oAuth 2 clients may break with SpringBoot 3
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 22/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- java, spring-boot
- Domaine
- authentication
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Java
- Étoiles
- 50
- Forks
- 33
- Merge moyen
- 6 j 2 h
- PR mergées (30 j)
- 2
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de spring-cloud/spring-cloud-bindings
-
Difficulté 3/5 Une demi-journée Accessibilité débutants 45/100
spring-cloud/spring-cloud-bindings#116 · 2 commentaires · 1 réaction ·
-
Difficulté 2/5 Une demi-journée Accessibilité débutants 55/100
-
Difficulté 4/5 3-5 jours Accessibilité débutants 22/100
-
SCS Configuration Help NeededOuverte
Difficulté 4/5 3-5 jours Accessibilité débutants 15/100
-
Difficulté 3/5 1-2 jours Accessibilité débutants 35/100
Toutes les issues de spring-cloud/spring-cloud-bindings
Issues similaires
-
area:cpan-port area:performance bug
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
fglock/PerlOnJava#2230 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
federicoiosue/Omni-Notes#1044 ·
-
Industrial Center Text TypoOuverteBug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour