@inklok/api-spec 7.7.2 → 7.8.0

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 +253 -93
  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.0"
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
@@ -2564,17 +2564,14 @@ paths:
2564
2564
  '500':
2565
2565
  $ref: '#/components/responses/InternalServerError'
2566
2566
 
2567
- /v1/agreements/{executionId}/execution-key-envelopes:
2567
+ /v1/agreements/{executionId}/key-envelopes:
2568
2568
  post:
2569
- operationId: appendAgreementExecutionKeyEnvelopesV1
2570
- summary: Append agreement execution-key envelopes
2569
+ operationId: appendAgreementKeyEnvelopesV1
2570
+ summary: Append client-created scope key envelopes
2571
2571
  x-visibility: internal
2572
2572
  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.
2573
+ Stores envelopes created by an authorized client. The server validates scope
2574
+ authorization but never unwraps or re-wraps a scope DEK.
2578
2575
  x-required-roles: [workflow-operator, organization-admin]
2579
2576
  tags:
2580
2577
  - Agreements
@@ -2591,25 +2588,27 @@ paths:
2591
2588
  application/json:
2592
2589
  schema:
2593
2590
  type: object
2594
- required: [publicKeyIds]
2591
+ required: [envelopes]
2595
2592
  properties:
2596
- publicKeyIds:
2593
+ envelopes:
2597
2594
  type: array
2598
2595
  minItems: 1
2599
2596
  maxItems: 50
2600
2597
  items:
2601
- type: string
2598
+ $ref: '#/components/schemas/KeyEnvelope'
2602
2599
  responses:
2603
2600
  '200':
2604
- description: Updated execution-key grant set
2601
+ description: Updated scope envelope set
2605
2602
  content:
2606
2603
  application/json:
2607
2604
  schema:
2608
2605
  type: object
2609
- required: [executionKey, appended]
2606
+ required: [envelopes, appended]
2610
2607
  properties:
2611
- executionKey:
2612
- $ref: '#/components/schemas/ExecutionKeyGrantSet'
2608
+ envelopes:
2609
+ type: array
2610
+ items:
2611
+ $ref: '#/components/schemas/KeyEnvelope'
2613
2612
  appended:
2614
2613
  type: integer
2615
2614
  '400':
@@ -2625,6 +2624,63 @@ paths:
2625
2624
  '500':
2626
2625
  $ref: '#/components/responses/InternalServerError'
2627
2626
 
2627
+ /v1/signing/managed-regrant:
2628
+ post:
2629
+ operationId: managedScopeRegrant
2630
+ summary: Regrant authorized managed scope envelopes
2631
+ x-visibility: internal
2632
+ x-required-roles: []
2633
+ description: |
2634
+ Derives the caller's authorized managed scopes from the verified Cognito
2635
+ membership or signer token, recovers those scope DEKs inside the managed
2636
+ recovery boundary, and returns only RSA-OAEP envelopes for the caller's
2637
+ validated registered transient public key. The request cannot select scope
2638
+ IDs and the response never contains plaintext values or raw DEKs.
2639
+ tags:
2640
+ - Signing
2641
+ security:
2642
+ - bearerAuth: []
2643
+ requestBody:
2644
+ required: true
2645
+ content:
2646
+ application/json:
2647
+ schema:
2648
+ type: object
2649
+ required: [executionId, destinationPublicKeyId]
2650
+ properties:
2651
+ executionId:
2652
+ type: string
2653
+ destinationPublicKeyId:
2654
+ type: string
2655
+ responses:
2656
+ '200':
2657
+ description: Scoped managed envelopes for the authenticated principal
2658
+ content:
2659
+ application/json:
2660
+ schema:
2661
+ type: object
2662
+ required: [keyScopes, envelopes]
2663
+ properties:
2664
+ keyScopes:
2665
+ type: array
2666
+ items:
2667
+ $ref: '#/components/schemas/KeyScope'
2668
+ envelopes:
2669
+ type: array
2670
+ items:
2671
+ $ref: '#/components/schemas/KeyEnvelope'
2672
+ '400':
2673
+ $ref: '#/components/responses/BadRequest'
2674
+ '401':
2675
+ $ref: '#/components/responses/Unauthorized'
2676
+ '403':
2677
+ $ref: '#/components/responses/Forbidden'
2678
+ '404':
2679
+ $ref: '#/components/responses/NotFound'
2680
+ '500':
2681
+ $ref: '#/components/responses/InternalServerError'
2682
+ x-inklok-lambda: managed-scope-regrant
2683
+
2628
2684
  /v1/agreements/{executionId}/resend-completion-emails:
