oAuth 2 clients may break with SpringBoot 3
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 22/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- java, spring-boot
- Bereich
- authentication
Rechercherichtung
The mapping from the ProvisionedService ClientAuthenticationMethod field to spring.security.oauth2.client.registration.[registrationId].client-authentication-method happens in the spring-cloud-bindings library, so start there where the string is converted to a ClientAuthenticationMethod. Reproduce with a Spring Boot 3 app that uses a deprecated value such as basic or post and confirm the OAuth2 callback fails. Done means legacy values resolve to valid Spring Security instances without changing the shared ProvisionedService for other apps; the issue thread has no agreed fix, so check with maintainers first.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Depending on the value set by an oAuth2 ProvisionedService for the ClientAuthenticationMethod field, SpringBoot 3 apps may break when acting as an oAuth2 client. The value of this field gets mapped verbatim to the Spring spring.security.oauth2.client.registration.[registrationId].client-authentication-method property via the spring-cloud-bindings library when using service binding.
Internally, this value gets converted to a ClientAuthenticationMethod instance. This works fine for SpringBoot 2.7.x and below as the class maps the following Strings to defaulted instances (Note: the values allowed in the ClientRegistration resource are deprecated):
@Deprecated
public static final ClientAuthenticationMethod BASIC = new ClientAuthenticationMethod("basic");
public static final ClientAuthenticationMethod CLIENT_SECRET_BASIC = new ClientAuthenticationMethod(
"client_secret_basic");
@Deprecated
public static final ClientAuthenticationMethod POST = new ClientAuthenticationMethod("post");
public static final ClientAuthenticationMethod CLIENT_SECRET_POST = new ClientAuthenticationMethod(
"client_secret_post");
public static final ClientAuthenticationMethod CLIENT_SECRET_JWT = new ClientAuthenticationMethod(
"client_secret_jwt");
public static final ClientAuthenticationMethod PRIVATE_KEY_JWT = new ClientAuthenticationMethod("private_key_jwt");
public static final ClientAuthenticationMethod NONE = new ClientAuthenticationMethod("none");
In boot 3, the deprecated fields are no longer available meaning the clientAuthenticationMethod does not map to valid instance if the deprecated values are used for ClientAuthenticationMethod field of the ProvisionedService. This is causing the oAuth2 process to fail when the AuthServer is redirected back to the application's callback URL.
Simply asking a ProvisionedService to update the value of this field may break other apps that are depending on the same ProvisionedService instance.
- Vorherrschende Sprache
- Java
- Sterne
- 50
- Forks
- 33
- Ø Merge
- 6 T. 2 Std.
- Gemergte PRs (30 T.)
- 2
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus spring-cloud/spring-cloud-bindings
-
Schwierigkeit 3/5 Ein halber Tag Anfängerfreundlichkeit 45/100
spring-cloud/spring-cloud-bindings#116 · 2 Kommentare · 1 Reaktion ·
-
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 55/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 22/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 15/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
Alle Issues in spring-cloud/spring-cloud-bindings
Ähnliche Issues
-
area:cpan-port area:performance bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
fglock/PerlOnJava#2230 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
federicoiosue/Omni-Notes#1044 ·
-
Bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag