-
Notifications
You must be signed in to change notification settings - Fork 828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: do not default a missing secret to an empty one #2455
Merged
Merged
Conversation
This file contains 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
If client has no secret set, then configuration should have no secret Before: a missing secret was set as empty and this empty secret can be used even with client credential. After: a missing secret is null in DB layer so that you cannot do secret based login. There are other authentications so that the client is still usable.
We have created an issue in Pivotal Tracker to manage this: https://www.pivotaltracker.com/story/show/185909308 The labels on this github issue will be updated when the story is started. |
server/src/main/java/org/cloudfoundry/identity/uaa/client/UaaClient.java
Show resolved
Hide resolved
server/src/main/java/org/cloudfoundry/identity/uaa/client/UaaClient.java
Outdated
Show resolved
Hide resolved
...ava/org/cloudfoundry/identity/uaa/security/UaaUsingDelegatingPasswordEncoderMockMvcTest.java
Show resolved
Hide resolved
@Tallicia can you please ask a colleague to check this PR |
I am looking into this. |
hsinn0
reviewed
Sep 15, 2023
...n/java/org/cloudfoundry/identity/uaa/authentication/ClientDetailsAuthenticationProvider.java
Outdated
Show resolved
Hide resolved
hsinn0
approved these changes
Sep 18, 2023
strehle
added a commit
that referenced
this pull request
Oct 25, 2023
This fixes client creation rest call with empty secret. Empty client secret is allowed via YAML setting already, but in a REST call there is an error: Client Secret must be at least 1 characters in length. Why this occurs: There is a policy validator for user and client policy validation. For users, a minimum of 1 char for a password might be ok, for a client not. A secret can be empty. Before 76.22.0 a missing secret in a client creation call was defaulted to an empty secret, but with #2455 this was fixed. The fix prevented the creation with an empty secret. Therefore, this here is a fix for a regression introduced with 76.22.0. It simply prevents the policy validation if the secret is without text (null or empty).
strehle
added a commit
that referenced
this pull request
Oct 25, 2023
This fixes client creation rest call with empty secret. Empty client secret is allowed via YAML setting already, but in a REST call there is an error: Client Secret must be at least 1 characters in length. Why this occurs: There is a policy validator for user and client policy validation. For users, a minimum of 1 char for a password might be ok, for a client not. A secret can be empty. Before 76.22.0 a missing secret in a client creation call was defaulted to an empty secret, but with #2455 this was fixed. The fix prevented the creation with an empty secret. Therefore, this here is a fix for a regression introduced with 76.22.0. It simply prevents the policy validation if the secret is without text (null or empty).
strehle
added a commit
that referenced
this pull request
Oct 25, 2023
This fixes client creation rest call with empty secret. Empty client secret is allowed via YAML setting already, but in a REST call there is an error: Client Secret must be at least 1 characters in length. Why this occurs: There is a policy validator for user and client policy validation. For users, a minimum of 1 char for a password might be ok, for a client not. A secret can be empty. Before 76.22.0 a missing secret in a client creation call was defaulted to an empty secret, but with #2455 this was fixed. The fix prevented the creation with an empty secret. Therefore, this here is a fix for a regression introduced with 76.22.0. It simply prevents the policy validation if the secret is without text (null or empty).
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.
If client has no secret set, then configuration should have no secret
Before: a missing secret was set as empty and this empty secret can be used even with client credential. After: a missing secret is null in DB layer so that you cannot do secret based login. There are other authentications so that the client is still usable.