| 1 | import type * as signer from "@distilled.cloud/aws/signer"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `signer:GetRevocationStatus`. |
| 7 | * |
| 8 | * Checks whether a signature's signing profile version, signing job, or |
| 9 | * signing certificates have been revoked — the verification-time complement |
| 10 | * to `RevokeSignature` / `RevokeSigningProfile`, served from Signer's |
| 11 | * regional verification (`data-`) endpoint. Account-level operation — the |
| 12 | * entities checked are chosen per request at runtime, so the binding takes no |
| 13 | * resource argument. Provide the implementation with |
| 14 | * `Effect.provide(AWS.Signer.GetRevocationStatusHttp)`. |
| 15 | * ### Revoking Signatures |
| 16 | * **Example:** Verify a Signature Before Trusting It |
| 17 | * ```typescript |
| 18 | * // init — account-level binding, no resource argument |
| 19 | * const getRevocationStatus = yield* AWS.Signer.GetRevocationStatus(); |
| 20 | * |
| 21 | * // runtime |
| 22 | * const { revokedEntities } = yield* getRevocationStatus({ |
| 23 | * signatureTimestamp: signedAt, |
| 24 | * platformId: "Notation-OCI-SHA384-ECDSA", |
| 25 | * profileVersionArn, |
| 26 | * jobArn, |
| 27 | * certificateHashes, |
| 28 | * }); |
| 29 | * const trusted = (revokedEntities ?? []).length === 0; |
| 30 | * ``` |
| 31 | * |
| 32 | * @binding |
| 33 | */ |
| 34 | export interface GetRevocationStatus extends Binding.Service< |
| 35 | GetRevocationStatus, |
| 36 | "AWS.Signer.GetRevocationStatus", |
| 37 | () => Effect.Effect< |
| 38 | ( |
| 39 | request: signer.GetRevocationStatusRequest, |
| 40 | ) => Effect.Effect< |
| 41 | signer.GetRevocationStatusResponse, |
| 42 | signer.GetRevocationStatusError |
| 43 | > |
| 44 | > |
| 45 | > {} |
| 46 | export const GetRevocationStatus = Binding.Service<GetRevocationStatus>( |
| 47 | "AWS.Signer.GetRevocationStatus", |
| 48 | ); |