Class QuorumApprovalPendingException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
co.ankatech.ankasecure.keymanagement.exception.KeyManagementSdkException
co.ankatech.ankasecure.keymanagement.exception.QuorumApprovalPendingException
- All Implemented Interfaces:
Serializable
The operation was not performed: the tenant's quorum policy gates it, so the Admin API recorded a
quorum request instead and answered
202 Accepted.
Thrown by an operation that is gated only when the tenant's quorum policy enables it: a key
metadata update that weakens the key, or a rotation. The request waits until
QuorumRequestReceipt.requiredApprovals() people other than the requester approve it in the
Admin Console, and then the Admin API runs the operation exactly as this call would have run it. One
rejection, the requester's cancellation or the expiry ends it without running. A destruction request
is always gated, so it never throws this: it returns the QuorumRequestReceipt itself.
try {
sdk.keys().update("payments-signing-key", update);
} catch (QuorumApprovalPendingException pending) {
log.info("Waiting for {} approvals: request {}", pending.getReceipt().requiredApprovals(),
pending.getReceipt().requestId());
}
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intHTTP status of the answer that carries a quorum request. -
Constructor Summary
ConstructorsConstructorDescriptionCreates the exception from the quorum request the Admin API answered with. -
Method Summary
Modifier and TypeMethodDescriptionThe request id is a UUID: the SDK refuses a quorum answer whose id is not one.Methods inherited from class co.ankatech.ankasecure.keymanagement.exception.KeyManagementSdkException
getHttpStatus, getOAuthError, getProblemDetail, getProblemExtensions, getProblemInstance, getProblemTitle, getProblemType, getRetryAfterMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
STATUS
public static final int STATUSHTTP status of the answer that carries a quorum request.- See Also:
-
-
Constructor Details
-
QuorumApprovalPendingException
Creates the exception from the quorum request the Admin API answered with. Its message names the request id and the operation asTerminalSafe.text(String)renders them.- Parameters:
receipt- the quorum request; must not benull
-
-
Method Details
-
getReceipt
- Returns:
- the quorum request the operation now waits on
-
getRequestId
The request id is a UUID: the SDK refuses a quorum answer whose id is not one. A caller that displays the receipt's other members renders them throughTerminalSafe.text(String).- Returns:
- the quorum request id, the value
quorumRequests().get(...)andquorumRequests().cancel(...)take
-