Class InternalCryptoUseCaseOperations
java.lang.Object
co.ankatech.ankasecure.keymanagement.InternalCryptoUseCaseOperations
The tenant's internal cryptographic use cases: a runtime identity (an actor and its credential), the
grants and constraints it uses, provisioned and governed as one unit. Obtained from
AuthenticatedKeyManagementSdk.internalCryptoUseCases().
CreateInternalCryptoUseCaseRequest request = new CreateInternalCryptoUseCaseRequest()
.applicationId(applicationId)
.name("invoice-signing")
.keyKid("invoice-signing-key");
try (InternalCryptoUseCaseProvisioning provisioned = sdk.internalCryptoUseCases().create(request)) {
// store provisioned.clientSecret() now: it is never returned again
}
-
Method Summary
Modifier and TypeMethodDescriptioncreate(CreateInternalCryptoUseCaseRequest request) Provisions a use case (POST /tenants/{t}/internal-crypto-use-cases) and returns its actor credential's client secret once, in a zeroizable holder.voidRevokes a use case and the identity, grants and credential it provisioned (DELETE /tenants/{t}/internal-crypto-use-cases/{id}).Reads one use case (GET /tenants/{t}/internal-crypto-use-cases/{id}).Lists the tenant's use cases (GET /tenants/{t}/internal-crypto-use-cases).Resumes a suspended use case (PATCH /tenants/{t}/internal-crypto-use-cases/{id}/resume).suspend(UUID useCaseId, SuspendInternalCryptoUseCaseRequest request) Suspends a use case (PATCH /tenants/{t}/internal-crypto-use-cases/{id}/suspend).
-
Method Details
-
list
Lists the tenant's use cases (GET /tenants/{t}/internal-crypto-use-cases).- Parameters:
query- the status filter and page; must not benull- Returns:
- one page of use cases
- Throws:
KeyManagementSdkException- when the call is refused
-
create
Provisions a use case (POST /tenants/{t}/internal-crypto-use-cases) and returns its actor credential's client secret once, in a zeroizable holder.- Parameters:
request- the use case; must not benull- Returns:
- the created use case, its secret moved out of the response into the holder
- Throws:
KeyManagementSdkException- when the call is refused
-
get
Reads one use case (GET /tenants/{t}/internal-crypto-use-cases/{id}).- Parameters:
useCaseId- the use case; must not benull- Returns:
- the use case (never with its secret)
- Throws:
KeyManagementSdkException- when the call is refused
-
delete
Revokes a use case and the identity, grants and credential it provisioned (DELETE /tenants/{t}/internal-crypto-use-cases/{id}).- Parameters:
useCaseId- the use case; must not benullreason- why it is revoked, recorded in the audit trail, ornull- Throws:
KeyManagementSdkException- when the call is refused
-
suspend
public InternalCryptoUseCaseResponse suspend(UUID useCaseId, SuspendInternalCryptoUseCaseRequest request) Suspends a use case (PATCH /tenants/{t}/internal-crypto-use-cases/{id}/suspend).- Parameters:
useCaseId- the use case; must not benullrequest- the suspension reason; must not benull- Returns:
- the suspended use case
- Throws:
KeyManagementSdkException- when the call is refused
-
resume
Resumes a suspended use case (PATCH /tenants/{t}/internal-crypto-use-cases/{id}/resume).- Parameters:
useCaseId- the use case; must not benull- Returns:
- the resumed use case
- Throws:
KeyManagementSdkException- when the call is refused
-