change_password_upon_first_use does not work with Horizon deployed by Kolla-ansible

Bug #2073159 reported by Franciszek Przewoźny
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
kolla-ansible
Status tracked in Dalmatian
Antelope
Fix Committed
High
Unassigned
Bobcat
Fix Committed
High
Unassigned
Caracal
In Progress
High
Unassigned
Dalmatian
Fix Released
High
Franciszek Przewoźny

Bug Description

Hey,

As a disclaimer: most of the configuration is default, parameters related to endpoints are default.

With following option set in Keystone:

[security_compliance]
change_password_upon_first_use = True

Horizon redirects correctly to "Change password" screen, but it doesn't work.

From logs, it seems like the POST query is executed against http://HERE_IP:5000/users/a5e3b6a416234807a870897e88a3c365/password

2024-07-15 21:45:10.166568 DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): HERE_IP:5000
2024-07-15 21:45:10.178351 DEBUG:urllib3.connectionpool:http://HERE_IP:5000 "POST /users/a5e3b6a416234807a870897e88a3c365/password HTTP/1.1" 404 207
2024-07-15 21:45:10.178875 DEBUG:keystoneauth.session:Request returned failure status: 404
2024-07-15 21:45:10.179095 Unable to update password due to exception: Not Found (HTTP 404) (Request-ID: req-de6cf206-d160-41e3-81d2-14fde17d301a)

Manually checked endpoint with GET query, and it wasn't found:
# curl http://HERE_IP:5000/users/a5e3b6a416234807a870897e88a3c365/password
<!doctype html>
<html lang=en>
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>

But /v3 endpoint exist:
# curl http://HERE_IP:5000/v3/users/a5e3b6a416234807a870897e88a3c365/password
{"message": "The method is not allowed for the requested URL."}

So password change POST query should be executed against /v3 API.

With Horizon configuration overwritten, it works just fine:
OPENSTACK_KEYSTONE_URL = "http://HERE_IP:5000/v3"

I'm not sure here if Horizon should be reconfigured, or Keystone API endpoint should include /v3 in path.

Thank you,
Franciszek

tags: added: keystone
description: updated
Revision history for this message
Grzegorz Koper (koperg) wrote :

I've reproduced this issue.
In my opinion Horizon should be reconfigured to point to /v3 endpoint

Can be fixed similarly to :
https://review.opendev.org/c/openstack/kolla-ansible/+/893212

@fprzewozn: Would you like to try and contribute a fix ?

Changed in kolla-ansible:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Grzegorz Koper (koperg)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (master)
Changed in kolla-ansible:
status: Confirmed → In Progress
Changed in kolla-ansible:
assignee: Grzegorz Koper (koperg) → Franciszek Przewoźny (fprzewozn)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (master)

Reviewed: https://review.opendev.org/c/openstack/kolla-ansible/+/924487
Committed: https://opendev.org/openstack/kolla-ansible/commit/c0db4ac425756315497439cbaf1b4691f91b69e5
Submitter: "Zuul (22348)"
Branch: master

commit c0db4ac425756315497439cbaf1b4691f91b69e5
Author: Franciszek Przewozny <email address hidden>
Date: Fri Jul 19 12:41:57 2024 +0200

    Add /v3 suffix to OPENSTACK_KEYSTONE_URL

    Change I60162b54bc06e158534d29311d4474b34750c64d
    removed the '/v3' suffix from horizon_keystone_url variable,
    but the version is needed for some operations.
    This patch fixes the "Change password" Horizon function
    until Horizon bug #2073639 is resolved.

    Closes-Bug: #2073159
    Change-Id: I6ff46b47e9109d0757f2e5ce8019ba591b9892e1

Changed in kolla-ansible:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (stable/2024.1)

Fix proposed to branch: stable/2024.1
Review: https://review.opendev.org/c/openstack/kolla-ansible/+/926031

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on kolla-ansible (stable/2024.1)

Change abandoned by "Franciszek Przewoźny <email address hidden>" on branch: stable/2024.1
Review: https://review.opendev.org/c/openstack/kolla-ansible/+/926031

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (stable/2023.2)

Fix proposed to branch: stable/2023.2
Review: https://review.opendev.org/c/openstack/kolla-ansible/+/926032

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (stable/2023.1)

Fix proposed to branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/kolla-ansible/+/926033

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (stable/2023.1)

Reviewed: https://review.opendev.org/c/openstack/kolla-ansible/+/926033
Committed: https://opendev.org/openstack/kolla-ansible/commit/e8aa5d212441d3030b6a6224eccc5676f0574d67
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit e8aa5d212441d3030b6a6224eccc5676f0574d67
Author: Franciszek Przewozny <email address hidden>
Date: Fri Jul 19 12:41:57 2024 +0200

    Add /v3 suffix to OPENSTACK_KEYSTONE_URL

    Change I60162b54bc06e158534d29311d4474b34750c64d
    removed the '/v3' suffix from horizon_keystone_url variable,
    but the version is needed for some operations.
    This patch fixes the "Change password" Horizon function
    until Horizon bug #2073639 is resolved.

    Closes-Bug: #2073159
    Change-Id: I6ff46b47e9109d0757f2e5ce8019ba591b9892e1
    (cherry picked from commit c0db4ac425756315497439cbaf1b4691f91b69e5)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (stable/2023.2)

Reviewed: https://review.opendev.org/c/openstack/kolla-ansible/+/926032
Committed: https://opendev.org/openstack/kolla-ansible/commit/d2d846f6fdb6deac0f41b4785813d5b98d2ec21e
Submitter: "Zuul (22348)"
Branch: stable/2023.2

commit d2d846f6fdb6deac0f41b4785813d5b98d2ec21e
Author: Franciszek Przewozny <email address hidden>
Date: Fri Jul 19 12:41:57 2024 +0200

    Add /v3 suffix to OPENSTACK_KEYSTONE_URL

    Change I60162b54bc06e158534d29311d4474b34750c64d
    removed the '/v3' suffix from horizon_keystone_url variable,
    but the version is needed for some operations.
    This patch fixes the "Change password" Horizon function
    until Horizon bug #2073639 is resolved.

    Closes-Bug: #2073159
    Change-Id: I6ff46b47e9109d0757f2e5ce8019ba591b9892e1
    (cherry picked from commit c0db4ac425756315497439cbaf1b4691f91b69e5)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (stable/2024.1)

Reviewed: https://review.opendev.org/c/openstack/kolla-ansible/+/926031
Committed: https://opendev.org/openstack/kolla-ansible/commit/e77135b195d075adbe482897e0174026cc7eff8f
Submitter: "Zuul (22348)"
Branch: stable/2024.1

commit e77135b195d075adbe482897e0174026cc7eff8f
Author: Franciszek Przewozny <email address hidden>
Date: Fri Jul 19 12:41:57 2024 +0200

    Add /v3 suffix to OPENSTACK_KEYSTONE_URL

    Change I60162b54bc06e158534d29311d4474b34750c64d
    removed the '/v3' suffix from horizon_keystone_url variable,
    but the version is needed for some operations.
    This patch fixes the "Change password" Horizon function
    until Horizon bug #2073639 is resolved.

    Closes-Bug: #2073159
    Change-Id: I6ff46b47e9109d0757f2e5ce8019ba591b9892e1
    (cherry picked from commit c0db4ac425756315497439cbaf1b4691f91b69e5)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.