Skip to content
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 7 commits into from
Sep 20, 2023

Conversation

strehle
Copy link
Member

@strehle strehle commented Aug 25, 2023

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.

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.
@cf-gitbot
Copy link

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.

@strehle strehle requested review from a team August 25, 2023 14:34
@strehle strehle added the in_review The PR is currently in review label Sep 14, 2023
@strehle
Copy link
Member Author

strehle commented Sep 14, 2023

@Tallicia can you please ask a colleague to check this PR

@hsinn0
Copy link
Contributor

hsinn0 commented Sep 15, 2023

@Tallicia can you please ask a colleague to check this PR

I am looking into this.

@strehle strehle requested a review from hsinn0 September 18, 2023 14:42
@strehle strehle added scheduled and removed in_review The PR is currently in review labels Sep 19, 2023
@strehle strehle added this to the 76.22.0 milestone Sep 19, 2023
@strehle strehle merged commit 463ee93 into develop Sep 20, 2023
20 checks passed
@strehle strehle deleted the fix/no-empty-secret branch September 20, 2023 16:44
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
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Missing secret attribute in UAA YAML must not be used for any default passwords
4 participants