Skip to content
This repository has been archived by the owner on Nov 10, 2021. It is now read-only.

Latest commit

 

History

History
624 lines (253 loc) · 13.1 KB

index.md

File metadata and controls

624 lines (253 loc) · 13.1 KB

Protocol Documentation

Table of Contents

Top

sym/enums/service.proto

Service

Service represents a system Sym integrates with

Name Number Description
UNKNOWN 0 Unidentified service
SLACK 1 Slack
OKTA 2 Okta
AWS 3 AWS
CUSTOM 4 Customer service

Top

sym/models/resource.proto

Resource

Resource represents some entity from a given service

Field Type Label Description
service sym.enums.Service The service this is a resource in
id string How the resource is identified

Top

sym/models/schema.proto

Schema

Field Type Label Description
version int32

Top

sym/models/user.proto

User

User holds multiple Identities for various integrated services.

Field Type Label Description
uuid UUID The uuid for a user remains constant across all services
current_identity User.Identity current_identity is the system the user is currently interacting with sym from
identities User.Identity repeated identities this user has

User.Identity

Identity of the user in a given service

Field Type Label Description
service sym.enums.Service
id string

Top

sym/models/uuid.proto

UUID

Field Type Label Description
value string

Top

sym/messages/approval.proto

Approval

Approval messages represent approval for a target user to use a resource

Field Type Label Description
id sym.models.UUID
schema sym.models.Schema
request Request The request that was approved
meta Approval.Meta Metadata about the approval

Approval.Meta

Metadata about an approval

Field Type Label Description
approver sym.models.User The approving user

Top

sym/messages/authz.proto

Authz

Authz messages test if a user is authorized for a role

Field Type Label Description
schema sym.models.Schema
user string
role string

AuthzResponse

AuthzResponse gets sent back by authz requests

Field Type Label Description
ok bool
errorMessage string error message when not ok

Top

sym/messages/dispatch.proto

Dispatch

Dispatch messages wrap another message type

Field Type Label Description
action string
payload google.protobuf.Any

Top

sym/messages/expiration.proto

Expiration

Expiration messages represent an approval that is now expired

Field Type Label Description
id sym.models.UUID
schema sym.models.Schema
target Expiration.Target The expiring user and resource

Expiration.Target

Target combines the expiring user and resource

Field Type Label Description
user sym.models.User user to remove access from
resource sym.models.Resource resource to remove access to

Top

sym/messages/options.proto

Options

Options messages represent a user asking for options with a given filter

Field Type Label Description
id sym.models.UUID
schema sym.models.Schema
requester sym.models.User
filter Options.Filter

Options.Filter

Options filter

Field Type Label Description
service sym.enums.Service The service this is a resource in
pattern string Filter string for resources

OptionsResponse

OptionsResponse gets sent back by dispatch requests

Field Type Label Description
ok bool
error string error message when not ok
options string repeated

Top

sym/messages/request.proto

Request

Request represents some user request for access

Field Type Label Description
id sym.models.UUID
schema sym.models.Schema
target Request.Target The target user and resource
meta Request.Meta Metadata about the request

Request.Meta

Metadata about the request

Field Type Label Description
reason string user-defined arbitrary reason

Request.Target

Target combines the requesting user and resource

Field Type Label Description
user sym.models.User user to grant access to
resource sym.models.Resource resource to give access to

Top

sym/messages/response.proto

ApprovalResponse

ApprovalResponse gets sent back upon successful approvals

Field Type Label Description
ok bool
error string error message when not ok

DispatchResponse

DispatchResponse gets sent back by dispatch requests

Field Type Label Description
ok bool
error string error message when not ok

ExpirationResponse

ExpirationResponse gets sent back upon successful expirations

Field Type Label Description
ok bool
error string error message when not ok

Scalar Value Types

.proto Type Notes C++ Java Python Go C# PHP Ruby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)