Documentation
¶
Index ¶
- Variables
- type Generic
- func (x *Generic) ClearCredential()
- func (x *Generic) GetCredential() *v3.SdsSecretConfig
- func (x *Generic) GetHeader() string
- func (x *Generic) GetHeaderValuePrefix() string
- func (x *Generic) HasCredential() bool
- func (*Generic) ProtoMessage()
- func (x *Generic) ProtoReflect() protoreflect.Message
- func (x *Generic) Reset()
- func (x *Generic) SetCredential(v *v3.SdsSecretConfig)
- func (x *Generic) SetHeader(v string)
- func (x *Generic) SetHeaderValuePrefix(v string)
- func (x *Generic) String() string
- type Generic_builder
Constants ¶
This section is empty.
Variables ¶
View Source
var File_envoy_extensions_http_injected_credentials_generic_v3_generic_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Generic ¶
type Generic struct {
// The SDS configuration for the credential that will be injected to the specified HTTP request header.
// It must be a generic secret.
Credential *v3.SdsSecretConfig `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"`
// The header that will be injected to the HTTP request with the provided credential.
// If not set, filter will default to: “Authorization“
Header string `protobuf:"bytes,2,opt,name=header,proto3" json:"header,omitempty"`
// The prefix to prepend to the credential value before injecting it into the header.
// This is useful for adding a scheme such as “Bearer “ or “Basic “ to the credential.
// For example, if the credential is “xyz123“ and the prefix is “Bearer “, the
// final header value will be “Bearer xyz123“.
// If not set, the raw credential value will be injected without any prefix.
HeaderValuePrefix string `protobuf:"bytes,3,opt,name=header_value_prefix,json=headerValuePrefix,proto3" json:"header_value_prefix,omitempty"`
// contains filtered or unexported fields
}
Generic extension can be used to inject HTTP Basic Auth, Bearer Token, or any arbitrary credential into the proxied requests. The credential will be injected into the specified HTTP request header. Refer to [RFC 6750: The OAuth 2.0 Authorization Framework: Bearer Token Usage](https://www.rfc-editor.org/rfc/rfc6750) for details.
func (*Generic) GetCredential ¶
func (x *Generic) GetCredential() *v3.SdsSecretConfig
func (*Generic) ProtoReflect ¶
func (x *Generic) ProtoReflect() protoreflect.Message
func (*Generic) SetCredential ¶
func (x *Generic) SetCredential(v *v3.SdsSecretConfig)
type Generic_builder ¶
type Generic_builder struct {
// The SDS configuration for the credential that will be injected to the specified HTTP request header.
// It must be a generic secret.
Credential *v3.SdsSecretConfig
// The header that will be injected to the HTTP request with the provided credential.
// If not set, filter will default to: “Authorization“
Header string
// The prefix to prepend to the credential value before injecting it into the header.
// This is useful for adding a scheme such as “Bearer “ or “Basic “ to the credential.
// For example, if the credential is “xyz123“ and the prefix is “Bearer “, the
// final header value will be “Bearer xyz123“.
// If not set, the raw credential value will be injected without any prefix.
HeaderValuePrefix string
// contains filtered or unexported fields
}
func (Generic_builder) Build ¶
func (b0 Generic_builder) Build() *Generic
Source Files
¶
- generic.pb.go
Click to show internal directories.
Click to hide internal directories.