-
Notifications
You must be signed in to change notification settings - Fork 148
Open
Description
Description:
Current the variables:
- ssoSigner
- ssoEncrypter
- samlAssertionBuilder
- samlHTTPRedirectSignatureValidator
in SAMLSSOUtil are initialized in a synchronized block inside each method which they are used as below:
Lines 770 to 778 in 5a98b0b
try { | |
synchronized (Runtime.getRuntime().getClass()) { | |
ssoSigner = (SSOSigner) Class.forName(IdentityUtil.getProperty( | |
SAMLSSOConstants.SAMLSSO_SIGNER_CLASS_NAME).trim()).newInstance(); | |
ssoSigner.init(); | |
} | |
return ssoSigner.setSignature(request, signatureAlgorithm, digestAlgorithm, cred); | |
A suggested improvement to the process would be to initialize them in one place like the doBootstrap() method:
Lines 665 to 674 in 5a98b0b
public static void doBootstrap() { | |
if (!isBootStrapped) { | |
try { | |
DefaultBootstrap.bootstrap(); | |
isBootStrapped = true; | |
} catch (ConfigurationException e) { | |
log.error("Error in bootstrapping the OpenSAML2 library", e); | |
} | |
} | |
} |
Suggested Labels:
Improvement
Suggested Assignees:
N/A
Related Issues:
N/A
Metadata
Metadata
Assignees
Labels
No labels