Class KeyEncryptionTestConfiguration
java.lang.Object
com.irurueta.authserver.testsupport.KeyEncryptionTestConfiguration
@TestConfiguration(proxyBeanMethods=false)
public class KeyEncryptionTestConfiguration
extends Object
Supplies the inputs of the encryption of signing keys at rest to a test context. The values are generated at
runtime for each context, so no secret-looking literal exists in the sources and nothing persists between runs.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final SecureRandomSource of the generated values.private static final intNumber of random bytes of the generated salt. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.test.context.DynamicPropertyRegistrarRegistersauthserver.keys.encryption.passwordand.saltwith random values.
-
Field Details
-
RANDOM
Source of the generated values. -
SALT_BYTES
private static final int SALT_BYTESNumber of random bytes of the generated salt.- See Also:
-
-
Constructor Details
-
KeyEncryptionTestConfiguration
public KeyEncryptionTestConfiguration()
-
-
Method Details
-
keyEncryptionPropertiesRegistrar
@Bean public org.springframework.test.context.DynamicPropertyRegistrar keyEncryptionPropertiesRegistrar()Registersauthserver.keys.encryption.passwordand.saltwith random values.- Returns:
- the registrar.
-