cloudfoundry / cloudfoundry/uaa
Fix and improve configuration validation when using the `strict` profile
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 844
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 27
Description
Issue
Running with the strict profile fails, for example in the local env with cargo. This is due to some new, valid properties were introduced but are not reflected in the UaaConfiguration class, which is out of date. To verify, run:
./gradlew '-Dspring.profiles.active=strict' run
The app will fail to start. Check uaa/build/reports/tests/uaa-server.log:
[...]
Unable to find property 'external_groups' on class: org.cloudfoundry.identity.uaa.impl.config.UaaConfiguration$Scim
in 'string', line 20, column 20:
external_groups: ['organizations.acme|cn=test_org ...
[...]
Next steps
- gh-3262 partially addresses this, to ensure . It makes sure the validation logic does not trip up when running UAA with
cargo/uaa.yml. However, that PR does not look at the business logic of validating properties. - We should ensure that we have proper validation of the configuration.
- When migrating to Java config and the Boot 3+, we should Spring Boot's facilities for validating configuration: use
@ConfigurationPropertiesobject and do our validation there, removing the need for a dedicatedYamlConfigurationValidator.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the UaaConfiguration class and the dedicated YamlConfigurationValidator, then run ./gradlew '-Dspring.profiles.active=strict' run and inspect uaa/build/reports/tests/uaa-server.log. Compare the strict profile properties with the configuration model and existing validation behavior. Done means valid properties no longer prevent startup and configuration validation remains properly enforced.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100