diff --git a/api/endorsement-provisioning/README.md b/api/endorsement-provisioning/README.md index 1a5522e..11ce6f3 100644 --- a/api/endorsement-provisioning/README.md +++ b/api/endorsement-provisioning/README.md @@ -133,6 +133,40 @@ format is CoRIM. } ``` +## Endorsements Activation Policy + +A set of endorsements need to be "active" to be usable during verification and CoSERV queries. The provisioning service has +a default activation policy for all endorsements submitted at the `/submit` endpoint. A provisioning server's activation +policy can be seen by querying the well-known endpoint and looking for the `activate-on-submit` field in the response. +If this is set to `true`, it means that the endorsements are activated on submission. If it's `false`, the endorsements +are only submitted and not activated. + +The provisioning service's activation policy can be overriden by specifying a boolean query parameter `activate` in the URL. + +### Example + +```text +>> Request: + POST /endorsement-provisioning/v1/submit?activate=false + Host: veraison.example + Content-Type: application/rim+cbor + +...CoRIM as binary data... + +<< Response: + HTTP/1.1 201 Created + Content-Type: application/vnd.veraison.provisioning-session+json + Location: /endorsement-provisioning/v1/session/1234567890 + + { + "status": "processing", + "expiry": "2030-10-12T07:20:50.52Z" + } +``` + +Post-submission, the endorsements can be activated and deactivated using the Endorsement Lifecycle Management (ELM) +interface, which is described in the next section. + # Endorsement Lifecycle Management (ELM) Interface This interface can be used for activating/deactivating endorsements provisioned diff --git a/api/endorsement-provisioning/endorsement-provisioning.yaml b/api/endorsement-provisioning/endorsement-provisioning.yaml index 9b64708..b716375 100644 --- a/api/endorsement-provisioning/endorsement-provisioning.yaml +++ b/api/endorsement-provisioning/endorsement-provisioning.yaml @@ -11,6 +11,15 @@ paths: post: description: > Submit a CoRIM payload containing the endorsements to be provisioned + parameters: + - name: activate + in: query + description: > + Whether to activate the endorsements on submission. This will override + the default activate-on-submit policy of the provisioning service. + required: false + schema: + type: boolean requestBody: required: true content: diff --git a/api/well-known/README.md b/api/well-known/README.md index 9571be1..2277fa9 100644 --- a/api/well-known/README.md +++ b/api/well-known/README.md @@ -9,6 +9,7 @@ The information for the provisioning service has the following attributes: * The allowed provisioning media types; * The version of the provisioning service; * The current operational state of the service; +* The default activation policy on submission of endorsements; * The exposed API endpoints and the corresponding URLs (relative to the request's base URL). ### Querying information about the Provisioning service @@ -32,6 +33,7 @@ Content-format: application/vnd.veraison.discovery+json ], "version": "commit-a8056d0", "service-state": "READY", + "activate-on-submit": true, "api-endpoints": { "provisioningSubmit": "/endorsement-provisioning/v1/submit" }