mirror of
https://github.com/hanzoai/ca.git
synced 2026-11-03 18:08:27 +00:00
1296 lines
39 KiB
Go
1296 lines
39 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.12
|
|
// protoc v7.36.2
|
|
// source: auth.proto
|
|
|
|
package pb
|
|
|
|
import (
|
|
reflect "reflect"
|
|
sync "sync"
|
|
unsafe "unsafe"
|
|
|
|
_ "github.com/effective-security/protoc-gen-go/api"
|
|
_ "google.golang.org/genproto/googleapis/api/annotations"
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
type IDP_Enum int32
|
|
|
|
const (
|
|
// Undefined indicates that the IDP is undefined
|
|
IDP_Undefined IDP_Enum = 0
|
|
// Google indicates that the IDP is Google
|
|
IDP_Google IDP_Enum = 1
|
|
// Github indicates that the IDP is Github
|
|
IDP_Github IDP_Enum = 2
|
|
// Gitlab indicates that the IDP is Gitlab
|
|
IDP_Gitlab IDP_Enum = 3
|
|
// Local indicates that the IDP is local for testing
|
|
IDP_Local IDP_Enum = 1000
|
|
)
|
|
|
|
// Enum value maps for IDP_Enum.
|
|
var (
|
|
IDP_Enum_name = map[int32]string{
|
|
0: "Undefined",
|
|
1: "Google",
|
|
2: "Github",
|
|
3: "Gitlab",
|
|
1000: "Local",
|
|
}
|
|
IDP_Enum_value = map[string]int32{
|
|
"Undefined": 0,
|
|
"Google": 1,
|
|
"Github": 2,
|
|
"Gitlab": 3,
|
|
"Local": 1000,
|
|
}
|
|
)
|
|
|
|
func (x IDP_Enum) Enum() *IDP_Enum {
|
|
p := new(IDP_Enum)
|
|
*p = x
|
|
return p
|
|
}
|
|
|
|
func (x IDP_Enum) String() string {
|
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
}
|
|
|
|
func (IDP_Enum) Descriptor() protoreflect.EnumDescriptor {
|
|
return file_auth_proto_enumTypes[0].Descriptor()
|
|
}
|
|
|
|
func (IDP_Enum) Type() protoreflect.EnumType {
|
|
return &file_auth_proto_enumTypes[0]
|
|
}
|
|
|
|
func (x IDP_Enum) Number() protoreflect.EnumNumber {
|
|
return protoreflect.EnumNumber(x)
|
|
}
|
|
|
|
// Deprecated: Use IDP_Enum.Descriptor instead.
|
|
func (IDP_Enum) EnumDescriptor() ([]byte, []int) {
|
|
return file_auth_proto_rawDescGZIP(), []int{8, 0}
|
|
}
|
|
|
|
// AuthProvidersRequest specifies request to get list of supported IDP
|
|
type AuthProvidersRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// Email specifies optional email to use for login
|
|
Email string `protobuf:"bytes,1,opt,name=Email,proto3" json:"Email,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *AuthProvidersRequest) Reset() {
|
|
*x = AuthProvidersRequest{}
|
|
mi := &file_auth_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *AuthProvidersRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*AuthProvidersRequest) ProtoMessage() {}
|
|
|
|
func (x *AuthProvidersRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_auth_proto_msgTypes[0]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use AuthProvidersRequest.ProtoReflect.Descriptor instead.
|
|
func (*AuthProvidersRequest) Descriptor() ([]byte, []int) {
|
|
return file_auth_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *AuthProvidersRequest) GetEmail() string {
|
|
if x != nil {
|
|
return x.Email
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// AuthProvidersResponse provides list of supported IDP
|
|
type AuthProvidersResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// AuthURL specifies URL to start authentication flow
|
|
AuthURL string `protobuf:"bytes,1,opt,name=AuthURL,proto3" json:"AuthURL,omitempty"`
|
|
// Providers specifies the list of supported IDPs
|
|
Providers []IDP_Enum `protobuf:"varint,2,rep,packed,name=Providers,proto3,enum=pb.IDP_Enum" json:"Providers,omitempty"`
|
|
// ProviderNames specifies the list of supported IDP names,
|
|
// this can be used to display the list of supported IDPs to the user,
|
|
// or for REST clients that are not aware of enum values.
|
|
ProviderNames []string `protobuf:"bytes,3,rep,name=ProviderNames,proto3" json:"ProviderNames,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *AuthProvidersResponse) Reset() {
|
|
*x = AuthProvidersResponse{}
|
|
mi := &file_auth_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *AuthProvidersResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*AuthProvidersResponse) ProtoMessage() {}
|
|
|
|
func (x *AuthProvidersResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_auth_proto_msgTypes[1]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use AuthProvidersResponse.ProtoReflect.Descriptor instead.
|
|
func (*AuthProvidersResponse) Descriptor() ([]byte, []int) {
|
|
return file_auth_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *AuthProvidersResponse) GetAuthURL() string {
|
|
if x != nil {
|
|
return x.AuthURL
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *AuthProvidersResponse) GetProviders() []IDP_Enum {
|
|
if x != nil {
|
|
return x.Providers
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *AuthProvidersResponse) GetProviderNames() []string {
|
|
if x != nil {
|
|
return x.ProviderNames
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// UserInfo provides basic info about user
|
|
type UserInfo struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
|
|
Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
|
|
Email string `protobuf:"bytes,3,opt,name=Email,proto3" json:"Email,omitempty"`
|
|
EmailVerified bool `protobuf:"varint,4,opt,name=EmailVerified,proto3" json:"EmailVerified,omitempty"`
|
|
// Role is the role of the user in the application.
|
|
// For most of the users, the role is "user".
|
|
Role string `protobuf:"bytes,5,opt,name=Role,proto3" json:"Role,omitempty"`
|
|
// Orgs maps the IDs of the orgs the user can select to the resolved role
|
|
Orgs map[string]string `protobuf:"bytes,6,rep,name=Orgs,proto3" json:"Orgs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
|
// OrgID is the org selected in the token
|
|
OrgID string `protobuf:"bytes,7,opt,name=OrgID,proto3" json:"OrgID,omitempty"`
|
|
// OrgRole is the resolved role in the selected org: the explicit org-wide
|
|
// role, or Viewer derived from project grants
|
|
OrgRole string `protobuf:"bytes,8,opt,name=OrgRole,proto3" json:"OrgRole,omitempty"`
|
|
// OrgRoleSource is "direct" for an explicit org-wide grant or "project"
|
|
// for a derived Viewer classification
|
|
OrgRoleSource string `protobuf:"bytes,9,opt,name=OrgRoleSource,proto3" json:"OrgRoleSource,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *UserInfo) Reset() {
|
|
*x = UserInfo{}
|
|
mi := &file_auth_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *UserInfo) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*UserInfo) ProtoMessage() {}
|
|
|
|
func (x *UserInfo) ProtoReflect() protoreflect.Message {
|
|
mi := &file_auth_proto_msgTypes[2]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use UserInfo.ProtoReflect.Descriptor instead.
|
|
func (*UserInfo) Descriptor() ([]byte, []int) {
|
|
return file_auth_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *UserInfo) GetID() string {
|
|
if x != nil {
|
|
return x.ID
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UserInfo) GetName() string {
|
|
if x != nil {
|
|
return x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UserInfo) GetEmail() string {
|
|
if x != nil {
|
|
return x.Email
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UserInfo) GetEmailVerified() bool {
|
|
if x != nil {
|
|
return x.EmailVerified
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *UserInfo) GetRole() string {
|
|
if x != nil {
|
|
return x.Role
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UserInfo) GetOrgs() map[string]string {
|
|
if x != nil {
|
|
return x.Orgs
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *UserInfo) GetOrgID() string {
|
|
if x != nil {
|
|
return x.OrgID
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UserInfo) GetOrgRole() string {
|
|
if x != nil {
|
|
return x.OrgRole
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UserInfo) GetOrgRoleSource() string {
|
|
if x != nil {
|
|
return x.OrgRoleSource
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// Token is returned to the client
|
|
type Token struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
TokenType string `protobuf:"bytes,1,opt,name=TokenType,proto3" json:"TokenType,omitempty"`
|
|
AccessToken string `protobuf:"bytes,2,opt,name=AccessToken,proto3" json:"AccessToken,omitempty"`
|
|
Jkt string `protobuf:"bytes,3,opt,name=Jkt,proto3" json:"Jkt,omitempty"`
|
|
// ExpiresAt returns time in RFC3339 format
|
|
ExpiresAt string `protobuf:"bytes,4,opt,name=ExpiresAt,proto3" json:"ExpiresAt,omitempty"`
|
|
// IssuedAt returns time in RFC3339 format
|
|
IssuedAt string `protobuf:"bytes,5,opt,name=IssuedAt,proto3" json:"IssuedAt,omitempty"`
|
|
Issuer string `protobuf:"bytes,6,opt,name=Issuer,proto3" json:"Issuer,omitempty"`
|
|
Audience string `protobuf:"bytes,7,opt,name=Audience,proto3" json:"Audience,omitempty"`
|
|
Provider IDP_Enum `protobuf:"varint,8,opt,name=Provider,proto3,enum=pb.IDP_Enum" json:"Provider,omitempty"`
|
|
ExpiresIn uint32 `protobuf:"varint,9,opt,name=ExpiresIn,proto3" json:"ExpiresIn,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *Token) Reset() {
|
|
*x = Token{}
|
|
mi := &file_auth_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *Token) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Token) ProtoMessage() {}
|
|
|
|
func (x *Token) ProtoReflect() protoreflect.Message {
|
|
mi := &file_auth_proto_msgTypes[3]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use Token.ProtoReflect.Descriptor instead.
|
|
func (*Token) Descriptor() ([]byte, []int) {
|
|
return file_auth_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *Token) GetTokenType() string {
|
|
if x != nil {
|
|
return x.TokenType
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Token) GetAccessToken() string {
|
|
if x != nil {
|
|
return x.AccessToken
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Token) GetJkt() string {
|
|
if x != nil {
|
|
return x.Jkt
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Token) GetExpiresAt() string {
|
|
if x != nil {
|
|
return x.ExpiresAt
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Token) GetIssuedAt() string {
|
|
if x != nil {
|
|
return x.IssuedAt
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Token) GetIssuer() string {
|
|
if x != nil {
|
|
return x.Issuer
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Token) GetAudience() string {
|
|
if x != nil {
|
|
return x.Audience
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Token) GetProvider() IDP_Enum {
|
|
if x != nil {
|
|
return x.Provider
|
|
}
|
|
return IDP_Undefined
|
|
}
|
|
|
|
func (x *Token) GetExpiresIn() uint32 {
|
|
if x != nil {
|
|
return x.ExpiresIn
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// UserTokenResponse provides response with Token and UserInfo
|
|
type UserTokenResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Token *Token `protobuf:"bytes,1,opt,name=Token,proto3" json:"Token,omitempty"`
|
|
UserInfo *UserInfo `protobuf:"bytes,2,opt,name=UserInfo,proto3" json:"UserInfo,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *UserTokenResponse) Reset() {
|
|
*x = UserTokenResponse{}
|
|
mi := &file_auth_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *UserTokenResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*UserTokenResponse) ProtoMessage() {}
|
|
|
|
func (x *UserTokenResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_auth_proto_msgTypes[4]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use UserTokenResponse.ProtoReflect.Descriptor instead.
|
|
func (*UserTokenResponse) Descriptor() ([]byte, []int) {
|
|
return file_auth_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
func (x *UserTokenResponse) GetToken() *Token {
|
|
if x != nil {
|
|
return x.Token
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *UserTokenResponse) GetUserInfo() *UserInfo {
|
|
if x != nil {
|
|
return x.UserInfo
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// CallerStatusResponse returns the caller information
|
|
type CallerStatusResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// Subject of the caller.
|
|
Subject string `protobuf:"bytes,1,opt,name=Subject,proto3" json:"Subject,omitempty"`
|
|
// Role is the application of the caller.
|
|
// The role of a specific Org can be found in Claims.
|
|
Role string `protobuf:"bytes,2,opt,name=Role,proto3" json:"Role,omitempty"`
|
|
// Claims from the token, converted to KVPair.
|
|
Claims []*KVPair `protobuf:"bytes,3,rep,name=Claims,proto3" json:"Claims,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *CallerStatusResponse) Reset() {
|
|
*x = CallerStatusResponse{}
|
|
mi := &file_auth_proto_msgTypes[5]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *CallerStatusResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*CallerStatusResponse) ProtoMessage() {}
|
|
|
|
func (x *CallerStatusResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_auth_proto_msgTypes[5]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use CallerStatusResponse.ProtoReflect.Descriptor instead.
|
|
func (*CallerStatusResponse) Descriptor() ([]byte, []int) {
|
|
return file_auth_proto_rawDescGZIP(), []int{5}
|
|
}
|
|
|
|
func (x *CallerStatusResponse) GetSubject() string {
|
|
if x != nil {
|
|
return x.Subject
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *CallerStatusResponse) GetRole() string {
|
|
if x != nil {
|
|
return x.Role
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *CallerStatusResponse) GetClaims() []*KVPair {
|
|
if x != nil {
|
|
return x.Claims
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// LoginInfo provides basic info about user login
|
|
type LoginInfo struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
|
|
ExternalID string `protobuf:"bytes,2,opt,name=ExternalID,proto3" json:"ExternalID,omitempty"`
|
|
Provider IDP_Enum `protobuf:"varint,3,opt,name=Provider,proto3,enum=pb.IDP_Enum" json:"Provider,omitempty"`
|
|
Name string `protobuf:"bytes,4,opt,name=Name,proto3" json:"Name,omitempty"`
|
|
Email string `protobuf:"bytes,5,opt,name=Email,proto3" json:"Email,omitempty"`
|
|
EmailVerified bool `protobuf:"varint,6,opt,name=EmailVerified,proto3" json:"EmailVerified,omitempty"`
|
|
LoginCount uint32 `protobuf:"varint,7,opt,name=LoginCount,proto3" json:"LoginCount,omitempty"`
|
|
LastLoginAt string `protobuf:"bytes,8,opt,name=LastLoginAt,proto3" json:"LastLoginAt,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *LoginInfo) Reset() {
|
|
*x = LoginInfo{}
|
|
mi := &file_auth_proto_msgTypes[6]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *LoginInfo) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*LoginInfo) ProtoMessage() {}
|
|
|
|
func (x *LoginInfo) ProtoReflect() protoreflect.Message {
|
|
mi := &file_auth_proto_msgTypes[6]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use LoginInfo.ProtoReflect.Descriptor instead.
|
|
func (*LoginInfo) Descriptor() ([]byte, []int) {
|
|
return file_auth_proto_rawDescGZIP(), []int{6}
|
|
}
|
|
|
|
func (x *LoginInfo) GetID() string {
|
|
if x != nil {
|
|
return x.ID
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginInfo) GetExternalID() string {
|
|
if x != nil {
|
|
return x.ExternalID
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginInfo) GetProvider() IDP_Enum {
|
|
if x != nil {
|
|
return x.Provider
|
|
}
|
|
return IDP_Undefined
|
|
}
|
|
|
|
func (x *LoginInfo) GetName() string {
|
|
if x != nil {
|
|
return x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginInfo) GetEmail() string {
|
|
if x != nil {
|
|
return x.Email
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginInfo) GetEmailVerified() bool {
|
|
if x != nil {
|
|
return x.EmailVerified
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *LoginInfo) GetLoginCount() uint32 {
|
|
if x != nil {
|
|
return x.LoginCount
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *LoginInfo) GetLastLoginAt() string {
|
|
if x != nil {
|
|
return x.LastLoginAt
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// ExchangeCodeRequest exchanges the one-time code for a token.
|
|
// The Code is returned as part of OAuth flow and valid for 30 seconds.
|
|
// It must be exchanged to Access Token following code_challenge verification.
|
|
type ExchangeCodeRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// Code is the code to be exchanged for a token
|
|
Code string `protobuf:"bytes,1,opt,name=Code,proto3" json:"Code,omitempty"`
|
|
// Verifier is the code verifier for the code_challenge
|
|
Verifier string `protobuf:"bytes,2,opt,name=Verifier,proto3" json:"Verifier,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ExchangeCodeRequest) Reset() {
|
|
*x = ExchangeCodeRequest{}
|
|
mi := &file_auth_proto_msgTypes[7]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ExchangeCodeRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ExchangeCodeRequest) ProtoMessage() {}
|
|
|
|
func (x *ExchangeCodeRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_auth_proto_msgTypes[7]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ExchangeCodeRequest.ProtoReflect.Descriptor instead.
|
|
func (*ExchangeCodeRequest) Descriptor() ([]byte, []int) {
|
|
return file_auth_proto_rawDescGZIP(), []int{7}
|
|
}
|
|
|
|
func (x *ExchangeCodeRequest) GetCode() string {
|
|
if x != nil {
|
|
return x.Code
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ExchangeCodeRequest) GetVerifier() string {
|
|
if x != nil {
|
|
return x.Verifier
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// List of supported IDPs
|
|
type IDP struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *IDP) Reset() {
|
|
*x = IDP{}
|
|
mi := &file_auth_proto_msgTypes[8]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *IDP) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*IDP) ProtoMessage() {}
|
|
|
|
func (x *IDP) ProtoReflect() protoreflect.Message {
|
|
mi := &file_auth_proto_msgTypes[8]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use IDP.ProtoReflect.Descriptor instead.
|
|
func (*IDP) Descriptor() ([]byte, []int) {
|
|
return file_auth_proto_rawDescGZIP(), []int{8}
|
|
}
|
|
|
|
// SelectOrgRequest specifies a request to switch the token to a specific Org
|
|
type SelectOrgRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// OrgID specifies the Org to switch to
|
|
OrgID string `protobuf:"bytes,1,opt,name=OrgID,proto3" json:"OrgID,omitempty"`
|
|
// RememberMe specifies if the cookie should be set for the user.
|
|
// Otherwise, if the cookie is used, it will be set for the session only.
|
|
RememberMe bool `protobuf:"varint,2,opt,name=RememberMe,proto3" json:"RememberMe,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *SelectOrgRequest) Reset() {
|
|
*x = SelectOrgRequest{}
|
|
mi := &file_auth_proto_msgTypes[9]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *SelectOrgRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*SelectOrgRequest) ProtoMessage() {}
|
|
|
|
func (x *SelectOrgRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_auth_proto_msgTypes[9]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use SelectOrgRequest.ProtoReflect.Descriptor instead.
|
|
func (*SelectOrgRequest) Descriptor() ([]byte, []int) {
|
|
return file_auth_proto_rawDescGZIP(), []int{9}
|
|
}
|
|
|
|
func (x *SelectOrgRequest) GetOrgID() string {
|
|
if x != nil {
|
|
return x.OrgID
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *SelectOrgRequest) GetRememberMe() bool {
|
|
if x != nil {
|
|
return x.RememberMe
|
|
}
|
|
return false
|
|
}
|
|
|
|
type AllowedMethods struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// Service is the name of the service
|
|
Service string `protobuf:"bytes,1,opt,name=Service,proto3" json:"Service,omitempty"`
|
|
// Methods is the list of methods that are allowed.
|
|
// The key is the short method name, the value is the full method name.
|
|
Methods []*KVPair `protobuf:"bytes,2,rep,name=Methods,proto3" json:"Methods,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *AllowedMethods) Reset() {
|
|
*x = AllowedMethods{}
|
|
mi := &file_auth_proto_msgTypes[10]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *AllowedMethods) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*AllowedMethods) ProtoMessage() {}
|
|
|
|
func (x *AllowedMethods) ProtoReflect() protoreflect.Message {
|
|
mi := &file_auth_proto_msgTypes[10]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use AllowedMethods.ProtoReflect.Descriptor instead.
|
|
func (*AllowedMethods) Descriptor() ([]byte, []int) {
|
|
return file_auth_proto_rawDescGZIP(), []int{10}
|
|
}
|
|
|
|
func (x *AllowedMethods) GetService() string {
|
|
if x != nil {
|
|
return x.Service
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *AllowedMethods) GetMethods() []*KVPair {
|
|
if x != nil {
|
|
return x.Methods
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type ServiceAccessInfo struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Allowed []*AllowedMethods `protobuf:"bytes,1,rep,name=Allowed,proto3" json:"Allowed,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ServiceAccessInfo) Reset() {
|
|
*x = ServiceAccessInfo{}
|
|
mi := &file_auth_proto_msgTypes[11]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ServiceAccessInfo) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ServiceAccessInfo) ProtoMessage() {}
|
|
|
|
func (x *ServiceAccessInfo) ProtoReflect() protoreflect.Message {
|
|
mi := &file_auth_proto_msgTypes[11]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ServiceAccessInfo.ProtoReflect.Descriptor instead.
|
|
func (*ServiceAccessInfo) Descriptor() ([]byte, []int) {
|
|
return file_auth_proto_rawDescGZIP(), []int{11}
|
|
}
|
|
|
|
func (x *ServiceAccessInfo) GetAllowed() []*AllowedMethods {
|
|
if x != nil {
|
|
return x.Allowed
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// MethodAccess describes the access rules of a method and whether the caller
|
|
// satisfies them at org scope
|
|
type MethodAccess struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// Method is the full method name
|
|
Method string `protobuf:"bytes,1,opt,name=Method,proto3" json:"Method,omitempty"`
|
|
// AllowedRoles are the minimum roles at Org or Project scope; a caller with
|
|
// a role that can assume any of them is allowed. Empty means any
|
|
// authenticated caller.
|
|
AllowedRoles []string `protobuf:"bytes,2,rep,name=AllowedRoles,proto3" json:"AllowedRoles,omitempty"`
|
|
// Scopes are required from an API key or a token with a scope claim
|
|
Scopes []string `protobuf:"bytes,3,rep,name=Scopes,proto3" json:"Scopes,omitempty"`
|
|
// Allowed is true when the caller may call the method at org scope
|
|
Allowed bool `protobuf:"varint,4,opt,name=Allowed,proto3" json:"Allowed,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *MethodAccess) Reset() {
|
|
*x = MethodAccess{}
|
|
mi := &file_auth_proto_msgTypes[12]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *MethodAccess) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*MethodAccess) ProtoMessage() {}
|
|
|
|
func (x *MethodAccess) ProtoReflect() protoreflect.Message {
|
|
mi := &file_auth_proto_msgTypes[12]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use MethodAccess.ProtoReflect.Descriptor instead.
|
|
func (*MethodAccess) Descriptor() ([]byte, []int) {
|
|
return file_auth_proto_rawDescGZIP(), []int{12}
|
|
}
|
|
|
|
func (x *MethodAccess) GetMethod() string {
|
|
if x != nil {
|
|
return x.Method
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *MethodAccess) GetAllowedRoles() []string {
|
|
if x != nil {
|
|
return x.AllowedRoles
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *MethodAccess) GetScopes() []string {
|
|
if x != nil {
|
|
return x.Scopes
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *MethodAccess) GetAllowed() bool {
|
|
if x != nil {
|
|
return x.Allowed
|
|
}
|
|
return false
|
|
}
|
|
|
|
// CallerScope is the resolved scope of the caller in the selected org
|
|
type CallerScope struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// OrgID is the org selected in the token
|
|
OrgID string `protobuf:"bytes,1,opt,name=OrgID,proto3" json:"OrgID,omitempty"`
|
|
// ProjectID is the project an API key is restricted to
|
|
ProjectID string `protobuf:"bytes,2,opt,name=ProjectID,proto3" json:"ProjectID,omitempty"`
|
|
// Role is the resolved role at org scope
|
|
Role Role_Enum `protobuf:"varint,3,opt,name=Role,proto3,enum=pb.Role_Enum" json:"Role,omitempty"`
|
|
// RoleSource tells how the org role was resolved
|
|
RoleSource RoleSource_Enum `protobuf:"varint,4,opt,name=RoleSource,proto3,enum=pb.RoleSource_Enum" json:"RoleSource,omitempty"`
|
|
// ProjectRoles maps the IDs of the projects with an explicit grant to
|
|
// the granted role
|
|
ProjectRoles map[string]string `protobuf:"bytes,5,rep,name=ProjectRoles,proto3" json:"ProjectRoles,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
|
// Scopes are the scopes of an API key or a scoped token
|
|
Scopes []string `protobuf:"bytes,6,rep,name=Scopes,proto3" json:"Scopes,omitempty"`
|
|
// IsAPIKey is true when the caller is an API key
|
|
IsAPIKey bool `protobuf:"varint,7,opt,name=IsAPIKey,proto3" json:"IsAPIKey,omitempty"`
|
|
// Methods lists the access rules of every public method
|
|
Methods []*MethodAccess `protobuf:"bytes,8,rep,name=Methods,proto3" json:"Methods,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *CallerScope) Reset() {
|
|
*x = CallerScope{}
|
|
mi := &file_auth_proto_msgTypes[13]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *CallerScope) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*CallerScope) ProtoMessage() {}
|
|
|
|
func (x *CallerScope) ProtoReflect() protoreflect.Message {
|
|
mi := &file_auth_proto_msgTypes[13]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use CallerScope.ProtoReflect.Descriptor instead.
|
|
func (*CallerScope) Descriptor() ([]byte, []int) {
|
|
return file_auth_proto_rawDescGZIP(), []int{13}
|
|
}
|
|
|
|
func (x *CallerScope) GetOrgID() string {
|
|
if x != nil {
|
|
return x.OrgID
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *CallerScope) GetProjectID() string {
|
|
if x != nil {
|
|
return x.ProjectID
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *CallerScope) GetRole() Role_Enum {
|
|
if x != nil {
|
|
return x.Role
|
|
}
|
|
return Role_None
|
|
}
|
|
|
|
func (x *CallerScope) GetRoleSource() RoleSource_Enum {
|
|
if x != nil {
|
|
return x.RoleSource
|
|
}
|
|
return RoleSource_Unknown
|
|
}
|
|
|
|
func (x *CallerScope) GetProjectRoles() map[string]string {
|
|
if x != nil {
|
|
return x.ProjectRoles
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *CallerScope) GetScopes() []string {
|
|
if x != nil {
|
|
return x.Scopes
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *CallerScope) GetIsAPIKey() bool {
|
|
if x != nil {
|
|
return x.IsAPIKey
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *CallerScope) GetMethods() []*MethodAccess {
|
|
if x != nil {
|
|
return x.Methods
|
|
}
|
|
return nil
|
|
}
|
|
|
|
var File_auth_proto protoreflect.FileDescriptor
|
|
|
|
const file_auth_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\n" +
|
|
"auth.proto\x12\x02pb\x1a\vtypes.proto\x1a\n" +
|
|
"orgs.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x18es/api/annotations.proto\"3\n" +
|
|
"\x14AuthProvidersRequest\x12\x1b\n" +
|
|
"\x05Email\x18\x01 \x01(\tB\x05\x80\xf4\x18\xa0\x01R\x05Email\"\x83\x01\n" +
|
|
"\x15AuthProvidersResponse\x12\x18\n" +
|
|
"\aAuthURL\x18\x01 \x01(\tR\aAuthURL\x12*\n" +
|
|
"\tProviders\x18\x02 \x03(\x0e2\f.pb.IDP.EnumR\tProviders\x12$\n" +
|
|
"\rProviderNames\x18\x03 \x03(\tR\rProviderNames\"\xb9\x02\n" +
|
|
"\bUserInfo\x12\x0e\n" +
|
|
"\x02ID\x18\x01 \x01(\tR\x02ID\x12\x12\n" +
|
|
"\x04Name\x18\x02 \x01(\tR\x04Name\x12\x14\n" +
|
|
"\x05Email\x18\x03 \x01(\tR\x05Email\x12$\n" +
|
|
"\rEmailVerified\x18\x04 \x01(\bR\rEmailVerified\x12\x12\n" +
|
|
"\x04Role\x18\x05 \x01(\tR\x04Role\x12*\n" +
|
|
"\x04Orgs\x18\x06 \x03(\v2\x16.pb.UserInfo.OrgsEntryR\x04Orgs\x12\x14\n" +
|
|
"\x05OrgID\x18\a \x01(\tR\x05OrgID\x12\x18\n" +
|
|
"\aOrgRole\x18\b \x01(\tR\aOrgRole\x12$\n" +
|
|
"\rOrgRoleSource\x18\t \x01(\tR\rOrgRoleSource\x1a7\n" +
|
|
"\tOrgsEntry\x12\x10\n" +
|
|
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
|
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x8f\x02\n" +
|
|
"\x05Token\x12\x1c\n" +
|
|
"\tTokenType\x18\x01 \x01(\tR\tTokenType\x12 \n" +
|
|
"\vAccessToken\x18\x02 \x01(\tR\vAccessToken\x12\x10\n" +
|
|
"\x03Jkt\x18\x03 \x01(\tR\x03Jkt\x12\x1c\n" +
|
|
"\tExpiresAt\x18\x04 \x01(\tR\tExpiresAt\x12\x1a\n" +
|
|
"\bIssuedAt\x18\x05 \x01(\tR\bIssuedAt\x12\x16\n" +
|
|
"\x06Issuer\x18\x06 \x01(\tR\x06Issuer\x12\x1a\n" +
|
|
"\bAudience\x18\a \x01(\tR\bAudience\x12(\n" +
|
|
"\bProvider\x18\b \x01(\x0e2\f.pb.IDP.EnumR\bProvider\x12\x1c\n" +
|
|
"\tExpiresIn\x18\t \x01(\rR\tExpiresIn\"^\n" +
|
|
"\x11UserTokenResponse\x12\x1f\n" +
|
|
"\x05Token\x18\x01 \x01(\v2\t.pb.TokenR\x05Token\x12(\n" +
|
|
"\bUserInfo\x18\x02 \x01(\v2\f.pb.UserInfoR\bUserInfo\"h\n" +
|
|
"\x14CallerStatusResponse\x12\x18\n" +
|
|
"\aSubject\x18\x01 \x01(\tR\aSubject\x12\x12\n" +
|
|
"\x04Role\x18\x02 \x01(\tR\x04Role\x12\"\n" +
|
|
"\x06Claims\x18\x03 \x03(\v2\n" +
|
|
".pb.KVPairR\x06Claims\"\xf7\x01\n" +
|
|
"\tLoginInfo\x12\x0e\n" +
|
|
"\x02ID\x18\x01 \x01(\tR\x02ID\x12\x1e\n" +
|
|
"\n" +
|
|
"ExternalID\x18\x02 \x01(\tR\n" +
|
|
"ExternalID\x12(\n" +
|
|
"\bProvider\x18\x03 \x01(\x0e2\f.pb.IDP.EnumR\bProvider\x12\x12\n" +
|
|
"\x04Name\x18\x04 \x01(\tR\x04Name\x12\x14\n" +
|
|
"\x05Email\x18\x05 \x01(\tR\x05Email\x12$\n" +
|
|
"\rEmailVerified\x18\x06 \x01(\bR\rEmailVerified\x12\x1e\n" +
|
|
"\n" +
|
|
"LoginCount\x18\a \x01(\rR\n" +
|
|
"LoginCount\x12 \n" +
|
|
"\vLastLoginAt\x18\b \x01(\tR\vLastLoginAt\"E\n" +
|
|
"\x13ExchangeCodeRequest\x12\x12\n" +
|
|
"\x04Code\x18\x01 \x01(\tR\x04Code\x12\x1a\n" +
|
|
"\bVerifier\x18\x02 \x01(\tR\bVerifier\"\x8b\x01\n" +
|
|
"\x03IDP\"\x83\x01\n" +
|
|
"\x04Enum\x12\x1c\n" +
|
|
"\tUndefined\x10\x00\x1a\r\x92\xb2\x19\tundefined\x12\x16\n" +
|
|
"\x06Google\x10\x01\x1a\n" +
|
|
"\x92\xb2\x19\x06google\x12\x16\n" +
|
|
"\x06Github\x10\x02\x1a\n" +
|
|
"\x92\xb2\x19\x06github\x12\x16\n" +
|
|
"\x06Gitlab\x10\x03\x1a\n" +
|
|
"\x92\xb2\x19\x06gitlab\x12\x15\n" +
|
|
"\x05Local\x10\xe8\a\x1a\t\x92\xb2\x19\x05local\"N\n" +
|
|
"\x10SelectOrgRequest\x12\x1a\n" +
|
|
"\x05OrgID\x18\x01 \x01(\tB\x04\xe8\xf3\x18\x01R\x05OrgID\x12\x1e\n" +
|
|
"\n" +
|
|
"RememberMe\x18\x02 \x01(\bR\n" +
|
|
"RememberMe\"P\n" +
|
|
"\x0eAllowedMethods\x12\x18\n" +
|
|
"\aService\x18\x01 \x01(\tR\aService\x12$\n" +
|
|
"\aMethods\x18\x02 \x03(\v2\n" +
|
|
".pb.KVPairR\aMethods\"A\n" +
|
|
"\x11ServiceAccessInfo\x12,\n" +
|
|
"\aAllowed\x18\x01 \x03(\v2\x12.pb.AllowedMethodsR\aAllowed\"|\n" +
|
|
"\fMethodAccess\x12\x16\n" +
|
|
"\x06Method\x18\x01 \x01(\tR\x06Method\x12\"\n" +
|
|
"\fAllowedRoles\x18\x02 \x03(\tR\fAllowedRoles\x12\x16\n" +
|
|
"\x06Scopes\x18\x03 \x03(\tR\x06Scopes\x12\x18\n" +
|
|
"\aAllowed\x18\x04 \x01(\bR\aAllowed\"\x81\x03\n" +
|
|
"\vCallerScope\x12\x14\n" +
|
|
"\x05OrgID\x18\x01 \x01(\tR\x05OrgID\x12\x1c\n" +
|
|
"\tProjectID\x18\x02 \x01(\tR\tProjectID\x12!\n" +
|
|
"\x04Role\x18\x03 \x01(\x0e2\r.pb.Role.EnumR\x04Role\x123\n" +
|
|
"\n" +
|
|
"RoleSource\x18\x04 \x01(\x0e2\x13.pb.RoleSource.EnumR\n" +
|
|
"RoleSource\x12E\n" +
|
|
"\fProjectRoles\x18\x05 \x03(\v2!.pb.CallerScope.ProjectRolesEntryR\fProjectRoles\x12\x16\n" +
|
|
"\x06Scopes\x18\x06 \x03(\tR\x06Scopes\x12\x1a\n" +
|
|
"\bIsAPIKey\x18\a \x01(\bR\bIsAPIKey\x12*\n" +
|
|
"\aMethods\x18\b \x03(\v2\x10.pb.MethodAccessR\aMethods\x1a?\n" +
|
|
"\x11ProjectRolesEntry\x12\x10\n" +
|
|
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
|
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x012\xcc\a\n" +
|
|
"\x04Auth\x12v\n" +
|
|
"\fGetProviders\x12\x18.pb.AuthProvidersRequest\x1a\x19.pb.AuthProvidersResponse\"1\x82C\x0eauth providers\x82\xd3\xe4\x93\x02\x1a:\x01*\"\x15/pb.Auth/GetProviders\x12k\n" +
|
|
"\fGetUserToken\x12\x16.google.protobuf.Empty\x1a\x15.pb.UserTokenResponse\",\x82C\tauth user\x82\xd3\xe4\x93\x02\x1a:\x01*\"\x15/pb.Auth/GetUserToken\x12l\n" +
|
|
"\vRevokeToken\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.Empty\"-\x82C\vauth revoke\x82\xd3\xe4\x93\x02\x19:\x01*\"\x14/pb.Auth/RevokeToken\x12d\n" +
|
|
"\x06Caller\x12\x16.google.protobuf.Empty\x1a\x18.pb.CallerStatusResponse\"(\x82C\vauth caller\x82\xd3\xe4\x93\x02\x14:\x01*\"\x0f/pb.Auth/Caller\x12T\n" +
|
|
"\fExchangeCode\x12\x17.pb.ExchangeCodeRequest\x1a\t.pb.Token\" \x82\xd3\xe4\x93\x02\x1a:\x01*\"\x15/pb.Auth/ExchangeCode\x12b\n" +
|
|
"\tSelectOrg\x12\x14.pb.SelectOrgRequest\x1a\x15.pb.UserTokenResponse\"(\x82C\bauth org\x82\xd3\xe4\x93\x02\x17:\x01*\"\x12/pb.Auth/SelectOrg\x12k\n" +
|
|
"\x12AuthenticateAPIKey\x12\x16.google.protobuf.Empty\x1a\x15.pb.UserTokenResponse\"&\x82\xd3\xe4\x93\x02 :\x01*\"\x1b/pb.Auth/AuthenticateAPIKey\x12x\n" +
|
|
"\x11GetAllowedMethods\x12\x16.google.protobuf.Empty\x1a\x15.pb.ServiceAccessInfo\"4\x82C\fauth allowed\x82\xd3\xe4\x93\x02\x1f:\x01*\"\x1a/pb.Auth/GetAllowedMethods\x12j\n" +
|
|
"\x0eGetCallerScope\x12\x16.google.protobuf.Empty\x1a\x0f.pb.CallerScope\"/\x82C\n" +
|
|
"auth scope\x82\xd3\xe4\x93\x02\x1c:\x01*\"\x17/pb.Auth/GetCallerScopeB/Z-github.com/effective-security/trustyca/api/pbb\x06proto3"
|
|
|
|
var (
|
|
file_auth_proto_rawDescOnce sync.Once
|
|
file_auth_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_auth_proto_rawDescGZIP() []byte {
|
|
file_auth_proto_rawDescOnce.Do(func() {
|
|
file_auth_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_auth_proto_rawDesc), len(file_auth_proto_rawDesc)))
|
|
})
|
|
return file_auth_proto_rawDescData
|
|
}
|
|
|
|
var file_auth_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
|
var file_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
|
|
var file_auth_proto_goTypes = []any{
|
|
(IDP_Enum)(0), // 0: pb.IDP.Enum
|
|
(*AuthProvidersRequest)(nil), // 1: pb.AuthProvidersRequest
|
|
(*AuthProvidersResponse)(nil), // 2: pb.AuthProvidersResponse
|
|
(*UserInfo)(nil), // 3: pb.UserInfo
|
|
(*Token)(nil), // 4: pb.Token
|
|
(*UserTokenResponse)(nil), // 5: pb.UserTokenResponse
|
|
(*CallerStatusResponse)(nil), // 6: pb.CallerStatusResponse
|
|
(*LoginInfo)(nil), // 7: pb.LoginInfo
|
|
(*ExchangeCodeRequest)(nil), // 8: pb.ExchangeCodeRequest
|
|
(*IDP)(nil), // 9: pb.IDP
|
|
(*SelectOrgRequest)(nil), // 10: pb.SelectOrgRequest
|
|
(*AllowedMethods)(nil), // 11: pb.AllowedMethods
|
|
(*ServiceAccessInfo)(nil), // 12: pb.ServiceAccessInfo
|
|
(*MethodAccess)(nil), // 13: pb.MethodAccess
|
|
(*CallerScope)(nil), // 14: pb.CallerScope
|
|
nil, // 15: pb.UserInfo.OrgsEntry
|
|
nil, // 16: pb.CallerScope.ProjectRolesEntry
|
|
(*KVPair)(nil), // 17: pb.KVPair
|
|
(Role_Enum)(0), // 18: pb.Role.Enum
|
|
(RoleSource_Enum)(0), // 19: pb.RoleSource.Enum
|
|
(*emptypb.Empty)(nil), // 20: google.protobuf.Empty
|
|
}
|
|
var file_auth_proto_depIdxs = []int32{
|
|
0, // 0: pb.AuthProvidersResponse.Providers:type_name -> pb.IDP.Enum
|
|
15, // 1: pb.UserInfo.Orgs:type_name -> pb.UserInfo.OrgsEntry
|
|
0, // 2: pb.Token.Provider:type_name -> pb.IDP.Enum
|
|
4, // 3: pb.UserTokenResponse.Token:type_name -> pb.Token
|
|
3, // 4: pb.UserTokenResponse.UserInfo:type_name -> pb.UserInfo
|
|
17, // 5: pb.CallerStatusResponse.Claims:type_name -> pb.KVPair
|
|
0, // 6: pb.LoginInfo.Provider:type_name -> pb.IDP.Enum
|
|
17, // 7: pb.AllowedMethods.Methods:type_name -> pb.KVPair
|
|
11, // 8: pb.ServiceAccessInfo.Allowed:type_name -> pb.AllowedMethods
|
|
18, // 9: pb.CallerScope.Role:type_name -> pb.Role.Enum
|
|
19, // 10: pb.CallerScope.RoleSource:type_name -> pb.RoleSource.Enum
|
|
16, // 11: pb.CallerScope.ProjectRoles:type_name -> pb.CallerScope.ProjectRolesEntry
|
|
13, // 12: pb.CallerScope.Methods:type_name -> pb.MethodAccess
|
|
1, // 13: pb.Auth.GetProviders:input_type -> pb.AuthProvidersRequest
|
|
20, // 14: pb.Auth.GetUserToken:input_type -> google.protobuf.Empty
|
|
20, // 15: pb.Auth.RevokeToken:input_type -> google.protobuf.Empty
|
|
20, // 16: pb.Auth.Caller:input_type -> google.protobuf.Empty
|
|
8, // 17: pb.Auth.ExchangeCode:input_type -> pb.ExchangeCodeRequest
|
|
10, // 18: pb.Auth.SelectOrg:input_type -> pb.SelectOrgRequest
|
|
20, // 19: pb.Auth.AuthenticateAPIKey:input_type -> google.protobuf.Empty
|
|
20, // 20: pb.Auth.GetAllowedMethods:input_type -> google.protobuf.Empty
|
|
20, // 21: pb.Auth.GetCallerScope:input_type -> google.protobuf.Empty
|
|
2, // 22: pb.Auth.GetProviders:output_type -> pb.AuthProvidersResponse
|
|
5, // 23: pb.Auth.GetUserToken:output_type -> pb.UserTokenResponse
|
|
20, // 24: pb.Auth.RevokeToken:output_type -> google.protobuf.Empty
|
|
6, // 25: pb.Auth.Caller:output_type -> pb.CallerStatusResponse
|
|
4, // 26: pb.Auth.ExchangeCode:output_type -> pb.Token
|
|
5, // 27: pb.Auth.SelectOrg:output_type -> pb.UserTokenResponse
|
|
5, // 28: pb.Auth.AuthenticateAPIKey:output_type -> pb.UserTokenResponse
|
|
12, // 29: pb.Auth.GetAllowedMethods:output_type -> pb.ServiceAccessInfo
|
|
14, // 30: pb.Auth.GetCallerScope:output_type -> pb.CallerScope
|
|
22, // [22:31] is the sub-list for method output_type
|
|
13, // [13:22] is the sub-list for method input_type
|
|
13, // [13:13] is the sub-list for extension type_name
|
|
13, // [13:13] is the sub-list for extension extendee
|
|
0, // [0:13] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_auth_proto_init() }
|
|
func file_auth_proto_init() {
|
|
if File_auth_proto != nil {
|
|
return
|
|
}
|
|
file_types_proto_init()
|
|
file_orgs_proto_init()
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_auth_proto_rawDesc), len(file_auth_proto_rawDesc)),
|
|
NumEnums: 1,
|
|
NumMessages: 16,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_auth_proto_goTypes,
|
|
DependencyIndexes: file_auth_proto_depIdxs,
|
|
EnumInfos: file_auth_proto_enumTypes,
|
|
MessageInfos: file_auth_proto_msgTypes,
|
|
}.Build()
|
|
File_auth_proto = out.File
|
|
file_auth_proto_goTypes = nil
|
|
file_auth_proto_depIdxs = nil
|
|
}
|