@inklok/api-spec 7.7.2 → 7.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/openapi.yaml +211 -112
  2. package/package.json +1 -1
package/openapi.yaml CHANGED
@@ -8,7 +8,7 @@ info:
8
8
  Authenticate using an API key or bearer token, then use the resources below to manage
9
9
  templates, agreements, documents, and signing. For your first integration, start with
10
10
  the Quick Start guide.
11
- version: "7.7.2"
11
+ version: "7.8.1"
12
12
  contact:
13
13
  name: Inklok API Support
14
14
  email: support@inklok.com
@@ -129,7 +129,7 @@ paths:
129
129
  summary: List crypto identities
130
130
  x-visibility: internal
131
131
  description: |
132
- Returns RSA-OAEP session public keys visible to the authenticated caller.
132
+ Returns registered public keys for authenticated crypto principals visible to the caller.
133
133
  x-required-roles: [signer, workflow-editor, workflow-operator, agreement-auditor, organization-admin]
134
134
  tags:
135
135
  - Crypto Identities
@@ -144,7 +144,7 @@ paths:
144
144
  required: false
145
145
  schema:
146
146
  type: string
147
- enum: [signer, org-session]
147
+ enum: [USER, PARTY, ORG_ROLE, WORKSPACE_ROLE]
148
148
  - name: subjectId
149
149
  in: query
150
150
  required: false
@@ -205,7 +205,7 @@ paths:
205
205
  summary: Upsert crypto identity
206
206
  x-visibility: internal
207
207
  description: |
208
- Stores a session public key. Private keys are never accepted by this API.
208
+ Stores a registered public key for a versioned crypto principal. Private keys are never accepted by this API.
209
209
  x-required-roles: [signer, workflow-editor, workflow-operator, agreement-auditor, organization-admin]
210
210
  tags:
211
211
  - Crypto Identities
@@ -1816,6 +1816,12 @@ paths:
1816
1816
  description: Document identifier
1817
1817
  schema:
1818
1818
  type: string
1819
+ - name: executionId
1820
+ in: query
1821
+ required: false
1822
+ description: Required for signer-token access; binds document access to the verified signing execution.
1823
+ schema:
1824
+ type: string
1819
1825
  responses:
1820
1826
  '200':
1821
1827
  description: Base64-encoded document encryption key for client-side decryption
@@ -2564,17 +2570,14 @@ paths:
2564
2570
  '500':
2565
2571
  $ref: '#/components/responses/InternalServerError'
2566
2572
 
2567
- /v1/agreements/{executionId}/execution-key-envelopes:
2573
+ /v1/agreements/{executionId}/key-envelopes:
2568
2574
  post:
2569
- operationId: appendAgreementExecutionKeyEnvelopesV1
2570
- summary: Append agreement execution-key envelopes
2575
+ operationId: appendAgreementKeyEnvelopesV1
2576
+ summary: Append client-created scope key envelopes
2571
2577
  x-visibility: internal
2572
2578
  description: |
2573
- Issues server-wrapped execution-key envelopes for additional authorized session public keys.
2574
- The request contains public key IDs only. Inklok wraps the agreement key to
2575
- the requested RSA-OAEP public keys and never persists plaintext key material.
2576
- This is a cryptographic access grant event. Inklok commits the envelope append
2577
- and KEY_ACCESS_GRANTED audit record atomically, or fail the request without changing access.
2579
+ Stores envelopes created by an authorized client. The server validates scope
2580
+ authorization but never unwraps or re-wraps a scope DEK.
2578
2581
  x-required-roles: [workflow-operator, organization-admin]
2579
2582
  tags:
2580
2583
  - Agreements
@@ -2591,25 +2594,27 @@ paths:
2591
2594
  application/json:
2592
2595
  schema:
2593
2596
  type: object
2594
- required: [publicKeyIds]
2597
+ required: [envelopes]
2595
2598
  properties:
2596
- publicKeyIds:
2599
+ envelopes:
2597
2600
  type: array
2598
2601
  minItems: 1
2599
2602
  maxItems: 50
2600
2603
  items:
2601
- type: string
2604
+ $ref: '#/components/schemas/KeyEnvelope'
2602
2605
  responses:
2603
2606
  '200':
2604
- description: Updated execution-key grant set
2607
+ description: Updated scope envelope set
2605
2608
  content:
2606
2609
  application/json:
2607
2610
  schema:
2608
2611
  type: object
2609
- required: [executionKey, appended]
2612
+ required: [envelopes, appended]
2610
2613
  properties:
2611
- executionKey:
2612
- $ref: '#/components/schemas/ExecutionKeyGrantSet'
2614
+ envelopes:
2615
+ type: array
2616
+ items:
2617
+ $ref: '#/components/schemas/KeyEnvelope'
2613
2618
  appended:
