)]}'
{"id":"openstack%2Fkeystone~909256","triplet_id":"openstack%2Fkeystone~stable%2F2023.2~I8c45131b298ceae7b43b42e2c5df167607d18c48","project":"openstack/keystone","branch":"stable/2023.2","topic":"appcred-validation-speed2-stable/2023.2","attention_set":{},"removed_from_attention_set":{"21107":{"account":{"_account_id":21107,"name":"Trent Lloyd","email":"trent.lloyd@canonical.com","username":"lathiat"},"last_update":"2024-03-14 16:45:20.000000000","reason":"Change was submitted"}},"hashtags":[],"change_id":"I8c45131b298ceae7b43b42e2c5df167607d18c48","subject":"Improve application credential validation speed","status":"MERGED","created":"2024-02-20 04:56:27.000000000","updated":"2024-03-14 16:48:59.000000000","submitted":"2024-03-14 16:45:20.000000000","submitter":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"total_comment_count":0,"unresolved_comment_count":0,"has_review_started":true,"submission_id":"909256-appcred-validation-speed2-stable/2023.2","cherry_pick_of_change":880456,"cherry_pick_of_patch_set":4,"meta_rev_id":"d7ba55a93cecfa6531d3b611f07fbb2d3c0d47a6","_number":909256,"virtual_id_number":909256,"owner":{"_account_id":21107,"name":"Trent Lloyd","email":"trent.lloyd@canonical.com","username":"lathiat"},"actions":{},"labels":{"Verified":{"approved":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"all":[{"value":0,"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},{"value":0,"_account_id":7414,"name":"David Wilde","email":"dwilde@redhat.com","username":"d34dh0r53"},{"tag":"autogenerated:zuul:gate","value":2,"date":"2024-03-14 16:45:20.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-2":"Fails","-1":"Doesn\u0027t seem to work"," 0":"No score","+1":"Works for me","+2":"Verified"},"description":"","default_value":0,"optional":true},"Code-Review":{"approved":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"all":[{"value":2,"date":"2024-03-08 15:37:35.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},{"value":2,"date":"2024-03-14 14:24:25.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":7414,"name":"David Wilde","email":"dwilde@redhat.com","username":"d34dh0r53"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-2":"Do not merge","-1":"This patch needs further work before it can be merged"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me (core reviewer)"},"description":"","default_value":0,"optional":true},"Workflow":{"approved":{"_account_id":7414,"name":"David Wilde","email":"dwilde@redhat.com","username":"d34dh0r53"},"all":[{"value":0,"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},{"value":1,"date":"2024-03-14 14:24:25.000000000","permitted_voting_range":{"min":1,"max":1},"_account_id":7414,"name":"David Wilde","email":"dwilde@redhat.com","username":"d34dh0r53"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-1":"Work in progress"," 0":"Ready for reviews","+1":"Approved"},"description":"","default_value":0,"optional":true}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":7414,"name":"David Wilde","email":"dwilde@redhat.com","username":"d34dh0r53"},{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2024-02-20 05:29:43.000000000","updated_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"reviewer":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"state":"CC"},{"updated":"2024-02-20 06:43:22.000000000","updated_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"reviewer":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"state":"REVIEWER"},{"updated":"2024-03-08 15:37:35.000000000","updated_by":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"reviewer":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"state":"REVIEWER"},{"updated":"2024-03-14 14:24:25.000000000","updated_by":{"_account_id":7414,"name":"David Wilde","email":"dwilde@redhat.com","username":"d34dh0r53"},"reviewer":{"_account_id":7414,"name":"David Wilde","email":"dwilde@redhat.com","username":"d34dh0r53"},"state":"REVIEWER"}],"messages":[{"id":"c94f145501c81c8f48b0d9f585dc30690a5312ed","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":21107,"name":"Trent Lloyd","email":"trent.lloyd@canonical.com","username":"lathiat"},"date":"2024-02-20 04:56:27.000000000","message":"Patch Set 1: Cherry Picked from branch master.","accounts_in_message":[],"_revision_number":1},{"id":"b62a5b17599a4ca45293c3eb9629bf8bdaa45140","tag":"autogenerated:zuul:check-arm64","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2024-02-20 05:29:43.000000000","message":"Patch Set 1:\n\nBuild succeeded (ARM64 pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/ae2359c81dde405eb471bf7049206909\n\n- openstack-tox-py38-arm64 https://zuul.opendev.org/t/openstack/build/b03374e504914624a22a40d7fe363553 : SUCCESS in 10m 20s (non-voting)\n- openstack-tox-py39-arm64 https://zuul.opendev.org/t/openstack/build/3fdfb6d986b14be09f0db718f9fcbb01 : SUCCESS in 31m 37s (non-voting)","accounts_in_message":[],"_revision_number":1},{"id":"e335fdd26a2c0c404c41c2b9a4d1a44730db77ba","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2024-02-20 06:43:22.000000000","message":"Patch Set 1: Verified+1\n\nBuild succeeded (check pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/e646267c2ed145dd95bbfbac29f6c0e1\n\n- openstack-tox-cover https://zuul.opendev.org/t/openstack/build/39580c593ddc430095fae338f1134158 : SUCCESS in 13m 00s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/49216639b7444d4cac5bcd0912e55715 : SUCCESS in 4m 39s\n- openstack-tox-py38 https://zuul.opendev.org/t/openstack/build/a182ce2dc08e49afa78e74e9473bd684 : SUCCESS in 11m 28s\n- openstack-tox-py39 https://zuul.opendev.org/t/openstack/build/1c44483729224e488aeb4cc728da43dd : SUCCESS in 13m 05s\n- openstack-tox-py310 https://zuul.opendev.org/t/openstack/build/89226e1b7f6c4003adff97a8f7a0730d : SUCCESS in 11m 23s\n- openstack-tox-py311 https://zuul.opendev.org/t/openstack/build/b65062448a28423aa35a07c746373681 : RETRY_LIMIT in 1m 36s (non-voting)\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/e4cfc4dba96a4d55939787d27503fcfc : SUCCESS in 11m 06s\n- grenade https://zuul.opendev.org/t/openstack/build/6239bf7ca728430ba87d87e547213e30 : SUCCESS in 42m 34s\n- tempest-full-py3 https://zuul.opendev.org/t/openstack/build/9cbd1a2447eb463c8dc008f16890f90c : SUCCESS in 1h 34m 53s\n- keystone-dsvm-py3-functional https://zuul.opendev.org/t/openstack/build/ac9a35c03adf45d7ba9ee323e4f807e6 : SUCCESS in 36m 43s\n- keystone-dsvm-py3-functional-fips https://zuul.opendev.org/t/openstack/build/fb0f8c460148413bacb7943fbf9cf505 : SUCCESS in 25m 14s (non-voting)\n- keystone-dsvm-py3-functional-federation-ubuntu-jammy https://zuul.opendev.org/t/openstack/build/67920cead9e64617857d2508fe289a2b : FAILURE in 25m 28s (non-voting)\n- keystone-dsvm-py3-functional-federation-ubuntu-jammy-k2k https://zuul.opendev.org/t/openstack/build/d44efa4bfa5c4a49875b4a3dffa86a8f : SUCCESS in 38m 17s\n- keystoneclient-devstack-functional https://zuul.opendev.org/t/openstack/build/4b129af1143b42a6a7b08a4bb7a71642 : SUCCESS in 19m 36s (non-voting)\n- keystone-dsvm-ldap-domain-specific-driver https://zuul.opendev.org/t/openstack/build/af6419e58b264574b0517d315a423b9b : FAILURE in 11m 50s (non-voting)\n- tempest-ipv6-only https://zuul.opendev.org/t/openstack/build/9487c3545f1e4ca7aafc2f6dad152349 : SUCCESS in 49m 45s","accounts_in_message":[],"_revision_number":1},{"id":"ba82520e9c593c0b0f2b328759554d7d449d81dd","author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"date":"2024-03-08 15:37:35.000000000","message":"Patch Set 1: Code-Review+2","accounts_in_message":[],"_revision_number":1},{"id":"a5d6961cb09cc0f58923e953596865301e18e31a","author":{"_account_id":7414,"name":"David Wilde","email":"dwilde@redhat.com","username":"d34dh0r53"},"date":"2024-03-14 14:24:25.000000000","message":"Patch Set 1: Code-Review+2 Workflow+1","accounts_in_message":[],"_revision_number":1},{"id":"6085166dea1eb7c737ba78afcc58cdbd46784875","tag":"autogenerated:zuul:gate","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2024-03-14 14:25:01.000000000","message":"Patch Set 1: -Verified\n\nStarting gate jobs.","accounts_in_message":[],"_revision_number":1},{"id":"d8e810aa32fba4d8cab1142a942099166668ec5a","tag":"autogenerated:zuul:gate","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2024-03-14 16:45:20.000000000","message":"Patch Set 1: Verified+2\n\nBuild succeeded (gate pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/e546da56448f4df19ed05f5033c521a7\n\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/d49b515c85074b509df7440aead58c71 : SUCCESS in 6m 12s\n- openstack-tox-py38 https://zuul.opendev.org/t/openstack/build/e23cbdb1f42744eda13105ad0f4c96c1 : SUCCESS in 12m 43s\n- openstack-tox-py39 https://zuul.opendev.org/t/openstack/build/bf2689189ecb4cecbe742a6ac9d817a3 : SUCCESS in 17m 30s\n- openstack-tox-py310 https://zuul.opendev.org/t/openstack/build/0e7e5498d19b45d392f775be56ab94eb : SUCCESS in 12m 17s\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/ffd9c199b7294be7bc789db6098d9d51 : SUCCESS in 14m 45s\n- grenade https://zuul.opendev.org/t/openstack/build/6f5e66b1511043adbb6ab6b580b6425e : SUCCESS in 53m 48s\n- tempest-full-py3 https://zuul.opendev.org/t/openstack/build/7d8474e0e6f949f4ad5ef894c86d7951 : SUCCESS in 1h 29m 24s\n- keystone-dsvm-py3-functional https://zuul.opendev.org/t/openstack/build/a31968f8beba43c480883d029ccbca1c : SUCCESS in 31m 14s\n- keystone-dsvm-py3-functional-federation-ubuntu-jammy-k2k https://zuul.opendev.org/t/openstack/build/4be8ff9c883e478b8e413e879d6a1c5a : SUCCESS in 37m 40s\n- tempest-ipv6-only https://zuul.opendev.org/t/openstack/build/ecdc44423a2143d7bb68edfd01b824da : SUCCESS in 56m 34s","accounts_in_message":[],"_revision_number":1},{"id":"ecd8869364ed35135737afb8fff17d2bf47f381e","tag":"autogenerated:gerrit:merged","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2024-03-14 16:45:20.000000000","message":"Change has been successfully merged","accounts_in_message":[],"_revision_number":1},{"id":"d7ba55a93cecfa6531d3b611f07fbb2d3c0d47a6","tag":"autogenerated:zuul:promote","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2024-03-14 16:48:59.000000000","message":"Patch Set 1:\n\nBuild succeeded (promote pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/36c5532b29c244b2832e1b1983dcf578\n\n- promote-openstack-tox-docs https://zuul.opendev.org/t/openstack/build/902f1f6674ec4f0dac23b98b954ca143 : SUCCESS in 1m 54s","accounts_in_message":[],"_revision_number":1}],"current_revision_number":1,"current_revision":"932863b6db39d684c807ab7efc8dd0bee48be445","revisions":{"932863b6db39d684c807ab7efc8dd0bee48be445":{"kind":"REWORK","_number":1,"created":"2024-02-20 04:56:27.000000000","uploader":{"_account_id":21107,"name":"Trent Lloyd","email":"trent.lloyd@canonical.com","username":"lathiat"},"ref":"refs/changes/56/909256/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/keystone","ref":"refs/changes/56/909256/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/keystone refs/changes/56/909256/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/keystone refs/changes/56/909256/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/keystone refs/changes/56/909256/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/keystone refs/changes/56/909256/1"}}},"commit":{"parents":[{"commit":"5a55e9de15c7f390e43addc5f3ff1a4809ec1a5b","subject":"Normalize policy checks for domain-scoped tokens","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/keystone/commit/5a55e9de15c7f390e43addc5f3ff1a4809ec1a5b"}]}],"author":{"name":"Trent Lloyd","email":"trent.lloyd@canonical.com","date":"2024-01-02 08:46:24.000000000","tz":0},"committer":{"name":"Trent Lloyd","email":"trent.lloyd@canonical.com","date":"2024-02-20 04:56:27.000000000","tz":0},"subject":"Improve application credential validation speed","message":"Improve application credential validation speed\n\nValidating an application credential token is very slow, taking at least\n400ms+ in a simple devstack environment, 5-10x longer than validating a\nuser/password project token.\n\nThe primary bottleneck during a token validation request\n(/v3/auth/tokens) is that token.roles is evaluated at least 5 times.\nvalidate_token is called twice, first during RBAC to populate the\nsubject token context and again to actually validate the token. Each\ncall to validate_token then called token.roles twice because it first\nchecks if it is None, before calling it again to use the result. Lastly\ntoken.roles is evaluated a fifth time during\nrender_token_response_from_model.\n\nEach evaluation of token.roles calls through\n_get_application_credential_roles into list_role_assignments which then\nmakes multiple round-trip SQL queries to the database.\n\nUnlike the related get_roles_for_user_and_project function, none of\nthese calls are currently cached/memoized. We memoize\nlist_role_assignments to get the same-speedup.\n\nReduce the number of token.roles calls to only 3 by storing and re-using\nthe token.roles result in validate_token, then memoize\nlist_role_assignments so the 2nd and 3rd call fetch from the cache\ninstead of repeating many SQL queries.\n\nThis provides a substantial performance improvement bringing validation\ntime in-line with user/password tokens.\n\nChange-Id: I8c45131b298ceae7b43b42e2c5df167607d18c48\n(cherry picked from commit 67b5cca032c36ef67a8aee9db6adada9b403dc5c)\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/keystone/commit/932863b6db39d684c807ab7efc8dd0bee48be445"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/keystone/commit/932863b6db39d684c807ab7efc8dd0bee48be445"}]},"branch":"refs/heads/stable/2023.2"}},"requirements":[],"submit_records":[{"rule_name":"gerrit~DefaultSubmitRule","status":"CLOSED","labels":[{"label":"Verified","status":"MAY","applied_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}},{"label":"Code-Review","status":"MAY","applied_by":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"}},{"label":"Workflow","status":"MAY","applied_by":{"_account_id":7414,"name":"David Wilde","email":"dwilde@redhat.com","username":"d34dh0r53"}}]}],"submit_requirements":[{"name":"Verified","description":"Verified in gate by CI","status":"SATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Verified\u003dMAX AND -label:Verified\u003dMIN","fulfilled":true,"status":"PASS","passing_atoms":["label:Verified\u003dMAX"],"failing_atoms":["label:Verified\u003dMIN"],"atom_explanations":{}}},{"name":"Code-Review","description":"Code reviewed by core reviewer","status":"SATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Code-Review\u003dMAX AND -label:Code-Review\u003dMIN","fulfilled":true,"status":"PASS","passing_atoms":["label:Code-Review\u003dMAX"],"failing_atoms":["label:Code-Review\u003dMIN"],"atom_explanations":{}}},{"name":"Workflow","description":"Approved for gate by core reviewer","status":"SATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Workflow\u003dMAX AND -label:Workflow\u003dMIN","fulfilled":true,"status":"PASS","passing_atoms":["label:Workflow\u003dMAX"],"failing_atoms":["label:Workflow\u003dMIN"],"atom_explanations":{}}}]}
