JDBC session store: InvalidClassException on SecurityContextImpl after Spring Security upgrade (similar to #181, but for SPRING_SESSION_ATTRIBUTES)
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
Línea de trabajo
Start with UaaJdbcSessionConfig and the SPRING_SESSION_ATTRIBUTES.ATTRIBUTE_BYTES serialization path, then compare the JSON-based UaaTokenStore approach from #181. Reproduce the rolling-upgrade failure with an existing JDBC session, and confirm that the session conversion service or serializer can read both SecurityContextImpl versions. Done means old and new sessions remain usable across the upgrade and a regression test covers both serialization directions.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
With servlet.session-store: database, sessions are stored by Spring Session JDBC using JDK serialization. After upgrading UAA to a version with a different Spring Security minor, any request carrying an existing JSESSIONID fails:
at org.springframework.session.jdbc.JdbcIndexedSessionRepository.deserialize
at ...JdbcSession.getAttribute
at ...HttpSessionSecurityContextRepository.loadContext
Caused by: java.io.InvalidClassException: org.springframework.security.core.context.SecurityContextImpl;
local class incompatible: stream classdesc serialVersionUID = 580, local class serialVersionUID = 620
The same happens in both directions during a rolling update. The Thymeleaf error template also reads the session, so the error page fails to render too (TemplateOutputException).
#181 fixed this for oauth_code by storing JSON (UaaTokenStore). SPRING_SESSION_ATTRIBUTES.ATTRIBUTE_BYTES has the same problem. UaaJdbcSessionConfig does not configure a springSessionConversionService or any serializer.
UAA Version - 78.9.0
Full log -
org.thymeleaf.exceptions.TemplateOutputException: An error happened during template rendering
...
Caused by: org.springframework.core.convert.ConversionFailedException: Failed to convert from type [byte[]] to type [java.lang.Object] for value [{...}]
...
at org.springframework.session.jdbc.JdbcIndexedSessionRepository.deserialize(JdbcIndexedSessionRepository.java:689)
at org.springframework.session.jdbc.JdbcIndexedSessionRepository$JdbcSession.getAttribute(JdbcIndexedSessionRepository.java:801)
at org.springframework.session.web.http.HttpSessionAdapter.getAttribute(HttpSessionAdapter.java:102)
at org.springframework.security.web.context.HttpSessionSecurityContextRepository.readSecurityContextFromSession(HttpSessionSecurityContextRepository.java:212)
at org.springframework.security.web.context.HttpSessionSecurityContextRepository.loadContext(HttpSessionSecurityContextRepository.java:126)
...
Caused by: org.springframework.core.serializer.support.SerializationFailedException: Failed to deserialize payload. Is the byte array a result of corresponding serialization for DefaultDeserializer?
...
Caused by: java.io.InvalidClassException: org.springframework.security.core.context.SecurityContextImpl; local class incompatible: stream classdesc serialVersionUID = 580, local class serialVersionUID = 620```
- Lenguaje dominante
- Java
- Estrellas
- 1.6k
- Forks
- 847
- Merge medio
- 2 d 1 h
- PR fusionados (30 d)
- 48
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 cloudfoundry/uaa
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
cloudfoundry/uaa#4194 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
cloudfoundry/uaa#4156 ·
Los mantenedores suelen responder en 1 día
-
Support named allowed-resource policies for mTLS clientsPosiblemente ocupada @strehle la tomó hace 24 días. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
cloudfoundry/uaa#4125 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
cloudfoundry/uaa#4086 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
cloudfoundry/uaa#3735 ·
Los mantenedores suelen responder en 1 día
Todos los issues de cloudfoundry/uaa
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
testng-team/testng#3672 ·
Los mantenedores suelen responder en 1 día
-
triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
eclipse-edc/IdentityHub#1296 ·
Los mantenedores suelen responder en 1 día
-
ui: 進捗状況線ダイアログが日本語表示で英語のままAbiertoarea: ui priority: medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
tetsuji16/microProject#1721 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
[Bug] [BanyanDB] timestamp.ParseDuration silently drops everything after "d"Posiblemente ocupada @soujasK la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
apache/skywalking#14287 ·
Los mantenedores suelen responder en 1 día