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

Abierto
#4,394 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
java, spring-boot

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Java
Estrellas
4.9k
Forks
3.5k
Merge medio
1 d 13 h
PR fusionados (30 d)
14

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de spring-cloud/spring-cloud-gateway

Todos los issues de spring-cloud/spring-cloud-gateway

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.