auth

package
v0.0.0-...-3b69245 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2024 License: AGPL-3.0 Imports: 8 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CreateTokenWithPasswordResponse_Status_name = map[int32]string{
		0: "OK",
		1: "CREDENTIALS_INVALID",
		2: "IDENTITY_NOT_ACTIVE",
		3: "UNAUTHORIZED",
	}
	CreateTokenWithPasswordResponse_Status_value = map[string]int32{
		"OK":                  0,
		"CREDENTIALS_INVALID": 1,
		"IDENTITY_NOT_ACTIVE": 2,
		"UNAUTHORIZED":        3,
	}
)

Enum value maps for CreateTokenWithPasswordResponse_Status.

View Source
var (
	CreateTokenWithOAuth2Response_Status_name = map[int32]string{
		0: "OK",
		1: "UNAUTHENTICATED",
		2: "IDENTITY_NOT_ACTIVE",
		3: "UNAUTHORIZED",
	}
	CreateTokenWithOAuth2Response_Status_value = map[string]int32{
		"OK":                  0,
		"UNAUTHENTICATED":     1,
		"IDENTITY_NOT_ACTIVE": 2,
		"UNAUTHORIZED":        3,
	}
)

Enum value maps for CreateTokenWithOAuth2Response_Status.

View Source
var (
	RefreshTokenResponse_Status_name = map[int32]string{
		0: "OK",
		1: "TOKEN_INVALID",
		2: "TOKEN_NOT_FOUND",
		3: "TOKEN_DISABLED",
		4: "TOKEN_EXPIRED",
		5: "TOKEN_IS_NOT_REFRESH_TOKEN",
		6: "IDENTITY_NOT_FOUND",
		7: "IDENTITY_NOT_ACTIVE",
		8: "IDENTITY_UNAUTHENTICATED",
	}
	RefreshTokenResponse_Status_value = map[string]int32{
		"OK":                         0,
		"TOKEN_INVALID":              1,
		"TOKEN_NOT_FOUND":            2,
		"TOKEN_DISABLED":             3,
		"TOKEN_EXPIRED":              4,
		"TOKEN_IS_NOT_REFRESH_TOKEN": 5,
		"IDENTITY_NOT_FOUND":         6,
		"IDENTITY_NOT_ACTIVE":        7,
		"IDENTITY_UNAUTHENTICATED":   8,
	}
)

Enum value maps for RefreshTokenResponse_Status.

View Source
var (
	CheckAccessWithTokenResponse_Status_name = map[int32]string{
		0: "OK",
		1: "TOKEN_INVALID",
		2: "TOKEN_NOT_FOUND",
		3: "TOKEN_DISABLED",
		4: "TOKEN_EXPIRED",
		5: "UNAUTHORIZED",
	}
	CheckAccessWithTokenResponse_Status_value = map[string]int32{
		"OK":              0,
		"TOKEN_INVALID":   1,
		"TOKEN_NOT_FOUND": 2,
		"TOKEN_DISABLED":  3,
		"TOKEN_EXPIRED":   4,
		"UNAUTHORIZED":    5,
	}
)

Enum value maps for CheckAccessWithTokenResponse_Status.

View Source
var (
	CheckAccessWithPasswordResponse_Status_name = map[int32]string{
		0: "OK",
		1: "UNAUTHENTICATED",
		5: "UNAUTHORIZED",
	}
	CheckAccessWithPasswordResponse_Status_value = map[string]int32{
		"OK":              0,
		"UNAUTHENTICATED": 1,
		"UNAUTHORIZED":    5,
	}
)

Enum value maps for CheckAccessWithPasswordResponse_Status.

View Source
var (
	CheckAccessWithX509Response_Status_name = map[int32]string{
		0: "OK",
		1: "CERTIFICATE_INVALID_FORMAT",
		2: "CERTIFICATE_INVALID",
		3: "CERTIFICATE_NOT_FOUND",
		4: "CERTIFICATE_DISABLED",
		5: "IDENTITY_NOT_FOUND",
		6: "IDENTITY_NOT_ACTIVE",
		7: "UNAUTHORIZED",
	}
	CheckAccessWithX509Response_Status_value = map[string]int32{
		"OK":                         0,
		"CERTIFICATE_INVALID_FORMAT": 1,
		"CERTIFICATE_INVALID":        2,
		"CERTIFICATE_NOT_FOUND":      3,
		"CERTIFICATE_DISABLED":       4,
		"IDENTITY_NOT_FOUND":         5,
		"IDENTITY_NOT_ACTIVE":        6,
		"UNAUTHORIZED":               7,
	}
)

Enum value maps for CheckAccessWithX509Response_Status.

View Source
var (
	CheckAccessResponse_Status_name = map[int32]string{
		0: "OK",
		1: "IDENTITY_NOT_FOUND",
		2: "IDENTITY_NOT_ACTIVE",
		3: "UNAUTHORIZED",
	}
	CheckAccessResponse_Status_value = map[string]int32{
		"OK":                  0,
		"IDENTITY_NOT_FOUND":  1,
		"IDENTITY_NOT_ACTIVE": 2,
		"UNAUTHORIZED":        3,
	}
)

Enum value maps for CheckAccessResponse_Status.

View Source
var IAMAuthService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "native_iam_auth.IAMAuthService",
	HandlerType: (*IAMAuthServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateTokenWithPassword",
			Handler:    _IAMAuthService_CreateTokenWithPassword_Handler,
		},
		{
			MethodName: "CreateTokenWithOAuth2",
			Handler:    _IAMAuthService_CreateTokenWithOAuth2_Handler,
		},
		{
			MethodName: "RefreshToken",
			Handler:    _IAMAuthService_RefreshToken_Handler,
		},
		{
			MethodName: "CheckAccessWithToken",
			Handler:    _IAMAuthService_CheckAccessWithToken_Handler,
		},
		{
			MethodName: "CheckAccessWithPassword",
			Handler:    _IAMAuthService_CheckAccessWithPassword_Handler,
		},
		{
			MethodName: "CheckAccessWithX509",
			Handler:    _IAMAuthService_CheckAccessWithX509_Handler,
		},
		{
			MethodName: "CheckAccess",
			Handler:    _IAMAuthService_CheckAccess_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "auth.proto",
}

IAMAuthService_ServiceDesc is the grpc.ServiceDesc for IAMAuthService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterIAMAuthServiceServer

func RegisterIAMAuthServiceServer(s grpc.ServiceRegistrar, srv IAMAuthServiceServer)

Types

type CheckAccessRequest

