Skip to content

Commit cc82052

Browse files
fix(docs): Update kas-registry docs with new shape. (#154)
1.) Update kas-registry docs to fit the new `key_management` way of importing/creating key and connecting an attribute to a specific key. --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent b39da16 commit cc82052

File tree

13 files changed

+476
-122
lines changed

13 files changed

+476
-122
lines changed

docs/components/policy/key_access_registry.md

Lines changed: 8 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,11 @@ The Key Access Server (KAS) Registry within the platform policy is a store of kn
55
Within platform policy, a registered KAS instance has the following key attributes:
66

77
1. **URI**: The location where the KAS is accessible. This must be unique among all KAS instances registered in the platform.
8-
2. **Public Key Location**:
9-
1. **Remote**: A public key available at an endpoint, such as `https://kas-one.com/public_key`.
10-
2. **Cached**: One or more public keys stored within the platform policy database (see the example below).
11-
12-
These traits are essential for managing KAS Grants to attributes and their associated key splits in encryption and decryption processes.
13-
14-
#### Cached Key Example
15-
16-
```json5
17-
{
18-
"cached": {
19-
// One or more known public keys for the KAS
20-
"keys": [
21-
{
22-
// x509 ASN.1 content in PEM format
23-
"pem": "<your PEM certificate>",
24-
// key identifier
25-
"kid": "<your key id>",
26-
// key algorithm (see below)
27-
"alg": 1
28-
}
29-
]
30-
}
31-
}
32-
```
33-
34-
1. The `"pem"` field should contain the full certificate, for example:
35-
`-----BEGIN CERTIFICATE-----
36-
MIIB...5Q=
37-
-----END CERTIFICATE-----
38-
`.
39-
40-
2. The `"kid"` field represents the key identifier, which is primarily used for key rotation.
41-
42-
3. The `"alg"` field specifies the key algorithm used:
43-
44-
| Key Algorithm | `alg` Value |
45-
| ----------------- | ----------- |
46-
| `rsa:2048` | 1 |
47-
| `ec:secp256r1` | 5 |
8+
2. **Source Type**: Indicates whether the KAS is managed by the organization or imported from an external party. (Defaults to unspecified)
9+
3. **Name**: A friendly name for the registered KAS. (Optional)
10+
11+
:::important
12+
**PublicKey** is deprecated and no longer used as of `v0.7.0` of service. Instead, import public keys with [key management](./keymanagement/quickstart.md).
13+
The ability to assign grants was deprecated in [v0.7.0 of service](https://github.com/opentdf/platform/releases/tag/service%2Fv0.7.0),
14+
in favor of [key mappings](./keymanagement/key_mappings.md).
15+
:::

specs/authorization/v2/authorization.openapi.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,20 @@ components:
245245
title: token
246246
required:
247247
- token
248+
- properties:
249+
withRequestToken:
250+
title: with_request_token
251+
description: |+
252+
derive the entity from the request's authorization access token JWT, rather than passing in the body
253+
with_request_token must be true when set:
254+
```
255+
this == true
256+
```
257+
258+
$ref: '#/components/schemas/google.protobuf.BoolValue'
259+
title: with_request_token
260+
required:
261+
- withRequestToken
248262
title: EntityIdentifier
249263
additionalProperties: false
250264
description: |-

specs/policy/actions/actions.openapi.yaml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,23 @@ components:
491491
required:
492492
- rule
493493
additionalProperties: false
494+
policy.Certificate:
495+
type: object
496+
properties:
497+
id:
498+
type: string
499+
title: id
500+
description: generated uuid in database
501+
pem:
502+
type: string
503+
title: pem
504+
description: PEM format certificate
505+
metadata:
506+
title: metadata
507+
description: Optional metadata.
508+
$ref: '#/components/schemas/common.Metadata'
509+
title: Certificate
510+
additionalProperties: false
494511
policy.Condition:
495512
type: object
496513
properties:
@@ -603,7 +620,7 @@ components:
603620
604621
publicKey:
605622
title: public_key
606-
description: Deprecated
623+
description: 'Deprecated: KAS can have multiple key pairs'
607624
$ref: '#/components/schemas/policy.PublicKey'
608625
sourceType:
609626
title: source_type
@@ -663,6 +680,12 @@ components:
663680
$ref: '#/components/schemas/policy.SimpleKasKey'
664681
title: kas_keys
665682
description: Keys for the namespace
683+
rootCerts:
684+
type: array
685+
items:
686+
$ref: '#/components/schemas/policy.Certificate'
687+
title: root_certs
688+
description: Root certificates for chain of trust
666689
title: Namespace
667690
additionalProperties: false
668691
policy.Obligation:

specs/policy/attributes/attributes.openapi.yaml

Lines changed: 31 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -135,30 +135,6 @@ paths:
135135
description: |-
136136
Required
137137
Fully Qualified Names of attribute values (i.e. https://<namespace>/attr/<attribute_name>/value/<value_name>), normalized to lower case.
138-
- name: withValue.withKeyAccessGrants
139-
in: query
140-
description: Deprecated
141-
schema:
142-
type: boolean
143-
title: with_key_access_grants
144-
description: Deprecated
145-
- name: withValue.withSubjectMaps
146-
in: query
147-
schema:
148-
type: boolean
149-
title: with_subject_maps
150-
- name: withValue.withResourceMaps
151-
in: query
152-
schema:
153-
type: boolean
154-
title: with_resource_maps
155-
- name: withValue.withAttribute.withKeyAccessGrants
156-
in: query
157-
description: Deprecated
158-
schema:
159-
type: boolean
160-
title: with_key_access_grants
161-
description: Deprecated
162138
responses:
163139
default:
164140
description: Error
@@ -426,10 +402,7 @@ paths:
426402
tags:
427403
- policy.attributes.AttributesService
428404
summary: AssignKeyAccessServerToAttribute
429-
description: |-
430-
--------------------------------------*
431-
Attribute <> Key Access Server RPCs
432-
---------------------------------------
405+
description: 'Deprecated: utilize AssignPublicKeyToAttribute'
433406
operationId: policy.attributes.AttributesService.AssignKeyAccessServerToAttribute
434407
parameters:
435408
- name: Connect-Protocol-Version
@@ -466,6 +439,7 @@ paths:
466439
tags:
467440
- policy.attributes.AttributesService
468441
summary: RemoveKeyAccessServerFromAttribute
442+
description: 'Deprecated: utilize RemovePublicKeyFromAttribute'
469443
operationId: policy.attributes.AttributesService.RemoveKeyAccessServerFromAttribute
470444
parameters:
471445
- name: Connect-Protocol-Version
@@ -502,6 +476,7 @@ paths:
502476
tags:
503477
- policy.attributes.AttributesService
504478
summary: AssignKeyAccessServerToValue
479+
description: 'Deprecated: utilize AssignPublicKeyToValue'
505480
operationId: policy.attributes.AttributesService.AssignKeyAccessServerToValue
506481
parameters:
507482
- name: Connect-Protocol-Version
@@ -538,6 +513,7 @@ paths:
538513
tags:
539514
- policy.attributes.AttributesService
540515
summary: RemoveKeyAccessServerFromValue
516+
description: 'Deprecated: utilize RemovePublicKeyFromValue'
541517
operationId: policy.attributes.AttributesService.RemoveKeyAccessServerFromValue
542518
parameters:
543519
- name: Connect-Protocol-Version
@@ -1032,39 +1008,22 @@ components:
10321008
required:
10331009
- rule
10341010
additionalProperties: false
1035-
policy.AttributeValueSelector:
1011+
policy.Certificate:
10361012
type: object
10371013
properties:
1038-
withKeyAccessGrants:
1039-
type: boolean
1040-
title: with_key_access_grants
1041-
description: Deprecated
1042-
withSubjectMaps:
1043-
type: boolean
1044-
title: with_subject_maps
1045-
withResourceMaps:
1046-
type: boolean
1047-
title: with_resource_maps
1048-
withAttribute:
1049-
title: with_attribute
1050-
$ref: '#/components/schemas/policy.AttributeValueSelector.AttributeSelector'
1051-
title: AttributeValueSelector
1052-
additionalProperties: false
1053-
policy.AttributeValueSelector.AttributeSelector:
1054-
type: object
1055-
properties:
1056-
withKeyAccessGrants:
1057-
type: boolean
1058-
title: with_key_access_grants
1059-
description: Deprecated
1060-
withNamespace:
1061-
title: with_namespace
1062-
$ref: '#/components/schemas/policy.AttributeValueSelector.AttributeSelector.NamespaceSelector'
1063-
title: AttributeSelector
1064-
additionalProperties: false
1065-
policy.AttributeValueSelector.AttributeSelector.NamespaceSelector:
1066-
type: object
1067-
title: NamespaceSelector
1014+
id:
1015+
type: string
1016+
title: id
1017+
description: generated uuid in database
1018+
pem:
1019+
type: string
1020+
title: pem
1021+
description: PEM format certificate
1022+
metadata:
1023+
title: metadata
1024+
description: Optional metadata.
1025+
$ref: '#/components/schemas/common.Metadata'
1026+
title: Certificate
10681027
additionalProperties: false
10691028
policy.Condition:
10701029
type: object
@@ -1178,7 +1137,7 @@ components:
11781137
11791138
publicKey:
11801139
title: public_key
1181-
description: Deprecated
1140+
description: 'Deprecated: KAS can have multiple key pairs'
11821141
$ref: '#/components/schemas/policy.PublicKey'
11831142
sourceType:
11841143
title: source_type
@@ -1238,6 +1197,12 @@ components:
12381197
$ref: '#/components/schemas/policy.SimpleKasKey'
12391198
title: kas_keys
12401199
description: Keys for the namespace
1200+
rootCerts:
1201+
type: array
1202+
items:
1203+
$ref: '#/components/schemas/policy.Certificate'
1204+
title: root_certs
1205+
description: Root certificates for chain of trust
12411206
title: Namespace
12421207
additionalProperties: false
12431208
policy.Obligation:
@@ -1617,6 +1582,7 @@ components:
16171582
$ref: '#/components/schemas/policy.attributes.AttributeKeyAccessServer'
16181583
title: AssignKeyAccessServerToAttributeRequest
16191584
additionalProperties: false
1585+
description: 'Deprecated: utilize AssignPublicKeyToAttributeRequest'
16201586
policy.attributes.AssignKeyAccessServerToAttributeResponse:
16211587
type: object
16221588
properties:
@@ -1634,6 +1600,7 @@ components:
16341600
$ref: '#/components/schemas/policy.attributes.ValueKeyAccessServer'
16351601
title: AssignKeyAccessServerToValueRequest
16361602
additionalProperties: false
1603+
description: 'Deprecated: utilize AssignPublicKeyToValueRequest'
16371604
policy.attributes.AssignKeyAccessServerToValueResponse:
16381605
type: object
16391606
properties:
@@ -1868,7 +1835,7 @@ components:
18681835
type: string
18691836
title: id
18701837
format: uuid
1871-
description: Deprecated
1838+
description: 'Deprecated: utilize identifier'
18721839
deprecated: true
18731840
title: GetAttributeRequest
18741841
additionalProperties: false
@@ -1917,7 +1884,7 @@ components:
19171884
type: string
19181885
title: id
19191886
format: uuid
1920-
description: Deprecated
1887+
description: 'Deprecated: utilize identifier'
19211888
deprecated: true
19221889
title: GetAttributeValueRequest
19231890
additionalProperties: false
@@ -1958,12 +1925,6 @@ components:
19581925
description: |-
19591926
Required
19601927
Fully Qualified Names of attribute values (i.e. https://<namespace>/attr/<attribute_name>/value/<value_name>), normalized to lower case.
1961-
withValue:
1962-
title: with_value
1963-
description: |-
1964-
Optional
1965-
This attribute value selector is not used currently, but left here for future use.
1966-
$ref: '#/components/schemas/policy.AttributeValueSelector'
19671928
title: GetAttributeValuesByFqnsRequest
19681929
additionalProperties: false
19691930
policy.attributes.GetAttributeValuesByFqnsResponse:
@@ -2076,6 +2037,7 @@ components:
20762037
$ref: '#/components/schemas/policy.attributes.AttributeKeyAccessServer'
20772038
title: RemoveKeyAccessServerFromAttributeRequest
20782039
additionalProperties: false
2040+
description: 'Deprecated: utilize RemovePublicKeyFromAttributeRequest'
20792041
policy.attributes.RemoveKeyAccessServerFromAttributeResponse:
20802042
type: object
20812043
properties:
@@ -2093,6 +2055,7 @@ components:
20932055
$ref: '#/components/schemas/policy.attributes.ValueKeyAccessServer'
20942056
title: RemoveKeyAccessServerFromValueRequest
20952057
additionalProperties: false
2058+
description: 'Deprecated: utilize RemovePublicKeyFromValueRequest'
20962059
policy.attributes.RemoveKeyAccessServerFromValueResponse:
20972060
type: object
20982061
properties:

specs/policy/kasregistry/key_access_server_registry.openapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ components:
879879
880880
publicKey:
881881
title: public_key
882-
description: Deprecated
882+
description: 'Deprecated: KAS can have multiple key pairs'
883883
$ref: '#/components/schemas/policy.PublicKey'
884884
sourceType:
885885
title: source_type

0 commit comments

Comments
 (0)