Class CredHubPermissionV2Template
java.lang.Object
org.springframework.credhub.core.permissionV2.CredHubPermissionV2Template
- All Implemented Interfaces:
CredHubPermissionV2Operations
Implements the main interaction with CredHub to add, retrieve, and delete permissions.
- Author:
- Scott Frederick, Alberto C. RĂos
-
Constructor Summary
ConstructorsConstructorDescriptionCredHubPermissionV2Template(CredHubOperations credHubOperations) Create a newCredHubPermissionV2Template. -
Method Summary
Modifier and TypeMethodDescriptionaddPermissions(CredentialName path, Permission permission) Add permissions to an credential path.voidDelete a permission.getPermissions(String id) Get a permission.getPermissionsByPathAndActor(CredentialName path, Actor actor) Get a permission by path and actor.updatePermissions(String id, CredentialName path, Permission permission) Add permissions to an existing credential.
-
Constructor Details
-
CredHubPermissionV2Template
Create a newCredHubPermissionV2Template.- Parameters:
credHubOperations- theCredHubOperationsto use for interactions with CredHub
-
-
Method Details
-
getPermissions
Description copied from interface:CredHubPermissionV2OperationsGet a permission.- Specified by:
getPermissionsin interfaceCredHubPermissionV2Operations- Parameters:
id- the CredHub-assigned ID of the permission; must not be null- Returns:
- the details if the specified permission
-
getPermissionsByPathAndActor
Description copied from interface:CredHubPermissionV2OperationsGet a permission by path and actor.- Specified by:
getPermissionsByPathAndActorin interfaceCredHubPermissionV2Operations- Parameters:
path- the path of the credentials; must not be nullactor- the actor of the credentials; must not be null- Returns:
- the details if the specified permission
-
addPermissions
Description copied from interface:CredHubPermissionV2OperationsAdd permissions to an credential path.- Specified by:
addPermissionsin interfaceCredHubPermissionV2Operations- Parameters:
path- the path of the credentials; must not be nullpermission- a permission to add- Returns:
- the details if the added permission
-
updatePermissions
public CredentialPermission updatePermissions(String id, CredentialName path, Permission permission) Description copied from interface:CredHubPermissionV2OperationsAdd permissions to an existing credential.- Specified by:
updatePermissionsin interfaceCredHubPermissionV2Operations- Parameters:
id- the CredHub-assigned ID of the permission; must not be nullpath- the path of the credentials; must not be nullpermission- a permission to add- Returns:
- the details if the added permission
-
deletePermission
Description copied from interface:CredHubPermissionV2OperationsDelete a permission.- Specified by:
deletePermissionin interfaceCredHubPermissionV2Operations- Parameters:
id- the CredHub-assigned ID of the permission; must not be null
-