Documentation
¶
Index ¶
- Variables
- func ErrorInvalidAuthorization(format string, args ...interface{}) *errors.Error
- func ErrorInvalidBearerToken(format string, args ...interface{}) *errors.Error
- func ErrorInvalidClaims(format string, args ...interface{}) *errors.Error
- func ErrorInvalidCredentials(format string, args ...interface{}) *errors.Error
- func ErrorSecurityErrorReasonUnspecified(format string, args ...interface{}) *errors.Error
- func ErrorSignTokenFailed(format string, args ...interface{}) *errors.Error
- func ErrorTokenExpired(format string, args ...interface{}) *errors.Error
- func ErrorTokenInvalid(format string, args ...interface{}) *errors.Error
- func ErrorTokenMissing(format string, args ...interface{}) *errors.Error
- func ErrorUnsupportedSigningMethod(format string, args ...interface{}) *errors.Error
- func IsInvalidAuthorization(err error) bool
- func IsInvalidBearerToken(err error) bool
- func IsInvalidClaims(err error) bool
- func IsInvalidCredentials(err error) bool
- func IsSecurityErrorReasonUnspecified(err error) bool
- func IsSignTokenFailed(err error) bool
- func IsTokenExpired(err error) bool
- func IsTokenInvalid(err error) bool
- func IsTokenMissing(err error) bool
- func IsUnsupportedSigningMethod(err error) bool
- type AuthNConfigs
- func (*AuthNConfigs) Descriptor() ([]byte, []int)deprecated
- func (x *AuthNConfigs) GetActive() string
- func (x *AuthNConfigs) GetConfigs() []*v1.AuthN
- func (x *AuthNConfigs) GetDefault() string
- func (*AuthNConfigs) ProtoMessage()
- func (x *AuthNConfigs) ProtoReflect() protoreflect.Message
- func (x *AuthNConfigs) Reset()
- func (x *AuthNConfigs) String() string
- func (m *AuthNConfigs) Validate() error
- func (m *AuthNConfigs) ValidateAll() error
- type AuthNConfigsMultiError
- type AuthNConfigsValidationError
- func (e AuthNConfigsValidationError) Cause() error
- func (e AuthNConfigsValidationError) Error() string
- func (e AuthNConfigsValidationError) ErrorName() string
- func (e AuthNConfigsValidationError) Field() string
- func (e AuthNConfigsValidationError) Key() bool
- func (e AuthNConfigsValidationError) Reason() string
- type AuthZConfigs
- func (*AuthZConfigs) Descriptor() ([]byte, []int)deprecated
- func (x *AuthZConfigs) GetActive() string
- func (x *AuthZConfigs) GetConfigs() []*v11.AuthZ
- func (x *AuthZConfigs) GetDefault() string
- func (*AuthZConfigs) ProtoMessage()
- func (x *AuthZConfigs) ProtoReflect() protoreflect.Message
- func (x *AuthZConfigs) Reset()
- func (x *AuthZConfigs) String() string
- func (m *AuthZConfigs) Validate() error
- func (m *AuthZConfigs) ValidateAll() error
- type AuthZConfigsMultiError
- type AuthZConfigsValidationError
- func (e AuthZConfigsValidationError) Cause() error
- func (e AuthZConfigsValidationError) Error() string
- func (e AuthZConfigsValidationError) ErrorName() string
- func (e AuthZConfigsValidationError) Field() string
- func (e AuthZConfigsValidationError) Key() bool
- func (e AuthZConfigsValidationError) Reason() string
- type Security
- func (*Security) Descriptor() ([]byte, []int)deprecated
- func (x *Security) GetAuthnConfigs() *AuthNConfigs
- func (x *Security) GetAuthzConfigs() *AuthZConfigs
- func (x *Security) GetTransportSecurityConfigs() *TransportSecurityConfigs
- func (*Security) ProtoMessage()
- func (x *Security) ProtoReflect() protoreflect.Message
- func (x *Security) Reset()
- func (x *Security) String() string
- func (m *Security) Validate() error
- func (m *Security) ValidateAll() error
- type SecurityErrorReason
- func (SecurityErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x SecurityErrorReason) Enum() *SecurityErrorReason
- func (SecurityErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x SecurityErrorReason) Number() protoreflect.EnumNumber
- func (x SecurityErrorReason) String() string
- func (SecurityErrorReason) Type() protoreflect.EnumType
- type SecurityMultiError
- type SecurityValidationError
- type TransportSecurityConfigs
- func (*TransportSecurityConfigs) Descriptor() ([]byte, []int)deprecated
- func (x *TransportSecurityConfigs) GetActive() string
- func (x *TransportSecurityConfigs) GetConfigs() []*v12.TLSConfig
- func (x *TransportSecurityConfigs) GetDefault() string
- func (*TransportSecurityConfigs) ProtoMessage()
- func (x *TransportSecurityConfigs) ProtoReflect() protoreflect.Message
- func (x *TransportSecurityConfigs) Reset()
- func (x *TransportSecurityConfigs) String() string
- func (m *TransportSecurityConfigs) Validate() error
- func (m *TransportSecurityConfigs) ValidateAll() error
- type TransportSecurityConfigsMultiError
- type TransportSecurityConfigsValidationError
- func (e TransportSecurityConfigsValidationError) Cause() error
- func (e TransportSecurityConfigsValidationError) Error() string
- func (e TransportSecurityConfigsValidationError) ErrorName() string
- func (e TransportSecurityConfigsValidationError) Field() string
- func (e TransportSecurityConfigsValidationError) Key() bool
- func (e TransportSecurityConfigsValidationError) Reason() string
Constants ¶
This section is empty.
Variables ¶
var ( SecurityErrorReason_name = map[int32]string{ 0: "SECURITY_ERROR_REASON_UNSPECIFIED", 1002: "INVALID_CREDENTIALS", 1003: "TOKEN_EXPIRED", 1004: "TOKEN_INVALID", 1005: "TOKEN_MISSING", 1006: "INVALID_CLAIMS", 1007: "INVALID_BEARER_TOKEN", 1008: "UNSUPPORTED_SIGNING_METHOD", 1009: "SIGN_TOKEN_FAILED", 2000: "INVALID_AUTHORIZATION", } SecurityErrorReason_value = map[string]int32{ "SECURITY_ERROR_REASON_UNSPECIFIED": 0, "INVALID_CREDENTIALS": 1002, "TOKEN_EXPIRED": 1003, "TOKEN_INVALID": 1004, "TOKEN_MISSING": 1005, "INVALID_CLAIMS": 1006, "INVALID_BEARER_TOKEN": 1007, "UNSUPPORTED_SIGNING_METHOD": 1008, "SIGN_TOKEN_FAILED": 1009, "INVALID_AUTHORIZATION": 2000, } )
Enum value maps for SecurityErrorReason.
var File_config_security_v1_error_proto protoreflect.FileDescriptor
var File_config_security_v1_security_proto protoreflect.FileDescriptor
Functions ¶
func ErrorInvalidAuthorization ¶
The user is authenticated but does not have permission for the specific resource or action.
func ErrorInvalidBearerToken ¶
The bearer token is specifically invalid or malformed.
func ErrorInvalidClaims ¶
The claims within the token are invalid.
func ErrorInvalidCredentials ¶
The provided credentials (e.g., username/password) are invalid.
func ErrorSecurityErrorReasonUnspecified ¶
The default, unspecified reason. This is required by proto3 syntax.
func ErrorSignTokenFailed ¶
Failed to sign a new token.
func ErrorTokenExpired ¶
The authentication token has expired.
func ErrorTokenInvalid ¶
The authentication token is malformed or invalid.
func ErrorTokenMissing ¶
The authentication token is missing from the request.
func ErrorUnsupportedSigningMethod ¶
The signing method used in the token is not supported.
func IsInvalidAuthorization ¶
The user is authenticated but does not have permission for the specific resource or action.
func IsInvalidBearerToken ¶
The bearer token is specifically invalid or malformed.
func IsInvalidClaims ¶
The claims within the token are invalid.
func IsInvalidCredentials ¶
The provided credentials (e.g., username/password) are invalid.
func IsSecurityErrorReasonUnspecified ¶
The default, unspecified reason. This is required by proto3 syntax.
func IsTokenInvalid ¶
The authentication token is malformed or invalid.
func IsTokenMissing ¶
The authentication token is missing from the request.
func IsUnsupportedSigningMethod ¶
The signing method used in the token is not supported.
Types ¶
type AuthNConfigs ¶
type AuthNConfigs struct {
Default *string `protobuf:"bytes,1,opt,name=default,proto3,oneof" json:"default,omitempty"`
Active *string `protobuf:"bytes,2,opt,name=active,proto3,oneof" json:"active,omitempty"`
Configs []*v1.AuthN `protobuf:"bytes,3,rep,name=configs,proto3" json:"configs,omitempty"`
// contains filtered or unexported fields
}
func (*AuthNConfigs) Descriptor
deprecated
func (*AuthNConfigs) Descriptor() ([]byte, []int)
Deprecated: Use AuthNConfigs.ProtoReflect.Descriptor instead.
func (*AuthNConfigs) GetActive ¶
func (x *AuthNConfigs) GetActive() string
func (*AuthNConfigs) GetConfigs ¶
func (x *AuthNConfigs) GetConfigs() []*v1.AuthN
func (*AuthNConfigs) GetDefault ¶
func (x *AuthNConfigs) GetDefault() string
func (*AuthNConfigs) ProtoMessage ¶
func (*AuthNConfigs) ProtoMessage()
func (*AuthNConfigs) ProtoReflect ¶
func (x *AuthNConfigs) ProtoReflect() protoreflect.Message
func (*AuthNConfigs) Reset ¶
func (x *AuthNConfigs) Reset()
func (*AuthNConfigs) String ¶
func (x *AuthNConfigs) String() string
func (*AuthNConfigs) Validate ¶
func (m *AuthNConfigs) Validate() error
Validate checks the field values on AuthNConfigs with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*AuthNConfigs) ValidateAll ¶
func (m *AuthNConfigs) ValidateAll() error
ValidateAll checks the field values on AuthNConfigs with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in AuthNConfigsMultiError, or nil if none found.
type AuthNConfigsMultiError ¶
type AuthNConfigsMultiError []error
AuthNConfigsMultiError is an error wrapping multiple validation errors returned by AuthNConfigs.ValidateAll() if the designated constraints aren't met.
func (AuthNConfigsMultiError) AllErrors ¶
func (m AuthNConfigsMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AuthNConfigsMultiError) Error ¶
func (m AuthNConfigsMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AuthNConfigsValidationError ¶
type AuthNConfigsValidationError struct {
// contains filtered or unexported fields
}
AuthNConfigsValidationError is the validation error returned by AuthNConfigs.Validate if the designated constraints aren't met.
func (AuthNConfigsValidationError) Cause ¶
func (e AuthNConfigsValidationError) Cause() error
Cause function returns cause value.
func (AuthNConfigsValidationError) Error ¶
func (e AuthNConfigsValidationError) Error() string
Error satisfies the builtin error interface
func (AuthNConfigsValidationError) ErrorName ¶
func (e AuthNConfigsValidationError) ErrorName() string
ErrorName returns error name.
func (AuthNConfigsValidationError) Field ¶
func (e AuthNConfigsValidationError) Field() string
Field function returns field value.
func (AuthNConfigsValidationError) Key ¶
func (e AuthNConfigsValidationError) Key() bool
Key function returns key value.
func (AuthNConfigsValidationError) Reason ¶
func (e AuthNConfigsValidationError) Reason() string
Reason function returns reason value.
type AuthZConfigs ¶
type AuthZConfigs struct {
Default *string `protobuf:"bytes,1,opt,name=default,proto3,oneof" json:"default,omitempty"`
Active *string `protobuf:"bytes,2,opt,name=active,proto3,oneof" json:"active,omitempty"`
Configs []*v11.AuthZ `protobuf:"bytes,3,rep,name=configs,proto3" json:"configs,omitempty"`
// contains filtered or unexported fields
}
func (*AuthZConfigs) Descriptor
deprecated
func (*AuthZConfigs) Descriptor() ([]byte, []int)
Deprecated: Use AuthZConfigs.ProtoReflect.Descriptor instead.
func (*AuthZConfigs) GetActive ¶
func (x *AuthZConfigs) GetActive() string
func (*AuthZConfigs) GetConfigs ¶
func (x *AuthZConfigs) GetConfigs() []*v11.AuthZ
func (*AuthZConfigs) GetDefault ¶
func (x *AuthZConfigs) GetDefault() string
func (*AuthZConfigs) ProtoMessage ¶
func (*AuthZConfigs) ProtoMessage()
func (*AuthZConfigs) ProtoReflect ¶
func (x *AuthZConfigs) ProtoReflect() protoreflect.Message
func (*AuthZConfigs) Reset ¶
func (x *AuthZConfigs) Reset()
func (*AuthZConfigs) String ¶
func (x *AuthZConfigs) String() string
func (*AuthZConfigs) Validate ¶
func (m *AuthZConfigs) Validate() error
Validate checks the field values on AuthZConfigs with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*AuthZConfigs) ValidateAll ¶
func (m *AuthZConfigs) ValidateAll() error
ValidateAll checks the field values on AuthZConfigs with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in AuthZConfigsMultiError, or nil if none found.
type AuthZConfigsMultiError ¶
type AuthZConfigsMultiError []error
AuthZConfigsMultiError is an error wrapping multiple validation errors returned by AuthZConfigs.ValidateAll() if the designated constraints aren't met.
func (AuthZConfigsMultiError) AllErrors ¶
func (m AuthZConfigsMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AuthZConfigsMultiError) Error ¶
func (m AuthZConfigsMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AuthZConfigsValidationError ¶
type AuthZConfigsValidationError struct {
// contains filtered or unexported fields
}
AuthZConfigsValidationError is the validation error returned by AuthZConfigs.Validate if the designated constraints aren't met.
func (AuthZConfigsValidationError) Cause ¶
func (e AuthZConfigsValidationError) Cause() error
Cause function returns cause value.
func (AuthZConfigsValidationError) Error ¶
func (e AuthZConfigsValidationError) Error() string
Error satisfies the builtin error interface
func (AuthZConfigsValidationError) ErrorName ¶
func (e AuthZConfigsValidationError) ErrorName() string
ErrorName returns error name.
func (AuthZConfigsValidationError) Field ¶
func (e AuthZConfigsValidationError) Field() string
Field function returns field value.
func (AuthZConfigsValidationError) Key ¶
func (e AuthZConfigsValidationError) Key() bool
Key function returns key value.
func (AuthZConfigsValidationError) Reason ¶
func (e AuthZConfigsValidationError) Reason() string
Reason function returns reason value.
type Security ¶
type Security struct {
// List of authentication configurations.
AuthnConfigs *AuthNConfigs `protobuf:"bytes,1,opt,name=authn_configs,proto3" json:"authn_configs,omitempty"`
// List of authorization configurations.
AuthzConfigs *AuthZConfigs `protobuf:"bytes,2,opt,name=authz_configs,proto3" json:"authz_configs,omitempty"`
// List of transport layer security (TLS) configurations.
TransportSecurityConfigs *TransportSecurityConfigs `protobuf:"bytes,3,opt,name=transport_security_configs,proto3" json:"transport_security_configs,omitempty"`
// contains filtered or unexported fields
}
Security defines the top-level configuration for all security-related components.
func (*Security) Descriptor
deprecated
func (*Security) GetAuthnConfigs ¶
func (x *Security) GetAuthnConfigs() *AuthNConfigs
func (*Security) GetAuthzConfigs ¶
func (x *Security) GetAuthzConfigs() *AuthZConfigs
func (*Security) GetTransportSecurityConfigs ¶
func (x *Security) GetTransportSecurityConfigs() *TransportSecurityConfigs
func (*Security) ProtoMessage ¶
func (*Security) ProtoMessage()
func (*Security) ProtoReflect ¶
func (x *Security) ProtoReflect() protoreflect.Message
func (*Security) Validate ¶
Validate checks the field values on Security with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Security) ValidateAll ¶
ValidateAll checks the field values on Security with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SecurityMultiError, or nil if none found.
type SecurityErrorReason ¶
type SecurityErrorReason int32
SecurityErrorReason defines the application's specific security error codes. These codes supplement the common error codes and provide more specific details for authentication and authorization failures.
const ( // The default, unspecified reason. This is required by proto3 syntax. SecurityErrorReason_SECURITY_ERROR_REASON_UNSPECIFIED SecurityErrorReason = 0 // The provided credentials (e.g., username/password) are invalid. SecurityErrorReason_INVALID_CREDENTIALS SecurityErrorReason = 1002 // The authentication token has expired. SecurityErrorReason_TOKEN_EXPIRED SecurityErrorReason = 1003 // The authentication token is malformed or invalid. SecurityErrorReason_TOKEN_INVALID SecurityErrorReason = 1004 // The authentication token is missing from the request. SecurityErrorReason_TOKEN_MISSING SecurityErrorReason = 1005 // The claims within the token are invalid. SecurityErrorReason_INVALID_CLAIMS SecurityErrorReason = 1006 // The bearer token is specifically invalid or malformed. SecurityErrorReason_INVALID_BEARER_TOKEN SecurityErrorReason = 1007 // The signing method used in the token is not supported. SecurityErrorReason_UNSUPPORTED_SIGNING_METHOD SecurityErrorReason = 1008 // Failed to sign a new token. SecurityErrorReason_SIGN_TOKEN_FAILED SecurityErrorReason = 1009 // The user is authenticated but does not have permission for the specific resource or action. SecurityErrorReason_INVALID_AUTHORIZATION SecurityErrorReason = 2000 )
func (SecurityErrorReason) Descriptor ¶
func (SecurityErrorReason) Descriptor() protoreflect.EnumDescriptor
func (SecurityErrorReason) Enum ¶
func (x SecurityErrorReason) Enum() *SecurityErrorReason
func (SecurityErrorReason) EnumDescriptor
deprecated
func (SecurityErrorReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use SecurityErrorReason.Descriptor instead.
func (SecurityErrorReason) Number ¶
func (x SecurityErrorReason) Number() protoreflect.EnumNumber
func (SecurityErrorReason) String ¶
func (x SecurityErrorReason) String() string
func (SecurityErrorReason) Type ¶
func (SecurityErrorReason) Type() protoreflect.EnumType
type SecurityMultiError ¶
type SecurityMultiError []error
SecurityMultiError is an error wrapping multiple validation errors returned by Security.ValidateAll() if the designated constraints aren't met.
func (SecurityMultiError) AllErrors ¶
func (m SecurityMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SecurityMultiError) Error ¶
func (m SecurityMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SecurityValidationError ¶
type SecurityValidationError struct {
// contains filtered or unexported fields
}
SecurityValidationError is the validation error returned by Security.Validate if the designated constraints aren't met.
func (SecurityValidationError) Cause ¶
func (e SecurityValidationError) Cause() error
Cause function returns cause value.
func (SecurityValidationError) Error ¶
func (e SecurityValidationError) Error() string
Error satisfies the builtin error interface
func (SecurityValidationError) ErrorName ¶
func (e SecurityValidationError) ErrorName() string
ErrorName returns error name.
func (SecurityValidationError) Field ¶
func (e SecurityValidationError) Field() string
Field function returns field value.
func (SecurityValidationError) Key ¶
func (e SecurityValidationError) Key() bool
Key function returns key value.
func (SecurityValidationError) Reason ¶
func (e SecurityValidationError) Reason() string
Reason function returns reason value.
type TransportSecurityConfigs ¶
type TransportSecurityConfigs struct {
Default *string `protobuf:"bytes,1,opt,name=default,proto3,oneof" json:"default,omitempty"`
Active *string `protobuf:"bytes,2,opt,name=active,proto3,oneof" json:"active,omitempty"`
Configs []*v12.TLSConfig `protobuf:"bytes,3,rep,name=configs,proto3" json:"configs,omitempty"`
// contains filtered or unexported fields
}
func (*TransportSecurityConfigs) Descriptor
deprecated
func (*TransportSecurityConfigs) Descriptor() ([]byte, []int)
Deprecated: Use TransportSecurityConfigs.ProtoReflect.Descriptor instead.
func (*TransportSecurityConfigs) GetActive ¶
func (x *TransportSecurityConfigs) GetActive() string
func (*TransportSecurityConfigs) GetConfigs ¶
func (x *TransportSecurityConfigs) GetConfigs() []*v12.TLSConfig
func (*TransportSecurityConfigs) GetDefault ¶
func (x *TransportSecurityConfigs) GetDefault() string
func (*TransportSecurityConfigs) ProtoMessage ¶
func (*TransportSecurityConfigs) ProtoMessage()
func (*TransportSecurityConfigs) ProtoReflect ¶
func (x *TransportSecurityConfigs) ProtoReflect() protoreflect.Message
func (*TransportSecurityConfigs) Reset ¶
func (x *TransportSecurityConfigs) Reset()
func (*TransportSecurityConfigs) String ¶
func (x *TransportSecurityConfigs) String() string
func (*TransportSecurityConfigs) Validate ¶
func (m *TransportSecurityConfigs) Validate() error
Validate checks the field values on TransportSecurityConfigs with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*TransportSecurityConfigs) ValidateAll ¶
func (m *TransportSecurityConfigs) ValidateAll() error
ValidateAll checks the field values on TransportSecurityConfigs with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in TransportSecurityConfigsMultiError, or nil if none found.
type TransportSecurityConfigsMultiError ¶
type TransportSecurityConfigsMultiError []error
TransportSecurityConfigsMultiError is an error wrapping multiple validation errors returned by TransportSecurityConfigs.ValidateAll() if the designated constraints aren't met.
func (TransportSecurityConfigsMultiError) AllErrors ¶
func (m TransportSecurityConfigsMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (TransportSecurityConfigsMultiError) Error ¶
func (m TransportSecurityConfigsMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type TransportSecurityConfigsValidationError ¶
type TransportSecurityConfigsValidationError struct {
// contains filtered or unexported fields
}
TransportSecurityConfigsValidationError is the validation error returned by TransportSecurityConfigs.Validate if the designated constraints aren't met.
func (TransportSecurityConfigsValidationError) Cause ¶
func (e TransportSecurityConfigsValidationError) Cause() error
Cause function returns cause value.
func (TransportSecurityConfigsValidationError) Error ¶
func (e TransportSecurityConfigsValidationError) Error() string
Error satisfies the builtin error interface
func (TransportSecurityConfigsValidationError) ErrorName ¶
func (e TransportSecurityConfigsValidationError) ErrorName() string
ErrorName returns error name.
func (TransportSecurityConfigsValidationError) Field ¶
func (e TransportSecurityConfigsValidationError) Field() string
Field function returns field value.
func (TransportSecurityConfigsValidationError) Key ¶
func (e TransportSecurityConfigsValidationError) Key() bool
Key function returns key value.
func (TransportSecurityConfigsValidationError) Reason ¶
func (e TransportSecurityConfigsValidationError) Reason() string
Reason function returns reason value.