Class SystemPropertyCredentialsResolver
java.lang.Object
com.northconcepts.datapipeline.security.SystemPropertyCredentialsResolver
- All Implemented Interfaces:
CredentialsResolver
A
CredentialsResolver that reads credential values from JVM system properties
at each resolve.
Map logical credential keys to system property names:
new SystemPropertyCredentialsResolver()
.map(Credentials.ACCESS_KEY, "s3.accessKey")
.map(Credentials.SECRET_KEY, "s3.secretKey");
Unset properties are omitted from the returned Credentials. Since system properties
can change at runtime, this resolver reports isRotating() as true.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionResolves and returns the current credentials.booleanIndicates if this resolver can return different credentials over time.Maps a logical credential key (seeCredentials) to a system property name.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.northconcepts.datapipeline.security.CredentialsResolver
refresh
-
Constructor Details
-
SystemPropertyCredentialsResolver
public SystemPropertyCredentialsResolver()
-
-
Method Details
-
map
Maps a logical credential key (seeCredentials) to a system property name. -
getCredentials
Description copied from interface:CredentialsResolverResolves and returns the current credentials. Must not returnnull.- Specified by:
getCredentialsin interfaceCredentialsResolver
-
isRotating
public boolean isRotating()Description copied from interface:CredentialsResolverIndicates if this resolver can return different credentials over time. The default implementation returnsfalse.- Specified by:
isRotatingin interfaceCredentialsResolver
-
toString
-