Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Human validation is warranted because the change alters CSRF bypass and bearer-authentication filter ordering for client-administration mutations, requiring integration checks across deployed proxies, servlet containers, and legacy clients beyond MockMvc coverage.
No open issues 🎉
What changed in this PR
This pull request mitigates CSRF exposure on client administration endpoints by requiring CSRF validation for state-changing requests authenticated with the legacy access_token parameter, while allowing authenticated bearer-token requests to bypass CSRF protection.
Changes:
- Enables cookie-based CSRF protection for client administration mutations unless a non-empty bearer token is supplied.
- Adds MockMvc coverage for bearer, legacy parameter, session, invalid-token, and CSRF scenarios.
- Documents the updated authentication and CSRF requirements in generated API and client-authentication documentation.
| File | Description |
|---|---|
| uaa/src/test/java/org/cloudfoundry/identity/uaa/mock/clients/ClientAdminEndpointDocs.java | Adds generated API documentation coverage for client-admin mutations requiring CSRF protection. |
| uaa/src/test/java/org/cloudfoundry/identity/uaa/mock/clients/ClientAdminCsrfMockMvcTests.java | Adds comprehensive tests for client-admin CSRF enforcement and authentication behavior. |
| uaa/slateCustomizations/source/index.html.md.erb | Updates generated client administration API documentation with CSRF requirements and forbidden-response guidance. |
| server/src/main/java/org/cloudfoundry/identity/uaa/client/ClientAdminSecurityConfiguration.java | Configures CSRF protection for client administration endpoints with an exception for non-empty bearer authorization headers. |
| docs/UAA-Client-Authentication.md | Documents bearer-token and legacy access_token authentication requirements for client administration, including CSRF behavior. |
Review effort: Lite
This branch has not been deployed
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.
fix / mitigate
https://github.com/cloudfoundry/uaa/security/code-scanning/127