Reference For: developers

gRPC: identity

Services, methods, messages and enums of identity.proto.

Identity: login, sessions, roles, permissions.

IdentityService

Sign-in, sessions, roles and permissions.

MethodRequestResponseDescription
LoginLoginRequestLoginResponse

Signs in with a user name and password; may ask for a second factor.

CompleteMfaCompleteMfaRequestSessionInfo

Completes a sign-in with the second factor.

LogoutEmptyEmpty

Ends the caller's session.

WhoAmIEmptyWhoAmIResponse

The caller's user, groups and session.

ListRolesEmptyListRolesResponse

Every role with its privileges.

ListPermissionsListPermissionsRequestListPermissionsResponse

Permissions of an object.

SetPermissionSetPermissionRequestPermission

Assigns a role to a user or group on an object.

RemovePermissionRemovePermissionRequestEmpty

Removes a permission from an object.

CheckPrivilegeCheckPrivilegeRequestCheckPrivilegeResponse

Whether the caller holds privilege on entity.

Messages

LoginRequest

Password login.

FieldNumberTypeDescription
username1string

User name.

password2string

Password.

kind3SessionKind

Kind of session to open.

UserView

A user account.

FieldNumberTypeDescription
username1string

User name.

display_name2string

Name to show.

email3string

Email address.

enabled4bool

The account may sign in.

groups5repeated string

Groups the user belongs to.

mfa_enrolled6bool

Two-step verification is set up.

break_glass7bool

Break-glass account for emergency access.

password_rotation_required8bool

The password must be changed at the next sign-in.

SessionInfo

An open session.

FieldNumberTypeDescription
token1string

Bearer token; shown once.

session_id2string

Id of the session; the bearer token of later calls.

expires_at3string

End of the session, RFC 3339.

user4UserView

The signed-in user.

password_rotation_required5bool

The session is restricted until the password is changed.

mfa_enrolment_required6bool

The session may only reach MFA self-service until enrolment completes.

MfaChallenge

The login needs a second factor.

FieldNumberTypeDescription
pending_token1string

Token to send with the code to CompleteMfa.

LoginResponse

A session, or a challenge for the second factor.

FieldNumberTypeDescription
session1SessionInfo

The open session.

mfa_required2MfaChallenge

The second factor is needed first.

CompleteMfaRequest

The second factor of a login.

FieldNumberTypeDescription
pending_token1string

Token of the challenge.

code2string

Six-digit code or a recovery code.

WhoAmIResponse

The caller and its session.

FieldNumberTypeDescription
username1string

User name.

groups2repeated string

Groups of the user.

session_id3string

Id of the session.

kind4SessionKind

Kind of session.

mfa_pending5bool

The session waits for the second factor.

password_rotation_required6bool

The password must be changed before anything else works.

break_glass7bool

The session belongs to a break-glass account.

Role

A role.

FieldNumberTypeDescription
id1string

Id of the role.

name2string

Name.

description3string

What the role is for.

privileges4repeated string

Privilege ids the role holds.

system5bool

Built-in role, not editable.

ListRolesResponse

The roles.

FieldNumberTypeDescription
items1repeated Role

Every role.

Principal

A user or a group.

FieldNumberTypeDescription
type1Principal.Type

User or group.

name2string

User name or group name.

Permission

A role granted to a principal on an object.

FieldNumberTypeDescription
id1string

Id of the permission.

entity2string

Id of the object.

principal3Principal

Who gets the role.

role4string

Id of the role.

propagate5bool

The permission also applies to the objects below.

ListPermissionsRequest

Lists permissions.

FieldNumberTypeDescription
entity1string

Id of the object.

ListPermissionsResponse

The permissions.

FieldNumberTypeDescription
items1repeated Permission

Permissions of the object.

SetPermissionRequest

Grants a role on an object.

FieldNumberTypeDescription
entity1string

Id of the object.

principal2Principal

Who gets the role.

role3string

Id of the role.

propagate4bool

Also apply to the objects below.

RemovePermissionRequest

Removes a permission.

FieldNumberTypeDescription
id1string

Id of the permission.

CheckPrivilegeRequest

Asks whether the caller holds a privilege.

FieldNumberTypeDescription
entity1string

Id of the object.

privilege2string

Privilege id.

CheckPrivilegeResponse

Answer of a privilege check.

FieldNumberTypeDescription
granted1bool

The caller holds the privilege on the object.

Enums

SessionKind

Kind of session a login opens.

ValueNumberDescription
SESSION_KIND_INTERACTIVE0
SESSION_KIND_API1

Principal.Type

Kind of principal.

ValueNumberDescription
TYPE_USER0
TYPE_GROUP1

Version 0.1.