authn-mappings: send OAuth bearer token, document user_access_manage scope | DAL-546 - #692
Merged
platinummonkey merged 2 commits intoJul 29, 2026
Conversation
…scope list/get already work with default scopes (user_access_read). Flip from make_api_no_auth! to make_api! so the OAuth bearer is actually sent for create/update/delete, and document the user_access_manage opt-in in the command help text, mirroring the existing logs-restriction pattern.
srosenthal-dd
marked this pull request as ready for review
July 29, 2026 00:37
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a25aad1e6f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- src/client.rs: the make_api_no_auth! macro-contract test used AuthNMappingsAPI as its vehicle type, which is no longer accurate now that authn_mappings.rs uses make_api!. Swapped to ApplicationSecurityAPI (ASM WAF custom rules), which is still genuinely no-auth today. - Added test_authn_mappings_list_accepts_oauth_bearer_token, which configures access_token only (no API/APP keys) and asserts the Authorization: Bearer header is sent -- the prior tests all used test_config's defaults (access_token: None), so the make_api_no_auth! -> make_api! change wasn't actually exercised by any test.
platinummonkey
approved these changes
Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pup authn-mappings {list,get,create,update,delete}frommake_api_no_auth!tomake_api!so the OAuth bearer is actually sent.create/update/deleterequireuser_access_manage, which is not requested by default -- mirrors the existinglogs-restrictionprecedent.Scope check
list/getrequireuser_access_read-- already in bothdefault_scopes()andread_only_scopes().create/update/deleterequireuser_access_manage-- intentionally not indefault_scopes()orread_only_scopes()(same treatment aslogs-restrictionwrites), since it's a broad/sensitive scope. Users must opt in withpup auth login --extra-scopes user_access_manage.Test plan
cargo test authn_mappingspassespup authn-mappings listworks with OAuth login, andcreate/update/deletework afterpup auth login --extra-scopes user_access_manageJira: DAL-546