Skip to content
This repository was archived by the owner on Dec 20, 2025. It is now read-only.

Conversation

@rahul-chekuri
Copy link

  • 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

…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
```
@spinnakerbot
Copy link
Contributor

The following commits need their title changed:

  • b62f2c2: Add new GateBoot667ProfileFactory that emits the new gate config.

Please format your commit title into the form:

<type>(<scope>): <subject>, e.g. fix(kubernetes): address NPE in status check

This allows us to easily generate changelogs & determine semantic version numbers when cutting releases. You can read more about commit conventions here.

@rahul-chekuri rahul-chekuri force-pushed the oauth2-spring-scrty-5-properties branch from b62f2c2 to 2063e0d Compare April 3, 2025 08:32
…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 dbyron-sf closed this Oct 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants