v0.0.69
pan-dotdot-proto
pan/dotdot/v1/base/auth.proto
AuthSource
| Name | Number | Description |
|---|---|---|
| None | 0 | |
| Console | 1 | |
| Pan | 2 |
pan/dotdot/v1/base/admin.proto
AdminMember
| Field | Type | Label | Description |
|---|---|---|---|
| dot_id | string | dotdot內部的帳號識別id | |
| source_id | string | 第三方認證源的id | |
| source | AuthSource | 第三方認證源 | |
| display_name | string | 顯示名稱 | |
| functions | AdminFunction | repeated | 該帳號擁有的admin functions (superuser操作權限) |
AdminFunction
| Name | Number | Description |
|---|---|---|
| FunctionNone | 0 | |
| RoleOperation | 1 | 可操作Role |
| PolicyOperation | 2 | 可操作Policy |
| PermissionOperation | 3 | 可操作Permission |
pan/dotdot/v1/admin/command.proto
AssignFunctionsAnswer
error -> InvalidArgument | PermissionDenied | Error_MemberNotFound
AssignFunctionsPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| dot_id | string | 要賦予admin function的member的dot_id | |
| functions | pan.dotdot.v1.base.AdminFunction | repeated | 要賦予的admin functions |
RevokeFunctionsAnswer
error -> InvalidArgument | PermissionDenied | Error_MemberNotFound
RevokeFunctionsPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| dot_id | string | 要撤銷權限的對象dot_id | |
| functions | pan.dotdot.v1.base.AdminFunction | repeated | 要撤銷的admin functions |
| propagate | bool | 連帶移除該member創建的role, policy和permission |
TransferRootAnswer
error -> InvalidArgument | PermissionDenied | Error_MemberNotFound
TransferRootPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| dot_id | string | 要轉移root權限的對象dot_id |
Command
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| TransferRoot | TransferRootPayload | TransferRootAnswer | root only - 轉移root role給另一位member,轉移後自己會失去root role |
| AssignFunctions | AssignFunctionsPayload | AssignFunctionsAnswer | root only - 賦予admin function給某一位member |
| RevokeFunctions | RevokeFunctionsPayload | RevokeFunctionsAnswer | root only - 撤除某一位member的admin function,可選擇同時移除該位member所創建的規則 |
pan/dotdot/v1/admin/query.proto
GetAdminFunctionsAnswer
error -> Internal | InvalidArgument | PermissionDenied
| Field | Type | Label | Description |
|---|---|---|---|
| records | GetAdminFunctionsAnswer.Record | repeated |
GetAdminFunctionsAnswer.Record
| Field | Type | Label | Description |
|---|---|---|---|
| id | int64 | admin_function的id | |
| name | string | admin_function的name |
GetAdminFunctionsPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string |
GetAdminMembersAnswer
error -> Internal | PermissionDenied
| Field | Type | Label | Description |
|---|---|---|---|
| members | pan.dotdot.v1.base.AdminMember | repeated | |
| total | int32 |
GetAdminMembersPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| functions | pan.dotdot.v1.base.AdminFunction | repeated | 要篩選的admin function,只會返回擁有指定function的member。如果是空array,則返回all |
| page | int32 | ||
| size | int32 |
Query
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| GetAdminFunctions | GetAdminFunctionsPayload | GetAdminFunctionsAnswer | root only,查詢所有admin functions |
| GetAdminMembers | GetAdminMembersPayload | GetAdminMembersAnswer | root only,查詢所有「擁有任一admin function的auth member」 |
pan/dotdot/v1/auth/command.proto
AppleLoginAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string |
AppleLoginPayload
| Field | Type | Label | Description |
|---|---|---|---|
| apple_access_token | string |
GoogleLoginAnswer
error -> Internal | Unauthenticated | InvalidArgument | Error_MemberNotFound
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| dot_id | string | dotdot內部的帳號識別id | |
| expired_at | google.protobuf.Timestamp | token過期時間 | |
| is_root | bool | 是root帳號 | |
| functions | pan.dotdot.v1.base.AdminFunction | repeated | 該帳號擁有的admin functions (superuser操作權限) |
GoogleLoginPayload
| Field | Type | Label | Description |
|---|---|---|---|
| google_access_token | string |
PanLoginAnswer
error -> Internal | Unauthenticated | InvalidArgument | Error_MemberNotFound
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| dot_id | string | dotdot內部的帳號識別id | |
| expired_at | google.protobuf.Timestamp | token過期時間 | |
| is_root | bool | 是root帳號 | |
| functions | pan.dotdot.v1.base.AdminFunction | repeated | 該帳號擁有的admin functions (superuser操作權限) |
PanLoginPayload
| Field | Type | Label | Description |
|---|---|---|---|
| pan_access_token | string |
RefreshInfoAnswer
error -> Internal | InvalidArgument | PermissionDenied
| Field | Type | Label | Description |
|---|---|---|---|
| is_root | bool | 是root帳號 | |
| functions | pan.dotdot.v1.base.AdminFunction | repeated | 該帳號擁有的admin functions (superuser操作權限) |
RefreshInfoPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string |
RegisterAnswer
RegisterAnswer.Error
RegisterPayload
| Field | Type | Label | Description |
|---|---|---|---|
| app_code | string | deprecated | |
| source | pan.dotdot.v1.base.AuthSource | 第三方認證源 | |
| id | string | email or uid |
RegisterAnswer.Error.Value
| Name | Number | Description |
|---|---|---|
| None | 0 | |
| IdDuplicated | 1001 | source id重複註冊 |
Command
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| Register | RegisterPayload | RegisterAnswer | 沒有使用 |
| PanLogin | PanLoginPayload | PanLoginAnswer | 透過pan access token換取該member的admin_token, dot_id, admin functions, 是否是root等資訊 |
| GoogleLogin | GoogleLoginPayload | GoogleLoginAnswer | 透過google access token換取該member的admin_token, dot_id, admin functions, 是否是root等資訊 |
| AppleLogin | AppleLoginPayload | AppleLoginAnswer | |
| RefreshInfo | RefreshInfoPayload | RefreshInfoAnswer | 用admin token換取該member的admin functions, 是否是root等資訊 |
pan/dotdot/v1/base/domain.proto
Domain
| Name | Number | Description |
|---|---|---|
| DomainNone | 0 | |
| DomainPan | 1 | |
| DomainJPay | 2 | |
| DomainJPoints | 3 | |
| DomainJKTalk | 4 |
pan/dotdot/v1/base/error.proto
Error
Error.Value
| Name | Number | Description |
|---|---|---|
| None | 0 | |
| PolicyNotFound | 1101 | 查無policy |
| PermissionNotFound | 1102 | 查無permission |
| RoleNotFound | 1103 | 查無role |
| MemberNotFound | 1104 | 查無該用戶 |
| AssignerNotFound | 1105 | 查無操作者資料 |
| ReceiverNotFound | 1106 | 查無被操作者資料 |
| NameDuplicated | 1107 | 名字重複 |
| HierarchyOverHeight | 1120 | 繼承關聯後高度超過指定高度 |
| ChildHierarchyOverHeight | 1121 | 子節點高度 >= 父節點高度 |
| MemberAlreadyExist | 1122 | 用戶已存在 |
pan/dotdot/v1/base/general.proto
TernaryCondition
| Name | Number | Description |
|---|---|---|
| All | 0 | |
| True | 1 | |
| False | 2 |
pan/dotdot/v1/base/group.proto
Group
| Field | Type | Label | Description |
|---|---|---|---|
| id | int64 | ||
| name | string | ||
| display_name | string |
pan/dotdot/v1/base/member.proto
AuthMember
| Field | Type | Label | Description |
|---|---|---|---|
| dot_id | string | dotdot內部的帳號識別id | |
| source_id | string | 第三方認證源的id | |
| source | AuthSource | 第三方認證源 | |
| display_name | string | 顯示名稱 |
PanMember
| Field | Type | Label | Description |
|---|---|---|---|
| uid | int64 | pan的member uid | |
| huid | string | pan的member huid | |
| display_name | string | pan的member display name |
pan/dotdot/v1/base/permission.proto
GenericNode
| Field | Type | Label | Description |
|---|---|---|---|
| id | int64 | 節點id | |
| name | string | 唯一名稱 | |
| display_name | string | 顯示名稱 | |
| purpose | string | 補充描述 | |
| type | NodeType | 節點類型 | |
| creator_id | string | 創建該node的auth member的dot_id | |
| domain | Domain | 該節點所屬domain,目前僅Permission有這欄位(ex: 'pan', 'jpay', 'jpoints') |
NodeList
| Field | Type | Label | Description |
|---|---|---|---|
| nodes | GenericNode | repeated |
Permission
| Field | Type | Label | Description |
|---|---|---|---|
| id | int64 | ||
| name | string | 唯一名稱 | |
| display_name | string | 顯示名稱 | |
| purpose | string | ||
| domain | Domain |
Policy
| Field | Type | Label | Description |
|---|---|---|---|
| id | int64 | ||
| name | string | 唯一名稱 | |
| display_name | string | 顯示名稱 | |
| purpose | string | ||
| permissions | Permission | repeated | |
| policies | Policy | repeated |
Role
| Field | Type | Label | Description |
|---|---|---|---|
| id | int64 | ||
| name | string | 唯一名稱 | |
| display_name | string | 顯示名稱 | |
| purpose | string | 補充描述 | |
| linker_id | string | 當初賦予該role給該auth member的auth member的dot_id (僅部分API會有值) | |
| permissions | Permission | repeated | 直接關聯的所有permission |
| policies | Policy | repeated | 直接關聯的所有policy |
NodeType
| Name | Number | Description |
|---|---|---|
| Type_None | 0 | |
| Type_Permission | 1 | |
| Type_Policy | 2 | |
| Type_Role | 3 | |
| Type_AuthMember | 4 |
pan/dotdot/v1/group/command.proto
AssignGroupManagerAnswer
AssignGroupManagerPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| dot_id | string | ||
| group_id | int64 |
AttachMemberToGroupAnswer
AttachMemberToGroupPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| uid | int64 | ||
| group_id | int64 |
CreateTargetGroupAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| group_id | int64 |
CreateTargetGroupPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| name | string | required & unique | |
| display_name | string | required |
DetachMemberFromGroupAnswer
DetachMemberFromGroupPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| uid | int64 | ||
| group_id | int64 |
Command
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| CreateTargetGroup | CreateTargetGroupPayload | CreateTargetGroupAnswer | root only |
| AssignGroupManager | AssignGroupManagerPayload | AssignGroupManagerAnswer | root only |
| AttachMemberToGroup | AttachMemberToGroupPayload | AttachMemberToGroupAnswer | root only |
| DetachMemberFromGroup | DetachMemberFromGroupPayload | DetachMemberFromGroupAnswer | root only |
pan/dotdot/v1/group/query.proto
GetGroupManagersAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| managers | pan.dotdot.v1.base.AuthMember | repeated |
GetGroupManagersPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| group_id | int64 |
GetGroupMembersAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| members | pan.dotdot.v1.base.PanMember | repeated |
GetGroupMembersPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| group_id | int64 |
GetGroupsAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| groups | pan.dotdot.v1.base.Group | repeated |
GetGroupsPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string |
Query
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| GetGroups | GetGroupsPayload | GetGroupsAnswer | |
| GetGroupManagers | GetGroupManagersPayload | GetGroupManagersAnswer | |
| GetGroupMembers | GetGroupMembersPayload | GetGroupMembersAnswer |
pan/dotdot/v1/health.proto
HealthCheckRequest
| Field | Type | Label | Description |
|---|---|---|---|
| service | string |
HealthCheckResponse
| Field | Type | Label | Description |
|---|---|---|---|
| status | HealthCheckResponse.ServingStatus |
HealthCheckResponse.ServingStatus
| Name | Number | Description |
|---|---|---|
| SERVING_STATUS_UNSPECIFIED | 0 | |
| SERVING_STATUS_SERVING | 1 | |
| SERVING_STATUS_NOT_SERVING | 2 | |
| SERVING_STATUS_SERVICE_UNKNOWN | 3 | Used only by the Watch method. |
HealthService
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| Check | HealthCheckRequest | HealthCheckResponse | |
| Watch | HealthCheckRequest | HealthCheckResponse stream |
validate/validate.proto
AnyRules
AnyRules describe constraints applied exclusively to the google.protobuf.Any well-known type
| Field | Type | Label | Description |
|---|---|---|---|
| required | bool | optional | Required specifies that this field must be set |
| in | string | repeated | In specifies that this field's type_url must be equal to one of the specified values. |
| not_in | string | repeated | NotIn specifies that this field's type_url must not be equal to any of the specified values. |
BoolRules
BoolRules describes the constraints applied to bool values
| Field | Type | Label | Description |
|---|---|---|---|
| const | bool | optional | Const specifies that this field must be exactly the specified value |
BytesRules
BytesRules describe the constraints applied to bytes values
| Field | Type | Label | Description |
|---|---|---|---|
| const | bytes | optional | Const specifies that this field must be exactly the specified value |
| len | uint64 | optional | Len specifies that this field must be the specified number of bytes |
| min_len | uint64 | optional | MinLen specifies that this field must be the specified number of bytes at a minimum |
| max_len | uint64 | optional | MaxLen specifies that this field must be the specified number of bytes at a maximum |
| pattern | string | optional | Pattern specifies that this field must match against the specified regular expression (RE2 syntax). The included expression should elide any delimiters. |
| prefix | bytes | optional | Prefix specifies that this field must have the specified bytes at the beginning of the string. |
| suffix | bytes | optional | Suffix specifies that this field must have the specified bytes at the end of the string. |
| contains | bytes | optional | Contains specifies that this field must have the specified bytes anywhere in the string. |
| in | bytes | repeated | In specifies that this field must be equal to one of the specified values |
| not_in | bytes | repeated | NotIn specifies that this field cannot be equal to one of the specified values |
| ip | bool | optional | Ip specifies that the field must be a valid IP (v4 or v6) address in byte format |
| ipv4 | bool | optional | Ipv4 specifies that the field must be a valid IPv4 address in byte format |
| ipv6 | bool | optional | Ipv6 specifies that the field must be a valid IPv6 address in byte format |
| ignore_empty | bool | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty |
DoubleRules
DoubleRules describes the constraints applied to double values
| Field | Type | Label | Description |
|---|---|---|---|
| const | double | optional | Const specifies that this field must be exactly the specified value |
| lt | double | optional | Lt specifies that this field must be less than the specified value, exclusive |
| lte | double | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive |
| gt | double | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. |
| gte | double | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. |
| in | double | repeated | In specifies that this field must be equal to one of the specified values |
| not_in | double | repeated | NotIn specifies that this field cannot be equal to one of the specified values |
| ignore_empty | bool | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty |
DurationRules
DurationRules describe the constraints applied exclusively to the google.protobuf.Duration well-known type
| Field | Type | Label | Description |
|---|---|---|---|
| required | bool | optional | Required specifies that this field must be set |
| const | google.protobuf.Duration | optional | Const specifies that this field must be exactly the specified value |
| lt | google.protobuf.Duration | optional | Lt specifies that this field must be less than the specified value, exclusive |
| lte | google.protobuf.Duration | optional | Lt specifies that this field must be less than the specified value, inclusive |
| gt | google.protobuf.Duration | optional | Gt specifies that this field must be greater than the specified value, exclusive |
| gte | google.protobuf.Duration | optional | Gte specifies that this field must be greater than the specified value, inclusive |
| in | google.protobuf.Duration | repeated | In specifies that this field must be equal to one of the specified values |
| not_in | google.protobuf.Duration | repeated | NotIn specifies that this field cannot be equal to one of the specified values |
EnumRules
EnumRules describe the constraints applied to enum values
| Field | Type | Label | Description |
|---|---|---|---|
| const | int32 | optional | Const specifies that this field must be exactly the specified value |
| defined_only | bool | optional | DefinedOnly specifies that this field must be only one of the defined values for this enum, failing on any undefined value. |
| in | int32 | repeated | In specifies that this field must be equal to one of the specified values |
| not_in | int32 | repeated | NotIn specifies that this field cannot be equal to one of the specified values |
FieldRules
FieldRules encapsulates the rules for each type of field. Depending on the field, the correct set should be used to ensure proper validations.
| Field | Type | Label | Description |
|---|---|---|---|
| message | MessageRules | optional | |
| float | FloatRules | optional | Scalar Field Types |
| double | DoubleRules | optional | |
| int32 | Int32Rules | optional | |
| int64 | Int64Rules | optional | |
| uint32 | UInt32Rules | optional | |
| uint64 | UInt64Rules | optional | |
| sint32 | SInt32Rules | optional | |
| sint64 | SInt64Rules | optional | |
| fixed32 | Fixed32Rules | optional | |
| fixed64 | Fixed64Rules | optional | |
| sfixed32 | SFixed32Rules | optional | |
| sfixed64 | SFixed64Rules | optional | |
| bool | BoolRules | optional | |
| string | StringRules | optional | |
| bytes | BytesRules | optional | |
| enum | EnumRules | optional | Complex Field Types |
| repeated | RepeatedRules | optional | |
| map | MapRules | optional | |
| any | AnyRules | optional | Well-Known Field Types |
| duration | DurationRules | optional | |
| timestamp | TimestampRules | optional |
Fixed32Rules
Fixed32Rules describes the constraints applied to fixed32 values
| Field | Type | Label | Description |
|---|---|---|---|
| const | fixed32 | optional | Const specifies that this field must be exactly the specified value |
| lt | fixed32 | optional | Lt specifies that this field must be less than the specified value, exclusive |
| lte | fixed32 | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive |
| gt | fixed32 | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. |
| gte | fixed32 | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. |
| in | fixed32 | repeated | In specifies that this field must be equal to one of the specified values |
| not_in | fixed32 | repeated | NotIn specifies that this field cannot be equal to one of the specified values |
| ignore_empty | bool | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty |
Fixed64Rules
Fixed64Rules describes the constraints applied to fixed64 values
| Field | Type | Label | Description |
|---|---|---|---|
| const | fixed64 | optional | Const specifies that this field must be exactly the specified value |
| lt | fixed64 | optional | Lt specifies that this field must be less than the specified value, exclusive |
| lte | fixed64 | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive |
| gt | fixed64 | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. |
| gte | fixed64 | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. |
| in | fixed64 | repeated | In specifies that this field must be equal to one of the specified values |
| not_in | fixed64 | repeated | NotIn specifies that this field cannot be equal to one of the specified values |
| ignore_empty | bool | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty |
FloatRules
FloatRules describes the constraints applied to float values
| Field | Type | Label | Description |
|---|---|---|---|
| const | float | optional | Const specifies that this field must be exactly the specified value |
| lt | float | optional | Lt specifies that this field must be less than the specified value, exclusive |
| lte | float | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive |
| gt | float | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. |
| gte | float | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. |
| in | float | repeated | In specifies that this field must be equal to one of the specified values |
| not_in | float | repeated | NotIn specifies that this field cannot be equal to one of the specified values |
| ignore_empty | bool | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty |
Int32Rules
Int32Rules describes the constraints applied to int32 values
| Field | Type | Label | Description |
|---|---|---|---|
| const | int32 | optional | Const specifies that this field must be exactly the specified value |
| lt | int32 | optional | Lt specifies that this field must be less than the specified value, exclusive |
| lte | int32 | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive |
| gt | int32 | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. |
| gte | int32 | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. |
| in | int32 | repeated | In specifies that this field must be equal to one of the specified values |
| not_in | int32 | repeated | NotIn specifies that this field cannot be equal to one of the specified values |
| ignore_empty | bool | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty |
Int64Rules
Int64Rules describes the constraints applied to int64 values
| Field | Type | Label | Description |
|---|---|---|---|
| const | int64 | optional | Const specifies that this field must be exactly the specified value |
| lt | int64 | optional | Lt specifies that this field must be less than the specified value, exclusive |
| lte | int64 | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive |
| gt | int64 | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. |
| gte | int64 | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. |
| in | int64 | repeated | In specifies that this field must be equal to one of the specified values |
| not_in | int64 | repeated | NotIn specifies that this field cannot be equal to one of the specified values |
| ignore_empty | bool | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty |
MapRules
MapRules describe the constraints applied to map values
| Field | Type | Label | Description |
|---|---|---|---|
| min_pairs | uint64 | optional | MinPairs specifies that this field must have the specified number of KVs at a minimum |
| max_pairs | uint64 | optional | MaxPairs specifies that this field must have the specified number of KVs at a maximum |
| no_sparse | bool | optional | NoSparse specifies values in this field cannot be unset. This only applies to map's with message value types. |
| keys | FieldRules | optional | Keys specifies the constraints to be applied to each key in the field. |
| values | FieldRules | optional | Values specifies the constraints to be applied to the value of each key in the field. Message values will still have their validations evaluated unless skip is specified here. |
| ignore_empty | bool | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty |
MessageRules
MessageRules describe the constraints applied to embedded message values. For message-type fields, validation is performed recursively.
| Field | Type | Label | Description |
|---|---|---|---|
| skip | bool | optional | Skip specifies that the validation rules of this field should not be evaluated |
| required | bool | optional | Required specifies that this field must be set |
RepeatedRules
RepeatedRules describe the constraints applied to repeated values
| Field | Type | Label | Description |
|---|---|---|---|
| min_items | uint64 | optional | MinItems specifies that this field must have the specified number of items at a minimum |
| max_items | uint64 | optional | MaxItems specifies that this field must have the specified number of items at a maximum |
| unique | bool | optional | Unique specifies that all elements in this field must be unique. This constraint is only applicable to scalar and enum types (messages are not supported). |
| items | FieldRules | optional | Items specifies the constraints to be applied to each item in the field. Repeated message fields will still execute validation against each item unless skip is specified here. |
| ignore_empty | bool | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty |
SFixed32Rules
SFixed32Rules describes the constraints applied to sfixed32 values
| Field | Type | Label | Description |
|---|---|---|---|
| const | sfixed32 | optional | Const specifies that this field must be exactly the specified value |
| lt | sfixed32 | optional | Lt specifies that this field must be less than the specified value, exclusive |
| lte | sfixed32 | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive |
| gt | sfixed32 | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. |
| gte | sfixed32 | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. |
| in | sfixed32 | repeated | In specifies that this field must be equal to one of the specified values |
| not_in | sfixed32 | repeated | NotIn specifies that this field cannot be equal to one of the specified values |
| ignore_empty | bool | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty |
SFixed64Rules
SFixed64Rules describes the constraints applied to sfixed64 values
| Field | Type | Label | Description |
|---|---|---|---|
| const | sfixed64 | optional | Const specifies that this field must be exactly the specified value |
| lt | sfixed64 | optional | Lt specifies that this field must be less than the specified value, exclusive |
| lte | sfixed64 | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive |
| gt | sfixed64 | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. |
| gte | sfixed64 | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. |
| in | sfixed64 | repeated | In specifies that this field must be equal to one of the specified values |
| not_in | sfixed64 | repeated | NotIn specifies that this field cannot be equal to one of the specified values |
| ignore_empty | bool | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty |
SInt32Rules
SInt32Rules describes the constraints applied to sint32 values
| Field | Type | Label | Description |
|---|---|---|---|
| const | sint32 | optional | Const specifies that this field must be exactly the specified value |
| lt | sint32 | optional | Lt specifies that this field must be less than the specified value, exclusive |
| lte | sint32 | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive |
| gt | sint32 | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. |
| gte | sint32 | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. |
| in | sint32 | repeated | In specifies that this field must be equal to one of the specified values |
| not_in | sint32 | repeated | NotIn specifies that this field cannot be equal to one of the specified values |
| ignore_empty | bool | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty |
SInt64Rules
SInt64Rules describes the constraints applied to sint64 values
| Field | Type | Label | Description |
|---|---|---|---|
| const | sint64 | optional | Const specifies that this field must be exactly the specified value |
| lt | sint64 | optional | Lt specifies that this field must be less than the specified value, exclusive |
| lte | sint64 | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive |
| gt | sint64 | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. |
| gte | sint64 | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. |
| in | sint64 | repeated | In specifies that this field must be equal to one of the specified values |
| not_in | sint64 | repeated | NotIn specifies that this field cannot be equal to one of the specified values |
| ignore_empty | bool | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty |
StringRules
StringRules describe the constraints applied to string values
| Field | Type | Label | Description |
|---|---|---|---|
| const | string | optional | Const specifies that this field must be exactly the specified value |
| len | uint64 | optional | Len specifies that this field must be the specified number of characters (Unicode code points). Note that the number of characters may differ from the number of bytes in the string. |
| min_len | uint64 | optional | MinLen specifies that this field must be the specified number of characters (Unicode code points) at a minimum. Note that the number of characters may differ from the number of bytes in the string. |
| max_len | uint64 | optional | MaxLen specifies that this field must be the specified number of characters (Unicode code points) at a maximum. Note that the number of characters may differ from the number of bytes in the string. |
| len_bytes | uint64 | optional | LenBytes specifies that this field must be the specified number of bytes |
| min_bytes | uint64 | optional | MinBytes specifies that this field must be the specified number of bytes at a minimum |
| max_bytes | uint64 | optional | MaxBytes specifies that this field must be the specified number of bytes at a maximum |
| pattern | string | optional | Pattern specifies that this field must match against the specified regular expression (RE2 syntax). The included expression should elide any delimiters. |
| prefix | string | optional | Prefix specifies that this field must have the specified substring at the beginning of the string. |
| suffix | string | optional | Suffix specifies that this field must have the specified substring at the end of the string. |
| contains | string | optional | Contains specifies that this field must have the specified substring anywhere in the string. |
| not_contains | string | optional | NotContains specifies that this field cannot have the specified substring anywhere in the string. |
| in | string | repeated | In specifies that this field must be equal to one of the specified values |
| not_in | string | repeated | NotIn specifies that this field cannot be equal to one of the specified values |
| bool | optional | Email specifies that the field must be a valid email address as defined by RFC 5322 | |
| hostname | bool | optional | Hostname specifies that the field must be a valid hostname as defined by RFC 1034. This constraint does not support internationalized domain names (IDNs). |
| ip | bool | optional | Ip specifies that the field must be a valid IP (v4 or v6) address. Valid IPv6 addresses should not include surrounding square brackets. |
| ipv4 | bool | optional | Ipv4 specifies that the field must be a valid IPv4 address. |
| ipv6 | bool | optional | Ipv6 specifies that the field must be a valid IPv6 address. Valid IPv6 addresses should not include surrounding square brackets. |
| uri | bool | optional | Uri specifies that the field must be a valid, absolute URI as defined by RFC 3986 |
| uri_ref | bool | optional | UriRef specifies that the field must be a valid URI as defined by RFC 3986 and may be relative or absolute. |
| address | bool | optional | Address specifies that the field must be either a valid hostname as defined by RFC 1034 (which does not support internationalized domain names or IDNs), or it can be a valid IP (v4 or v6). |
| uuid | bool | optional | Uuid specifies that the field must be a valid UUID as defined by RFC 4122 |
| well_known_regex | KnownRegex | optional | WellKnownRegex specifies a common well known pattern defined as a regex. |
| strict | bool | optional | This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable strict header validation. By default, this is true, and HTTP header validations are RFC-compliant. Setting to false will enable a looser validations that only disallows \r\n\0 characters, which can be used to bypass header matching rules. Default: true |
| ignore_empty | bool | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty |
TimestampRules
TimestampRules describe the constraints applied exclusively to the google.protobuf.Timestamp well-known type
| Field | Type | Label | Description |
|---|---|---|---|
| required | bool | optional | Required specifies that this field must be set |
| const | google.protobuf.Timestamp | optional | Const specifies that this field must be exactly the specified value |
| lt | google.protobuf.Timestamp | optional | Lt specifies that this field must be less than the specified value, exclusive |
| lte | google.protobuf.Timestamp | optional | Lte specifies that this field must be less than the specified value, inclusive |
| gt | google.protobuf.Timestamp | optional | Gt specifies that this field must be greater than the specified value, exclusive |
| gte | google.protobuf.Timestamp | optional | Gte specifies that this field must be greater than the specified value, inclusive |
| lt_now | bool | optional | LtNow specifies that this must be less than the current time. LtNow can only be used with the Within rule. |
| gt_now | bool | optional | GtNow specifies that this must be greater than the current time. GtNow can only be used with the Within rule. |
| within | google.protobuf.Duration | optional | Within specifies that this field must be within this duration of the current time. This constraint can be used alone or with the LtNow and GtNow rules. |
UInt32Rules
UInt32Rules describes the constraints applied to uint32 values
| Field | Type | Label | Description |
|---|---|---|---|
| const | uint32 | optional | Const specifies that this field must be exactly the specified value |
| lt | uint32 | optional | Lt specifies that this field must be less than the specified value, exclusive |
| lte | uint32 | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive |
| gt | uint32 | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. |
| gte | uint32 | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. |
| in | uint32 | repeated | In specifies that this field must be equal to one of the specified values |
| not_in | uint32 | repeated | NotIn specifies that this field cannot be equal to one of the specified values |
| ignore_empty | bool | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty |
UInt64Rules
UInt64Rules describes the constraints applied to uint64 values
| Field | Type | Label | Description |
|---|---|---|---|
| const | uint64 | optional | Const specifies that this field must be exactly the specified value |
| lt | uint64 | optional | Lt specifies that this field must be less than the specified value, exclusive |
| lte | uint64 | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive |
| gt | uint64 | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. |
| gte | uint64 | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. |
| in | uint64 | repeated | In specifies that this field must be equal to one of the specified values |
| not_in | uint64 | repeated | NotIn specifies that this field cannot be equal to one of the specified values |
| ignore_empty | bool | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty |
KnownRegex
WellKnownRegex contain some well-known patterns.
| Name | Number | Description |
|---|---|---|
| UNKNOWN | 0 | |
| HTTP_HEADER_NAME | 1 | HTTP header name as defined by RFC 7230. |
| HTTP_HEADER_VALUE | 2 | HTTP header value as defined by RFC 7230. |
File-level Extensions
| Extension | Type | Base | Number | Description |
|---|---|---|---|---|
| rules | FieldRules | .google.protobuf.FieldOptions | 1071 | Rules specify the validations to be performed on this field. By default, no validation is performed against a field. |
| disabled | bool | .google.protobuf.MessageOptions | 1071 | Disabled nullifies any validation rules for this message, including any message fields associated with it that do support validation. |
| ignored | bool | .google.protobuf.MessageOptions | 1072 | Ignore skips generation of validation methods for this message. |
| required | bool | .google.protobuf.OneofOptions | 1071 | Required ensures that exactly one the field options in a oneof is set; validation fails if no fields in the oneof are set. |
pan/dotdot/v1/member/command.proto
CreateMemberAnswer
error -> Internal | InvalidArgument | PermissionDenied | Error_MemberAlreadyExist
| Field | Type | Label | Description |
|---|---|---|---|
| dot_id | string | dotdot內部的帳號識別id |
CreateMemberPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| source_id | string | 指定member的source_id (ex: lc member的話是email,但如果透過pan login就是uid) | |
| source | pan.dotdot.v1.base.AuthSource | ||
| display_name | string |
UpdateMemberAnswer
error -> Internal | InvalidArgument | PermissionDenied | Error_MemberNotFound
UpdateMemberPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| dot_id | string | dotdot內部的帳號識別id | |
| display_name | string |
Command
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| CreateMember | CreateMemberPayload | CreateMemberAnswer | root only,創建auth member,創建後的member可透過google或pan登入 |
| UpdateMember | UpdateMemberPayload | UpdateMemberAnswer | root only,可更新member的資訊 |
pan/dotdot/v1/member/query.proto
GetMemberListAnswer
error -> Internal | InvalidArgument | PermissionDenied
| Field | Type | Label | Description |
|---|---|---|---|
| records | GetMemberListAnswer.Record | repeated | |
| total | int32 | 總數 |
GetMemberListAnswer.Record
| Field | Type | Label | Description |
|---|---|---|---|
| dot_id | string | dotdot內部的帳號識別id | |
| source_id | string | 第三方認證源的id | |
| source | pan.dotdot.v1.base.AuthSource | 第三方認證源 | |
| display_name | string | 顯示名稱 |
GetMemberListPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| source_id | string | 若source是pan,則source_id為uid,是完全比對。若source是lc,則source_id為email,是模糊比對。 | |
| source | pan.dotdot.v1.base.AuthSource | ||
| display_name | string | ||
| has_roles | pan.dotdot.v1.base.TernaryCondition | filter member是否要擁有roles | |
| page | int32 | ||
| page_size | int32 |
Query
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| GetMemberList | GetMemberListPayload | GetMemberListAnswer | 查詢所有auth member |
pan/dotdot/v1/permission/command.proto
CreatePermissionAnswer
error -> Internal | PermissionDenied | InvalidArgument | Unauthenticated | Error_NameDuplicated
| Field | Type | Label | Description |
|---|---|---|---|
| permission_id | int64 | 新創建的permission的id |
CreatePermissionPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| name | string | 名稱,需要唯一 | |
| display_name | string | 顯示名稱 | |
| purpose | string | 補充描述 | |
| domain | pan.dotdot.v1.base.Domain | 領域分類 |
DeletePermissionAnswer
error -> Internal | InvalidArgument | PermissionDenied | Unauthenticated | Error_PermissionNotFound
DeletePermissionPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| permission_id | int64 | 要刪除的permission的id |
UpdatePermissionAnswer
error -> Internal | InvalidArgument | PermissionDenied | Unauthenticated | Error_PermissionNotFound
UpdatePermissionPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| permission_id | int64 | 要更新的permission的id | |
| display_name | string | 顯示名稱 | |
| purpose | string | 補充描述 |
Command
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| CreatePermission | CreatePermissionPayload | CreatePermissionAnswer | 只限「root」或是「擁有PermissionOperation的auth member」可調用 |
| UpdatePermission | UpdatePermissionPayload | UpdatePermissionAnswer | 只限「root」或是「擁有PermissionOperation、且為該permission的創建者的auth member」可調用 |
| DeletePermission | DeletePermissionPayload | DeletePermissionAnswer | 只限「root」或是「擁有PermissionOperation、且為該permission的創建者的auth member」可調用 |
pan/dotdot/v1/permission/query.proto
CheckPermissionsAnswer
error -> Internal | InvalidArgument | PermissionDenied | Error_MemberNotFound
| Field | Type | Label | Description |
|---|---|---|---|
| records | CheckPermissionsAnswer.Record | repeated | |
| source | pan.dotdot.v1.base.AuthSource | input的admin_token的member的source | |
| source_id | string | input的admin_token的member的source_id | |
| dot_id | string | input的admin_token的member的dot_id |
CheckPermissionsAnswer.Record
| Field | Type | Label | Description |
|---|---|---|---|
| permission_id | int64 | input的permission_id | |
| is_verified | bool | 該member是否擁有該permission_id的權限 |
CheckPermissionsPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| permission_ids | int64 | repeated |
GetAllPermissionAnswer
error -> Internal | InvalidArgument | PermissionDenied
| Field | Type | Label | Description |
|---|---|---|---|
| permissions | pan.dotdot.v1.base.GenericNode | repeated | |
| total | int64 | 總數 |
GetAllPermissionPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| attachable | bool | 若為true,則只顯示自己可以貼到role上的permission | |
| page | int32 | 頁數 | |
| size | int32 | 每頁的筆數 | |
| domain | pan.dotdot.v1.base.Domain | 篩選domain | |
| name | string | 查詢的permission name,模糊比對 | |
| display_name | string | 查詢的permission display_name,模糊比對 |
GetPersonalBreadCrumbAnswer
error -> Internal | InvalidArgument | PermissionDenied | Error_MemberNotFound
| Field | Type | Label | Description |
|---|---|---|---|
| node_matrix | pan.dotdot.v1.base.NodeList | repeated |
GetPersonalBreadCrumbPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| dot_id | string | 要查詢的對象的dot_id,如果為空則會使用admin_token的dot_id查詢 |
GetPersonalPermissionsAnswer
error -> Internal | InvalidArgument | PermissionDenied | Error_MemberNotFound
| Field | Type | Label | Description |
|---|---|---|---|
| permissions | pan.dotdot.v1.base.Permission | repeated |
GetPersonalPermissionsPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| dot_id | string | 要查詢的對象的dot_id,如果為空則會使用admin_token的dot_id查詢 | |
| name | string | 查詢的permission name,模糊比對 | |
| display_name | string | 查詢的permission display_name,模糊比對 |
GetPersonalTreeAnswer
error -> Internal | InvalidArgument | PermissionDenied | Error_MemberNotFound
| Field | Type | Label | Description |
|---|---|---|---|
| roles | pan.dotdot.v1.base.Role | repeated |
GetPersonalTreePayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| dot_id | string | 要查詢的對象的dot_id,如果為空則會使用admin_token的dot_id查詢 |
Query
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| GetPersonalTree | GetPersonalTreePayload | GetPersonalTreeAnswer | 查詢個人擁有的權限Tree (path = Role -> Policy -> Permission),可查詢自己或他人 |
| GetPersonalBreadCrumb | GetPersonalBreadCrumbPayload | GetPersonalBreadCrumbAnswer | 查詢個人擁有的權限BreadCrumb (path = Role -> Policy -> Permission),可查詢自己或他人 |
| GetPersonalPermissions | GetPersonalPermissionsPayload | GetPersonalPermissionsAnswer | 查詢個人所有的permission,可查詢自己或他人 |
| GetAllPermission | GetAllPermissionPayload | GetAllPermissionAnswer | 查詢所有permission 若attachable設為true,則是查詢可貼到role或policy上的permission (目前是自身擁有的皆可,所以查詢結果會和GetPersonalPermissions相同) |
| CheckPermissions | CheckPermissionsPayload | CheckPermissionsAnswer | 給持有限制資源的back-end確認權限使用 |
pan/dotdot/v1/policy/command.proto
CreatePolicyAnswer
error -> Internal | InvalidArgument | PermissionDenied | Unauthenticated | Error_MemberNotFound | Error_HierarchyOverHeight | Error_NameDuplicated | Error_PolicyNotFound | Error_PermissionNotFound
| Field | Type | Label | Description |
|---|---|---|---|
| policy_id | int64 |
CreatePolicyPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| name | string | ||
| display_name | string | ||
| purpose | string | ||
| policy_ids | int64 | repeated | |
| permission_ids | int64 | repeated |
DeletePolicyAnswer
error -> Internal | InvalidArgument | PermissionDenied | Unauthorized | Error_PolicyNotFound
DeletePolicyPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| policy_id | int64 | 要刪除的policy的id |
UpdatePolicyAnswer
error -> Internal | InvalidArgument | PermissionDenied | Unauthorized | Error_PolicyNotFound | Error_MemberNotFound | Error_ChildHierarchyOverHeight | Error_HierarchyOverHeight | Error_NameDuplicated
UpdatePolicyPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| policy_id | int64 | 要更新的policy的id | |
| name | string | ||
| display_name | string | ||
| purpose | string | ||
| policy_ids | int64 | repeated | |
| permission_ids | int64 | repeated |
Command
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| CreatePolicy | CreatePolicyPayload | CreatePolicyAnswer | 只限「root」或是「擁有PolicyOperation的auth member」可調用 作為children的policies和permissions不可皆為空 可賦予的policies和permissions限定在「自身擁有的roles有直接關聯的policy或permission」 child policy不可超過指定樹高,目前為1 (即child policy下面不可再關聯policy) |
| UpdatePolicy | UpdatePolicyPayload | UpdatePolicyAnswer | 只限「root」或是「擁有PolicyOperation、且為該policy的創建者的auth member」可調用 作為children的policies和permissions不可皆為空 可賦予的policies和permissions限定在「自身擁有的roles有直接關聯的policy或permission」 child policy不可超過指定樹高,目前為1 (即child policy下面不可再關聯policy) 要更新的Policy和child policy不可是相同樹高 |
| DeletePolicy | DeletePolicyPayload | DeletePolicyAnswer | 只限「root」或是「擁有PolicyOperation、且為該policy的創建者的auth member」可調用 |
pan/dotdot/v1/policy/query.proto
GetAllPolicyAnswer
error -> Internal | InvalidArgument | PermissionDenied
| Field | Type | Label | Description |
|---|---|---|---|
| policies | pan.dotdot.v1.base.GenericNode | repeated | |
| total | int64 | 總數 |
GetAllPolicyPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| attachable | bool | 若設定為true,則只查詢自己有資格賦予到role上的 | |
| name | string | 模糊比對policy name | |
| display_name | string | 模糊比對policy display_name | |
| page | int32 | 頁數 | |
| size | int32 |
GetPolicyBreadCrumbAnswer
error -> Internal | InvalidArgument | PermissionDenied | Error_MemberNotFound
| Field | Type | Label | Description |
|---|---|---|---|
| node_matrix | pan.dotdot.v1.base.NodeList | repeated |
GetPolicyBreadCrumbPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| policy_id | int64 | 要查詢的policy的id |
GetPolicyDetailAnswer
error -> Internal | InvalidArgument | PermissionDenied
| Field | Type | Label | Description |
|---|---|---|---|
| id | int64 | policy的id | |
| name | string | 名稱 | |
| display_name | string | 顯示名稱 | |
| purpose | string | 補充描述 | |
| permissions | int64 | repeated | 向下直接關聯的所有permission的id |
| policies | int64 | repeated | 向下直接關聯的所有policy的id |
GetPolicyDetailPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| policy_id | int64 | 要查詢的policy的id |
GetPolicyTreeAnswer
error -> Internal | InvalidArgument | PermissionDenied | Error_MemberNotFound
| Field | Type | Label | Description |
|---|---|---|---|
| policy | pan.dotdot.v1.base.Policy |
GetPolicyTreePayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| policy_id | int64 | 要查詢的policy的id |
Query
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| GetAllPolicy | GetAllPolicyPayload | GetAllPolicyAnswer | 查詢全部role 若attachable設為true,則只返回自己可attach到role上的policy (目前條件為自己擁有的policy) |
| GetPolicyDetail | GetPolicyDetailPayload | GetPolicyDetailAnswer | 查詢單一policy的資料,children僅顯示直接關聯者、以id表示 |
| GetPolicyTree | GetPolicyTreePayload | GetPolicyTreeAnswer | 查詢單一policy到leaf為止的Tree (path = Policy -> Permission) |
| GetPolicyBreadCrumb | GetPolicyBreadCrumbPayload | GetPolicyBreadCrumbAnswer | 查詢單一policy到leaf為止的BreadCrumb (path = Policy -> Permission) |
pan/dotdot/v1/role/command.proto
AttachRoleAnswer
error -> Internal | InvalidArgument | PermissionDenied | Unauthorized | Error_AssignerNotFound | Error_ReceiverNotFound | Error_RoleNotFound
AttachRolePayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| dot_id | string | dotdot內部的帳號識別id | |
| role_ids | int64 | repeated |
CreateRoleAnswer
error -> Internal | InvalidArgument | PermissionDenied | Unauthorized | Error_MemberNotFound | Error_NameDuplicated | Error_PolicyNotFound | Error_PermissionNotFound
| Field | Type | Label | Description |
|---|---|---|---|
| role_id | int64 | 新創建的role的id |
CreateRolePayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| name | string | ||
| display_name | string | ||
| purpose | string | ||
| policy_ids | int64 | repeated | |
| permission_ids | int64 | repeated |
DeleteRoleAnswer
error -> Internal | InvalidArgument | PermissionDenied | Unauthorized | Error_RoleNotFound
DeleteRolePayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| role_id | int64 | 要刪除的role的id |
DetachRoleAnswer
error -> Internal | InvalidArgument | PermissionDenied | Error_AssignerNotFound | Error_ReceiverNotFound | Error_RoleNotFound
DetachRolePayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| dot_id | string | dotdot內部的帳號識別id | |
| role_ids | int64 | repeated |
UpdateRoleAnswer
error -> Internal | InvalidArgument | PermissionDenied | Unauthorized | Error_RoleNotFound | Error_MemberNotFound | Error_NameDuplicated
UpdateRolePayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| role_id | int64 | 要更新的role的id | |
| name | string | ||
| display_name | string | ||
| purpose | string | ||
| policy_ids | int64 | repeated | |
| permission_ids | int64 | repeated |
Command
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| AttachRole | AttachRolePayload | AttachRoleAnswer | 只限「root」或是「擁有RoleOperation的auth member」可調用 可賦予的範圍只限於自身擁有的role |
| DetachRole | DetachRolePayload | DetachRoleAnswer | 只限「root」或是「當初attach該role給該auth member」的auth member可調用 |
| CreateRole | CreateRolePayload | CreateRoleAnswer | 只限「root」或是「擁有RoleOperation的auth member」可調用 作為children的policies和permissions不可皆為空 可賦予的policies和permissions限定在「自身擁有的roles有直接關聯的policy或permission」 |
| UpdateRole | UpdateRolePayload | UpdateRoleAnswer | 只限「root」或是「擁有RoleOperation、且為該role的創建者的auth member」可調用 作為children的policies和permissions不可皆為空 可賦予的policies和permissions限定在「自身擁有的roles有直接關聯的policy或permission」 |
| DeleteRole | DeleteRolePayload | DeleteRoleAnswer | 只限「root」或是「擁有RoleOperation、且為該role的創建者的auth member」可調用 |
pan/dotdot/v1/role/query.proto
GetAllRoleAnswer
error -> Internal | InvalidArgument | PermissionDenied
| Field | Type | Label | Description |
|---|---|---|---|
| roles | pan.dotdot.v1.base.GenericNode | repeated | |
| total | int64 | 總數 |
GetAllRolePayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| attachable | bool | 若設定為true,則只查詢自己可以賦予給其他帳號的role | |
| name | string | 模糊比對role name | |
| display_name | string | 模糊比對role display_name | |
| page | int32 | 頁數 | |
| size | int32 |
GetPersonalRolesAnswer
error -> Internal | InvalidArgument | PermissionDenied
| Field | Type | Label | Description |
|---|---|---|---|
| roles | pan.dotdot.v1.base.Role | repeated |
GetPersonalRolesPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| dot_id | string | 若dot_id為空,則會查詢admin_token之dot_id |
GetRoleBreadCrumbAnswer
error -> Internal | InvalidArgument | PermissionDenied | Error_MemberNotFound
| Field | Type | Label | Description |
|---|---|---|---|
| node_matrix | pan.dotdot.v1.base.NodeList | repeated |
GetRoleBreadCrumbPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| role_id | int64 | 要查詢的role的id |
GetRoleDetailAnswer
error -> Internal | InvalidArgument | PermissionDenied
| Field | Type | Label | Description |
|---|---|---|---|
| id | int64 | ||
| name | string | 名稱 | |
| display_name | string | 顯示名稱 | |
| purpose | string | 補充描述 | |
| permissions | int64 | repeated | 向下直接關聯的permission的id |
| policies | int64 | repeated | 向下直接關聯的policy的id |
| creator_id | string | role的創建者的id |
GetRoleDetailPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| role_id | int64 | 要查詢的role的id |
GetRoleTreeAnswer
error -> Internal | InvalidArgument | PermissionDenied | Error_MemberNotFound
| Field | Type | Label | Description |
|---|---|---|---|
| role | pan.dotdot.v1.base.Role |
GetRoleTreePayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| role_id | int64 | 要查詢的role的id |
Query
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| GetAllRole | GetAllRolePayload | GetAllRoleAnswer | 查詢全部role 若attachable設為true,則只顯示自己「可attach給別人」的role (目前條件為自己擁有的roles) |
| GetRoleDetail | GetRoleDetailPayload | GetRoleDetailAnswer | 查詢單一role的資料,children僅顯示直接關聯者、以id表示 |
| GetRoleTree | GetRoleTreePayload | GetRoleTreeAnswer | 查詢單一role到leaf為止的Tree (path = Role -> Policy -> Permission) |
| GetRoleBreadCrumb | GetRoleBreadCrumbPayload | GetRoleBreadCrumbAnswer | 查詢單一role到leaf為止的BreadCrumb (path = Role -> Policy -> Permission) |
| GetPersonalRoles | GetPersonalRolesPayload | GetPersonalRolesAnswer | 查詢某auth member所包含的所有role,不包含role的children |