org.springframework.boot.autoconfigure.security.oauth2.client.OAuth2ClientProperties.Provider class lacks end-session-endpoint-uri

Aperta
#4,394 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
java, spring-boot

Direzione di ricerca

Start by reading the OAuth2 client property definitions and the OIDC logout handler configuration in Spring Cloud Gateway. Trace how provider properties become a ClientRegistration, especially how issuer discovery supplies the end-session endpoint. Done when a provider can configure that endpoint without issuer-uri and logout uses it; the issue does not name specific files or tests.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

waiting for feedback

We are using Spring Authorization Server and Spring Gateway in our microservice environment.

If I config the gateway as:

spring:
  security:
    oauth2:
      client:
        registration:
          gateway-client:
            provider: auth-service
            client-id: OUR_CLIENT_ID
            client-secret: OUR_CLIENT_SECRET
            authorization-grant-type: authorization_code
            client-authentication-method: client_secret_basic
            redirect-uri: '{baseUrl}/login/oauth2/code/{registrationId}'
            client-name: gateway-client
        provider:
          auth-service:
            issuer-uri: ${auth-server-base-uri}
            authorization-uri: ${auth-server-base-uri}/oauth2/authorize
            jwk-set-uri: ${auth-server-base-uri}/oauth2/jwks
            token-uri: ${auth-server-base-uri}/oauth2/token
            user-info-uri: ${auth-server-base-uri}/userinfo
            user-name-attribute: sub

everything almost works fine, as that "issuer-uri" enables discovery of endpoints including end-session-endpoint.
But that leads to a dependency, so authorization server must always be started (and healthy) before gateway service.

If I remove that issuer-uri almost everything works fine (and that annoying dependency will be gone), except logging out of the system. because ClientRegistration is not fetched through discovery (issuer-uri). there is no simple way to configure OidcClientInitiatedServerLogoutSuccessHandler to have proper end-session-endpoint (or I couldn't find it).

it would be great that somehow configure the discovery of endpoints on first time they are needed, not on startup.

Lingua principale
Java
Stelle
4.9k
Fork
3.5k
Merge medio
1g 13h
PR unite (30g)
14

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di spring-cloud/spring-cloud-gateway

Tutte le issue di spring-cloud/spring-cloud-gateway

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.