Manually exercise audit logged endpoints not in VERIFY_ENDPOINTS#10256
Merged
david-crespo merged 4 commits intomainfrom Apr 14, 2026
Merged
Manually exercise audit logged endpoints not in VERIFY_ENDPOINTS#10256david-crespo merged 4 commits intomainfrom
VERIFY_ENDPOINTS#10256david-crespo merged 4 commits intomainfrom
Conversation
Move the uncovered-audit-log-endpoints.txt and audited-get-endpoints.txt snapshot files into hardcoded BTreeMaps in the test code. Comments explaining each exception are now regular Rust comments. Add staleness detection for allowlist entries that no longer apply.
d59444b to
db2061c
Compare
david-crespo
commented
Apr 9, 2026
| client_id: uuid::Uuid::nil(), | ||
| })), | ||
| ) | ||
| .await; |
Contributor
Author
There was a problem hiding this comment.
Had a look at why each of the above is not in VERIFY_ENDPOINTS — a couple of of them could actually move there, but mostly they're not in there because it's noisy to change the test to accommodate these weird request bodies.
login_local: JSON body, could movelogin_saml: UntypedBody, not JSONlogout: no bodydevice_auth_request: URL-encoded bodydevice_auth_confirm: JSON body, could movedevice_access_token: URL-encoded body
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.
Sensitivity checks
Had the robot manually trigger various failure scenarios to make sure the tests catch them and the error messages give clear instructions about what to do.
audit_and_timefromproject_create. Test flags it with instructions to add audit logging or add it to the allowlist.check_manualcall forlogoutand removed it fromallowed_unaudited. Caught viauntested_mutating. (This is the bug the last commit fixes.)bogus_endpointtoallowed_unaudited. Test panics with "Stale allowed_unaudited entry ... remove it from the list."logoutpath to/v1/logoutt. Test fails with "allowed_unaudited entry for logout has wrong method/path."Background
@inickles asked me about
login_localandlogin_samlwhy they're listed as uncovered even though they have audit logging.omicron/nexus/tests/output/uncovered-audit-log-endpoints.txt
Lines 1 to 12 in 831e013
The reason is when we test audit log coverage, we piggyback on top of the list of endpoints that is used for verifying authorization in order to have a nice list of valid request bodies for each endpoint.
login_localandlogin_samlaren't in there because they are technically unauthenticated in the usual sense — the contents of the request body are what authenticates the endpoint.omicron/nexus/tests/integration_tests/endpoints.rs
Lines 1768 to 1800 in 831e013
But it's a short list of endpoints that we're failing to exercise, so we can call them by hand in the test.