DPoP InMemoryCache: document the request-rate ceiling implied by maxRequestsPerKey
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 62/100
- Tipo de issue
- Documentación
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- java, spring-boot
- Área
- authentication, documentation
Línea de trabajo
Encuentra la documentación de referencia de DPoP y el javadoc de DPoPProofReplayValidator.InMemoryCache que describe maxRequestsPerKey. Lee el valor predeterminado de clock-skew en DPoPProofJwtDecoderFactory, luego comprueba la fórmula de tasa, aproximadamente maxRequestsPerKey / clockSkew por segundo por nodo, contra los números del issue. Terminado cuando la documentación indique el límite superior y el efecto de warm-up; el mensaje de log distinto es un cambio de código y debería separarse. DPoPAuthenticationTests muestra cómo sobrescribir los límites para una prueba.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Expected Behavior
The DPoP reference documentation states the request-rate ceiling that DPoPProofReplayValidator.InMemoryCache's per-key limit implies for a single client key: about maxRequestsPerKey / clockSkew accepted requests per second per node. A request rejected because of that limit can be told apart from an invalid or replayed proof, for example by a distinct log message.
Current Behavior
Spring Security 7.1.2 (Spring Boot 4.1.2), one resource-server node, .dPoP(Customizer.withDefaults()), Keycloak 26.6.1 issuing DPoP-bound tokens. One client key sending unique proofs at a constant rate for 70 s:
| rate (req/s) | accepted | rejected (401) | first rejection | accepted, last 30 s |
|---|---|---|---|---|
| 24 | 1680 | 0 | – | 24.0 |
| 26 | 1802 | 18 | 39.4 s | 25.9 |
| 32 | 1976 | 264 | 31.8 s | 31.9 |
| 40 | 2015 | 785 | 25.0 s | 33.3 |
| 50 | 2012 | 1488 | 20.0 s | 33.3 |
With the defaults (maxRequestsPerKey = 1000, 30 s clock skew in DPoPProofJwtDecoderFactory), one client key is capped at about 33 accepted requests per second per node. Above about 25 req/s it is also rejected for a while after it starts, from t ≈ 1000/R, because its quota fills before its first entries expire. The 1000-per-key default is documented; the rate ceiling it implies is not.
Context
Replay protection itself works as intended; this is about availability for honest high-rate clients, such as a backend service that uses one DPoP key. The limit can be raised as in DPoPAuthenticationTests (an ObjectPostProcessor<DPoPAuthenticationProvider> that installs a DPoPProofJwtDecoderFactory built with createDefaultJwtValidatorFactory and a DPoPProofReplayValidator whose InMemoryCache has a larger setMaxRequestsPerKey). The ceiling then scales with both settings: the test's values (500 per key, 60 s skew) give about 8 req/s per key. Happy to submit a docs PR if this is welcome.
Minimal reproduction (Spring Boot app + Keycloak, one command), predictions committed before the run, and raw data: https://github.com/sergioemancinas/dpop-replay-threshold/tree/main/spring-7-followup
- Lenguaje dominante
- Java
- Estrellas
- 9.7k
- Forks
- 6.4k
- Merge medio
- 1 d 22 h
- PR fusionados (30 d)
- 49
Preparar el entorno
- 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 spring-projects/spring-security
-
status: waiting-for-triage type: enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
spring-projects/spring-security#19995 ·
Los mantenedores suelen responder en 1 día
-
status: waiting-for-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
spring-projects/spring-security#19984 ·
Los mantenedores suelen responder en 1 día
-
Spring-security-7.1.xsd schema validates request-matcher incorrectlyPosiblemente ocupada @suryakant-source la tomó hace 6 días. Abiertostatus: waiting-for-triage type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
spring-projects/spring-security#19981 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
status: waiting-for-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
spring-projects/spring-security#19963 ·
Los mantenedores suelen responder en 1 día
-
KerberosRestTemplate throws RestClientException when doExecute() returns nullPosiblemente ocupada @Lyin-OTTF la tomó hace 10 días. Abiertostatus: waiting-for-triage type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
spring-projects/spring-security#19935 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de spring-projects/spring-security
Issues similares
-
[BUG] micronaut-serde-oracle-jdbc-json brings a second OJDBC driver onto the runtime classpathPosiblemente ocupada @ZARAYACH la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
micronaut-projects/micronaut-serialization#1494 · 4 comentarios ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Los mantenedores suelen responder en 2 días
-
code-health feature/sync OS/Android QA/Test-Plan-Specified QA/Yes
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
brave/brave-browser#60327 ·
Los mantenedores suelen responder en 1 día
-
Type: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
it-at-m/raumreservierung#383 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
aws/context-ontology-accelerator#325 ·
Los mantenedores suelen responder en 1 día