Zudoku
Unikraft Cloud Network Shield Plugin API

Secrets

Server

List Secrets

GET
http://localhost:8080
/secrets

List every secret in force. Values are never returned.

List Secrets › Responses

Every secret in force, values excluded.

The response carrying every secret's metadata.
status
​string · enum · required

The status of the response.

Enum values:
success
error
partial_success
​object · required

The response data for this request.

op_time_us
​integer · uint64 · required

The operation time in microseconds.

message
​string

An optional message providing additional information about the status.

A list of errors which may have occurred during the request.


Replace All Secrets

PUT
http://localhost:8080
/secrets

Replace every secret. A stored secret may leave out its value to keep it. 409 is returned when an id appears twice, and 422 when a secret is refused: it fails validation, is new and has no value, is bound to an http, passthrough or missing policy, no https policy it is bound to covers its hostnames, or the set holds more than 100.

Replace All Secrets › Request Body

A secret as a replace of every secret sends it.
id
​string · required

The secret's id, on the same terms as a policy's.

Example: github-token
​object · required

Where and how it is substituted.

hostname
​string[] · minItems: 1 · required

Exact hostnames the secret may be substituted for, at least one, at least one of them covered by an https policy the secret is bound to.

value
​string

(OPTIONAL) The value substituted for the pattern. Left out, the stored one is kept; a new secret needs it. Never returned.

bound_to_policies
​string[]

(OPTIONAL) The https policies whose requests the secret is substituted into. Empty, it applies to every https policy covering its hostnames.

Replace All Secrets › Responses

The secrets as they now stand, values excluded.

The response carrying every secret's metadata.
status
​string · enum · required

The status of the response.

Enum values:
success
error
partial_success
​object · required

The response data for this request.

op_time_us
​integer · uint64 · required

The operation time in microseconds.

message
​string

An optional message providing additional information about the status.

A list of errors which may have occurred during the request.


Add Secrets

POST
http://localhost:8080
/secrets

Add secrets, as an array even of one, which is added whole or not at all. 201 is returned with the secrets added. 409 is returned when an id is taken or appears twice, and 422 when a secret is refused.

Add Secrets › Request Body

A secret, as written.
id
​string · required

The secret's id, on the same terms as a policy's.

Example: github-token
value
​string · required

The value substituted for the pattern. Never returned.

​object · required

Where and how it is substituted.

hostname
​string[] · minItems: 1 · required

Exact hostnames the secret may be substituted for, at least one, at least one of them covered by an https policy the secret is bound to.

bound_to_policies
​string[]

(OPTIONAL) The https policies whose requests the secret is substituted into. Empty, it applies to every https policy covering its hostnames.

Add Secrets › Responses

The secrets added, values excluded.

The response carrying every secret's metadata.
status
​string · enum · required

The status of the response.

Enum values:
success
error
partial_success
​object · required

The response data for this request.

op_time_us
​integer · uint64 · required

The operation time in microseconds.

message
​string

An optional message providing additional information about the status.

A list of errors which may have occurred during the request.


Get Secret

GET
http://localhost:8080
/secrets/{id}

Get one secret by id. 404 is returned when no such secret exists.

Get Secret › path Parameters

id
​string · required

Get Secret › Responses

The secret, value excluded.

The response carrying one secret's metadata.
status
​string · enum · required

The status of the response.

Enum values:
success
error
partial_success
​object · required

The response data for this request.

op_time_us
​integer · uint64 · required

The operation time in microseconds.

message
​string

An optional message providing additional information about the status.

A list of errors which may have occurred during the request.


Replace Secret

PUT
http://localhost:8080
/secrets/{id}

Replace one secret, leaving the others as they are. Its value is replaced when the body gives one, and kept when the body leaves value out. It is in force when the request is answered. 404 is returned when no such secret exists, and 422 when the body names another id or the secret is refused as an added one would be.

Replace Secret › path Parameters

id
​string · required

Replace Secret › Request Body

The request to replace one secret, which the path names.
​object · required

Where and how it is substituted.

hostname
​string[] · minItems: 1 · required

Exact hostnames the secret may be substituted for, at least one, at least one of them covered by an https policy the secret is bound to.

id
​string

(OPTIONAL) The secret's id. Given, it has to be the path's.

value
​string

(OPTIONAL) The value substituted for the pattern. Left out, the stored one is kept. Never returned.

bound_to_policies
​string[]

(OPTIONAL) The https policies whose requests the secret is substituted into. Empty, it applies to every https policy covering its hostnames.

Replace Secret › Responses

The secret as it now stands, value excluded.

The response carrying one secret's metadata.
status
​string · enum · required

The status of the response.

Enum values:
success
error
partial_success
​object · required

The response data for this request.

op_time_us
​integer · uint64 · required

The operation time in microseconds.

message
​string

An optional message providing additional information about the status.

A list of errors which may have occurred during the request.


Delete Secret

DELETE
http://localhost:8080
/secrets/{id}

Delete one secret. 404 is returned when no such secret exists.

Delete Secret › path Parameters

id
​string · required

Delete Secret › Responses

The outcome of deleting the secret.

A response which carries no data of its own. `data` is `null`; the outcome of the request is the HTTP status code.
status
​string · enum · required

The status of the response.

Enum values:
success
error
partial_success
data
​required

The response data for this request.

op_time_us
​integer · uint64 · required

The operation time in microseconds.

message
​string

An optional message providing additional information about the status.

A list of errors which may have occurred during the request.