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
[ELY-1471] Rework the WildFlyElytronProvider to be a static definition instead of a dynamically generated definition. #1061
Conversation
Linux - JDK9 Build 133 outcome was FAILURE using a merge of 6a2c594 Failed tests
|
putService(new Service(this, SASL_SERVER_FACTORY_TYPE, SaslMechanismInformation.Names.IEC_ISO_9798_U_ECDSA_SHA1, "org.wildfly.security.sasl.entity.EntitySaslServerFactory", emptyList, emptyMap)); | ||
putService(new Service(this, SASL_SERVER_FACTORY_TYPE, SaslMechanismInformation.Names.IEC_ISO_9798_M_ECDSA_SHA1, "org.wildfly.security.sasl.entity.EntitySaslServerFactory", emptyList, emptyMap)); | ||
putService(new Service(this, SASL_SERVER_FACTORY_TYPE, SaslMechanismInformation.Names.EXTERNAL, "org.wildfly.security.sasl.external.ExternalSaslServerFactory", emptyList, emptyMap)); | ||
putService(new Service(this, SASL_SERVER_FACTORY_TYPE, "GS2-KRB5-PLUS", "org.wildfly.security.sasl.gs2.Gs2SaslServerFactory", emptyList, emptyMap)); |
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.
Should not be constant Gs2.GS2_KRB5_PLUS used?
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.
That would cause the initialization of the Gs2 class, which may reintroduce the original problem.
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.
ok
@@ -27,7 +27,7 @@ | |||
/** | |||
* SHA-512/256 hashing implementation as defined in FIPS PUB 180-4 Secure Hash Standard | |||
*/ | |||
public class Sha512_256MessageDigest extends MessageDigestSpi { | |||
public class SHA512_256MessageDigest extends MessageDigestSpi { |
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.
Why rename this class?
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.
I probably should have put that in it's own commit but it popped up in the middle of this clean up - a while ago we agreed to upper case 3 letter acronyms and camel case 4 or more - this is a new class added in Elytron 1.2 so we can get away with a quick rename before it leaks into any API.
putService(new Service(this, ALG_PARAMS_TYPE, ALGORITHM_MASKED_PBKDF_HMAC_SHA512, MaskedPasswordAlgorithmParametersSpiImpl.class.getName(), emptyList, emptyMap)); | ||
putService(new Service(this, ALG_PARAMS_TYPE, "RSA", "org.wildfly.security.key.RSAParameterSpiImpl", emptyList, emptyMap)); | ||
|
||
putService(new Service(this, ALG_PARAMS_TYPE, ALGORITHM_CRYPT_MD5, "org.wildfly.security.password.impl.SaltedPasswordAlgorithmParametersSpiImpl", emptyList, emptyMap)); |
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.
A more efficient approach might be to read all this info from a text file to avoid all these strings sticking around in metaspace forever.
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.
Which Strings are you worried about @dmlloyd - The referenced constants or the hard coded ones?
At this stage it felt as though any over optimisation here will be undone as soon as Elytron is actually used one way or another, also although we can use files it seems we would be likely to undo any savings with the classes we load to read the files.
…n instead of a dynamically generated definition. This drastically reduces the class loading overhead just to initialise the Provider.
This drastically reduces the class loading overhead just to initialise the Provider.