REST Resource: projects.locations.instances.users

Resource: User

A User is an onboarded identity within an MPC instance.

JSON representation
{
  "name": string,
  "displayName": string,
  "principal": string,
  "authorizationKey": {
    object (AuthorizationKey)
  },
  "team": string,
  "roles": [
    enum (Role)
  ],
  "createTime": string,
  "updateTime": string,
  "state": enum (State),
  "uid": string,
  "roleStatuses": [
    {
      object (RoleStatus)
    }
  ]
}
Fields
name

string

Identifier. The resource name of the User. Format: projects/{project}/locations/{location}/instances/{instance}/users/{user}

displayName

string

Optional. User-assigned display name for the User.

principal

string

Required. Immutable. The principal that authenticates as this User: a Google account or a BYOID (workforce identity) principal. Requests on behalf of this User must come from this principal.

authorizationKey

object (AuthorizationKey)

Optional. The public key the User signs authorizations with. Signers and policy authors need one to authorize transactions and policies.

team

string

Optional. The resource name of the Team the User belongs to. Must be set if roles includes SIGNER, and must be empty otherwise; a request that breaks either rule fails with INVALID_ARGUMENT. Only signers hold key shares, so only signers belong to a Team. It is set when SIGNER is enabled (users.create or UserService.EnableUserRole), cleared when SIGNER is disabled, and changed with UserService.UpdateTeamAssignment. Format: projects/{project}/locations/{location}/instances/{instance}/teams/{team}

roles[]

enum (Role)

Optional. The roles to grant the User at creation: empty or SIGNER only. After that, roles change with UserService.EnableUserRole and UserService.DisableUserRole. In responses, the roles the User can use now: those that are ACTIVE or PENDING_DISABLED in roleStatuses. This can be empty, for example while the User's only role waits for approval.

createTime

string (Timestamp format)

Output only. The time at which the User 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: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

updateTime

string (Timestamp format)

Output only. The time at which the User 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: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

state

enum (State)

Output only. The lifecycle state of the User.

uid

string

Output only. The unique server-generated identifier of the User.

roleStatuses[]

object (RoleStatus)

Output only. The status of every role the User has ever been granted. A disabled role stays here as DISABLED, so its approvals stay visible.

AuthorizationKey

The public key a user signs authorizations with. The service only ever stores the public half; the private key never leaves the user.

JSON representation
{
  "publicKey": string,
  "algorithm": enum (PublicKeySignatureAlgorithm)
}
Fields
publicKey

string (bytes format)

Required. The public key material.

A base64-encoded string.

algorithm

enum (PublicKeySignatureAlgorithm)

Required. The signature algorithm of the public key.

PublicKeySignatureAlgorithm

Signature algorithms supported for user authorization keys.

Enums
PUBLIC_KEY_SIGNATURE_ALGORITHM_UNSPECIFIED Not specified.
PUBLIC_KEY_SIGNATURE_ALGORITHM_ECDSA_SECP256K1 ECDSA on curve secp256k1.
PUBLIC_KEY_SIGNATURE_ALGORITHM_EDDSA_ED25519 EdDSA on curve Ed25519.

Role

A role that grants a User a set of capabilities.

Enums
ROLE_UNSPECIFIED Not specified.
SIGNER Can hold key shares and authorize transactions.
POLICY_AUTHOR Can author and approve transaction policies.
ADMIN Can administer Users, Teams, and other instance resources.

State

The lifecycle state of a User.

Enums
STATE_UNSPECIFIED Not specified.
ACTIVE The User is enabled. Which roles the User can use is in roleStatuses.
DISABLED The User is disabled and cannot use any role.

RoleStatus

The status of one of a User's roles, in User.role_statuses.

Status is per role, so a change to one role doesn't affect the others. For example, a signer who is granted POLICY_AUTHOR can keep signing while POLICY_AUTHOR waits for Admin approval.

JSON representation
{
  "role": enum (Role),
  "state": enum (State),
  "activationInfo": {
    object (RoleApprovalInfo)
  },
  "version": string,
  "updateTime": string,
  "deactivationInfo": {
    object (RoleApprovalInfo)
  }
}
Fields
role