2629
2685
  post:
2630
2686
  operationId: agreementResendCompletionEmails
@@ -3117,17 +3173,17 @@ paths:
3117
3173
  $ref: '#/components/responses/InternalServerError'
3118
3174
  x-inklok-lambda: signing-acknowledge-execution
3119
3175
 
3120
- /v1/signing/unwrap-deks:
3176
+ /v1/signing/scope-envelopes:
3121
3177
  post:
3122
- operationId: unwrapSigningDeks
3123
- summary: Resolve signer-wrapped document keys and execution key envelopes
3178
+ operationId: resolveSigningScopeEnvelopes
3179
+ summary: Resolve signer-authorized scope envelopes
3124
3180
  x-visibility: internal
3125
3181
  description: |
3126
3182
  Returns wrapped key material scoped to the authenticated signer.
3127
3183
 
3128
3184
  - Requires a signing access token
3129
3185
  - Returns document key material for current PDF compatibility
3130
- - Returns executionKey envelopes for client-side sensitive placeholder decryption
3186
+ - Returns only scope envelopes authorized for the signer
3131
3187
  - Audited for signer access
3132
3188
  tags:
3133
3189
  - Signing
@@ -3147,7 +3203,7 @@ paths:
3147
3203
  executionId: "exec_123"
3148
3204
  responses:
3149
3205
  '200':
3150
- description: Wrapped key material for signer-visible document and execution key envelopes
3206
+ description: Wrapped document material and signer-visible scoped field envelopes
3151
3207
  content:
3152
3208
  application/json:
3153
3209
  schema:
@@ -3163,34 +3219,20 @@ paths:
3163
3219
  alg:
3164
3220
  type: string
3165
3221
  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'
3222
+ keyScopes:
3223
+ type: array
3224
+ items:
3225
+ $ref: '#/components/schemas/KeyScope'
3226
+ envelopes:
3227
+ type: array
3228
+ items:
3229
+ $ref: '#/components/schemas/KeyEnvelope'
3180
3230
  example:
3181
3231
  documentDek:
3182
3232
  encrypted: "base64..."
3183
3233
  alg: "KMS-WRAPPED-BASE64"
3184
- placeholders: {}
3185
- executionKey:
3186
- keyId: "ek_01H..."
3187
- alg: "INKLOK-EK-AES-256-GCM-RSA-OAEP-256"
3188
- envelopes:
3189
- - keyId: "ek_01H..."
3190
- subjectId: "party_abc"
3191
- subjectType: "signer"
3192
- alg: "RSA-OAEP-256"
3193
- wrappedKey: "base64..."
3234
+ keyScopes: []
3235
+ envelopes: []
3194
3236
  '400':
3195
3237
  $ref: '#/components/responses/BadRequest'
3196
3238
  '401':
@@ -3201,7 +3243,7 @@ paths:
3201
3243
  $ref: '#/components/responses/NotFound'
3202
3244
  '500':
3203
3245
  $ref: '#/components/responses/InternalServerError'
3204
- x-inklok-lambda: signing-unwrap-deks
3246
+ x-inklok-lambda: signing-scope-envelopes
3205
3247
 
3206
3248
  components:
3207
3249
  securitySchemes:
@@ -4616,7 +4658,7 @@ components:
4616
4658
  type: string
4617
4659
  nullable: true
4618
4660
  plan:
4619
- $ref: '#/components/schemas/Plan'
4661
+ $ref: '#/components/schemas/PlatformPlan'
4620
4662
  totalApiRequests:
4621
4663
  type: integer
4622
4664
  minimum: 0
@@ -5619,88 +5661,203 @@ components:
5619
5661
  $ref: '#/components/schemas/CreateExecutionParticipantInput'
5620
5662
  crypto:
5621
5663
  type: object
5622
- required: [executionKey]
5664
+ required: [keyScopes]
5623
5665
  description: Security material used to protect agreement field values.
5624
5666
  properties:
