-
Notifications
You must be signed in to change notification settings - Fork 842
WIP: initialize OpenSAML in one class #3223
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
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Centralize OpenSAML initialization and parser/unmarshaller setup into a single utility class and update existing converters/providers to use it.
- Introduce
OpenSamlXmlUtilsto handle OpenSAML initialization, registry lookup, and provide parser/unmarshallers. - Refactor
Saml2BearerGrantAuthenticationConverterandOpenSaml4AuthenticationProviderto useOpenSamlXmlUtilsinstead of inline initialization. - Minor formatting cleanup in
Saml2Utils.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| server/src/main/java/org/cloudfoundry/identity/uaa/provider/saml/Saml2Utils.java | Removed extraneous blank line |
| server/src/main/java/org/cloudfoundry/identity/uaa/provider/saml/Saml2BearerGrantAuthenticationConverter.java | Switched to OpenSamlXmlUtils for initialization and parsing |
| server/src/main/java/org/cloudfoundry/identity/uaa/provider/saml/OpenSamlXmlUtils.java | New utility class for OpenSAML initialization and provider registry |
| server/src/main/java/org/cloudfoundry/identity/uaa/provider/saml/OpenSaml4AuthenticationProvider.java | Updated to use OpenSamlXmlUtils for parsing and unmarshalling |
|
|
||
| import lombok.extern.slf4j.Slf4j; | ||
| import net.shibboleth.utilities.java.support.xml.ParserPool; | ||
| import org.cloudfoundry.identity.uaa.provider.SamlIdentityProviderDefinition; |
Copilot
AI
Jul 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This import is never used in the class. Consider removing SamlIdentityProviderDefinition to clean up unused imports.
| import org.cloudfoundry.identity.uaa.provider.SamlIdentityProviderDefinition; |
| import net.shibboleth.utilities.java.support.xml.ParserPool; | ||
| import org.cloudfoundry.identity.uaa.provider.SamlIdentityProviderDefinition; | ||
| import org.opensaml.core.config.ConfigurationService; | ||
| import org.opensaml.core.xml.XMLObject; |
Copilot
AI
Jul 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The XMLObject import is not referenced in this class. Removing it will declutter the code.
| import org.opensaml.core.xml.XMLObject; |
|
|
||
| private static final ParserPool parserPool; | ||
|
|
||
| public static boolean initialize() { |
Copilot
AI
Jul 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The method name initialize suggests side effects but only returns a boolean. Consider renaming to isInitialized or changing it to void initialize() to make its purpose clearer.
| public static boolean initialize() { | |
| public static boolean isInitialized() { |
No description provided.