This repository was archived by the owner on Dec 20, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 686
feat(OAuth2): Migrated OAuth2 configuration to align with Spring Security 5 Java DSL standards #2216
Closed
rahul-chekuri
wants to merge
14
commits into
spinnaker:master
from
rahul-chekuri:oauth2-spring-scrty-5-properties
Closed
feat(OAuth2): Migrated OAuth2 configuration to align with Spring Security 5 Java DSL standards #2216
rahul-chekuri
wants to merge
14
commits into
spinnaker:master
from
rahul-chekuri:oauth2-spring-scrty-5-properties
Conversation
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
…rity 5 Java DSL standards
- Replaced the legacy `security.authn.oauth2` structure with the new `spring.security.oauth2.client` configuration.
- Updated property mappings to conform to Spring Security 5's expectations.
- Ensured compatibility with existing `hal config security authn oauth2 edit` commands.
**Old Configuration that used get populated gate.yml:**
```
security:
authn:
oauth2:
enabled: true
client:
clientId: <client-id>
clientSecret: <client-secret>
accessTokenUri: https://www.googleapis.com/oauth2/v4/token
userAuthorizationUri: https://accounts.google.com/o/oauth2/v2/auth
scope: profile email
userInfoRequirements:
hd: <domain>
resource:
userInfoUri: https://www.googleapis.com/oauth2/v3/userinfo
userInfoMapping:
email: email
firstName: given_name
lastName: family_name
provider: GOOGLE
```
**New Configuration that gets populated in gate.yml (Aligned with Spring Security 5):**
```
spring:
security:
oauth2:
client:
registration:
google:
client-id: <client-id>
client-secret: <client-secret>
scope: profile,email
provider:
google:
authorization-uri: https://accounts.google.com/o/oauth2/auth
token-uri: https://oauth2.googleapis.com/token
user-info-uri: https://www.googleapis.com/oauth2/v3/userinfo
```
Commands remain unchanged:
```
hal config security authn oauth2 edit --provider google --client-id some_id --client-secret some_secret --user-info-requirements hd=company.io
```
dbyron-sf
reviewed
Apr 2, 2025
...ava/com/netflix/spinnaker/halyard/deploy/spinnaker/v1/profile/GateBoot667ProfileFactory.java
Outdated
Show resolved
Hide resolved
dbyron-sf
reviewed
Apr 2, 2025
...ava/com/netflix/spinnaker/halyard/deploy/spinnaker/v1/profile/GateBoot667ProfileFactory.java
Show resolved
Hide resolved
dbyron-sf
reviewed
Apr 2, 2025
...loy/src/main/java/com/netflix/spinnaker/halyard/deploy/spinnaker/v1/service/GateService.java
Outdated
Show resolved
Hide resolved
Contributor
|
The following commits need their title changed:
Please format your commit title into the form:
This allows us to easily generate changelogs & determine semantic version numbers when cutting releases. You can read more about commit conventions here. |
b62f2c2 to
2063e0d
Compare
…d redirect-uri to the new config.
…rity 5 Java DSL standards
- Replaced the legacy `security.authn.oauth2` structure with the new `spring.security.oauth2.client` configuration.
- Updated property mappings to conform to Spring Security 5's expectations.
- Ensured compatibility with existing `hal config security authn oauth2 edit` commands.
**Old Configuration that used get populated gate.yml:**
```
security:
authn:
oauth2:
enabled: true
client:
clientId: <client-id>
clientSecret: <client-secret>
accessTokenUri: https://www.googleapis.com/oauth2/v4/token
userAuthorizationUri: https://accounts.google.com/o/oauth2/v2/auth
scope: profile email
userInfoRequirements:
hd: <domain>
resource:
userInfoUri: https://www.googleapis.com/oauth2/v3/userinfo
userInfoMapping:
email: email
firstName: given_name
lastName: family_name
provider: GOOGLE
```
**New Configuration that gets populated in gate.yml (Aligned with Spring Security 5):**
```
spring:
security:
oauth2:
client:
registration:
google:
client-id: <client-id>
client-secret: <client-secret>
scope: profile,email
provider:
google:
authorization-uri: https://accounts.google.com/o/oauth2/auth
token-uri: https://oauth2.googleapis.com/token
user-info-uri: https://www.googleapis.com/oauth2/v3/userinfo
```
Commands remain unchanged:
```
hal config security authn oauth2 edit --provider google --client-id some_id --client-secret some_secret --user-info-requirements hd=company.io
```
…d redirect-uri to the new config.
…' into oauth2-spring-scrty-5-properties
dbyron-sf
reviewed
Apr 3, 2025
...c/test/groovy/com/netflix/spinnaker/halyard/deploy/spinnaker/v1/service/GateServiceTest.java
Show resolved
Hide resolved
dbyron-sf
reviewed
Apr 3, 2025
...com/netflix/spinnaker/halyard/deploy/spinnaker/v1/profile/GateBoot667ProfileFactoryTest.java
Outdated
Show resolved
Hide resolved
dbyron-sf
reviewed
Apr 3, 2025
...com/netflix/spinnaker/halyard/deploy/spinnaker/v1/profile/GateBoot667ProfileFactoryTest.java
Show resolved
Hide resolved
dbyron-sf
reviewed
Apr 3, 2025
...ava/com/netflix/spinnaker/halyard/deploy/spinnaker/v1/profile/GateBoot667ProfileFactory.java
Outdated
Show resolved
Hide resolved
dbyron-sf
reviewed
Apr 3, 2025
...loy/src/main/java/com/netflix/spinnaker/halyard/deploy/spinnaker/v1/service/GateService.java
Outdated
Show resolved
Hide resolved
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
security.authn.oauth2structure with the newspring.security.oauth2.clientconfiguration.hal config security authn oauth2 editcommands.Old Configuration that used get populated gate.yml:
New Configuration that gets populated in gate.yml (Aligned with Spring Security 5):
Commands remain unchanged: