Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update DEK Registry spec #2815

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
268 changes: 262 additions & 6 deletions dek-registry/generated/swagger-ui/dek-registry-api-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,29 @@ paths:
schema:
type: boolean
responses:
default:
description: default response
"200":
description: List of dek subjects
content:
application/vnd.schemaregistry.v1+json:
schema:
type: array
items:
type: string
example: User
application/vnd.schemaregistry+json; qs=0.9:
schema:
type: array
items:
type: string
example: User
application/json; qs=0.5:
schema:
type: array
items:
type: string
example: User
"404":
description: Error code 40470 -- Key not found
post:
summary: Create a dek.
operationId: createDek
Expand Down Expand Up @@ -88,24 +93,27 @@ paths:
schema:
type: boolean
responses:
default:
description: default response
"200":
description: List of kek names
content:
application/vnd.schemaregistry.v1+json:
schema:
type: array
items:
type: string
example: mykek
application/vnd.schemaregistry+json; qs=0.9:
schema:
type: array
items:
type: string
example: mykek
application/json; qs=0.5:
schema:
type: array
items:
type: string
example: mykek
post:
summary: Create a kek.
operationId: createKek
Expand Down Expand Up @@ -277,8 +285,97 @@ paths:
"404":
description: Error code 40470 -- Key not found
delete:
summary: Delete a dek.
operationId: deleteDek
summary: Delete all versions of a dek.
operationId: deleteDekVersions
parameters:
- name: name
in: path
description: Name of the kek
required: true
schema:
type: string
- name: subject
in: path
description: Subject of the dek
required: true
schema:
type: string
- name: algorithm
in: query
description: Algorithm of the dek
schema:
type: string
enum:
- AES128_GCM
- AES256_GCM
- AES256_SIV
- name: permanent
in: query
description: Whether to perform a permanent delete
schema:
type: boolean
responses:
"204":
description: No Content
"404":
description: Error code 40470 -- Key not found
/dek-registry/v1/keks/{name}/deks/{subject}/versions/{version}:
get:
summary: Get a dek by subject and version.
operationId: getDekByVersion
parameters:
- name: name
in: path
description: Name of the kek
required: true
schema:
type: string
- name: subject
in: path
description: Subject of the dek
required: true
schema:
type: string
- name: version
in: path
description: Version of the dek
required: true
schema:
type: string
- name: algorithm
in: query
description: Algorithm of the dek
schema:
type: string
enum:
- AES128_GCM
- AES256_GCM
- AES256_SIV
- name: deleted
in: query
description: Whether to include deleted keys
schema:
type: boolean
responses:
"200":
description: The dek info
content:
application/vnd.schemaregistry.v1+json:
schema:
$ref: '#/components/schemas/Dek'
application/vnd.schemaregistry+json; qs=0.9:
schema:
$ref: '#/components/schemas/Dek'
application/json; qs=0.5:
schema:
$ref: '#/components/schemas/Dek'
"404":
description: Error code 40470 -- Key not found
"422":
description: Error code 42202 -- Invalid version
delete:
summary: Delete a dek version.
operationId: deleteDekVersion
parameters:
- name: name
in: path
Expand All @@ -292,6 +389,12 @@ paths:
required: true
schema:
type: string
- name: version
in: path
description: Version of the dek
required: true
schema:
type: string
- name: algorithm
in: query
description: Algorithm of the dek
Expand All @@ -311,6 +414,152 @@ paths:
description: No Content
"404":
description: Error code 40470 -- Key not found
"422":
description: Error code 42202 -- Invalid version
/dek-registry/v1/keks/{name}/deks/{subject}/versions:
get:
summary: List versions of dek.
operationId: getDekVersions
parameters:
- name: name
in: path
description: Name of the kek
required: true
schema:
type: string
- name: subject
in: path
description: Subject of the dek
required: true
schema:
type: string
- name: algorithm
in: query
description: Algorithm of the dek
schema:
type: string
enum:
- AES128_GCM
- AES256_GCM
- AES256_SIV
- name: deleted
in: query
description: Whether to include deleted keys
schema:
type: boolean
responses:
"200":
description: List of version numbers for dek
content:
application/vnd.schemaregistry.v1+json:
schema:
type: array
items:
type: integer
format: int32
example: 1
application/vnd.schemaregistry+json; qs=0.9:
schema:
type: array
items:
type: integer
format: int32
example: 1
application/json; qs=0.5:
schema:
type: array
items:
type: integer
format: int32
example: 1
"404":
description: Error code 40470 -- Key not found
/dek-registry/v1/keks/{name}/deks/{subject}/versions/{version}/undelete:
post:
summary: Undelete a dek version.
operationId: undeleteDekVersion
parameters:
- name: name
in: path
description: Name of the kek
required: true
schema:
type: string
- name: subject
in: path
description: Subject of the dek
required: true
schema:
type: string
- name: version
in: path
description: Version of the dek
required: true
schema:
type: string
- name: algorithm
in: query
description: Algorithm of the dek
schema:
type: string
enum:
- AES128_GCM
- AES256_GCM
- AES256_SIV
responses:
"204":
description: No Content
"404":
description: Error code 40470 -- Key not found
"422":
description: Error code 42202 -- Invalid version
/dek-registry/v1/keks/{name}/deks/{subject}/undelete:
post:
summary: Undelete all versions of a dek.
operationId: undeleteDekVersions
parameters:
- name: name
in: path
description: Name of the kek
required: true
schema:
type: string
- name: subject
in: path
description: Subject of the dek
required: true
schema:
type: string
- name: algorithm
in: query
description: Algorithm of the dek
schema:
type: string
enum:
- AES128_GCM
- AES256_GCM
- AES256_SIV
responses:
"204":
description: No Content
"404":
description: Error code 40470 -- Key not found
/dek-registry/v1/keks/{name}/undelete:
post:
summary: Undelete a kek.
operationId: undeleteKek
parameters:
- name: name
in: path
description: Name of the kek
required: true
schema:
type: string
responses:
"204":
description: No Content
"404":
description: Error code 40470 -- Key not found
components:
schemas:
Dek:
Expand All @@ -336,11 +585,16 @@ components:
ts:
type: integer
format: int64
deleted:
type: boolean
CreateDekRequest:
type: object
properties:
subject:
type: string
version:
type: integer
format: int32
algorithm:
type: string
enum:
Expand Down Expand Up @@ -369,6 +623,8 @@ components:
ts:
type: integer
format: int64
deleted:
type: boolean
CreateKekRequest:
type: object
properties:
Expand Down