2614
2619
  type: integer
2615
2620
  '400':
@@ -3117,18 +3122,17 @@ paths:
3117
3122
  $ref: '#/components/responses/InternalServerError'
3118
3123
  x-inklok-lambda: signing-acknowledge-execution
3119
3124
 
3120
- /v1/signing/unwrap-deks:
3125
+ /v1/signing/scope-envelopes:
3121
3126
  post:
3122
- operationId: unwrapSigningDeks
3123
- summary: Resolve signer-wrapped document keys and execution key envelopes
3127
+ operationId: managedScopeRegrant
3128
+ summary: Regrant authorized managed scope envelopes
3124
3129
  x-visibility: internal
3125
3130
  description: |
3126
- Returns wrapped key material scoped to the authenticated signer.
3127
-
3128
- - Requires a signing access token
3129
- - Returns document key material for current PDF compatibility
3130
- - Returns executionKey envelopes for client-side sensitive placeholder decryption
3131
- - Audited for signer access
3131
+ Derives the caller's authorized managed scopes from the verified Cognito
3132
+ membership or signer token, recovers those scope DEKs inside the managed
3133
+ recovery boundary, and returns only RSA-OAEP envelopes for the caller's
3134
+ validated registered transient public key. The request cannot select scope
3135
+ IDs and the response never contains plaintext values or raw DEKs.
3132
3136
  tags:
3133
3137
  - Signing
3134
3138
  security:
@@ -3139,58 +3143,35 @@ paths:
3139
3143
  application/json:
3140
3144
  schema:
3141
3145
  type: object
3142
- required: [executionId]
3146
+ required: [executionId, destinationPublicKeyId]
3143
3147
  properties:
3144
3148
  executionId:
3145
3149
  type: string
3150
+ destinationPublicKeyId:
3151
+ type: string
3146
3152
  example:
3147
3153
  executionId: "exec_123"
3154
+ destinationPublicKeyId: "session_key_123"
3148
3155
  responses:
3149
3156
  '200':
3150
- description: Wrapped key material for signer-visible document and execution key envelopes
3157
+ description: Scoped managed envelopes for the authenticated principal
3151
3158
  content:
3152
3159
  application/json:
3153
3160
  schema:
3154
3161
  type: object
3155
- required: [documentDek, placeholders]
3162
+ required: [keyScopes, envelopes]
3156
3163
  properties:
3157
- documentDek:
3158
- type: object
3159
- required: [encrypted, alg]
3160
- properties:
3161
- encrypted:
3162
- type: string
3163
- alg:
3164
- type: string
3165
- enum: [KMS-WRAPPED-BASE64, RSA-OAEP]
3166
- placeholders:
3167
- type: object
3168
- description: Reserved empty map; placeholder values use executionKey envelopes.
3169
- additionalProperties:
3170
- type: object
3171
- required: [encrypted, alg]
3172
- properties:
3173
- encrypted:
3174
- type: string
3175
- alg:
3176
- type: string
3177
- enum: [KMS-WRAPPED-BASE64, RSA-OAEP]
3178
- executionKey:
3179
- $ref: '#/components/schemas/ExecutionKeyGrantSet'
3180
- example:
3181
- documentDek:
3182
- encrypted: "base64..."
3183
- alg: "KMS-WRAPPED-BASE64"
3184
- placeholders: {}
3185
- executionKey:
3186
- keyId: "ek_01H..."
3187
- alg: "INKLOK-EK-AES-256-GCM-RSA-OAEP-256"
3164
+ keyScopes:
3165
+ type: array
3166
+ items:
3167
+ $ref: '#/components/schemas/KeyScope'
3188
3168
  envelopes:
3189
- - keyId: "ek_01H..."
3190
- subjectId: "party_abc"
3191
- subjectType: "signer"
3192
- alg: "RSA-OAEP-256"
3193
- wrappedKey: "base64..."
3169
+ type: array
3170
+ items:
3171
+ $ref: '#/components/schemas/KeyEnvelope'
3172
+ example:
3173
+ keyScopes: []
3174
+ envelopes: []
3194
3175
  '400':
3195
3176
  $ref: '#/components/responses/BadRequest'
3196
3177
  '401':
@@ -3201,7 +3182,7 @@ paths:
3201
3182
  $ref: '#/components/responses/NotFound'
3202
3183
  '500':
3203
3184
  $ref: '#/components/responses/InternalServerError'
3204
- x-inklok-lambda: signing-unwrap-deks
3185
+ x-inklok-lambda: managed-scope-regrant
3205
3186
 
3206
3187
  components:
3207
3188
  securitySchemes:
@@ -4616,7 +4597,7 @@ components:
4616
4597
  type: string
4617
4598
  nullable: true
4618
4599
  plan:
