Resource: KeyRing
A KeyRing is a logical grouping of keys. Every KeyRing has its own KeyPolicy, set when the KeyRing is created, and every key created in the KeyRing follows it.
Keys cannot be moved between KeyRings, and a KeyRing can only be deleted when it contains no keys.
| JSON representation |
|---|
{
"name": string,
"displayName": string,
"keyPolicy": {
object ( |
| Fields | |
|---|---|
name |
Identifier. The resource name of the KeyRing. Format: projects/{project}/locations/{location}/instances/{instance}/keyRings/{keyRing} |
displayName |
Optional. User-assigned display name for the KeyRing. |
keyPolicy |
Required. Immutable. The KeyPolicy that every key in this KeyRing follows. Set only when the KeyRing is created. It belongs to this KeyRing alone and cannot be shared with or referenced by other KeyRings. |
createTime |
Output only. The time at which the KeyRing was created. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
updateTime |
Output only. The time at which the KeyRing was last updated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
uid |
Output only. The unique server-generated identifier of the KeyRing. |
keyCount |
Output only. The number of keys in the KeyRing, including disabled keys. Because keys are never deleted, a KeyRing can be deleted only while this is 0. |
KeyPolicy
A KeyPolicy defines how key shares are allocated when a key is generated: who holds them, how many are needed to sign, and where they are stored.
A KeyPolicy is a tree of threshold rules. The root is a PolicyNode that requires threshold of its children. Each child is a TeamNode, a UserNode, or a nested PolicyNode. The tree is limited to two levels: a PolicyNode nested under the root cannot contain another PolicyNode.
A KeyPolicy is not a standalone resource. It is set inline on a KeyRing when the KeyRing is created, belongs only to that KeyRing, and cannot be changed or shared. To use different rules for new keys, create a new KeyRing with a new KeyPolicy.
| JSON representation |
|---|
{
"policy": {
object ( |
| Fields | |
|---|---|
policy |
Required. Immutable. The root threshold rule. |
PolicyNode
A k-of-n threshold rule over child nodes.
| JSON representation |
|---|
{
"policyNodeId": string,
"threshold": integer,
"subKeyShares": [
{
object ( |
| Fields | |
|---|---|
policyNodeId |
Required. An identifier for this node, unique within the KeyPolicy. Keys refer to it when they report which key shares fill which slot. Must match |
threshold |
Required. The number of children in |
subKeyShares[] |
Required. The child nodes. Must contain at least one node. |
ParticipantNode
A child of a PolicyNode.
| JSON representation |
|---|
{ // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "teamNode": { object ( |
| Fields | |
|---|---|
| The kind of participant. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: | |
teamNode |
|
userNode |
Key shares held by a specific User. |
policyNode |
A nested threshold rule. Only allowed directly under the root. |
| End of mutually exclusive fields. | |
TeamNode
A threshold rule over members of a Team. When a key is created, totalMembers members of the Team each receive a key share, and any threshold of them can sign.
| JSON representation |
|---|
{
"team": string,
"threshold": integer,
"totalMembers": integer,
"storageInfo": {
object ( |
| Fields | |
|---|---|
team |
Required. The resource name of the Team. Format: projects/{project}/locations/{location}/instances/{instance}/teams/{team} |
threshold |
Required. The number of key shares from this Team needed to sign. Must be between 1 and |
totalMembers |
Required. The number of Team members that receive a key share. This is not the size of the Team: the Team may have more members than this. Key creation fails if the Team has fewer active signers than this. |
storageInfo |
Required. Where the Team's key shares are stored. |
UserNode
Key shares held by a specific User. The User must have the SIGNER role.
| JSON representation |
|---|
{
"user": string,
"shareStorage": [
{
object ( |
| Fields | |
|---|---|
user |
Required. The resource name of the User. Format: projects/{project}/locations/{location}/instances/{instance}/users/{user} |
shareStorage[] |
Required. Where each of the User's key shares is stored, one entry per key share. Currently must contain exactly one entry with |
threshold |
Required. The number of this User's key shares needed to sign. Must be between 1 and the size of |
Methods |
|
|---|---|
|
Creates a new KeyRing in an instance. |
|
Deletes a KeyRing and its KeyPolicy. |
|
Gets details of a single KeyRing. |
|
Lists KeyRings in an instance. |