type CheckAccessRequest struct {

	// Namespace where identity is located
	Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// Unique identifier of the identity
	Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"`
	// Scopes to check
	Scopes []*Scope `protobuf:"bytes,3,rep,name=scopes,proto3" json:"scopes,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckAccessRequest) Descriptor deprecated

func (*CheckAccessRequest) Descriptor() ([]byte, []int)

Deprecated: Use CheckAccessRequest.ProtoReflect.Descriptor instead.

func (*CheckAccessRequest) GetIdentity

func (x *CheckAccessRequest) GetIdentity() string

func (*CheckAccessRequest) GetNamespace

func (x *CheckAccessRequest) GetNamespace() string

func (*CheckAccessRequest) GetScopes

func (x *CheckAccessRequest) GetScopes() []*Scope

func (*CheckAccessRequest) ProtoMessage

func (*CheckAccessRequest) ProtoMessage()

func (*CheckAccessRequest) ProtoReflect

func (x *CheckAccessRequest) ProtoReflect() protoreflect.Message

func (*CheckAccessRequest) Reset

func (x *CheckAccessRequest) Reset()

func (*CheckAccessRequest) String

func (x *CheckAccessRequest) String() string

type CheckAccessResponse

type CheckAccessResponse struct {

	// Status of the check
	Status CheckAccessResponse_Status `protobuf:"varint,1,opt,name=status,proto3,enum=native_iam_auth.CheckAccessResponse_Status" json:"status,omitempty"`
	// Details of the status, that can be safelly returned and displayed to the requester
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckAccessResponse) Descriptor deprecated

func (*CheckAccessResponse) Descriptor() ([]byte, []int)

Deprecated: Use CheckAccessResponse.ProtoReflect.Descriptor instead.

func (*CheckAccessResponse) GetMessage

func (x *CheckAccessResponse) GetMessage() string

func (*CheckAccessResponse) GetStatus

func (*CheckAccessResponse) ProtoMessage

func (*CheckAccessResponse) ProtoMessage()

func (*CheckAccessResponse) ProtoReflect

func (x *CheckAccessResponse) ProtoReflect() protoreflect.Message

func (*CheckAccessResponse) Reset

func (x *CheckAccessResponse) Reset()

func (*CheckAccessResponse) String

func (x *CheckAccessResponse) String() string

type CheckAccessResponse_Status

type CheckAccessResponse_Status int32
const (
	// Provided identity with provided certificate is allows to access scopes
	CheckAccessResponse_OK CheckAccessResponse_Status = 0
	// Identity wasnt founded.
	CheckAccessResponse_IDENTITY_NOT_FOUND CheckAccessResponse_Status = 1
	// Identity was manually disabled.
	CheckAccessResponse_IDENTITY_NOT_ACTIVE CheckAccessResponse_Status = 2
	// Identity dont have enought priviliges to perform actions from provided scopes
	CheckAccessResponse_UNAUTHORIZED CheckAccessResponse_Status = 3
)

func (CheckAccessResponse_Status) Descriptor

func (CheckAccessResponse_Status) Enum

func (CheckAccessResponse_Status) EnumDescriptor deprecated

func (CheckAccessResponse_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use CheckAccessResponse_Status.Descriptor instead.

func (CheckAccessResponse_Status) Number

func (CheckAccessResponse_Status) String

func (CheckAccessResponse_Status) Type

type CheckAccessWithPasswordRequest

type CheckAccessWithPasswordRequest struct {

	// Namespace where identity is located
	Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// Identity UUID inside namespace
	Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"`
	// Identity secret key
	Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	// Arbitrary metadata. For example MAC/IP/information of the actor/application/browser/machine that provided this indentity and password. The exact format of metadata is not defined, but JSON is suggested.
	Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// Scopes to check
	Scopes []*Scope `protobuf:"bytes,5,rep,name=scopes,proto3" json:"scopes,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckAccessWithPasswordRequest) Descriptor deprecated

func (*CheckAccessWithPasswordRequest) Descriptor() ([]byte, []int)

Deprecated: Use CheckAccessWithPasswordRequest.ProtoReflect.Descriptor instead.

func (*CheckAccessWithPasswordRequest) GetIdentity

func (x *CheckAccessWithPasswordRequest) GetIdentity() string

func (*CheckAccessWithPasswordRequest) GetMetadata

func (x *CheckAccessWithPasswordRequest) GetMetadata() string

func (*CheckAccessWithPasswordRequest) GetNamespace

func (x *CheckAccessWithPasswordRequest) GetNamespace() string

func (*CheckAccessWithPasswordRequest) GetPassword

func (x *CheckAccessWithPasswordRequest) GetPassword() string

func (*CheckAccessWithPasswordRequest) GetScopes

func (x *CheckAccessWithPasswordRequest) GetScopes() []*Scope

func (*CheckAccessWithPasswordRequest) ProtoMessage

func (*CheckAccessWithPasswordRequest) ProtoMessage()

func (*CheckAccessWithPasswordRequest) ProtoReflect

func (*CheckAccessWithPasswordRequest) Reset

func (x *CheckAccessWithPasswordRequest) Reset()

func (*CheckAccessWithPasswordRequest) String

type CheckAccessWithPasswordResponse

type CheckAccessWithPasswordResponse struct {

	// Status of the check
	Status CheckAccessWithPasswordResponse_Status `` /* 126-byte string literal not displayed */
	// Details of the status, that can be safelly returned and displayed to the requester
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckAccessWithPasswordResponse) Descriptor deprecated

func (*CheckAccessWithPasswordResponse) Descriptor() ([]byte, []int)

Deprecated: Use CheckAccessWithPasswordResponse.ProtoReflect.Descriptor instead.

func (*CheckAccessWithPasswordResponse) GetMessage

func (x *CheckAccessWithPasswordResponse) GetMessage() string

func (*CheckAccessWithPasswordResponse) GetStatus

func (*CheckAccessWithPasswordResponse) ProtoMessage

func (*CheckAccessWithPasswordResponse) ProtoMessage()

func (*CheckAccessWithPasswordResponse) ProtoReflect

func (*CheckAccessWithPasswordResponse) Reset

func (*CheckAccessWithPasswordResponse) String

type CheckAccessWithPasswordResponse_Status

type CheckAccessWithPasswordResponse_Status int32
const (
	// Provided identity with provided password is allows to access scopes
	CheckAccessWithPasswordResponse_OK CheckAccessWithPasswordResponse_Status = 0
	// Identity or password doesnt match
	CheckAccessWithPasswordResponse_UNAUTHENTICATED CheckAccessWithPasswordResponse_Status = 1
	// Identity dont have enought priviliges to perform actions from provided scopes
	CheckAccessWithPasswordResponse_UNAUTHORIZED CheckAccessWithPasswordResponse_Status = 5
)

func (CheckAccessWithPasswordResponse_Status) Descriptor

func (CheckAccessWithPasswordResponse_Status) Enum

func (CheckAccessWithPasswordResponse_Status) EnumDescriptor deprecated

func (CheckAccessWithPasswordResponse_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use CheckAccessWithPasswordResponse_Status.Descriptor instead.

func (CheckAccessWithPasswordResponse_Status) Number

func (CheckAccessWithPasswordResponse_Status) String

func (CheckAccessWithPasswordResponse_Status) Type

type CheckAccessWithTokenRequest

type CheckAccessWithTokenRequest struct {

	// Token to verify
	AccessToken string `protobuf:"bytes,1,opt,name=accessToken,proto3" json:"accessToken,omitempty"`
	// Scopes for with to validate access
	Scopes []*Scope `protobuf:"bytes,2,rep,name=scopes,proto3" json:"scopes,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckAccessWithTokenRequest) Descriptor deprecated

func (*CheckAccessWithTokenRequest) Descriptor() ([]byte, []int)

Deprecated: Use CheckAccessWithTokenRequest.ProtoReflect.Descriptor instead.

func (*CheckAccessWithTokenRequest) GetAccessToken

func (x *CheckAccessWithTokenRequest) GetAccessToken() string

func (*CheckAccessWithTokenRequest) GetScopes

func (x *CheckAccessWithTokenRequest) GetScopes() []*Scope

func (*CheckAccessWithTokenRequest) ProtoMessage

func (*CheckAccessWithTokenRequest) ProtoMessage()

func (*CheckAccessWithTokenRequest) ProtoReflect

func (*CheckAccessWithTokenRequest) Reset

func (x *CheckAccessWithTokenRequest) Reset()

func (*CheckAccessWithTokenRequest) String

func (x *CheckAccessWithTokenRequest) String() string

type CheckAccessWithTokenResponse

type CheckAccessWithTokenResponse struct {

	// Status of the verification
	Status CheckAccessWithTokenResponse_Status `protobuf:"varint,1,opt,name=status,proto3,enum=native_iam_auth.CheckAccessWithTokenResponse_Status" json:"status,omitempty"`
	// Details of the status, that can be safelly returned and displayed to the requester
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// Namespace where token and identity are located
	Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// Unique token id
	TokenUUID string `protobuf:"bytes,4,opt,name=tokenUUID,proto3" json:"tokenUUID,omitempty"`
	// Unique identity id
	IdentityUUID string `protobuf:"bytes,5,opt,name=identityUUID,proto3" json:"identityUUID,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckAccessWithTokenResponse) Descriptor deprecated

func (*CheckAccessWithTokenResponse) Descriptor() ([]byte, []int)

Deprecated: Use CheckAccessWithTokenResponse.ProtoReflect.Descriptor instead.

func (*CheckAccessWithTokenResponse) GetIdentityUUID

func (x *CheckAccessWithTokenResponse) GetIdentityUUID() string

func (*CheckAccessWithTokenResponse) GetMessage

func (x *CheckAccessWithTokenResponse) GetMessage() string

func (*CheckAccessWithTokenResponse) GetNamespace

func (x *CheckAccessWithTokenResponse) GetNamespace() string

func (*CheckAccessWithTokenResponse) GetStatus

func (*CheckAccessWithTokenResponse) GetTokenUUID

func (x *CheckAccessWithTokenResponse) GetTokenUUID() string

func (*CheckAccessWithTokenResponse) ProtoMessage

func (*CheckAccessWithTokenResponse) ProtoMessage()

func (*CheckAccessWithTokenResponse) ProtoReflect

func (*CheckAccessWithTokenResponse) Reset

func (x *CheckAccessWithTokenResponse) Reset()

func (*CheckAccessWithTokenResponse) String

type CheckAccessWithTokenResponse_Status

type CheckAccessWithTokenResponse_Status int32
const (
	// Provided token allows to access scopes
	CheckAccessWithTokenResponse_OK CheckAccessWithTokenResponse_Status = 0
	// Received token has bad format or its signature doesnt match
	CheckAccessWithTokenResponse_TOKEN_INVALID CheckAccessWithTokenResponse_Status = 1
	// Most probably token was deleted after its creation
	CheckAccessWithTokenResponse_TOKEN_NOT_FOUND CheckAccessWithTokenResponse_Status = 2
	// Token was manually disabled
	CheckAccessWithTokenResponse_TOKEN_DISABLED CheckAccessWithTokenResponse_Status = 3
	// Token expired
	CheckAccessWithTokenResponse_TOKEN_EXPIRED CheckAccessWithTokenResponse_Status = 4
	// Token has not enought privileges to access specified scopes
	CheckAccessWithTokenResponse_UNAUTHORIZED CheckAccessWithTokenResponse_Status = 5
)

func (CheckAccessWithTokenResponse_Status) Descriptor

func (CheckAccessWithTokenResponse_Status) Enum

func (CheckAccessWithTokenResponse_Status) EnumDescriptor deprecated

func (CheckAccessWithTokenResponse_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use CheckAccessWithTokenResponse_Status.Descriptor instead.

func (CheckAccessWithTokenResponse_Status) Number

func (CheckAccessWithTokenResponse_Status) String

func (CheckAccessWithTokenResponse_Status) Type

type CheckAccessWithX509Request

type CheckAccessWithX509Request struct {

	// X509 certificate in DER format
	Certificate []byte `protobuf:"bytes,1,opt,name=certificate,proto3" json:"certificate,omitempty"`
	// Scopes to check
	Scopes []*Scope `protobuf:"bytes,2,rep,name=scopes,proto3" json:"scopes,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckAccessWithX509Request) Descriptor deprecated

func (*CheckAccessWithX509Request) Descriptor() ([]byte, []int)

Deprecated: Use CheckAccessWithX509Request.ProtoReflect.Descriptor instead.

func (*CheckAccessWithX509Request) GetCertificate

func (x *CheckAccessWithX509Request) GetCertificate() []byte

func (*CheckAccessWithX509Request) GetScopes

func (x *CheckAccessWithX509Request) GetScopes() []*Scope

func (*CheckAccessWithX509Request) ProtoMessage

func (*CheckAccessWithX509Request) ProtoMessage()

func (*CheckAccessWithX509Request) ProtoReflect

func (*CheckAccessWithX509Request) Reset

func (x *CheckAccessWithX509Request) Reset()

func (*CheckAccessWithX509Request) String

func (x *CheckAccessWithX509Request) String() string

type CheckAccessWithX509Response

type CheckAccessWithX509Response struct {

	// Status of the check
	Status CheckAccessWithX509Response_Status `protobuf:"varint,1,opt,name=status,proto3,enum=native_iam_auth.CheckAccessWithX509Response_Status" json:"status,omitempty"`
	// Details of the status, that can be safelly returned and displayed to the requester
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// Certificate information. Only available if status is one of the {OK; CERTIFICATE_DISABLED; IDENTITY_NOT_FOUND; IDENTITY_NOT_ACTIVE; UNAUTHORIZED}
	CertificateInfo *CheckAccessWithX509Response_CertificateInfo `protobuf:"bytes,3,opt,name=certificateInfo,proto3" json:"certificateInfo,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckAccessWithX509Response) Descriptor deprecated

func (*CheckAccessWithX509Response) Descriptor() ([]byte, []int)

Deprecated: Use CheckAccessWithX509Response.ProtoReflect.Descriptor instead.

func (*CheckAccessWithX509Response) GetCertificateInfo

func (*CheckAccessWithX509Response) GetMessage

func (x *CheckAccessWithX509Response) GetMessage() string

func (*CheckAccessWithX509Response) GetStatus

func (*CheckAccessWithX509Response) ProtoMessage

func (*CheckAccessWithX509Response) ProtoMessage()

func (*CheckAccessWithX509Response) ProtoReflect

func (*CheckAccessWithX509Response) Reset

func (x *CheckAccessWithX509Response) Reset()

func (*CheckAccessWithX509Response) String

func (x *CheckAccessWithX509Response) String() string

type CheckAccessWithX509Response_CertificateInfo

type CheckAccessWithX509Response_CertificateInfo struct {

	// Namespace where certificate and identity are located
	Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// Unique identifier of the certificate
	Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"`
	// Unique identifier of the identity
	Identity string `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"`
	// contains filtered or unexported fields
}

Detailed information about certificate

func (*CheckAccessWithX509Response_CertificateInfo) Descriptor deprecated

Deprecated: Use CheckAccessWithX509Response_CertificateInfo.ProtoReflect.Descriptor instead.

func (*CheckAccessWithX509Response_CertificateInfo) GetIdentity

func (*CheckAccessWithX509Response_CertificateInfo) GetNamespace

func (*CheckAccessWithX509Response_CertificateInfo) GetUuid

func (*CheckAccessWithX509Response_CertificateInfo) ProtoMessage

func (*CheckAccessWithX509Response_CertificateInfo) ProtoReflect

func (*CheckAccessWithX509Response_CertificateInfo) Reset

func (*CheckAccessWithX509Response_CertificateInfo) String

type CheckAccessWithX509Response_Status

type CheckAccessWithX509Response_Status int32
const (
	// Provided identity with provided certificate is allows to access scopes
	CheckAccessWithX509Response_OK CheckAccessWithX509Response_Status = 0
	// Certificate corrupted or was supplied not in the DER format
	CheckAccessWithX509Response_CERTIFICATE_INVALID_FORMAT CheckAccessWithX509Response_Status = 1
	// Signature or other aspects of the certificate are invalid
	CheckAccessWithX509Response_CERTIFICATE_INVALID CheckAccessWithX509Response_Status = 2
	// Certificate wasnt founded. Most probably certificate or entire namespace was deleted
	CheckAccessWithX509Response_CERTIFICATE_NOT_FOUND CheckAccessWithX509Response_Status = 3
	// Certificate was manually disable and cont be used in auth mechanisms
	CheckAccessWithX509Response_CERTIFICATE_DISABLED CheckAccessWithX509Response_Status = 4
	// Identity wasnt founded. Most probably it was deleted and certificate will be deleted soon
	CheckAccessWithX509Response_IDENTITY_NOT_FOUND CheckAccessWithX509Response_Status = 5
	// Identity was manually disabled.
	CheckAccessWithX509Response_IDENTITY_NOT_ACTIVE CheckAccessWithX509Response_Status = 6
	// Certificate is valid, but identity dont have enought priviliges to perform actions from provided scopes
	CheckAccessWithX509Response_UNAUTHORIZED CheckAccessWithX509Response_Status = 7
)

func (CheckAccessWithX509Response_Status) Descriptor

func (CheckAccessWithX509Response_Status) Enum

func (CheckAccessWithX509Response_Status) EnumDescriptor deprecated

func (CheckAccessWithX509Response_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use CheckAccessWithX509Response_Status.Descriptor instead.

func (CheckAccessWithX509Response_Status) Number

func (CheckAccessWithX509Response_Status) String

func (CheckAccessWithX509Response_Status) Type

type CreateTokenWithOAuth2Request

type CreateTokenWithOAuth2Request struct {

	// Namespace where identity located. May be empty for global identity
	Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// OAuth2 provider
	Provider string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty"`
	// Code sended with initial request
	Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"`
	// Code_verifier used for initial request
	CodeVerifier string `protobuf:"bytes,4,opt,name=codeVerifier,proto3" json:"codeVerifier,omitempty"`
	// Redirect URL sended with initial request
	RedirectURL string `protobuf:"bytes,5,opt,name=redirectURL,proto3" json:"redirectURL,omitempty"`
	// Arbitrary metadata. For example MAC/IP/information of the actor/application/browser/machine that created this token. The exact format of metadata is not defined, but JSON is suggested.
	Metadata string `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// Scopes of the created token. Empty for creating token with all possible scopes for identity.
	Scopes []*Scope `protobuf:"bytes,7,rep,name=scopes,proto3" json:"scopes,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateTokenWithOAuth2Request) Descriptor deprecated

func (*CreateTokenWithOAuth2Request) Descriptor() ([]byte, []int)

Deprecated: Use CreateTokenWithOAuth2Request.ProtoReflect.Descriptor instead.

func (*CreateTokenWithOAuth2Request) GetCode

func (x *CreateTokenWithOAuth2Request) GetCode() string

func (*CreateTokenWithOAuth2Request) GetCodeVerifier

func (x *CreateTokenWithOAuth2Request) GetCodeVerifier() string

func (*CreateTokenWithOAuth2Request) GetMetadata

func (x *CreateTokenWithOAuth2Request) GetMetadata() string

func (*CreateTokenWithOAuth2Request) GetNamespace

func (x *CreateTokenWithOAuth2Request) GetNamespace() string

func (*CreateTokenWithOAuth2Request) GetProvider

func (x *CreateTokenWithOAuth2Request) GetProvider() string

func (*CreateTokenWithOAuth2Request) GetRedirectURL

func (x *CreateTokenWithOAuth2Request) GetRedirectURL() string

func (*CreateTokenWithOAuth2Request) GetScopes

func (x *CreateTokenWithOAuth2Request) GetScopes() []*Scope

func (*CreateTokenWithOAuth2Request) ProtoMessage

func (*CreateTokenWithOAuth2Request) ProtoMessage()

func (*CreateTokenWithOAuth2Request) ProtoReflect

func (*CreateTokenWithOAuth2Request) Reset

func (x *CreateTokenWithOAuth2Request) Reset()

func (*CreateTokenWithOAuth2Request) String

type CreateTokenWithOAuth2Response

type CreateTokenWithOAuth2Response struct {

	// Status of the token creation
	Status CreateTokenWithOAuth2Response_Status `protobuf:"varint,1,opt,name=status,proto3,enum=native_iam_auth.CreateTokenWithOAuth2Response_Status" json:"status,omitempty"`
	// Token used for authentication and authorization
	AccessToken string `protobuf:"bytes,2,opt,name=accessToken,proto3" json:"accessToken,omitempty"`
	// Token used for refreshing accessToken
	RefreshToken string `protobuf:"bytes,3,opt,name=refreshToken,proto3" json:"refreshToken,omitempty"`
	// Identity UUID
	Identity string `protobuf:"bytes,4,opt,name=identity,proto3" json:"identity,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateTokenWithOAuth2Response) Descriptor deprecated

func (*CreateTokenWithOAuth2Response) Descriptor() ([]byte, []int)

Deprecated: Use CreateTokenWithOAuth2Response.ProtoReflect.Descriptor instead.

func (*CreateTokenWithOAuth2Response) GetAccessToken

func (x *CreateTokenWithOAuth2Response) GetAccessToken() string

func (*CreateTokenWithOAuth2Response) GetIdentity

func (x *CreateTokenWithOAuth2Response) GetIdentity() string

func (*CreateTokenWithOAuth2Response) GetRefreshToken

func (x *CreateTokenWithOAuth2Response) GetRefreshToken() string

func (*CreateTokenWithOAuth2Response) GetStatus

func (*CreateTokenWithOAuth2Response) ProtoMessage

func (*CreateTokenWithOAuth2Response) ProtoMessage()

func (*CreateTokenWithOAuth2Response) ProtoReflect

func (*CreateTokenWithOAuth2Response) Reset

func (x *CreateTokenWithOAuth2Response) Reset()

func (*CreateTokenWithOAuth2Response) String

type CreateTokenWithOAuth2Response_Status

type CreateTokenWithOAuth2Response_Status int32
const (
	// Everything is ok. Access and refresh tokens were successfully created
	CreateTokenWithOAuth2Response_OK CreateTokenWithOAuth2Response_Status = 0
	// Failed to find identity by provided OAuth secrets
	CreateTokenWithOAuth2Response_UNAUTHENTICATED CreateTokenWithOAuth2Response_Status = 1
	// Identity was manually disabled
	CreateTokenWithOAuth2Response_IDENTITY_NOT_ACTIVE CreateTokenWithOAuth2Response_Status = 2
	// Not enough privileges to create token with specified scopes
	CreateTokenWithOAuth2Response_UNAUTHORIZED CreateTokenWithOAuth2Response_Status = 3
)

func (CreateTokenWithOAuth2Response_Status) Descriptor

func (CreateTokenWithOAuth2Response_Status) Enum

func (CreateTokenWithOAuth2Response_Status) EnumDescriptor deprecated

func (CreateTokenWithOAuth2Response_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use CreateTokenWithOAuth2Response_Status.Descriptor instead.

func (CreateTokenWithOAuth2Response_Status) Number

func (CreateTokenWithOAuth2Response_Status) String

func (CreateTokenWithOAuth2Response_Status) Type

type CreateTokenWithPasswordRequest

type CreateTokenWithPasswordRequest struct {

	// Namespace where identity located. May be empty for global identity
	Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// Identity UUID
	Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"`
	// Identity password
	Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	// Arbitrary metadata. For example MAC/IP/information of the actor/application/browser/machine that created this token. The exact format of metadata is not defined, but JSON is suggested.
	Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// Scopes of the created token. Empty for creating token with all possible scopes for identity.
	Scopes []*Scope `protobuf:"bytes,5,rep,name=scopes,proto3" json:"scopes,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateTokenWithPasswordRequest) Descriptor deprecated

func (*CreateTokenWithPasswordRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateTokenWithPasswordRequest.ProtoReflect.Descriptor instead.

func (*CreateTokenWithPasswordRequest) GetIdentity

func (x *CreateTokenWithPasswordRequest) GetIdentity() string

func (*CreateTokenWithPasswordRequest) GetMetadata

func (x *CreateTokenWithPasswordRequest) GetMetadata() string

func (*CreateTokenWithPasswordRequest) GetNamespace

func (x *CreateTokenWithPasswordRequest) GetNamespace() string

func (*CreateTokenWithPasswordRequest) GetPassword

func (x *CreateTokenWithPasswordRequest) GetPassword() string

func (*CreateTokenWithPasswordRequest) GetScopes

func (x *CreateTokenWithPasswordRequest) GetScopes() []*Scope

func (*CreateTokenWithPasswordRequest) ProtoMessage

func (*CreateTokenWithPasswordRequest) ProtoMessage()

func (*CreateTokenWithPasswordRequest) ProtoReflect

func (*CreateTokenWithPasswordRequest) Reset

func (x *CreateTokenWithPasswordRequest) Reset()

func (*CreateTokenWithPasswordRequest) String

type CreateTokenWithPasswordResponse

type CreateTokenWithPasswordResponse struct {

	// Status of the token creation
	Status CreateTokenWithPasswordResponse_Status `` /* 126-byte string literal not displayed */
	// Token used for authentication and authorization. If status is not OK - empty string
	AccessToken string `protobuf:"bytes,2,opt,name=accessToken,proto3" json:"accessToken,omitempty"`
	// Token used for refreshing accessToken. If status is not OK - empty string
	RefreshToken string `protobuf:"bytes,3,opt,name=refreshToken,proto3" json:"refreshToken,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateTokenWithPasswordResponse) Descriptor deprecated

func (*CreateTokenWithPasswordResponse) Descriptor() ([]byte, []int)

Deprecated: Use CreateTokenWithPasswordResponse.ProtoReflect.Descriptor instead.

func (*CreateTokenWithPasswordResponse) GetAccessToken

func (x *CreateTokenWithPasswordResponse) GetAccessToken() string

func (*CreateTokenWithPasswordResponse) GetRefreshToken

func (x *CreateTokenWithPasswordResponse) GetRefreshToken() string

func (*CreateTokenWithPasswordResponse) GetStatus

func (*CreateTokenWithPasswordResponse) ProtoMessage

func (*CreateTokenWithPasswordResponse) ProtoMessage()

func (*CreateTokenWithPasswordResponse) ProtoReflect

func (*CreateTokenWithPasswordResponse) Reset

func (*CreateTokenWithPasswordResponse) String

type CreateTokenWithPasswordResponse_Status

type CreateTokenWithPasswordResponse_Status int32
const (
	// Everything is ok. Access and refresh tokens were successfully created
	CreateTokenWithPasswordResponse_OK CreateTokenWithPasswordResponse_Status = 0
	// Login or password is not valid
	CreateTokenWithPasswordResponse_CREDENTIALS_INVALID CreateTokenWithPasswordResponse_Status = 1
	// Identity was manually disabled
	CreateTokenWithPasswordResponse_IDENTITY_NOT_ACTIVE CreateTokenWithPasswordResponse_Status = 2
	// Not enough privileges to create token with specified scopes
	CreateTokenWithPasswordResponse_UNAUTHORIZED CreateTokenWithPasswordResponse_Status = 3
)

func (CreateTokenWithPasswordResponse_Status) Descriptor

func (CreateTokenWithPasswordResponse_Status) Enum

func (CreateTokenWithPasswordResponse_Status) EnumDescriptor deprecated

func (CreateTokenWithPasswordResponse_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use CreateTokenWithPasswordResponse_Status.Descriptor instead.

func (CreateTokenWithPasswordResponse_Status) Number

func (CreateTokenWithPasswordResponse_Status) String

func (CreateTokenWithPasswordResponse_Status) Type

type IAMAuthServiceClient

type IAMAuthServiceClient interface {
	// OAuth. Create access token and refresh token using password
	CreateTokenWithPassword(ctx context.Context, in *CreateTokenWithPasswordRequest, opts ...grpc.CallOption) (*CreateTokenWithPasswordResponse, error)
	// Create access token and refresh token using thrid party OAuth2 provider
	CreateTokenWithOAuth2(ctx context.Context, in *CreateTokenWithOAuth2Request, opts ...grpc.CallOption) (*CreateTokenWithOAuth2Response, error)
	// OAuth. Creates new access token using refresh tokenna
	RefreshToken(ctx context.Context, in *RefreshTokenRequest, opts ...grpc.CallOption) (*RefreshTokenResponse, error)
	// rpc VerifyResoureAccess(VerifyResourceAccessRequest) returns (VerifyResourceAccessResponse);
	// OAuth. Check if token is allowed to perform actions from the specified scopes
	CheckAccessWithToken(ctx context.Context, in *CheckAccessWithTokenRequest, opts ...grpc.CallOption) (*CheckAccessWithTokenResponse, error)
	// Basic Auth. Check if provided identity with proposed password is allowed to perform actions from the provided scopes
	CheckAccessWithPassword(ctx context.Context, in *CheckAccessWithPasswordRequest, opts ...grpc.CallOption) (*CheckAccessWithPasswordResponse, error)
	// Authorization with X509 certificates. Check if provided identity identified by proposed certificate is allowed to perform actions from the provided scopes
	CheckAccessWithX509(ctx context.Context, in *CheckAccessWithX509Request, opts ...grpc.CallOption) (*CheckAccessWithX509Response, error)
	// Check if provided identity is allowed to perform actions from the provided scopes
	CheckAccess(ctx context.Context, in *CheckAccessRequest, opts ...grpc.CallOption) (*CheckAccessResponse, error)
}

IAMAuthServiceClient is the client API for IAMAuthService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type IAMAuthServiceServer

type IAMAuthServiceServer interface {
	// OAuth. Create access token and refresh token using password
	CreateTokenWithPassword(context.Context, *CreateTokenWithPasswordRequest) (*CreateTokenWithPasswordResponse, error)
	// Create access token and refresh token using thrid party OAuth2 provider
	CreateTokenWithOAuth2(context.Context, *CreateTokenWithOAuth2Request) (*CreateTokenWithOAuth2Response, error)
	// OAuth. Creates new access token using refresh tokenna
	RefreshToken(context.Context, *RefreshTokenRequest) (*RefreshTokenResponse, error)
	// rpc VerifyResoureAccess(VerifyResourceAccessRequest) returns (VerifyResourceAccessResponse);
	// OAuth. Check if token is allowed to perform actions from the specified scopes
	CheckAccessWithToken(context.Context, *CheckAccessWithTokenRequest) (*CheckAccessWithTokenResponse, error)
	// Basic Auth. Check if provided identity with proposed password is allowed to perform actions from the provided scopes
	CheckAccessWithPassword(context.Context, *CheckAccessWithPasswordRequest) (*CheckAccessWithPasswordResponse, error)
	// Authorization with X509 certificates. Check if provided identity identified by proposed certificate is allowed to perform actions from the provided scopes
	CheckAccessWithX509(context.Context, *CheckAccessWithX509Request) (*CheckAccessWithX509Response, error)
	// Check if provided identity is allowed to perform actions from the provided scopes
	CheckAccess(context.Context, *CheckAccessRequest) (*CheckAccessResponse, error)
	// contains filtered or unexported methods
}

IAMAuthServiceServer is the server API for IAMAuthService service. All implementations must embed UnimplementedIAMAuthServiceServer for forward compatibility

type RefreshTokenRequest

type RefreshTokenRequest struct {
	RefreshToken string `protobuf:"bytes,1,opt,name=refreshToken,proto3" json:"refreshToken,omitempty"`
	// contains filtered or unexported fields
}

func (*RefreshTokenRequest) Descriptor deprecated

func (*RefreshTokenRequest) Descriptor() ([]byte, []int)

Deprecated: Use RefreshTokenRequest.ProtoReflect.Descriptor instead.

func (*RefreshTokenRequest) GetRefreshToken

func (x *RefreshTokenRequest) GetRefreshToken() string

func (*RefreshTokenRequest) ProtoMessage

func (*RefreshTokenRequest) ProtoMessage()

func (*RefreshTokenRequest) ProtoReflect

func (x *RefreshTokenRequest) ProtoReflect() protoreflect.Message

func (*RefreshTokenRequest) Reset

func (x *RefreshTokenRequest) Reset()

func (*RefreshTokenRequest) String

func (x *RefreshTokenRequest) String() string

type RefreshTokenResponse

type RefreshTokenResponse struct {

	// Status of the refresh
	Status RefreshTokenResponse_Status `protobuf:"varint,1,opt,name=status,proto3,enum=native_iam_auth.RefreshTokenResponse_Status" json:"status,omitempty"`
	// New access token
	AccessToken string `protobuf:"bytes,2,opt,name=accessToken,proto3" json:"accessToken,omitempty"`
	// contains filtered or unexported fields
}

func (*RefreshTokenResponse) Descriptor deprecated

func (*RefreshTokenResponse) Descriptor() ([]byte, []int)

Deprecated: Use RefreshTokenResponse.ProtoReflect.Descriptor instead.

func (*RefreshTokenResponse) GetAccessToken

func (x *RefreshTokenResponse) GetAccessToken() string

func (*RefreshTokenResponse) GetStatus

func (*RefreshTokenResponse) ProtoMessage

func (*RefreshTokenResponse) ProtoMessage()

func (*RefreshTokenResponse) ProtoReflect

func (x *RefreshTokenResponse) ProtoReflect() protoreflect.Message

func (*RefreshTokenResponse) Reset

func (x *RefreshTokenResponse) Reset()

func (*RefreshTokenResponse) String

func (x *RefreshTokenResponse) String() string

type RefreshTokenResponse_Status

type RefreshTokenResponse_Status int32
const (
	// Everything is ok. New access token was successfully created
	RefreshTokenResponse_OK RefreshTokenResponse_Status = 0
	// Received token has bad format or its signature doesnt match
	RefreshTokenResponse_TOKEN_INVALID RefreshTokenResponse_Status = 1
	// Most probably token was deleted after its creation
	RefreshTokenResponse_TOKEN_NOT_FOUND RefreshTokenResponse_Status = 2
	// Token was manually disabled
	RefreshTokenResponse_TOKEN_DISABLED RefreshTokenResponse_Status = 3
	// Token expired
	RefreshTokenResponse_TOKEN_EXPIRED RefreshTokenResponse_Status = 4
	// Provided token was recognized but most probably it is normal access token (not refresh one)
	RefreshTokenResponse_TOKEN_IS_NOT_REFRESH_TOKEN RefreshTokenResponse_Status = 5
	// Identity wasnt founded. Most probably it was deleted after token creation
	RefreshTokenResponse_IDENTITY_NOT_FOUND RefreshTokenResponse_Status = 6
	// Identity was manually disabled.
	RefreshTokenResponse_IDENTITY_NOT_ACTIVE RefreshTokenResponse_Status = 7
	// Most probably indentity policies changed and now its not possible to create token with same scopes
	RefreshTokenResponse_IDENTITY_UNAUTHENTICATED RefreshTokenResponse_Status = 8
)

func (RefreshTokenResponse_Status) Descriptor

func (RefreshTokenResponse_Status) Enum

func (RefreshTokenResponse_Status) EnumDescriptor deprecated

func (RefreshTokenResponse_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use RefreshTokenResponse_Status.Descriptor instead.

func (RefreshTokenResponse_Status) Number

func (RefreshTokenResponse_Status) String

func (RefreshTokenResponse_Status) Type

type Scope

type Scope struct {

	// Namespace where this scope applies
	Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// Resources that can be accessed using token
	Resources []string `protobuf:"bytes,2,rep,name=resources,proto3" json:"resources,omitempty"`
	// Actions that can be done on resources
	Actions []string `protobuf:"bytes,3,rep,name=actions,proto3" json:"actions,omitempty"`
	// If this scope applies to all namespaces
	NamespaceIndependent bool `protobuf:"varint,4,opt,name=namespaceIndependent,proto3" json:"namespaceIndependent,omitempty"`
	// contains filtered or unexported fields
}

Scope of the requested access. Check native_iam_policy for more information.

func (*Scope) Descriptor deprecated

func (*Scope) Descriptor() ([]byte, []int)

Deprecated: Use Scope.ProtoReflect.Descriptor instead.

func (*Scope) GetActions

func (x *Scope) GetActions() []string

func (*Scope) GetNamespace

func (x *Scope) GetNamespace() string

func (*Scope) GetNamespaceIndependent

func (x *Scope) GetNamespaceIndependent() bool

func (*Scope) GetResources

func (x *Scope) GetResources() []string

func (*Scope) ProtoMessage

func (*Scope) ProtoMessage()

func (*Scope) ProtoReflect

func (x *Scope) ProtoReflect() protoreflect.Message

func (*Scope) Reset

func (x *Scope) Reset()

func (*Scope) String

func (x *Scope) String() string

type UnimplementedIAMAuthServiceServer

type UnimplementedIAMAuthServiceServer struct {
}

UnimplementedIAMAuthServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedIAMAuthServiceServer) CheckAccess

func (UnimplementedIAMAuthServiceServer) CheckAccessWithX509

func (UnimplementedIAMAuthServiceServer) RefreshToken

type UnsafeIAMAuthServiceServer

type UnsafeIAMAuthServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeIAMAuthServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to IAMAuthServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL