[Spring Cloud Azure] Validate tfp/acr claim against configured user-flows in AadB2cResourceServerAutoConfiguration
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 76/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- azure, java, spring-boot
- Área
- authentication, backend
Línea de trabajo
Read AadB2cResourceServerAutoConfiguration.java and AadJwtClaimNames.java, then inspect the existing tests in AadB2cResourceServerAutoConfigurationTests.java. Trace how jwtDecoder builds its validators and how configured user flows are represented. Add coverage for matching tfp, the acr fallback, case-insensitive matching, and rejection of unconfigured flows; done when those cases pass.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Library name and version
com.azure.spring:spring-cloud-azure-autoconfigure 7.4.0
Describe the bug
In AadB2cTrustedIssuerRepository (AadB2cTrustedIssuerRepository.java (lines 43–60)), addB2cUserFlowIssuers() registers policy-specific issuer URIs (<baseUri>/tfp/<tenantId>/<userFlow>/v2.0/) for each configured entry in spring.cloud.azure.active-directory.b2c.user-flows, while addB2cIssuer() also registers the tenant-level issuer URI (<baseUri>/<tenantId>/v2.0/).
When Azure AD B2C tokens use the <baseUri>/<tenantId>/v2.0/ issuer format, the user flow name is carried in the tfp (or acr) claim rather than in the iss path. However, AadB2cResourceServerAutoConfiguration.jwtDecoder (AadB2cResourceServerAutoConfiguration.java (lines 93–118)) only configures validators for aud, tid, iss, and timestamps, and does not check the tfp / acr claim against the configured user-flows when user-flows is populated.
Expected behavior
When spring.cloud.azure.active-directory.b2c.user-flows is configured, AadB2cResourceServerAutoConfiguration.jwtDecoder should validate that the token's tfp (or fallback acr) claim matches one of the configured user flow names in properties.getUserFlows().values(), consistent with how addB2cUserFlowIssuers() scopes /tfp/ issuer URLs to the configured user-flows.
Actual behavior
Tokens using the <baseUri>/<tenantId>/v2.0/ issuer format are only checked against AadJwtIssuerValidator, tid, aud, and timestamps, without checking tfp or acr against properties.getUserFlows().values().
Proposed Improvement
- Add
TFP("tfp") andACR("acr") constants toAadJwtClaimNames.java. - In
AadB2cResourceServerAutoConfiguration.jwtDecoder, whenproperties.getUserFlows()is non-empty, add a validator checking thattfp(oracrwhentfpis absent) matches a configured user flow name (case-insensitively). - Add unit test coverage in
AadB2cResourceServerAutoConfigurationTests.java.
- Lenguaje dominante
- Java
- Estrellas
- 2.6k
- Forks
- 2.2k
- Merge medio
- 2 d 3 h
- PR fusionados (30 d)
- 230
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Azure/azure-sdk-for-java
-
[Spring Cloud Azure] Improve Javadoc and startup guidance for allowed-group-names vs allowed-group-ids in AadAuthenticationPropertiesPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoazure-spring azure-spring-aad Client
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Azure/azure-sdk-for-java#51046 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
mgmt, in track 1 migration guide, call out that file-based authentication method is not recommendedQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. AbiertoAzure.Identity
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
Azure/azure-sdk-for-java#48894 ·
Los mantenedores suelen responder en 1 día
-
[BUG] Cosmos: `byPage(token, size).next()` sends an extra speculative query for the next page (~2x queries/RU per page call)Posiblemente ocupada @FabianMeiswinkel la tomó hoy. AbiertoClient Cosmos customer-reported needs-team-attention question Service Attention
Azure/azure-sdk-for-java#51034 · 3 comentarios · 1 reacción · 2 asignados ·
Los mantenedores suelen responder en 1 día
-
[FEATURE REQ] Support minor version bump in patch release processPosiblemente ocupada @jairmyree la tomó hace 2 días. Abierto
Azure/azure-sdk-for-java#51013 · 1 reacción · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[BUG] Service Bus Java scheduleMessage does not retry a transient server-busy response despite maxRetries=3Posiblemente ocupada @EldertGrootenboer la tomó hace 1 día. AbiertoClient customer-reported needs-team-attention question Service Attention Service Bus
Dificultad 4/5 3-5 días Aptitud para principiantes 20/100
Azure/azure-sdk-for-java#51006 · 3 comentarios · 1 reacción · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de Azure/azure-sdk-for-java
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
IdentityArrayObjectSet iterator remove may throw ArrayIndexOutOfBoundsExceptionPosiblemente ocupada @jiteshkhatri11 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
javapathfinder/jpf-core#660 · 1 comentario ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
breaking change bug needs human review not ready priority medium size S
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
martin-francois/symphony-trello#1193 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día