4619
- $ref: '#/components/schemas/Plan'
4600
+ $ref: '#/components/schemas/PlatformPlan'
4620
4601
  totalApiRequests:
4621
4602
  type: integer
4622
4603
  minimum: 0
@@ -5619,88 +5600,203 @@ components:
5619
5600
  $ref: '#/components/schemas/CreateExecutionParticipantInput'
5620
5601
  crypto:
5621
5602
  type: object
5622
- required: [executionKey]
5603
+ required: [keyScopes]
5623
5604
  description: Security material used to protect agreement field values.
5624
5605
  properties:
5625
- executionKey:
5626
- $ref: '#/components/schemas/ExecutionKeyGrantSet'
5627
-
5628
- ExecutionKeyGrantSet:
5606
+ keyScopes:
5607
+ type: array
5608
+ minItems: 1
5609
+ items:
5610
+ $ref: '#/components/schemas/KeyScope'
5611
+ envelopes:
5612
+ type: array
5613
+ items:
5614
+ $ref: '#/components/schemas/KeyEnvelope'
5615
+ managedRecoveryCapabilities:
5616
+ type: array
5617
+ items:
5618
+ $ref: '#/components/schemas/ManagedRecoveryCapability'
5619
+
5620
+ KeyScope:
5629
5621
  type: object
5630
- description: Security metadata used to protect agreement field values for authorized readers.
5631
- required: [keyId, alg, envelopes]
5622
+ required: [keyScopeId, type, version]
5632
5623
  properties:
5633
- keyId:
5624
+ keyScopeId:
5634
5625
  type: string
5635
- description: Customer-provided key identifier for this agreement.
5636
- alg:
5626
+ agreementId:
5627
+ type: string
5628
+ type:
5637
5629
  type: string
5638
- enum: [INKLOK-EK-AES-256-GCM-RSA-OAEP-256]
5639
- plaintextKey:
5630
+ enum: [PARTY_PRIVATE, SHARED, ORG_AUTHORIZED, WORKSPACE_AUTHORIZED]
5631
+ partyId:
5640
5632
  type: string
5641
- writeOnly: true
5642
- description: Secret key material provided when the agreement is created.
5643
- encryptedKey:
5644
- $ref: '#/components/schemas/EncryptedExecutionKey'
5645
- envelopes:
5633
+ members:
5646
5634
  type: array
5647
- minItems: 1
5648
5635
  items:
5649
- $ref: '#/components/schemas/ExecutionKeyEnvelope'
5636
+ type: string
5637
+ authorizationPolicy:
5638
+ type: object
5639
+ additionalProperties: true
5640
+ cryptoPrincipalRefs:
5641
+ type: array
5642
+ items:
5643
+ type: string
5644
+ version:
5645
+ type: integer
5646
+ minimum: 1
5647
+ protectionMode:
5648
+ type: string
5649
+ enum: [MANAGED, STRICT_ZK]
5650
+ createdAt:
5651
+ type: string
5652
+ format: date-time
5653
+ readOnly: true
5650
5654
 
5651
- EncryptedExecutionKey:
5655
+ KeyEnvelope:
5652
5656
  type: object
5653
- readOnly: true
5654
- required: [alg, ciphertext]
5657
+ required: [envelopeId, keyScopeId, recipientPrincipalId, recipientKeyId, wrappedKey, mode, keyVersion]
5655
5658
  properties:
5656
- alg:
5659
+ envelopeId:
5660
+ type: string
5661
+ agreementId:
5662
+ type: string
5663
+ keyScopeId:
5657
5664
  type: string
5658
- enum: [AWS-KMS]
5659
- ciphertext:
5665
+ recipientPrincipalId:
5660
5666
  type: string
5661
- description: Base64 protected ciphertext for the execution key.
5662
- kmsKeyId:
5667
+ recipientKeyId:
5663
5668
  type: string
5669
+ wrappedKey:
5670
+ type: string
5671
+ description: Client-created RSA-OAEP wrapped scope DEK.
5672
+ mode:
5673
+ type: string
5674
+ enum: [MANAGED, STRICT_ZK]
5675
+ keyVersion:
5676
+ type: integer
5677
+ minimum: 1
5664
5678
  createdAt:
5665
5679
  type: string
5666
5680
  format: date-time
5681
+ readOnly: true
5682
+ revokedAt:
5683
+ type: string
5684
+ format: date-time
5685
+ nullable: true
5667
5686
 
5668
- ExecutionKeyEnvelope:
5687
+ ManagedRecoveryCapability:
5669
5688
  type: object
5670
- required: [keyId, subjectId, subjectType, alg, wrappedKey]
5689
+ required: [capabilityId, allowedKeyScopeIds, scopes, state]
5671
5690
  properties:
5672
- keyId:
5691
+ capabilityId:
5673
5692
  type: string
5674
- subjectId:
5693
+ agreementId:
5675
5694
  type: string
