Class DecryptVerifyIntegrityException
- All Implemented Interfaces:
Serializable
INVALID: the decrypted plaintext was discarded and no file exists at the destination.
The streaming route commits its 200 before the inner signers are known, so a signer
that does not verify — or that the caller holds no grant on — surfaces here rather than
as the 400/403 the buffered route returns. This exception carries what the server
reported, so the caller learns which signer failed exactly as it would from a
DecryptVerifyResult: getSignatureResults() lists every inner signature in token
order with its kid, algorithm, materialVersion and verified
outcome, and getGcmTagVerdict() / getSignatureVerdict() say which of the two
integrity dimensions failed.
Being a StreamIntegrityException, it is caught by every handler of that type;
StreamIntegrityException.getVerdict() is INVALID.
- See Also:
-
Field Summary
Fields inherited from class co.ankatech.ankasecure.sdk.exception.AnkaSecureSdkException
MAX_RETRY_AFTER_SECONDS -
Constructor Summary
ConstructorsConstructorDescriptionDecryptVerifyIntegrityException(String message, String operation, String verdict, String reason, String correlationId, String gcmTagVerdict, String signatureVerdict, List<co.ankatech.secure.client.model.SignatureResult> signatureResults) Constructs the exception for anINVALIDtwo-verdict decrypt-verify part. -
Method Summary
Modifier and TypeMethodDescriptionReturns the outer AES-GCM tag outcome.List<co.ankatech.secure.client.model.SignatureResult>Returns the server's per-signature detail of the inner JWS, one entry per signature in token order; an entry withverified == falsenames a signer that did not verify or was refused.Returns the inner JWS signature outcome.Methods inherited from class co.ankatech.ankasecure.sdk.exception.StreamIntegrityException
getCorrelationId, getOperation, getReason, getVerdictMethods inherited from class co.ankatech.ankasecure.sdk.exception.AnkaSecureSdkException
getContext, getErrorCode, getHttpStatus, getResponseBody, getRetryAfterSecondsMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
DecryptVerifyIntegrityException
public DecryptVerifyIntegrityException(String message, String operation, String verdict, String reason, String correlationId, String gcmTagVerdict, String signatureVerdict, List<co.ankatech.secure.client.model.SignatureResult> signatureResults) Constructs the exception for anINVALIDtwo-verdict decrypt-verify part.- Parameters:
message- the detail message (oracle-safe; must not embed plaintext / key material)operation- the operation whose verdict failed (may benull)verdict- the overall verdict,INVALIDreason- the server's oracle-safe reason (may benull)correlationId- the request correlation id (may benull)gcmTagVerdict- the outer AES-GCM tag outcome (may benull)signatureVerdict- the inner JWS signature outcome (may benull)signatureResults- the per-signature detail, in token order (nullwhen the server reported none)
-
-
Method Details
-
getGcmTagVerdict
Returns the outer AES-GCM tag outcome.Server-supplied and unrendered: display it through
InertText.text(String).- Returns:
VALIDorINVALID, ornullwhen the server did not report it
-
getSignatureVerdict
Returns the inner JWS signature outcome.Server-supplied and unrendered: display it through
InertText.text(String).- Returns:
VALIDorINVALID, ornullwhen the server did not report it
-
getSignatureResults
Returns the server's per-signature detail of the inner JWS, one entry per signature in token order; an entry withverified == falsenames a signer that did not verify or was refused.- Returns:
- an unmodifiable list, empty when the server reported no entries; each call returns fresh copies of the entries, so changing one changes nothing in this exception
-