Skip to content

[v2] auth: don't send scope with application credentials - #3917

Merged
stephenfin merged 3 commits into
v2from
bp-v2-3757679-ba083dd-9b1f896
Aug 10, 2026
Merged

stephenfin merged 3 commits into
v2from
bp-v2-3757679-ba083dd-9b1f896

Conversation

@gophercloud-backport-bot

Copy link
Copy Markdown

Backport: #3869

Fixes #3868

When authenticating with application credentials, ToTokenV3ScopeMap was including a project scope in the token request. Keystone rejects this with HTTP 401: Application credentials cannot request a scope.

Application credentials carry an implicit project scope already. The fix returns an empty scope map early when application credentials are present.

Links to OpenStack source confirming that scopes are rejected with application credentials:
https://opendev.org/openstack/keystone/src/branch/stable/2025.1/keystone/auth/plugins/application_credential.py

fwiesel and others added 3 commits August 7, 2026 13:11
Keystone returns 401 when a token request includes both application
credentials and an explicit scope. Application credentials carry an
implicit project scope already.

For #3868
@github-actions github-actions Bot added v2 This PR targets v2 edit:gophercloud This PR updates common Gophercloud code semver:patch No API change labels Aug 7, 2026
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 63.865% (+0.003%) from 63.862% — bp-v2-3757679-ba083dd-9b1f896 into v2

@stephenfin
stephenfin merged commit 3083843 into v2 Aug 10, 2026
16 checks passed
@stephenfin
stephenfin deleted the bp-v2-3757679-ba083dd-9b1f896 branch August 10, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

edit:gophercloud This PR updates common Gophercloud code semver:patch No API change v2 This PR targets v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants