-
Notifications
You must be signed in to change notification settings - Fork 6k
Make OpenSamlMetadataRelyingPartyRegistrationConverter public #15090
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
in: saml2
An issue in SAML2 modules
status: blocked
An issue that's blocked on an external project change
type: enhancement
A general enhancement
Comments
I believe this will be addressed in #12116. I'll leave this ticket open for the moment just in case the other evolves differently than I imagine. |
jzheaux
added a commit
to jzheaux/spring-security
that referenced
this issue
Jun 29, 2024
jzheaux
added a commit
to jzheaux/spring-security
that referenced
this issue
Jul 2, 2024
This adds the RelyingPartyRegistrationsDecoder component which allows configuration with signature verification credentials. Closes spring-projectsgh-12116 Closes spring-projectsgh-15017 Closes spring-projectsgh-15090
jzheaux
added a commit
to jzheaux/spring-security
that referenced
this issue
Jul 2, 2024
This adds the RelyingPartyRegistrationsDecoder component which allows configuration with signature verification credentials. Closes spring-projectsgh-12116 Closes spring-projectsgh-15017 Closes spring-projectsgh-15090
jzheaux
added a commit
to jzheaux/spring-security
that referenced
this issue
Jul 2, 2024
This adds the RelyingPartyRegistrationsDecoder component which allows configuration with signature verification credentials. Closes spring-projectsgh-12116 Closes spring-projectsgh-15017 Closes spring-projectsgh-15090
jzheaux
added a commit
to jzheaux/spring-security
that referenced
this issue
Jul 2, 2024
This adds the RelyingPartyRegistrationsDecoder component which allows configuration with signature verification credentials. Closes spring-projectsgh-12116 Closes spring-projectsgh-15017 Closes spring-projectsgh-15090
Workaround: try {
Class<?> converterClass = Class.forName("org.springframework.security.saml2.provider.service.registration.OpenSamlMetadataRelyingPartyRegistrationConverter");
Constructor<?> converterConstructor = converterClass.getDeclaredConstructor();
converterConstructor.setAccessible(true);
Object converterInstance = converterConstructor.newInstance();
Method converterMethod = converterClass.getDeclaredMethod("convert", EntityDescriptor.class);
converterMethod.setAccessible(true);
this.converter = value -> {
try {
return (RelyingPartyRegistration.Builder) converterMethod.invoke(converterInstance, value);
} catch (InvocationTargetException ex) {
if (ex.getTargetException() instanceof RuntimeException cause) {
throw cause;
} else {
throw new RuntimeException("Cannot convert metadata", ex);
}
} catch (IllegalAccessException ex) {
throw new IllegalStateException("Cannot convert metadata", ex);
}
};
}
catch (ReflectiveOperationException ex) {
throw new IllegalStateException("Cannot initialise metadata converter", ex);
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
in: saml2
An issue in SAML2 modules
status: blocked
An issue that's blocked on an external project change
type: enhancement
A general enhancement
Expected Behavior
Class and its methods should be
public
.Current Behavior
Class and its methods are package-private.
Context
To allow writing alternatives to
RelyingPartyRegistrations
and others by adapting OpenSAML APIs.For example, in order to implement verification (#15018 (comment)) and refreshing (#15027 (comment)).
The text was updated successfully, but these errors were encountered: