Class UploadTrackingToken
java.lang.Object
ai.pipeline.connector.intake.token.UploadTrackingToken
Mints and verifies the opaque, HMAC-SHA256-signed tracking token returned from
every upload. The token is the client's receipt: it presents it to a
status lookup, and the service verifies the signature and reads the
UploadTokenClaims to resolve which document is being asked about.
Signed, not encrypted: the design goal is integrity and tenant-scoping, not confidentiality. A client cannot forge a token for a doc_id it never uploaded, cannot mutate the account/datasource it is scoped to, and cannot enumerate other documents — any tamper breaks the signature and the token is rejected.
Format: base64url(claimsJson) "." base64url(hmacSha256(key, base64url(claimsJson))).
-
Constructor Summary
ConstructorsConstructorDescriptionUploadTrackingToken(String signingKey, com.fasterxml.jackson.databind.ObjectMapper mapper) -
Method Summary
Modifier and TypeMethodDescriptionMint a token for an upload — issued on success and on failure once a doc_id is derived, since doc_id is deterministic and the client can poll any outcome (a retry lands on the same row).Verify a token's signature and return its claims.
-
Constructor Details
-
UploadTrackingToken
@Inject public UploadTrackingToken(String signingKey, com.fasterxml.jackson.databind.ObjectMapper mapper)
-
-
Method Details
-
issue
-
verify
Verify a token's signature and return its claims.- Throws:
HttpIntakeException- (400) if the token is malformed or the signature does not match — never reveals which check failed.
-