Secrets
Secret values the server keeps and gives to hosts.
| Operation | Kind | HTTP |
|---|---|---|
secrets.list | call | GET /v1/secrets |
secrets.set | call | PUT /v1/secrets/{name} |
secrets.remove | call | DELETE /v1/secrets/{name} |
secrets.rename | call | POST /v1/secrets/{name}/rename |
secrets.list
The names of the secrets.
Needs the role admin.
Result
| Field | Type | Description |
|---|---|---|
names | string[] | The global secrets' names, and the addresses of those that belong to something: a registry's password or token is registry/NAME, the passwords rookery logs in to a host with ssh/HOST and sudo/HOST, and a provisioner's own provisioner/NAME/SECRET. |
secrets | Named[] | The global secrets, by name, with their ids. |
{
"id": 1,
"op": "secrets.list"
}{
"id": 1,
"result": {
"names": [
"text"
],
"secrets": [
{
"id": "k3v9qz2m8w1x",
"name": "status"
}
]
}
}secrets.set
Set a secret's value.
Needs the role admin.
Arguments
| Name | Where | Required | Description |
|---|---|---|---|
name | path | yes | The secret, by its name or its id (bare or as sec_ID); registry/REGISTRY is a registry's login, ssh/HOST and sudo/HOST a host's passwords and provisioner/PROVISIONER/SECRET a provisioner's own |
Input
The value
| Field | Type | Description |
|---|---|---|
value | string |
Result
| Field | Type | Description |
|---|---|---|
ok | boolean |
Errors
| Status | When |
|---|---|
| 400 | Not a name |
{
"id": 1,
"op": "secrets.set",
"args": {
"name": "status"
},
"data": {
"value": "text"
}
}{
"id": 1,
"result": {
"ok": true
}
}secrets.remove
Remove a secret.
Needs the role admin.
Arguments
| Name | Where | Required | Description |
|---|---|---|---|
name | path | yes | The secret, by its name or its id (bare or as sec_ID), or the address of one that belongs to something |
Result
| Field | Type | Description |
|---|---|---|
ok | boolean |
Errors
| Status | When |
|---|---|
| 404 | No such secret |
{
"id": 1,
"op": "secrets.remove",
"args": {
"name": "status"
}
}{
"id": 1,
"result": {
"ok": true
}
}secrets.rename
Give a global secret another name.
Needs the role admin.
Arguments
| Name | Where | Required | Description |
|---|---|---|---|
name | path | yes | The secret, by its name or its id (bare or as sec_ID) |
Input
The new name
| Field | Type | Description |
|---|---|---|
name | string |
Result
| Field | Type | Description |
|---|---|---|
ok | boolean |
Errors
| Status | When |
|---|---|
| 400 | Not a name for a secret, or one that belongs to something |
| 404 | No such secret |
| 409 | The name is taken |
{
"id": 1,
"op": "secrets.rename",
"args": {
"name": "status"
},
"data": {
"name": "status"
}
}{
"id": 1,
"result": {
"ok": true
}
}Types
The named types used on this page.
Named
A thing rookery keeps, by its id and its name.
| Field | Type | Description |
|---|---|---|
id | string | Its id, which stays when it is renamed. |
name | string |