public class SecuredRsaKeyParameter
extends java.lang.Object
implements java.util.function.Supplier<java.lang.String>
It is intended that the stored parameter is the value between the -----BEGIN RSA PRIVATE KEY----- and
-----END RSA PRIVATE KEY-----, excluding that header and footer - this utility re-adds those values to the
resulting value. This is due to an inability to store newlines within an SSM parameter, and RSA key libraries
expecting a specific format.
Implements supplier logic to allow repeated reading of potentially changing values
| Modifier and Type | Method and Description |
|---|---|
static SecuredRsaKeyParameter |
fromEnv(com.amazonaws.services.simplesystemsmanagement.AWSSimpleSystemsManagement systemsManagementClient,
java.lang.String environmentVariable)
Creates a new reference to a secured parameter stored on Amazon SSM that represents a RSA key
|
static SecuredRsaKeyParameter |
fromEnv(java.lang.String environmentVariable)
Creates a new reference to a secured parameter stored on Amazon SSM that represents a RSA key
|
java.lang.String |
get() |
public java.lang.String get()
get in interface java.util.function.Supplier<java.lang.String>public static SecuredRsaKeyParameter fromEnv(java.lang.String environmentVariable)
Uses the default AWS system management client
environmentVariable - The name of an environment variable where the name of the parameter to access is storedpublic static SecuredRsaKeyParameter fromEnv(com.amazonaws.services.simplesystemsmanagement.AWSSimpleSystemsManagement systemsManagementClient, java.lang.String environmentVariable)
systemsManagementClient - Client instance to use when reading from SSMenvironmentVariable - The name of an environment variable where the name of the parameter to access is stored