public class ZMSClient extends Object implements Closeable
| Modifier and Type | Field and Description |
|---|---|
protected ZMSRDLGeneratedClient |
client |
static String |
ZMS_CLIENT_DEFAULT_CLIENT_SSL_PROTOCOL |
static String |
ZMS_CLIENT_PKEY_STORE_FACTORY_CLASS |
static String |
ZMS_CLIENT_PROP_ATHENZ_CONF |
static String |
ZMS_CLIENT_PROP_CERT_ALIAS |
static String |
ZMS_CLIENT_PROP_CLIENT_PROTOCOL |
static String |
ZMS_CLIENT_PROP_CONNECT_TIMEOUT |
static String |
ZMS_CLIENT_PROP_KEY_MANAGER_PASSWORD |
static String |
ZMS_CLIENT_PROP_KEY_MANAGER_PWD_APP_NAME |
static String |
ZMS_CLIENT_PROP_KEYSTORE_PASSWORD |
static String |
ZMS_CLIENT_PROP_KEYSTORE_PATH |
static String |
ZMS_CLIENT_PROP_KEYSTORE_PWD_APP_NAME |
static String |
ZMS_CLIENT_PROP_KEYSTORE_TYPE |
static String |
ZMS_CLIENT_PROP_PRIVATE_KEY_STORE_FACTORY_CLASS |
static String |
ZMS_CLIENT_PROP_READ_TIMEOUT |
static String |
ZMS_CLIENT_PROP_TRUSTSTORE_PASSWORD |
static String |
ZMS_CLIENT_PROP_TRUSTSTORE_PATH |
static String |
ZMS_CLIENT_PROP_TRUSTSTORE_PWD_APP_NAME |
static String |
ZMS_CLIENT_PROP_TRUSTSTORE_TYPE |
| Constructor and Description |
|---|
ZMSClient()
Constructs a new ZMSClient object with default settings.
|
ZMSClient(com.yahoo.athenz.auth.Principal identity)
Constructs a new ZMSClient object with default settings and given
principal object for credentials.
|
ZMSClient(String url)
Constructs a new ZMSClient object with the given ZMS Server url.
|
ZMSClient(String url,
com.yahoo.athenz.auth.Principal identity)
Constructs a new ZMSClient object with the given ZMS Server url and
given principal.
|
ZMSClient(String url,
SSLContext sslContext)
Constructs a new ZMSClient object with the given SSLContext object
and ZMS Server Url.
|
| Modifier and Type | Method and Description |
|---|---|
ZMSClient |
addCredentials(com.yahoo.athenz.auth.Principal identity)
Sets or overrides the current principal identity set in the client.
|
void |
addCredentials(String credHeader,
String credToken)
Set the client credentials using the specified header and token.
|
ZMSClient |
clearCredentials()
Clear the principal identity set for the client.
|
void |
close()
Close the ZMSClient object and release any allocated resources.
|
void |
deleteAssertion(String domainName,
String policyName,
Long assertionId,
String auditRef)
Delete specified assertion from the given policy
|
void |
deleteAssertion(String domainName,
String policyName,
String version,
Long assertionId,
String auditRef)
Delete specified assertion from the given policy
|
void |
deleteAssertionCondition(String domainName,
String policyName,
Long assertionId,
int conditionId,
String auditRef)
Delete a single assertion condition associated with the given assertion id.
|
void |
deleteAssertionConditions(String domainName,
String policyName,
Long assertionId,
String auditRef)
Delete all assertion conditions associated with the given assertion id.
|
void |
deleteDomainRoleMember(String domainName,
String memberName,
String auditRef)
Delete the specified user from all roles in the given domain
|
void |
deleteDomainTemplate(String domain,
String template,
String auditRef)
Delete the specified solution template roles and policies from the domain
|
void |
deleteEntity(String domainName,
String entityName,
String auditRef)
Delete the specified entity from the ZMS Server
|
void |
deleteGroup(String domainName,
String groupName,
String auditRef)
Delete the specified group from domain
|
void |
deleteGroupMembership(String domainName,
String groupName,
String memberName,
String auditRef)
Remove the specified member from the group
|
void |
deleteMembership(String domainName,
String roleName,
String memberName,
String auditRef)
Remove the specified member from the role
|
void |
deletePendingGroupMembership(String domainName,
String groupName,
String memberName,
String auditRef)
Remove the specified pending member from the group
|
void |
deletePendingMembership(String domainName,
String roleName,
String memberName,
String auditRef)
Remove the specified pending member from the role
|
void |
deletePolicy(String domainName,
String policyName,
String auditRef)
Delete specified policy from a domain
|
void |
deletePolicyVersion(String domainName,
String policyName,
String version,
String auditRef)
Delete specified policy version from a domain
|
void |
deleteProviderResourceGroupRoles(String tenantDomain,
String providerDomain,
String providerServiceName,
String resourceGroup,
String auditRef)
Delete the provider roles for the specified tenant resource group from the tenant domain.
|
void |
deletePublicKeyEntry(String domainName,
String serviceName,
String keyId,
String auditRef)
Delete the specified public key from the service object.
|
void |
deleteQuota(String domainName,
String auditRef)
Delete the specified quota details for the specified domain
|
void |
deleteRole(String domainName,
String roleName,
String auditRef)
Delete the specified role from domain
|
void |
deleteServiceIdentity(String domainName,
String serviceName,
String auditRef)
Delete the specified service from a domain
|
void |
deleteSubDomain(String parent,
String name,
String auditRef)
Delete a sub-domain
|
void |
deleteTenancy(String tenantDomain,
String providerService,
String auditRef)
Delete the specified provider service from a tenant domain
|
void |
deleteTenant(String providerDomain,
String providerService,
String tenantDomain,
String auditRef)
Delete the specified tenant from provider service
|
void |
deleteTenantResourceGroupRoles(String providerDomain,
String providerServiceName,
String tenantDomain,
String resourceGroup,
String auditRef)
Delete tenant roles for the specified tenant resource group in a domain
|
void |
deleteTopLevelDomain(String name,
String auditRef)
Delete a top level domain
|
void |
deleteUser(String name,
String auditRef)
Remove the specified user from Athens system.
|
void |
deleteUserDomain(String name,
String auditRef)
Delete a top-level user-domain (user.<userid>)
|
String |
generateEntityName(String domain,
String entity)
Generate an entity name as expected by ZMS Server can be used to
set the entity object's name field
(e.g.
|
String |
generateGroupName(String domain,
String group)
Generate a group name as expected by ZMS Server can be used to
set the group object's name field (e.g.
|
String |
generatePolicyName(String domain,
String policy)
Generate a policy name as expected by ZMS Server can be used to
set the policy object's name field (e.g.
|
String |
generateRoleName(String domain,
String role)
Generate a role name as expected by ZMS Server can be used to
set the role object's name field (e.g.
|
String |
generateServiceIdentityName(String domain,
String service)
Generate a service name as expected by ZMS Server can be used to
set the service identity object's name field
(e.g.
|
com.yahoo.athenz.zms.Access |
getAccess(String action,
String resource,
String trustDomain)
Requests the ZMS to indicate whether or not the specific request for the
specified resource with authentication details will be granted or not.
|
com.yahoo.athenz.zms.Access |
getAccess(String action,
String resource,
String trustDomain,
String principal)
Requests the ZMS to indicate whether or not the specific request for the
specified resource with authentication details will be granted or not.
|
com.yahoo.athenz.zms.Access |
getAccessExt(String action,
String resource,
String trustDomain,
String principal)
Requests the ZMS to indicate whether or not the specific request for the
specified resource with authentication details will be granted or not.
|
com.yahoo.athenz.zms.Assertion |
getAssertion(String domainName,
String policyName,
Long assertionId)
Return the specified policy object assertion
|
com.yahoo.athenz.zms.Domain |
getDomain(String domain)
Retrieve the specified domain object
|
com.yahoo.athenz.zms.DomainDataCheck |
getDomainDataCheck(String domain)
Check the data for the specified domain object
|
com.yahoo.athenz.zms.DomainList |
getDomainList()
Retrieve the list of domains provisioned on the ZMS Server
|
com.yahoo.athenz.zms.DomainList |
getDomainList(Integer limit,
String skip,
String prefix,
Integer depth,
String awsAccount,
Integer productId,
Date modifiedSince)
Retrieve the list of domains provisioned on the ZMS Server
filters based on the specified arguments
|
com.yahoo.athenz.zms.DomainList |
getDomainList(Integer limit,
String skip,
String prefix,
Integer depth,
String awsAccount,
Integer productId,
String azureSubscription,
Date modifiedSince)
Retrieve the list of domains provisioned on the ZMS Server
filters based on the specified arguments
|
com.yahoo.athenz.zms.DomainList |
getDomainList(Integer limit,
String skip,
String prefix,
Integer depth,
String awsAccount,
Integer productId,
String azureSubscription,
Date modifiedSince,
String tagKey,
String tagValue)
Retrieve the list of domains provisioned on the ZMS Server
filters based on the specified arguments
|
com.yahoo.athenz.zms.DomainList |
getDomainList(Integer limit,
String skip,
String prefix,
Integer depth,
String awsAccount,
Integer productId,
String azureSubscription,
Date modifiedSince,
String tagKey,
String tagValue,
String businessService)
Retrieve the list of domains provisioned on the ZMS Server
filters based on the specified arguments
|
com.yahoo.athenz.zms.DomainList |
getDomainList(String roleMember,
String roleName)
Retrieve the list of domains provisioned on the ZMS Server
filters based on the specified arguments
|
com.yahoo.athenz.zms.DomainMetaStoreValidValuesList |
getDomainMetaStoreValidValuesList(String attributeName,
String userName)
Retrieve all valid values for the given attribute and user
|
com.yahoo.athenz.zms.DomainRoleMembers |
getDomainRoleMembers(String domainName)
Retrieve the list of all members provisioned for a domain
in regular roles
|
com.yahoo.athenz.zms.DomainTemplateList |
getDomainTemplateList(String domain)
Retrieve the list of solution template provisioned for a domain
|
com.yahoo.athenz.zms.Entity |
getEntity(String domainName,
String entityName)
Retrieve the specified entity from the ZMS Server
|
com.yahoo.athenz.zms.EntityList |
getEntityList(String domainName)
Retrieve the list of entities defined for the specified domain
|
com.yahoo.athenz.zms.Group |
getGroup(String domainName,
String groupName,
boolean auditLog,
boolean pending)
Retrieve the specified group
|
com.yahoo.athenz.zms.GroupMembership |
getGroupMembership(String domainName,
String groupName,
String memberName,
String expiration)
Get membership details for the specified member in the given group
in a specified domain with an optional expiration
|
com.yahoo.athenz.zms.Groups |
getGroups(String domainName,
Boolean members)
Retrieve the list of groups defined for the specified domain.
|
com.yahoo.athenz.zms.Groups |
getGroups(String domainName,
Boolean members,
String tagKey,
String tagValue)
Retrieve the list of groups defined for the specified domain.
|
com.yahoo.athenz.zms.JWSDomain |
getJWSDomain(String domain)
Retrieve the specified singed domain object.
|
com.yahoo.athenz.zms.JWSDomain |
getJWSDomain(String domain,
Boolean signatureP1363Format,
String matchingTag,
Map<String,List<String>> responseHeaders)
Retrieve the specified singed domain object.
|
com.yahoo.athenz.zms.JWSDomain |
getJWSDomain(String domain,
String matchingTag,
Map<String,List<String>> responseHeaders)
Retrieve the specified singed domain object.
|
com.yahoo.athenz.zms.Membership |
getMembership(String domainName,
String roleName,
String memberName)
Get membership details for the specified member in the given role
in a specified domain
|
com.yahoo.athenz.zms.Membership |
getMembership(String domainName,
String roleName,
String memberName,
String expiration)
Get membership details for the specified member in the given role
in a specified domain with an optional expiration
|
com.yahoo.athenz.zms.DomainRoleMembers |
getOverdueReview(String domainName)
Get all domain members with overdue review dates
|
com.yahoo.athenz.zms.DomainGroupMembership |
getPendingDomainGroupMembersList(String principal)
Return all the list of pending requests for the given principal.
|
com.yahoo.athenz.zms.DomainRoleMembership |
getPendingDomainRoleMembersList(String principal)
Return all the list of pending requests for the given principal.
|
com.yahoo.athenz.zms.Policies |
getPolicies(String domainName,
Boolean assertions)
Retrieve the list of policies defined for the specified domain.
|
com.yahoo.athenz.zms.Policies |
getPolicies(String domainName,
Boolean assertions,
Boolean includeNonActive)
Retrieve the list of policies defined for the specified domain.
|
com.yahoo.athenz.zms.Policy |
getPolicy(String domainName,
String policyName)
Return the specified policy object
|
com.yahoo.athenz.zms.PolicyList |
getPolicyList(String domainName)
Get list of policies defined in the specified domain
|
com.yahoo.athenz.zms.PolicyList |
getPolicyList(String domainName,
Integer limit,
String skip)
Get list of policies defined in the specified domain filtered
based on the specified arguments
|
com.yahoo.athenz.zms.Policy |
getPolicyVersion(String domainName,
String policyName,
String version)
Return the specified policy version object
|
com.yahoo.athenz.zms.PolicyList |
getPolicyVersionList(String domainName,
String policyName)
Get list of policy versions for policy in a domain
|
com.yahoo.athenz.auth.Principal |
getPrincipal(String serviceToken)
The client will validate the given serviceToken against the ZMS Server
and if the token is valid, it will return a Principal object.
|
com.yahoo.athenz.auth.Principal |
getPrincipal(String serviceToken,
String tokenHeader)
The client will validate the given serviceToken against the ZMS Server
and if the token is valid, it will return a Principal object.
|
com.yahoo.athenz.zms.DomainGroupMember |
getPrincipalGroups(String principal,
String domainName)
Fetch all the groups across domains by either calling or specified principal
|
com.yahoo.athenz.zms.DomainRoleMember |
getPrincipalRoles(String principal,
String domainName)
Fetch all the roles across domains by either calling or specified principal
|
com.yahoo.athenz.zms.ProviderResourceGroupRoles |
getProviderResourceGroupRoles(String tenantDomain,
String providerDomain,
String providerServiceName,
String resourceGroup)
Retrieve the list of provider roles defined for a tenant resource group in a domain
|
com.yahoo.athenz.zms.PublicKeyEntry |
getPublicKeyEntry(String domainName,
String serviceName,
String keyId)
Retrieve the specified public key from the given service object
|
com.yahoo.athenz.zms.Quota |
getQuota(String domainName)
Retrieve the quota deatails for the specified domain
|
com.yahoo.athenz.zms.ResourceAccessList |
getResourceAccessList(String principal,
String action)
Retrieve the list of resources as defined in their respective assertions
that the given principal has access to through their role membership
|
com.yahoo.athenz.zms.Role |
getRole(String domainName,
String roleName)
Retrieve the specified role
|
com.yahoo.athenz.zms.Role |
getRole(String domainName,
String roleName,
boolean auditLog)
Retrieve the specified role
|
com.yahoo.athenz.zms.Role |
getRole(String domainName,
String roleName,
boolean auditLog,
boolean expand)
Retrieve the specified role
|
com.yahoo.athenz.zms.Role |
getRole(String domainName,
String roleName,
boolean auditLog,
boolean expand,
boolean pending)
Retrieve the specified role
|
com.yahoo.athenz.zms.RoleList |
getRoleList(String domainName)
Retrieve the list of roles defined for the specified domain
|
com.yahoo.athenz.zms.RoleList |
getRoleList(String domainName,
Integer limit,
String skip)
Retrieve the list of roles defined for the specified domain
filtered based on the parameters specified
|
com.yahoo.athenz.zms.Roles |
getRoles(String domainName,
Boolean members)
Retrieve the list of roles defined for the specified domain.
|
com.yahoo.athenz.zms.Roles |
getRoles(String domainName,
Boolean members,
String tagKey,
String tagValue)
Retrieve the list of roles defined for the specified domain.
|
com.yahoo.athenz.zms.ServerTemplateList |
getServerTemplateList()
Retrieve the list of solution templates provisioned on the ZMS Server
|
com.yahoo.athenz.zms.ServiceIdentities |
getServiceIdentities(String domainName,
Boolean publicKeys,
Boolean hosts)
Retrieve the list of services defined for the specified domain.
|
com.yahoo.athenz.zms.ServiceIdentity |
getServiceIdentity(String domainName,
String serviceName)
Retrieve the specified service object from a domain
|
com.yahoo.athenz.zms.ServiceIdentityList |
getServiceIdentityList(String domainName)
Retrieve the full list of services defined in a domain
|
com.yahoo.athenz.zms.ServiceIdentityList |
getServiceIdentityList(String domainName,
Integer limit,
String skip)
Retrieve the list of services defined in a domain filtered
based on the specified arguments
|
com.yahoo.athenz.zms.SignedDomains |
getSignedDomains(String domainName,
String metaOnly,
String metaAttr,
boolean masterCopy,
boolean conditions,
String matchingTag,
Map<String,List<String>> responseHeaders)
Retrieve the list of all domain data from the ZMS Server that
is signed with ZMS's private key.
|
com.yahoo.athenz.zms.SignedDomains |
getSignedDomains(String domainName,
String metaOnly,
String metaAttr,
boolean masterCopy,
String matchingTag,
Map<String,List<String>> responseHeaders)
Retrieve the list of all domain data from the ZMS Server that
is signed with ZMS's private key.
|
com.yahoo.athenz.zms.SignedDomains |
getSignedDomains(String domainName,
String metaOnly,
String matchingTag,
Map<String,List<String>> responseHeaders)
Retrieve the list of all domain data from the ZMS Server that
is signed with ZMS's private key.
|
com.yahoo.athenz.zms.SignedDomains |
getSignedDomains(String domainName,
String metaOnly,
String metaAttr,
String matchingTag,
Map<String,List<String>> responseHeaders)
Retrieve the list of all domain data from the ZMS Server that
is signed with ZMS's private key.
|
com.yahoo.athenz.zms.Template |
getTemplate(String template)
Retrieve the the specified solution template provisioned on the ZMS Server.
|
com.yahoo.athenz.zms.TenantResourceGroupRoles |
getTenantResourceGroupRoles(String providerDomain,
String providerServiceName,
String tenantDomain,
String resourceGroup)
Retrieve the list of tenant roles defined for a tenant resource group in a domain
|
com.yahoo.athenz.zms.UserList |
getUserList()
Get list of users defined in the system
|
com.yahoo.athenz.zms.UserList |
getUserList(String domainName)
Get list of users defined in the system
|
com.yahoo.athenz.zms.UserToken |
getUserToken(String userName)
For the specified user credentials return the corresponding User Token that
can be used for authenticating other ZMS operations.
|
com.yahoo.athenz.zms.UserToken |
getUserToken(String userName,
String serviceNames)
For the specified user credentials return the corresponding User Token that
can be used for authenticating other ZMS operations by any of the specified
authorized services.
|
com.yahoo.athenz.zms.UserToken |
getUserToken(String userName,
String serviceNames,
Boolean header)
For the specified user credentials return the corresponding User Token that
can be used for authenticating other ZMS operations by any of the specified
authorized services.
|
String |
getZmsUrl() |
com.yahoo.athenz.zms.Domain |
postSubDomain(String parent,
String auditRef,
com.yahoo.athenz.zms.SubDomain detail)
Create/Update a sub-domain in the specified domain.
|
com.yahoo.athenz.zms.Domain |
postTopLevelDomain(String auditRef,
com.yahoo.athenz.zms.TopLevelDomain detail)
Create/Update Top level domain.
|
com.yahoo.athenz.zms.Domain |
postUserDomain(String name,
String auditRef,
com.yahoo.athenz.zms.UserDomain detail)
Create a top-level user-domain - this is user.<userid> domain.
|
com.yahoo.athenz.zms.Assertion |
putAssertion(String domainName,
String policyName,
String auditRef,
com.yahoo.athenz.zms.Assertion assertion)
Add the specified assertion to the specified policy
|
com.yahoo.athenz.zms.Assertion |
putAssertion(String domainName,
String policyName,
String version,
String auditRef,
com.yahoo.athenz.zms.Assertion assertion)
Add the specified assertion to the specified policy
|
com.yahoo.athenz.zms.AssertionCondition |
putAssertionCondition(String domainName,
String policyName,
Long assertionId,
String auditRef,
com.yahoo.athenz.zms.AssertionCondition assertionCondition)
Store a single logical assertion condition.
|
com.yahoo.athenz.zms.AssertionConditions |
putAssertionConditions(String domainName,
String policyName,
Long assertionId,
String auditRef,
com.yahoo.athenz.zms.AssertionConditions assertionConditions)
Store multiple logical assertion conditions.
|
void |
putDefaultAdmins(String domainName,
String auditRef,
com.yahoo.athenz.zms.DefaultAdmins defaultAdmins)
For the specified domain in domainName, a list of default administrators
can be passed to this method and will be added to the domain's admin role
In addition this method will ensure that the admin role and policy exist and
are properly set up
|
void |
putDomainMeta(String name,
String auditRef,
com.yahoo.athenz.zms.DomainMeta detail)
Set the domain meta parameters
|
void |
putDomainSystemMeta(String name,
String attribute,
String auditRef,
com.yahoo.athenz.zms.DomainMeta detail)
Set the domain system meta parameters
|
void |
putDomainTemplate(String domain,
String auditRef,
com.yahoo.athenz.zms.DomainTemplate templates)
Provision the specified solution template roles and policies in the domain
|
void |
putDomainTemplateExt(String domain,
String template,
String auditRef,
com.yahoo.athenz.zms.DomainTemplate templates)
Provision the specified solution template roles and policies in the domain
|
void |
putEntity(String domainName,
String entityName,
String auditRef,
com.yahoo.athenz.zms.Entity entity)
Create/update an entity object in ZMS
|
void |
putGroup(String domainName,
String groupName,
String auditRef,
com.yahoo.athenz.zms.Group group)
Create/Update a new group in the specified domain.
|
void |
putGroupMembership(String domainName,
String groupName,
String memberName,
String auditRef)
Add a member in the specified group
|
void |
putGroupMembershipDecision(String domainName,
String groupName,
String memberName,
boolean approval,
String auditRef)
Approve or reject addition of a member in the specified group
|
void |
putGroupMeta(String domainName,
String groupName,
String auditRef,
com.yahoo.athenz.zms.GroupMeta meta)
Set the group meta parameters
|
void |
putGroupReview(String domainName,
String groupName,
String auditRef,
com.yahoo.athenz.zms.Group group)
Review group membership to extend and/or delete group members
|
void |
putGroupSystemMeta(String domainName,
String groupName,
String attribute,
String auditRef,
com.yahoo.athenz.zms.GroupSystemMeta meta)
Set the group system meta parameters
|
void |
putMembership(String domainName,
String roleName,
String memberName,
String auditRef)
Add a new member in the specified role.
|
void |
putMembership(String domainName,
String roleName,
String memberName,
com.yahoo.rdl.Timestamp expiration,
String auditRef)
Add a temporary member in the specified role with expiration
|
void |
putMembershipDecision(String domainName,
String roleName,
String memberName,
com.yahoo.rdl.Timestamp expiration,
boolean approval,
String auditRef)
Approve or reject addition of a member in the specified role optionally with expiration
|
void |
putMembershipWithReview(String domainName,
String roleName,
String memberName,
com.yahoo.rdl.Timestamp expiration,
com.yahoo.rdl.Timestamp review,
String auditRef)
Add a member in the specified role with optional expiration and optional review
|
void |
putPolicy(String domainName,
String policyName,
String auditRef,
com.yahoo.athenz.zms.Policy policy)
Create/Update a new policy in the specified domain.
|
void |
putPolicyVersion(String domainName,
String policyName,
String version,
String auditRef)
Create a new policy version in the specified domain.
|
void |
putPolicyVersion(String domainName,
String policyName,
String version,
String fromVersion,
String auditRef)
Create a new policy version in the specified domain.
|
void |
putProviderResourceGroupRoles(String tenantDomain,
String providerDomain,
String providerServiceName,
String resourceGroup,
String auditRef,
com.yahoo.athenz.zms.ProviderResourceGroupRoles providerRoles)
Create provider roles for the specified tenant resource group in the tenant domain.
|
void |
putPublicKeyEntry(String domainName,
String serviceName,
String keyId,
String auditRef,
com.yahoo.athenz.zms.PublicKeyEntry publicKeyEntry)
Update or add (if doesn't already exist) the specified public key in the service object
|
void |
putQuota(String domainName,
String auditRef,
com.yahoo.athenz.zms.Quota quota)
Create/Update the quota details for the specified domain
|
void |
putRole(String domainName,
String roleName,
String auditRef,
com.yahoo.athenz.zms.Role role)
Create/Update a new role in the specified domain.
|
void |
putRoleMeta(String domainName,
String roleName,
String auditRef,
com.yahoo.athenz.zms.RoleMeta meta)
Set the role meta parameters
|
void |
putRoleReview(String domainName,
String roleName,
String auditRef,
com.yahoo.athenz.zms.Role role)
Review role membership to extend and/or delete role members
|
void |
putRoleSystemMeta(String domainName,
String roleName,
String attribute,
String auditRef,
com.yahoo.athenz.zms.RoleSystemMeta meta)
Set the role system meta parameters
|
void |
putServiceIdentity(String domainName,
String serviceName,
String auditRef,
com.yahoo.athenz.zms.ServiceIdentity service)
Create/Update a new service in the specified domain.
|
void |
putServiceIdentitySystemMeta(String domainName,
String serviceName,
String attribute,
String auditRef,
com.yahoo.athenz.zms.ServiceIdentitySystemMeta meta)
Set the service system meta parameters
|
void |
putTenancy(String tenantDomain,
String providerService,
String auditRef,
com.yahoo.athenz.zms.Tenancy tenant)
Register a new provider service for a given tenant domain
|
void |
putTenant(String providerDomain,
String providerService,
String tenantDomain,
String auditRef,
com.yahoo.athenz.zms.Tenancy tenant)
Register a new tenant domain for the provider service
|
void |
putTenantResourceGroupRoles(String providerDomain,
String providerServiceName,
String tenantDomain,
String resourceGroup,
String auditRef,
com.yahoo.athenz.zms.TenantResourceGroupRoles tenantRoles)
Create tenant roles for the specified tenant resource group.
|
void |
setActivePolicyVersion(String domainName,
String policyName,
String version,
String auditRef)
Set a specified policy version active
|
void |
setProperty(String name,
Object value)
Set new ZMS Client configuration property.
|
void |
setZMSRDLGeneratedClient(ZMSRDLGeneratedClient client) |
protected ZMSRDLGeneratedClient client
public static final String ZMS_CLIENT_PROP_ATHENZ_CONF
public static final String ZMS_CLIENT_PROP_READ_TIMEOUT
public static final String ZMS_CLIENT_PROP_CONNECT_TIMEOUT
public static final String ZMS_CLIENT_PROP_CERT_ALIAS
public static final String ZMS_CLIENT_PROP_KEYSTORE_PATH
public static final String ZMS_CLIENT_PROP_KEYSTORE_TYPE
public static final String ZMS_CLIENT_PROP_KEYSTORE_PASSWORD
public static final String ZMS_CLIENT_PROP_KEYSTORE_PWD_APP_NAME
public static final String ZMS_CLIENT_PROP_KEY_MANAGER_PASSWORD
public static final String ZMS_CLIENT_PROP_KEY_MANAGER_PWD_APP_NAME
public static final String ZMS_CLIENT_PROP_TRUSTSTORE_PATH
public static final String ZMS_CLIENT_PROP_TRUSTSTORE_TYPE
public static final String ZMS_CLIENT_PROP_TRUSTSTORE_PASSWORD
public static final String ZMS_CLIENT_PROP_TRUSTSTORE_PWD_APP_NAME
public static final String ZMS_CLIENT_PROP_PRIVATE_KEY_STORE_FACTORY_CLASS
public static final String ZMS_CLIENT_PROP_CLIENT_PROTOCOL
public static final String ZMS_CLIENT_PKEY_STORE_FACTORY_CLASS
public static final String ZMS_CLIENT_DEFAULT_CLIENT_SSL_PROTOCOL
public ZMSClient()
public ZMSClient(String url)
url - ZMS Server url (e.g. https://server1.athenzcompany.com:4443/zms/v1)public ZMSClient(String url, com.yahoo.athenz.auth.Principal identity)
url - ZMS Server url (e.g. https://server1.athenzcompany.com:4443/zms/v1)identity - Principal object that includes credentialspublic ZMSClient(com.yahoo.athenz.auth.Principal identity)
identity - Principal object that includes credentialspublic ZMSClient(String url, SSLContext sslContext)
url - ZMS Server url (e.g. https://server1.athenzcompany.com:4443/zms/v1)sslContext - SSLContext that includes service's private key and x.509 certificate
for authenticating requestspublic void close()
close in interface Closeableclose in interface AutoCloseablepublic void setProperty(String name, Object value)
name - property name.value - property value. null value removes the property with the given name.public void setZMSRDLGeneratedClient(ZMSRDLGeneratedClient client)
public void addCredentials(String credHeader, String credToken)
credHeader - authentication header namecredToken - authentication credentialspublic ZMSClient addCredentials(com.yahoo.athenz.auth.Principal identity)
identity - Principal identity for authenticating requestspublic ZMSClient clearCredentials()
public String getZmsUrl()
public String generateRoleName(String domain, String role)
domain - name of the domainrole - name of the rolepublic String generatePolicyName(String domain, String policy)
domain - name of the domainpolicy - name of the policypublic String generateServiceIdentityName(String domain, String service)
domain - name of the domainservice - name of the servicepublic String generateEntityName(String domain, String entity)
domain - name of the domainentity - name of the servicepublic com.yahoo.athenz.zms.Domain getDomain(String domain)
domain - name of the domain to be retrievedZMSClientException - in case of failurepublic com.yahoo.athenz.zms.JWSDomain getJWSDomain(String domain)
domain - name of the domain to be retrievedZMSClientException - in case of failurepublic com.yahoo.athenz.zms.JWSDomain getJWSDomain(String domain, String matchingTag, Map<String,List<String>> responseHeaders)
domain - name of the domain to be retrievedmatchingTag - (can be null) contains modified timestamp received
with last request. If null, then return all domains.responseHeaders - contains the "tag" returned for modification
time of the domains, map key = "tag", List should
contain a single value timestamp String to be used
with subsequent call as matchingTag to this APIZMSClientException - in case of failurepublic com.yahoo.athenz.zms.JWSDomain getJWSDomain(String domain, Boolean signatureP1363Format, String matchingTag, Map<String,List<String>> responseHeaders)
domain - name of the domain to be retrievedsignatureP1363Format - return signature in P1363 format instead of ASN.1 DERmatchingTag - (can be null) contains modified timestamp received
with last request. If null, then return all domains.responseHeaders - contains the "tag" returned for modification
time of the domains, map key = "tag", List should
contain a single value timestamp String to be used
with subsequent call as matchingTag to this APIZMSClientException - in case of failurepublic com.yahoo.athenz.zms.DomainList getDomainList()
ZMSClientException - in case of failurepublic com.yahoo.athenz.zms.DomainList getDomainList(Integer limit, String skip, String prefix, Integer depth, String awsAccount, Integer productId, Date modifiedSince)
limit - number of domain objects to returnskip - exclude all the domains including the specified one from the return setprefix - return domains starting with this valuedepth - maximum depth of the domain (0 - top level domains only)awsAccount - return domain that has the specified aws account name. If account name
is specified all other optional attributes are ignored since there must be
only one domain matching the specified account name.productId - return domain that has the specified product id. If product id
is specified all other optional attributes are ignored since there must be
only one domain matching the specified product id.modifiedSince - return domains only modified since this dateZMSClientException - in case of failurepublic com.yahoo.athenz.zms.DomainList getDomainList(Integer limit, String skip, String prefix, Integer depth, String awsAccount, Integer productId, String azureSubscription, Date modifiedSince)
limit - number of domain objects to returnskip - exclude all the domains including the specified one from the return setprefix - return domains starting with this valuedepth - maximum depth of the domain (0 - top level domains only)awsAccount - return domain that has the specified aws account name. If account name
is specified all other optional attributes are ignored since there must be
only one domain matching the specified account name.productId - return domain that has the specified product id. If product id
is specified all other optional attributes are ignored since there must be
only one domain matching the specified product id.azureSubscription - return domain that has the specified azure subscription id. If subscription
id is specified all other optional attributes are ignored since there must be
only one domain matching the specified subscription id.modifiedSince - return domains only modified since this dateZMSClientException - in case of failurepublic com.yahoo.athenz.zms.DomainList getDomainList(Integer limit, String skip, String prefix, Integer depth, String awsAccount, Integer productId, String azureSubscription, Date modifiedSince, String tagKey, String tagValue)
limit - number of domain objects to returnskip - exclude all the domains including the specified one from the return setprefix - return domains starting with this valuedepth - maximum depth of the domain (0 - top level domains only)awsAccount - return domain that has the specified aws account name. If account name
is specified all other optional attributes are ignored since there must be
only one domain matching the specified account name.productId - return domain that has the specified product id. If product id
is specified all other optional attributes are ignored since there must be
only one domain matching the specified product id.azureSubscription - return domain that has the specified azure subscription id. If subscription
id is specified all other optional attributes are ignored since there must be
only one domain matching the specified subscription id.modifiedSince - return domains only modified since this datetagKey - query all domains with given tag nametagValue - query all domains with given tag key and valueZMSClientException - in case of failurepublic com.yahoo.athenz.zms.DomainList getDomainList(Integer limit, String skip, String prefix, Integer depth, String awsAccount, Integer productId, String azureSubscription, Date modifiedSince, String tagKey, String tagValue, String businessService)
limit - number of domain objects to returnskip - exclude all the domains including the specified one from the return setprefix - return domains starting with this valuedepth - maximum depth of the domain (0 - top level domains only)awsAccount - return domain that has the specified aws account name. If account name
is specified all other optional attributes are ignored since there must be
only one domain matching the specified account name.productId - return domain that has the specified product id. If product id
is specified all other optional attributes are ignored since there must be
only one domain matching the specified product id.azureSubscription - return domain that has the specified azure subscription id. If subscription
id is specified all other optional attributes are ignored since there must be
only one domain matching the specified subscription id.modifiedSince - return domains only modified since this datetagKey - query all domains with given tag nametagValue - query all domains with given tag key and valuebusinessService - returns domains that have the specified business service.ZMSClientException - in case of failurepublic com.yahoo.athenz.zms.DomainList getDomainList(String roleMember, String roleName)
roleMember - name of the principalroleName - name of the role where the principal is a member ofZMSClientException - in case of failurepublic com.yahoo.athenz.zms.Domain postTopLevelDomain(String auditRef, com.yahoo.athenz.zms.TopLevelDomain detail)
auditRef - string containing audit specification or ticket numberdetail - TopLevelDomain object to be created in ZMSZMSClientException - in case of failurepublic com.yahoo.athenz.zms.Domain postSubDomain(String parent, String auditRef, com.yahoo.athenz.zms.SubDomain detail)
parent - name of the parent domainauditRef - string containing audit specification or ticket numberdetail - SubDomain object to be created in ZMSZMSClientException - in case of failurepublic com.yahoo.athenz.zms.Domain postUserDomain(String name, String auditRef, com.yahoo.athenz.zms.UserDomain detail)
name - domain to be created, this is the <userid>auditRef - string containing audit specification or ticket numberdetail - UserDomain object to be created in ZMSZMSClientException - in case of failurepublic void deleteTopLevelDomain(String name, String auditRef)
name - domain name to be deleted from ZMSauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic void deleteSubDomain(String parent, String name, String auditRef)
parent - name of the parent domainname - sub-domain to be deletedauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic void deleteUserDomain(String name, String auditRef)
name - domain to be deleted, this is the <userid>auditRef - string containing audit specification or ticket numberpublic void putDomainMeta(String name, String auditRef, com.yahoo.athenz.zms.DomainMeta detail)
name - domain name to be modifiedauditRef - string containing audit specification or ticket numberdetail - meta parameters to be set on the domainpublic void putDomainSystemMeta(String name, String attribute, String auditRef, com.yahoo.athenz.zms.DomainMeta detail)
name - domain name to be modifiedattribute - system attribute being modified in this requestauditRef - string containing audit specification or ticket numberdetail - meta parameters to be set on the domainpublic com.yahoo.athenz.zms.RoleList getRoleList(String domainName)
domainName - name of the domainZMSClientException - in case of failurepublic com.yahoo.athenz.zms.RoleList getRoleList(String domainName, Integer limit, String skip)
domainName - name of the domainlimit - number of roles to returnskip - exclude all the roles including the specified one from the return setZMSClientException - in case of failurepublic com.yahoo.athenz.zms.Roles getRoles(String domainName, Boolean members, String tagKey, String tagValue)
domainName - name of the domainmembers - include all members for group roles as welltagKey - query all roles with given tag nametagValue - query all roles with given tag key and valueZMSClientException - in case of failurepublic com.yahoo.athenz.zms.Roles getRoles(String domainName, Boolean members)
domainName - name of the domainmembers - include all members for group roles as wellZMSClientException - in case of failurepublic com.yahoo.athenz.zms.Role getRole(String domainName, String roleName)
domainName - name of the domainroleName - name of the roleZMSClientException - in case of failurepublic com.yahoo.athenz.zms.Role getRole(String domainName, String roleName, boolean auditLog)
domainName - name of the domainroleName - name of the roleauditLog - include audit log for the role changes in the responseZMSClientException - in case of failurepublic com.yahoo.athenz.zms.Role getRole(String domainName, String roleName, boolean auditLog, boolean expand)
domainName - name of the domainroleName - name of the roleauditLog - include audit log for the role changes in the responseexpand - if the requested role is a delegated/trust role, this flag
will instruct the ZMS server to automatically retrieve the members of the
role from the delegated domain and return as part of the role objectZMSClientException - in case of failurepublic com.yahoo.athenz.zms.Role getRole(String domainName, String roleName, boolean auditLog, boolean expand, boolean pending)
domainName - name of the domainroleName - name of the roleauditLog - include audit log for the role changes in the responseexpand - if the requested role is a delegated/trust role, this flag
will instruct the ZMS server to automatically retrieve the members of the
role from the delegated domain and return as part of the role objectpending - if this flag is set, then all members for that role will be retrieved
including pending membersZMSClientException - in case of failurepublic void putRole(String domainName, String roleName, String auditRef, com.yahoo.athenz.zms.Role role)
domainName - name of the domainroleName - name of the roleauditRef - string containing audit specification or ticket numberrole - role object to be added to the domainZMSClientException - in case of failurepublic void deleteRole(String domainName, String roleName, String auditRef)
domainName - name of the domainroleName - name of the roleauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic com.yahoo.athenz.zms.Membership getMembership(String domainName, String roleName, String memberName)
domainName - name of the domainroleName - name of the rolememberName - name of the memberZMSClientException - in case of failurepublic com.yahoo.athenz.zms.Membership getMembership(String domainName, String roleName, String memberName, String expiration)
domainName - name of the domainroleName - name of the rolememberName - name of the memberexpiration - member expirationZMSClientException - in case of failurepublic com.yahoo.athenz.zms.DomainRoleMembers getOverdueReview(String domainName)
domainName - name of the domainpublic void putMembership(String domainName, String roleName, String memberName, String auditRef)
domainName - name of the domainroleName - name of the rolememberName - name of the member to be addedauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic void putMembership(String domainName, String roleName, String memberName, com.yahoo.rdl.Timestamp expiration, String auditRef)
domainName - name of the domainroleName - name of the rolememberName - name of the member to be addedexpiration - timestamp when this membership will expire (optional)auditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic void putMembershipWithReview(String domainName, String roleName, String memberName, com.yahoo.rdl.Timestamp expiration, com.yahoo.rdl.Timestamp review, String auditRef)
domainName - name of the domainroleName - name of the rolememberName - name of the member to be addedexpiration - timestamp when this membership will expire (optional)review - timestamp when this membership will require review (optional)auditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic void deleteMembership(String domainName, String roleName, String memberName, String auditRef)
domainName - name of the domainroleName - name of the rolememberName - name of the member to be removedauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic void deletePendingMembership(String domainName, String roleName, String memberName, String auditRef)
domainName - name of the domainroleName - name of the rolememberName - name of the pending member to be removedauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic com.yahoo.athenz.zms.UserList getUserList(String domainName)
domainName - optional name of the user domain and/or alias domainZMSClientException - in case of failurepublic com.yahoo.athenz.zms.UserList getUserList()
ZMSClientException - in case of failurepublic void deleteUser(String name, String auditRef)
name - name of the userauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic com.yahoo.athenz.zms.Policies getPolicies(String domainName, Boolean assertions)
domainName - name of the domainassertions - include all assertion for policies as wellZMSClientException - in case of failurepublic com.yahoo.athenz.zms.Policies getPolicies(String domainName, Boolean assertions, Boolean includeNonActive)
domainName - name of the domainassertions - include all assertion for policies as wellincludeNonActive - include non-active policy versionsZMSClientException - in case of failurepublic com.yahoo.athenz.zms.PolicyList getPolicyList(String domainName)
domainName - name of the domainZMSClientException - in case of failurepublic com.yahoo.athenz.zms.PolicyList getPolicyList(String domainName, Integer limit, String skip)
domainName - name of the domainlimit - number of policies to returnskip - exclude all the policies including the specified one from the return setZMSClientException - in case of failurepublic com.yahoo.athenz.zms.PolicyList getPolicyVersionList(String domainName, String policyName)
domainName - name of the domainpolicyName - name of the policyZMSClientException - in case of failurepublic com.yahoo.athenz.zms.Assertion getAssertion(String domainName, String policyName, Long assertionId)
domainName - name of the domainpolicyName - name of the policyassertionId - the id of the assertion to be retrievedZMSClientException - in case of failurepublic com.yahoo.athenz.zms.Assertion putAssertion(String domainName, String policyName, String auditRef, com.yahoo.athenz.zms.Assertion assertion)
domainName - name of the domainpolicyName - name of the policyauditRef - string containing audit specification or ticket numberassertion - Assertion object to be added to the policyZMSClientException - in case of failurepublic com.yahoo.athenz.zms.Assertion putAssertion(String domainName, String policyName, String version, String auditRef, com.yahoo.athenz.zms.Assertion assertion)
domainName - name of the domainpolicyName - name of the policyversion - name of the policyauditRef - string containing audit specification or ticket numberassertion - Assertion object to be added to the policyZMSClientException - in case of failurepublic void deleteAssertion(String domainName, String policyName, Long assertionId, String auditRef)
domainName - name of the domainpolicyName - name of the policyassertionId - the id of the assertion to be deletedauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic void deleteAssertion(String domainName, String policyName, String version, Long assertionId, String auditRef)
domainName - name of the domainpolicyName - name of the policyversion - name of the versionassertionId - the id of the assertion to be deletedauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic com.yahoo.athenz.zms.Policy getPolicy(String domainName, String policyName)
domainName - name of the domainpolicyName - name of the policy to be retrievedZMSClientException - in case of failurepublic com.yahoo.athenz.zms.Policy getPolicyVersion(String domainName, String policyName, String version)
domainName - name of the domainpolicyName - name of the policy to be retrievedversion - name of the policy version to be retrievedZMSClientException - in case of failurepublic void putPolicy(String domainName, String policyName, String auditRef, com.yahoo.athenz.zms.Policy policy)
domainName - name of the domainpolicyName - name of the policyauditRef - string containing audit specification or ticket numberpolicy - Policy object with detailsZMSClientException - in case of failurepublic void putPolicyVersion(String domainName, String policyName, String version, String auditRef)
domainName - name of the domainpolicyName - name of the policyversion - name of the policy versionauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic void putPolicyVersion(String domainName, String policyName, String version, String fromVersion, String auditRef)
domainName - name of the domainpolicyName - name of the policyversion - name of the policy versionfromVersion - name of the policy version to copy assertions fromauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic void deletePolicy(String domainName, String policyName, String auditRef)
domainName - name of the domainpolicyName - name of the policy to be deletedauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic void deletePolicyVersion(String domainName, String policyName, String version, String auditRef)
domainName - name of the domainpolicyName - name of the policyversion - name of the version to be deletedauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic void setActivePolicyVersion(String domainName, String policyName, String version, String auditRef)
domainName - name of the domainpolicyName - name of the policyversion - name of the version to be activatedauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic void putServiceIdentity(String domainName, String serviceName, String auditRef, com.yahoo.athenz.zms.ServiceIdentity service)
domainName - name of the domainserviceName - name of the serviceauditRef - string containing audit specification or ticket numberservice - ServiceIdentity object with all service detailsZMSClientException - in case of failurepublic void putServiceIdentitySystemMeta(String domainName, String serviceName, String attribute, String auditRef, com.yahoo.athenz.zms.ServiceIdentitySystemMeta meta)
domainName - name of the domainserviceName - name of the serviceattribute - service meta attribute being modified in this requestauditRef - string containing audit specification or ticket numbermeta - meta parameters to be set on the serviceZMSClientException - in case of failurepublic com.yahoo.athenz.zms.ServiceIdentity getServiceIdentity(String domainName, String serviceName)
domainName - name of the domainserviceName - name of the service to be retrievedZMSClientException - in case of failurepublic void deleteServiceIdentity(String domainName, String serviceName, String auditRef)
domainName - name of the domainserviceName - name of the service to be deletedauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic com.yahoo.athenz.zms.ServiceIdentities getServiceIdentities(String domainName, Boolean publicKeys, Boolean hosts)
domainName - name of the domainpublicKeys - include all public keys for services as wellhosts - include all configured hosts for services as wellZMSClientException - in case of failurepublic com.yahoo.athenz.zms.ServiceIdentityList getServiceIdentityList(String domainName)
domainName - name of the domainZMSClientException - in case of failurepublic com.yahoo.athenz.zms.ServiceIdentityList getServiceIdentityList(String domainName, Integer limit, String skip)
domainName - name of the domainlimit - number of services to returnskip - exclude all the services including the specified one from the return setZMSClientException - in case of failurepublic com.yahoo.athenz.zms.PublicKeyEntry getPublicKeyEntry(String domainName, String serviceName, String keyId)
domainName - name of the domainserviceName - name of the servicekeyId - the identifier of the public key to be retrievedZMSClientException - in case of failurepublic void putPublicKeyEntry(String domainName, String serviceName, String keyId, String auditRef, com.yahoo.athenz.zms.PublicKeyEntry publicKeyEntry)
domainName - name of the domainserviceName - name of the servicekeyId - the identifier of the public key to be updatedauditRef - string containing audit specification or ticket numberpublicKeyEntry - that contains the public key detailsZMSClientException - in case of failurepublic void deletePublicKeyEntry(String domainName, String serviceName, String keyId, String auditRef)
domainName - name of the domainserviceName - name of the servicekeyId - the identifier of the public key to be deletedauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic void putEntity(String domainName, String entityName, String auditRef, com.yahoo.athenz.zms.Entity entity)
domainName - name of the domainentityName - name of the entityauditRef - string containing audit specification or ticket numberentity - entity object with detailsZMSClientException - in case of failurepublic com.yahoo.athenz.zms.Entity getEntity(String domainName, String entityName)
domainName - name of the domainentityName - name of the entityZMSClientException - in case of failurepublic void deleteEntity(String domainName, String entityName, String auditRef)
domainName - name of the domainentityName - name of the entityauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic com.yahoo.athenz.zms.EntityList getEntityList(String domainName)
domainName - name of the domainZMSClientException - in case of failurepublic void putTenancy(String tenantDomain, String providerService, String auditRef, com.yahoo.athenz.zms.Tenancy tenant)
tenantDomain - name of the tenant domainproviderService - name of the provider service
format: provider-domain-name.provider-service-name, ex: "sports.storage"auditRef - string containing audit specification or ticket numbertenant - Tenancy object with tenant detailsZMSClientException - in case of failurepublic void deleteTenancy(String tenantDomain, String providerService, String auditRef)
tenantDomain - name of the tenant domainproviderService - name of the provider service,
format: provider-domain-name.provider-service-name, ex: "sports.storage"auditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic void putTenant(String providerDomain, String providerService, String tenantDomain, String auditRef, com.yahoo.athenz.zms.Tenancy tenant)
providerDomain - provider domain nameproviderService - provider service nametenantDomain - name of the tenant domainauditRef - string containing audit specification or ticket numbertenant - Tenancy object with tenant detailsZMSClientException - in case of failurepublic void deleteTenant(String providerDomain, String providerService, String tenantDomain, String auditRef)
providerDomain - provider domain nameproviderService - provider service nametenantDomain - name of the tenant domainauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic void putTenantResourceGroupRoles(String providerDomain, String providerServiceName, String tenantDomain, String resourceGroup, String auditRef, com.yahoo.athenz.zms.TenantResourceGroupRoles tenantRoles)
providerDomain - name of the provider domainproviderServiceName - name of the provider servicetenantDomain - name of the tenant's domainresourceGroup - name of the resource groupauditRef - string containing audit specification or ticket numbertenantRoles - Tenant rolesZMSClientException - in case of failurepublic com.yahoo.athenz.zms.TenantResourceGroupRoles getTenantResourceGroupRoles(String providerDomain, String providerServiceName, String tenantDomain, String resourceGroup)
providerDomain - name of the provider domainproviderServiceName - name of the provider servicetenantDomain - name of the tenant's domainresourceGroup - name of the resource groupZMSClientException - in case of failurepublic void deleteTenantResourceGroupRoles(String providerDomain, String providerServiceName, String tenantDomain, String resourceGroup, String auditRef)
providerDomain - name of the provider domainproviderServiceName - name of the provider servicetenantDomain - name of tenant's domainresourceGroup - name of the resource groupauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic com.yahoo.athenz.zms.Access getAccess(String action, String resource, String trustDomain)
action - value of the action to be carried out (e.g. "UPDATE", "DELETE")resource - resource name. Resource is defined as {DomainName}:{Entity}"trustDomain - (optional) if the access checks involves cross domain check only
check the specified trusted domain and ignore all othersZMSClientException - in case of failurepublic com.yahoo.athenz.zms.Access getAccess(String action, String resource, String trustDomain, String principal)
action - value of the action to be carried out (e.g. "UPDATE", "DELETE")resource - resource name. Resource is defined as {DomainName}:{Entity}"trustDomain - (optional) if the access checks involves cross domain check only
check the specified trusted domain and ignore all othersprincipal - (optional) carry out the access check for specified principalZMSClientException - in case of failurepublic com.yahoo.athenz.zms.Access getAccessExt(String action, String resource, String trustDomain, String principal)
action - value of the action to be carried out (e.g. "UPDATE", "DELETE")resource - resource string.trustDomain - (optional) if the access checks involves cross domain check only
check the specified trusted domain and ignore all othersprincipal - (optional) carry out the access check for specified principalZMSClientException - in case of failurepublic com.yahoo.athenz.zms.SignedDomains getSignedDomains(String domainName, String metaOnly, String matchingTag, Map<String,List<String>> responseHeaders)
domainName - name of the domain. if specified, the server will
only return this domain in the result setmetaOnly - (can be null) must have value of true or false (default).
if set to true, zms server will only return meta information
about each domain (description, last modified timestamp, etc) and
no role/policy/service details will be returned.matchingTag - (can be null) contains modified timestamp received
with last request. If null, then return all domains.responseHeaders - contains the "tag" returned for modification
time of the domains, map key = "tag", List should
contain a single value timestamp String to be used
with subsequent call as matchingTag to this APIZMSClientException - in case of failurepublic com.yahoo.athenz.zms.SignedDomains getSignedDomains(String domainName, String metaOnly, String metaAttr, String matchingTag, Map<String,List<String>> responseHeaders)
domainName - name of the domain. if specified, the server will
only return this domain in the result setmetaOnly - (can be null) must have value of true or false (default).
if set to true, zms server will only return meta information
about each domain (description, last modified timestamp, etc) and
no role/policy/service details will be returned.metaAttr - (can be null) if metaOnly option is set to true, this
parameter can filter the results based on the presence of the
requested attribute. Allowed values are: account, ypmid, and all.
account - only return domains that have the account value set
ypmid - only return domains that have the ypmid value set
all - return all domains (no filtering).matchingTag - (can be null) contains modified timestamp received
with last request. If null, then return all domains.responseHeaders - contains the "tag" returned for modification
time of the domains, map key = "tag", List should
contain a single value timestamp String to be used
with subsequent call as matchingTag to this APIZMSClientException - in case of failurepublic com.yahoo.athenz.zms.SignedDomains getSignedDomains(String domainName, String metaOnly, String metaAttr, boolean masterCopy, String matchingTag, Map<String,List<String>> responseHeaders)
domainName - name of the domain. if specified, the server will
only return this domain in the result setmetaOnly - (can be null) must have value of true or false (default).
if set to true, zms server will only return meta information
about each domain (description, last modified timestamp, etc) and
no role/policy/service details will be returned.metaAttr - (can be null) if metaOnly option is set to true, this
parameter can filter the results based on the presence of the
requested attribute. Allowed values are: account, ypmid, and all.
account - only return domains that have the account value set
ypmid - only return domains that have the ypmid value set
all - return all domains (no filtering).masterCopy - system principals can request the request to be processed
from the master data source instead of read replicas in case
there are any configuredmatchingTag - (can be null) contains modified timestamp received
with last request. If null, then return all domains.responseHeaders - contains the "tag" returned for modification
time of the domains, map key = "tag", List should
contain a single value timestamp String to be used
with subsequent call as matchingTag to this APIZMSClientException - in case of failurepublic com.yahoo.athenz.zms.SignedDomains getSignedDomains(String domainName, String metaOnly, String metaAttr, boolean masterCopy, boolean conditions, String matchingTag, Map<String,List<String>> responseHeaders)
domainName - name of the domain. if specified, the server will
only return this domain in the result setmetaOnly - (can be null) must have value of true or false (default).
if set to true, zms server will only return meta information
about each domain (description, last modified timestamp, etc) and
no role/policy/service details will be returned.metaAttr - (can be null) if metaOnly option is set to true, this
parameter can filter the results based on the presence of the
requested attribute. Allowed values are: account, ypmid, and all.
account - only return domains that have the account value set
ypmid - only return domains that have the ypmid value set
all - return all domains (no filtering).masterCopy - system principals can request the request to be processed
from the master data source instead of read replicas in case
there are any configuredconditions - an optional parameter to request assertion conditions to be
included in the response assertions in case
there are any configuredmatchingTag - (can be null) contains modified timestamp received
with last request. If null, then return all domains.responseHeaders - contains the "tag" returned for modification
time of the domains, map key = "tag", List should
contain a single value timestamp String to be used
with subsequent call as matchingTag to this APIZMSClientException - in case of failurepublic com.yahoo.athenz.zms.DomainMetaStoreValidValuesList getDomainMetaStoreValidValuesList(String attributeName, String userName)
attributeName - name of attributeuserName - restrict to values associated with the given userpublic com.yahoo.athenz.zms.UserToken getUserToken(String userName)
userName - name of the user. This is only used to verify that it matches
the user name from the credentials and is optional. The caller can just pass
the string "_self_" as the userName to bypass this optional check.ZMSClientException - in case of failurepublic com.yahoo.athenz.zms.UserToken getUserToken(String userName, String serviceNames, Boolean header)
userName - name of the userserviceNames - comma separated list of authorized service namesheader - boolean flag whether or not return authority header nameZMSClientException - in case of failurepublic com.yahoo.athenz.zms.UserToken getUserToken(String userName, String serviceNames)
userName - name of the userserviceNames - comma separated list of authorized service namesZMSClientException - in case of failurepublic void putDefaultAdmins(String domainName, String auditRef, com.yahoo.athenz.zms.DefaultAdmins defaultAdmins)
domainName - - name of the domain to add default administrators toauditRef - - string containing audit specification or ticket numberdefaultAdmins - - list of names to be added as default administratorsZMSClientException - in case of failurepublic com.yahoo.athenz.auth.Principal getPrincipal(String serviceToken)
serviceToken - token to be validated.ZMSClientException - in case of failurepublic com.yahoo.athenz.auth.Principal getPrincipal(String serviceToken, String tokenHeader)
serviceToken - token to be validated.tokenHeader - name of the authorization header for the tokenZMSClientException - in case of failurepublic void putProviderResourceGroupRoles(String tenantDomain, String providerDomain, String providerServiceName, String resourceGroup, String auditRef, com.yahoo.athenz.zms.ProviderResourceGroupRoles providerRoles)
tenantDomain - name of the tenant's domainproviderDomain - name of the provider domainproviderServiceName - name of the provider serviceresourceGroup - name of the resource groupauditRef - string containing audit specification or ticket numberproviderRoles - Provider rolesZMSClientException - in case of failurepublic void deleteProviderResourceGroupRoles(String tenantDomain, String providerDomain, String providerServiceName, String resourceGroup, String auditRef)
tenantDomain - name of tenant's domainproviderDomain - name of the provider domainproviderServiceName - name of the provider serviceresourceGroup - name of the resource groupauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic com.yahoo.athenz.zms.ProviderResourceGroupRoles getProviderResourceGroupRoles(String tenantDomain, String providerDomain, String providerServiceName, String resourceGroup)
tenantDomain - name of the tenant's domainproviderDomain - name of the provider domainproviderServiceName - name of the provider serviceresourceGroup - name of the resource groupZMSClientException - in case of failurepublic com.yahoo.athenz.zms.DomainDataCheck getDomainDataCheck(String domain)
domain - name of the domain to be checkedZMSClientException - in case of failurepublic com.yahoo.athenz.zms.Template getTemplate(String template)
template - name of the solution template to be retrievedZMSClientException - in case of failurepublic com.yahoo.athenz.zms.ServerTemplateList getServerTemplateList()
ZMSClientException - in case of failurepublic void putDomainTemplate(String domain, String auditRef, com.yahoo.athenz.zms.DomainTemplate templates)
domain - name of the domain to be updatedauditRef - string containing audit specification or ticket numbertemplates - contains list of template names to be provisioned in the domainZMSClientException - in case of failurepublic void putDomainTemplateExt(String domain, String template, String auditRef, com.yahoo.athenz.zms.DomainTemplate templates)
domain - name of the domain to be updatedtemplate - name of the template to be appliedauditRef - string containing audit specification or ticket numbertemplates - containing the single template (must match the template parameter) to be provisioned in the domainZMSClientException - in case of failurepublic void deleteDomainTemplate(String domain, String template, String auditRef)
domain - name of the domain to be updatedtemplate - is the name of the provisioned template to be deletedauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic com.yahoo.athenz.zms.DomainTemplateList getDomainTemplateList(String domain)
domain - name of the domainZMSClientException - in case of failurepublic com.yahoo.athenz.zms.ResourceAccessList getResourceAccessList(String principal, String action)
principal - the principal name (e.g. user.joe). Must have special
privileges to execute this query without specifying the principal.
Check with Athenz Service Administrators if you have a use case to
request all principals from Athenz Serviceaction - optional field specifying what action to filter assertions onZMSClientException - in case of failurepublic com.yahoo.athenz.zms.Quota getQuota(String domainName)
domainName - name of the domainZMSClientException - in case of failurepublic void putQuota(String domainName, String auditRef, com.yahoo.athenz.zms.Quota quota)
domainName - name of the domainauditRef - string containing audit specification or ticket numberquota - object to be set for the domainZMSClientException - in case of failurepublic void deleteQuota(String domainName, String auditRef)
domainName - name of the domainauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic void deleteDomainRoleMember(String domainName, String memberName, String auditRef)
domainName - name of the domainmemberName - name of the member to be removed from all rolesauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic com.yahoo.athenz.zms.DomainRoleMembers getDomainRoleMembers(String domainName)
domainName - name of the domainZMSClientException - in case of failurepublic com.yahoo.athenz.zms.DomainRoleMember getPrincipalRoles(String principal, String domainName)
principal - - Requested principal. If null will return roles for the user making the calldomainName - - Requested domain. If null will return roles from all domainspublic void putRoleSystemMeta(String domainName, String roleName, String attribute, String auditRef, com.yahoo.athenz.zms.RoleSystemMeta meta)
domainName - domain name containing the role to be modifiedroleName - role name to be modifiedattribute - role meta attribute being modified in this requestauditRef - string containing audit specification or ticket numbermeta - meta parameters to be set on the rolepublic void putRoleMeta(String domainName, String roleName, String auditRef, com.yahoo.athenz.zms.RoleMeta meta)
domainName - domain name containing the role to be modifiedroleName - role name to be modifiedauditRef - string containing audit specification or ticket numbermeta - meta parameters to be set on the rolepublic void putMembershipDecision(String domainName, String roleName, String memberName, com.yahoo.rdl.Timestamp expiration, boolean approval, String auditRef)
domainName - name of the domainroleName - name of the rolememberName - name of the member to be addedexpiration - timestamp when this membership will expire (optional)approval - flag indicating whether this membership is approved or rejectedauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic com.yahoo.athenz.zms.DomainRoleMembership getPendingDomainRoleMembersList(String principal)
principal - name of the approver principal (optional)ZMSClientException - in case of failurepublic void putRoleReview(String domainName, String roleName, String auditRef, com.yahoo.athenz.zms.Role role)
domainName - name of the domainroleName - name of the roleauditRef - string containing audit specification or ticket numberrole - Role object containing updated and/or deleted membersZMSClientException - in case of failurepublic void deleteGroup(String domainName, String groupName, String auditRef)
domainName - name of the domaingroupName - name of the groupauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic void deleteGroupMembership(String domainName, String groupName, String memberName, String auditRef)
domainName - name of the domaingroupName - name of the groupmemberName - name of the member to be removedauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic void deletePendingGroupMembership(String domainName, String groupName, String memberName, String auditRef)
domainName - name of the domaingroupName - name of the groupmemberName - name of the pending member to be removedauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic String generateGroupName(String domain, String group)
domain - name of the domaingroup - name of the grouppublic com.yahoo.athenz.zms.GroupMembership getGroupMembership(String domainName, String groupName, String memberName, String expiration)
domainName - name of the domaingroupName - name of the groupmemberName - name of the memberexpiration - member expirationZMSClientException - in case of failurepublic com.yahoo.athenz.zms.DomainGroupMember getPrincipalGroups(String principal, String domainName)
principal - - Requested principal. If null will return groups for the user making the calldomainName - - Requested domain. If null will return groups from all domainspublic void putGroupSystemMeta(String domainName, String groupName, String attribute, String auditRef, com.yahoo.athenz.zms.GroupSystemMeta meta)
domainName - domain name containing the group to be modifiedgroupName - group name to be modifiedattribute - group meta attribute being modified in this requestauditRef - string containing audit specification or ticket numbermeta - meta parameters to be set on the grouppublic void putGroupMeta(String domainName, String groupName, String auditRef, com.yahoo.athenz.zms.GroupMeta meta)
domainName - domain name containing the group to be modifiedgroupName - group name to be modifiedauditRef - string containing audit specification or ticket numbermeta - meta parameters to be set on the grouppublic void putGroupMembershipDecision(String domainName, String groupName, String memberName, boolean approval, String auditRef)
domainName - name of the domaingroupName - name of the groupmemberName - name of the member to be addedapproval - flag indicating whether this membership is approved or rejectedauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic com.yahoo.athenz.zms.DomainGroupMembership getPendingDomainGroupMembersList(String principal)
principal - name of the approver principal (optional)ZMSClientException - in case of failurepublic void putGroupReview(String domainName, String groupName, String auditRef, com.yahoo.athenz.zms.Group group)
domainName - name of the domaingroupName - name of the groupauditRef - string containing audit specification or ticket numbergroup - Group object containing updated and/or deleted membersZMSClientException - in case of failurepublic com.yahoo.athenz.zms.Group getGroup(String domainName, String groupName, boolean auditLog, boolean pending)
domainName - name of the domaingroupName - name of the groupauditLog - include audit log for the group changes in the responsepending - if this flag is set, then all members for that group will be retrieved
including pending membersZMSClientException - in case of failurepublic void putGroup(String domainName, String groupName, String auditRef, com.yahoo.athenz.zms.Group group)
domainName - name of the domaingroupName - name of the groupauditRef - string containing audit specification or ticket numbergroup - group object to be added to the domainZMSClientException - in case of failurepublic com.yahoo.athenz.zms.Groups getGroups(String domainName, Boolean members, String tagKey, String tagValue)
domainName - name of the domainmembers - include all members for group as welltagKey - query all groups with given tag nametagValue - query all groups with given tag key and valueZMSClientException - in case of failurepublic com.yahoo.athenz.zms.Groups getGroups(String domainName, Boolean members)
domainName - name of the domainmembers - include all members for group groups as wellZMSClientException - in case of failurepublic void putGroupMembership(String domainName, String groupName, String memberName, String auditRef)
domainName - name of the domaingroupName - name of the groupmemberName - name of the member to be addedauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic com.yahoo.athenz.zms.AssertionConditions putAssertionConditions(String domainName, String policyName, Long assertionId, String auditRef, com.yahoo.athenz.zms.AssertionConditions assertionConditions)
domainName - name of the domainpolicyName - name of the policyassertionId - id of the assertion associated with the conditionsauditRef - string containing audit specification or ticket numberassertionConditions - object containing conditions associated with the given assertion idZMSClientException - in case of failurepublic com.yahoo.athenz.zms.AssertionCondition putAssertionCondition(String domainName, String policyName, Long assertionId, String auditRef, com.yahoo.athenz.zms.AssertionCondition assertionCondition)
domainName - name of the domainpolicyName - name of the policyassertionId - id of the assertion associated with the conditionauditRef - string containing audit specification or ticket numberassertionCondition - object containing a single logical condition associated with the given assertion idZMSClientException - in case of failurepublic void deleteAssertionConditions(String domainName, String policyName, Long assertionId, String auditRef)
domainName - name of the domainpolicyName - name of the policyassertionId - id of the assertion associated with the conditionsauditRef - string containing audit specification or ticket numberZMSClientException - in case of failurepublic void deleteAssertionCondition(String domainName, String policyName, Long assertionId, int conditionId, String auditRef)
domainName - name of the domainpolicyName - name of the policyassertionId - id of the assertion associated with the conditionsconditionId - id of the condition to be deletedauditRef - string containing audit specification or ticket numberZMSClientException - in case of failureCopyright © 2016–2021 Yahoo Inc.. All rights reserved.