5676
- description: Signer party ID or authenticated org-session subject ID.
5677
- subjectType:
5695
+ partyId:
5678
5696
  type: string
5679
- enum: [signer, org-session]
5680
- alg:
5697
+ scopes:
5698
+ type: array
5699
+ minItems: 1
5700
+ items:
5701
+ $ref: '#/components/schemas/ManagedRecoveryScope'
5702
+ allowedKeyScopeIds:
5703
+ type: array
5704
+ minItems: 1
5705
+ items:
5706
+ type: string
5707
+ kmsKeyVersion:
5681
5708
  type: string
5682
- enum: [RSA-OAEP-256]
5683
- wrappedKey:
5709
+ state:
5684
5710
  type: string
5685
- description: Base64 RSA-OAEP wrapped execution key. Inklok does not unwrap this value.
5686
- publicKeyId:
5711
+ enum: [ACTIVE, RETIRED, EXPIRED]
5712
+ retiredAt:
5687
5713
  type: string
5714
+ format: date-time
5688
5715
  nullable: true
5689
5716
  createdAt:
5690
5717
  type: string
5691
5718
  format: date-time
5692
5719
  readOnly: true
5693
5720
 
5721
+ ManagedRecoveryScope:
5722
+ type: object
5723
+ required: [keyScopeId, kmsWrappedScopeDek]
5724
+ properties:
5725
+ keyScopeId:
5726
+ type: string
5727
+ kmsWrappedScopeDek:
5728
+ type: string
5729
+
5730
+ CryptoPrincipal:
5731
+ type: object
5732
+ required: [principalId, type, subjectId]
5733
+ properties:
5734
+ principalId:
5735
+ type: string
5736
+ type:
5737
+ type: string
5738
+ enum: [USER, PARTY, ORG_ROLE, WORKSPACE_ROLE]
5739
+ subjectId:
5740
+ type: string
5741
+ currentKeyVersion:
5742
+ type: integer
5743
+ minimum: 1
5744
+
5745
+ PrincipalKey:
5746
+ type: object
5747
+ required: [keyId, principalId, algorithm, publicKey, keyVersion, status, createdAt]
5748
+ properties:
5749
+ keyId:
5750
+ type: string
5751
+ principalId:
5752
+ type: string
5753
+ algorithm:
5754
+ type: string
5755
+ enum: [RSA-OAEP-256]
5756
+ publicKey:
5757
+ type: string
5758
+ keyVersion:
5759
+ type: integer
5760
+ minimum: 1
5761
+ status:
5762
+ type: string
5763
+ enum: [active, retired]
5764
+ createdAt:
5765
+ type: string
5766
+ format: date-time
5767
+ revokedAt:
5768
+ type: string
5769
+ format: date-time
5770
+ nullable: true
5771
+
5772
+ PrincipalKeyEnvelope:
5773
+ type: object
5774
+ required: [principalId, keyVersion, recipientPrincipalId, recipientKeyId, wrappedKey]
5775
+ properties:
5776
+ principalId:
5777
+ type: string
5778
+ keyVersion:
5779
+ type: integer
5780
+ minimum: 1
5781
+ recipientPrincipalId:
5782
+ type: string
5783
+ recipientKeyId:
5784
+ type: string
5785
+ wrappedKey:
5786
+ type: string
5787
+
5694
5788
  CryptoIdentity:
5695
5789
  type: object
5696
- description: Session public-key metadata used to unwrap execution-key envelopes client-side.
5697
- required: [publicKeyId, subjectType, subjectId, publicKeySpki, alg, status]
5790
+ description: Public-key metadata for a versioned crypto principal.
5791
+ required: [publicKeyId, principalId, principalType, subjectId, publicKeySpki, alg, keyVersion, status]
5698
5792
  properties:
5699
5793
  publicKeyId:
5700
5794
  type: string
5701
- subjectType:
5795
+ principalId:
5796
+ type: string
5797
+ principalType:
5702
5798
  type: string
5703
- enum: [signer, org-session]
5799
+ enum: [USER, PARTY, ORG_ROLE, WORKSPACE_ROLE]
5704
5800
  subjectId:
5705
5801
  type: string
5706
5802
  orgId:
@@ -5712,6 +5808,9 @@ components:
5712
5808
  alg:
5713
5809
  type: string
5714
5810
  enum: [RSA-OAEP-256]
5811
+ keyVersion:
5812
+ type: integer
5813
+ minimum: 1
5715
5814
  status:
5716
5815
  type: string
5717
5816
  enum: [active, retired]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inklok/api-spec",
3
- "version": "7.7.2",
3
+ "version": "7.8.1",
4
4
  "description": "Canonical OpenAPI specification for the Inklok public API.",
5
5
  "main": "openapi.yaml",
6
6
  "license": "MIT",