enum (Role)

Output only. The role.

state

enum (State)

Output only. The lifecycle state of the role.

activationInfo

object (RoleApprovalInfo)

Output only. The Admin approvals of the role's latest ENABLE change, pending or completed. While the role is ACTIVE or PENDING_DISABLED, this is the completed quorum that authorizes the User to use it; a disable, or a disable that expires, never replaces it. Unset for SIGNER, whose changes need no Admin approval.

version

string (int64 format)

Output only. The version of the role. It increases by 1 with each change that needs Admin approval, and Admins sign it in UserSigningPayload so an old approval can't be replayed. It never decreases: a change that expires or is canceled keeps its version, so its signatures can't be reused for a later change. 0 until the first such change; always 0 for SIGNER.

updateTime

string (Timestamp format)

Output only. The time at which the role's state last changed.

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: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

deactivationInfo

object (RoleApprovalInfo)

Output only. The Admin approvals of the role's latest DISABLE change: pending, completed or expired. Unset if the role was never disabled with Admin approval, and always for SIGNER.

State

The lifecycle state of a role.

Enums
STATE_UNSPECIFIED Not specified.
PENDING_ACTIVE The role was enabled and is waiting for Admin approval. The User cannot use it yet.
ACTIVE The User can use the role.
PENDING_DISABLED The role is being disabled and is waiting for Admin approval. The User can still use it.
DISABLED The role was disabled. The User cannot use it.

RoleApprovalInfo

The Admin approvals of one change to a User's ADMIN or POLICY_AUTHOR role.

JSON representation
{
  "approvals": [
    {
      object (RoleApproval)
    }
  ],
  "requiredApprovalCount": integer,
  "expireTime": string,
  "version": string,
  "completeTime": string
}
Fields
approvals[]

object (RoleApproval)

Output only. The Admin approvals collected for the change. The first entry is the approval of the Admin who requested it; others are appended as Admins call UserService.ApproveRoleChange.

requiredApprovalCount

integer

Output only. The number of Admin approvals required to complete the change. While the change is waiting for approvals, this reflects the instance's current threshold. Once the change completes, it is fixed to the threshold in effect when it completed.

expireTime

string (Timestamp format)

Output only. The time at which the change expires if it hasn't reached requiredApprovalCount. The server sets it when the change is requested. An expired change is dropped and its role returns to its previous state. Its approvals stay here for audit, with completeTime unset; they never replace the approvals of the other direction.

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: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

version

string (int64 format)

Output only. RoleStatus.version for this change: the version the approvals signed in UserSigningPayload.

completeTime

string (Timestamp format)

Output only. The time at which the change reached requiredApprovalCount and took effect. Unset while the change is pending and if it expired or was canceled.

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: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

RoleApproval

One Admin's recorded approval of a change to a User's role.

JSON representation
{
  "user": string,
  "authorizationInfo": {
    object (AuthorizationInfo)
  },
  "approveTime": string
}
Fields
user

string

Output only. The resource name of the approving Admin, resolved from the caller's authenticated identity. Format: projects/{project}/locations/{location}/instances/{instance}/users/{user}

authorizationInfo

object (AuthorizationInfo)

Output only. The Admin's signature over a UserSigningPayload that includes this role change.

approveTime

string (Timestamp format)

Output only. The time at which the approval was recorded.

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: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

Methods

approveRoleChange

Records an Admin's approval of the User's pending role change: the roles in PENDING_ACTIVE or PENDING_DISABLED in role_statuses.

create

Creates a new User in an instance.

disable

Disables a User and all of their roles at once.

disableRole

Disables one role of a User.

enable

Re-enables a disabled User: sets state back to ACTIVE.

enableRole

Enables one role of a User: grants it, or re-enables it if it was disabled.

get

Gets details of a single User.

list

Lists Users in an instance.

patch

Updates a User's display_name.

updateTeamAssignment

Moves a User to a different Team.