KNOX-3272: Improved OAuth flow checks and return 401 in case of missing client ID or invalid client secret#1170
Merged
smolnar82 merged 1 commit intoapache:masterfrom Mar 6, 2026
Merged
Conversation
…ng client ID or invalid client secret
Test Results7 tests 7 ✅ 1s ⏱️ Results for commit 13415ba. |
hanicz
approved these changes
Mar 6, 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.
KNOX-3272 - Client credential flow validation issues
What changes were proposed in this pull request?
This PR fixes two things:
client_secret, the response code is 401 (it was 400)client_idHow was this patch tested?
Updated existing JUnit tests and added a new one to cover point 2.) from above.
I also ran some manual testing:
First, I added the
CLIENTIDservice to thesandboxtopology, and acquired a client_id/client_secret pairThen I validated my changes. I created a new
tokenbasedtopology with theKNOXTOKENservice (that simulates the protected backend service):Tried to get a token without
client_id:Tried to get a token with an invalid
client_secret(note thesmolnar_prefix):Tested the happy path too:
Integration Tests
N/A
UI changes
N/A