public class IdentityManager extends Object
IdentityManager
supports translations from values such as user names to a global
identifier
In addition to username identity translation, this class can also handle translations from values such as AWS account IDs to a more description account name.
Constructor and Description |
---|
IdentityManager()
Create new empty
IdentityManager |
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
getAwsAccountMap()
Get AWS account map
|
Map<String,Identity> |
getIdentities()
Get all known identities
|
Identity |
getIdentity(String identifier)
Get specific identity
|
Map<String,String> |
getNamedSubnets()
Get named subnets
|
static IdentityManager |
load(String path)
Load identity manager configuration from a resource file
|
void |
logWarnings()
Analyze the loaded identity manager configuration, logging warnings if required
|
String |
lookupAlias(String username)
Given supplied alias, return any matching global identity
|
String |
lookupNamedSubnet(String address)
Given supplied IP address, return matching named subnet
|
public IdentityManager()
IdentityManager
public static IdentityManager load(String path) throws IOException
path
- Path to load JSON file from, resource path or GCS URLIdentityManager
IOException
- IOExceptionpublic void logWarnings()
Review identity manager configuration and log any possible issues with the configuration as warnings. Purely informational and will not throw exceptions if misconfigurations exist.
public Map<String,String> getAwsAccountMap()
public Map<String,Identity> getIdentities()
public Map<String,String> getNamedSubnets()
public Identity getIdentity(String identifier)
identifier
- Global identifier to return Identity
forpublic String lookupAlias(String username)
username
- Username to search forCopyright © 2022. All rights reserved.