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 Details

    • RANDOM

      private static final SecureRandom RANDOM
      Source of the generated values.
    • SALT_BYTES

      private static final int SALT_BYTES
      Number 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()
      Registers authserver.keys.encryption.password and .salt with random values.
      Returns:
      the registrar.