5625
- executionKey:
5626
- $ref: '#/components/schemas/ExecutionKeyGrantSet'
5627
-
5628
- ExecutionKeyGrantSet:
5667
+ keyScopes:
5668
+ type: array
5669
+ minItems: 1
5670
+ items:
5671
+ $ref: '#/components/schemas/KeyScope'
5672
+ envelopes:
5673
+ type: array
5674
+ items:
5675
+ $ref: '#/components/schemas/KeyEnvelope'
5676
+ managedRecoveryCapabilities:
5677
+ type: array
5678
+ items:
5679
+ $ref: '#/components/schemas/ManagedRecoveryCapability'
5680
+
5681
+ KeyScope:
5629
5682
  type: object
5630
- description: Security metadata used to protect agreement field values for authorized readers.
5631
- required: [keyId, alg, envelopes]
5683
+ required: [keyScopeId, type, version]
5632
5684
  properties:
5633
- keyId:
5685
+ keyScopeId:
5634
5686
  type: string
5635
- description: Customer-provided key identifier for this agreement.
5636
- alg:
5687
+ agreementId:
5637
5688
  type: string
5638
- enum: [INKLOK-EK-AES-256-GCM-RSA-OAEP-256]
5639
- plaintextKey:
5689
+ type:
5690
+ type: string
5691
+ enum: [PARTY_PRIVATE, SHARED, ORG_AUTHORIZED, WORKSPACE_AUTHORIZED]
5692
+ partyId:
5640
5693
  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:
5694
+ members:
5695
+ type: array
5696
+ items:
5697
+ type: string
5698
+ authorizationPolicy:
5699
+ type: object
5700
+ additionalProperties: true
5701
+ cryptoPrincipalRefs:
5646
5702
  type: array
5647
- minItems: 1
5648
5703
  items:
5649
- $ref: '#/components/schemas/ExecutionKeyEnvelope'
5704
+ type: string
5705
+ version:
5706
+ type: integer
5707
+ minimum: 1
5708
+ protectionMode:
5709
+ type: string
5710
+ enum: [MANAGED, STRICT_ZK]
5711
+ createdAt:
5712
+ type: string
5713
+ format: date-time
5714
+ readOnly: true
5650
5715
 
5651
- EncryptedExecutionKey:
5716
+ KeyEnvelope:
5652
5717
  type: object
5653
- readOnly: true
5654
- required: [alg, ciphertext]
5718
+ required: [envelopeId, keyScopeId, recipientPrincipalId, recipientKeyId, wrappedKey, mode, keyVersion]
5655
5719
  properties:
5656
- alg:
5720
+ envelopeId:
5657
5721
  type: string
5658
- enum: [AWS-KMS]
5659
- ciphertext:
5722
+ agreementId:
5723
+ type: string
5724
+ keyScopeId:
5725
+ type: string
5726
+ recipientPrincipalId:
5727
+ type: string
5728
+ recipientKeyId:
5729
+ type: string
5730
+ wrappedKey:
5660
5731
  type: string
5661
- description: Base64 protected ciphertext for the execution key.
5662
- kmsKeyId:
5732
+ description: Client-created RSA-OAEP wrapped scope DEK.
5733
+ mode:
5663
5734
  type: string
5735
+ enum: [MANAGED, STRICT_ZK]
5736
+ keyVersion:
5737
+ type: integer
5738
+ minimum: 1
5664
5739
  createdAt:
5665
5740
  type: string
5666
5741
  format: date-time
5742
+ readOnly: true
5743
+ revokedAt:
5744
+ type: string
5745
+ format: date-time
5746
+ nullable: true
5667
5747
 
5668
- ExecutionKeyEnvelope:
5748
+ ManagedRecoveryCapability:
5669
5749
  type: object
5670
- required: [keyId, subjectId, subjectType, alg, wrappedKey]
5750
+ required: [capabilityId, allowedKeyScopeIds, scopes, state]
5671
5751
  properties:
5672
- keyId:
5752
+ capabilityId:
5673
5753
  type: string
5674
- subjectId:
5754
+ agreementId:
5675
5755
  type: string
5676
- description: Signer party ID or authenticated org-session subject ID.
5677
- subjectType:
5756
+ partyId:
5678
5757
  type: string
5679
- enum: [signer, org-session]
5680
- alg:
5758
+ scopes:
5759
+ type: array
5760
+ minItems: 1
5761
+ items:
5762
+ $ref: '#/components/schemas/ManagedRecoveryScope'
5763
+ allowedKeyScopeIds:
5764
+ type: array
5765
+ minItems: 1
5766
+ items:
5767
+ type: string
5768
+ kmsKeyVersion:
5681
5769
  type: string
5682
- enum: [RSA-OAEP-256]
5683
- wrappedKey:
5770
+ state:
5684
5771
  type: string
5685
- description: Base64 RSA-OAEP wrapped execution key. Inklok does not unwrap this value.
5686
- publicKeyId:
5772
+ enum: [ACTIVE, RETIRED, EXPIRED]
5773
+ retiredAt:
5687
5774
  type: string
5775
+ format: date-time
5688
5776
  nullable: true
5689
5777
  createdAt:
5690
5778
  type: string
5691
5779
  format: date-time
5692
5780
  readOnly: true
5693
5781
 
5782
+ ManagedRecoveryScope:
5783
+ type: object
5784
+ required: [keyScopeId, kmsWrappedScopeDek]
5785
+ properties:
5786
+ keyScopeId:
5787
+ type: string
5788
+ kmsWrappedScopeDek:
5789
+ type: string
5790
+
5791
+ CryptoPrincipal:
5792
+ type: object
5793
+ required: [principalId, type, subjectId]
5794
+ properties:
5795
+ principalId:
5796
+ type: string
5797
+ type:
5798
+ type: string
5799
+ enum: [USER, PARTY, ORG_ROLE, WORKSPACE_ROLE]
5800
+ subjectId:
5801
+ type: string
5802
+ currentKeyVersion:
5803
+ type: integer
5804
+ minimum: 1
5805
+
5806
+ PrincipalKey:
5807
+ type: object
5808
+ required: [keyId, principalId, algorithm, publicKey, keyVersion, status, createdAt]
5809
+ properties:
5810
+ keyId:
5811
+ type: string
5812
+ principalId:
5813
+ type: string
5814
+ algorithm:
5815
+ type: string
5816
+ enum: [RSA-OAEP-256]
5817
+ publicKey:
5818
+ type: string
5819
+ keyVersion:
5820
+ type: integer
5821
+ minimum: 1
5822
+ status:
5823
+ type: string
5824
+ enum: [active, retired]
5825
+ createdAt:
5826
+ type: string
5827
+ format: date-time
5828
+ revokedAt:
5829
+ type: string
5830
+ format: date-time
5831
+ nullable: true
5832
+
5833
+ PrincipalKeyEnvelope:
5834
+ type: object
5835
+ required: [principalId, keyVersion, recipientPrincipalId, recipientKeyId, wrappedKey]
5836
+ properties:
5837
+ principalId:
5838
+ type: string
5839
+ keyVersion:
5840
+ type: integer
5841
+ minimum: 1
5842
+ recipientPrincipalId:
5843
+ type: string
5844
+ recipientKeyId:
5845
+ type: string
5846
+ wrappedKey:
5847
+ type: string
5848
+
5694
5849
  CryptoIdentity:
5695
5850
  type: object
5696
- description: Session public-key metadata used to unwrap execution-key envelopes client-side.
5697
- required: [publicKeyId, subjectType, subjectId, publicKeySpki, alg, status]
5851
+ description: Public-key metadata for a versioned crypto principal.
5852
+ required: [publicKeyId, principalId, principalType, subjectId, publicKeySpki, alg, keyVersion, status]
5698
5853
  properties:
5699
5854
  publicKeyId:
5700
5855
  type: string
5701
- subjectType:
5856
+ principalId:
5857
+ type: string
5858
+ principalType:
5702
5859
  type: string
5703
- enum: [signer, org-session]
5860
+ enum: [USER, PARTY, ORG_ROLE, WORKSPACE_ROLE]
5704
5861
  subjectId:
5705
5862
  type: string
5706
5863
  orgId:
@@ -5712,6 +5869,9 @@ components:
5712
5869
  alg:
5713
5870
  type: string
5714
5871
  enum: [RSA-OAEP-256]
5872
+ keyVersion:
5873
+ type: integer
5874
+ minimum: 1
5715
5875
  status:
5716
5876
  type: string
5717
5877
  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.0",
4
4
  "description": "Canonical OpenAPI specification for the Inklok public API.",
5
5
  "main": "openapi.yaml",
6
6
  "license": "MIT",