Documentation
¶
Index ¶
- Variables
- func NewHeaders(headers map[string][]string) map[string]*HeaderValues
- type GrpcRequest
- func (*GrpcRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GrpcRequest) GetHeaders() map[string]*HeaderValues
- func (x *GrpcRequest) GetJwt() *JWT
- func (x *GrpcRequest) GetMethod() string
- func (x *GrpcRequest) GetService() string
- func (x *GrpcRequest) GetTls() *TLS
- func (*GrpcRequest) ProtoMessage()
- func (x *GrpcRequest) ProtoReflect() protoreflect.Message
- func (x *GrpcRequest) Reset()
- func (x *GrpcRequest) String() string
- type HeaderValues
- type HttpRequest
- func (*HttpRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HttpRequest) GetHeaders() map[string]string
- func (x *HttpRequest) GetHost() string
- func (x *HttpRequest) GetJwt() *JWT
- func (x *HttpRequest) GetMethod() string
- func (x *HttpRequest) GetPath() string
- func (x *HttpRequest) GetProtocol() string
- func (x *HttpRequest) GetQuery() string
- func (x *HttpRequest) GetScheme() string
- func (x *HttpRequest) GetSize() int64
- func (x *HttpRequest) GetTls() *TLS
- func (*HttpRequest) ProtoMessage()
- func (x *HttpRequest) ProtoReflect() protoreflect.Message
- func (x *HttpRequest) Reset()
- func (x *HttpRequest) String() string
- type JWT
- func (*JWT) Descriptor() ([]byte, []int)deprecated
- func (x *JWT) GetAudience() []string
- func (x *JWT) GetEmail() string
- func (x *JWT) GetEmailVerified() bool
- func (x *JWT) GetExpiry() *timestamppb.Timestamp
- func (x *JWT) GetGroups() []string
- func (x *JWT) GetIssuedAt() *timestamppb.Timestamp
- func (x *JWT) GetIssuer() string
- func (x *JWT) GetSubject() string
- func (*JWT) ProtoMessage()
- func (x *JWT) ProtoReflect() protoreflect.Message
- func (x *JWT) Reset()
- func (x *JWT) String() string
- type TLS
- func (*TLS) Descriptor() ([]byte, []int)deprecated
- func (x *TLS) GetDnsNames() []string
- func (x *TLS) GetEmailAddresses() []string
- func (x *TLS) GetIpAddresses() []string
- func (x *TLS) GetIsCa() bool
- func (x *TLS) GetIssuer() *TLSName
- func (x *TLS) GetNotAfter() *timestamppb.Timestamp
- func (x *TLS) GetNotBefore() *timestamppb.Timestamp
- func (x *TLS) GetSerialNumber() uint64
- func (x *TLS) GetSubject() *TLSName
- func (x *TLS) GetUris() []string
- func (x *TLS) GetVersion() uint64
- func (*TLS) ProtoMessage()
- func (x *TLS) ProtoReflect() protoreflect.Message
- func (x *TLS) Reset()
- func (x *TLS) String() string
- type TLSName
- func (*TLSName) Descriptor() ([]byte, []int)deprecated
- func (x *TLSName) GetCommonName() string
- func (x *TLSName) GetCountry() []string
- func (x *TLSName) GetLocality() []string
- func (x *TLSName) GetOrganization() []string
- func (x *TLSName) GetOrganizationalUnit() []string
- func (x *TLSName) GetPostalCode() []string
- func (x *TLSName) GetProvince() []string
- func (x *TLSName) GetSerialNumber() string
- func (x *TLSName) GetStreetAddress() []string
- func (*TLSName) ProtoMessage()
- func (x *TLSName) ProtoReflect() protoreflect.Message
- func (x *TLSName) Reset()
- func (x *TLSName) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_schema_proto protoreflect.FileDescriptor
Functions ¶
func NewHeaders ¶
func NewHeaders(headers map[string][]string) map[string]*HeaderValues
Types ¶
type GrpcRequest ¶
type GrpcRequest struct {
// The GRPC service name: eg grpc.health.v1.Health
Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
// The method name, eg Check
Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
// The GRPC request metadata. Key values have been made canonical
// by golangs net/http.CanonicalHeaderKey
Headers map[string]*HeaderValues `` /* 155-byte string literal not displayed */
// The TLS information. May be absent for non TLS protected requests.
Tls *TLS `protobuf:"bytes,4,opt,name=tls,proto3" json:"tls,omitempty"`
// The jwt passed into the request. May be absent.
Jwt *JWT `protobuf:"bytes,5,opt,name=jwt,proto3" json:"jwt,omitempty"`
// contains filtered or unexported fields
}
func (*GrpcRequest) Descriptor
deprecated
func (*GrpcRequest) Descriptor() ([]byte, []int)
Deprecated: Use GrpcRequest.ProtoReflect.Descriptor instead.
func (*GrpcRequest) GetHeaders ¶
func (x *GrpcRequest) GetHeaders() map[string]*HeaderValues
func (*GrpcRequest) GetJwt ¶
func (x *GrpcRequest) GetJwt() *JWT
func (*GrpcRequest) GetMethod ¶
func (x *GrpcRequest) GetMethod() string
func (*GrpcRequest) GetService ¶
func (x *GrpcRequest) GetService() string
func (*GrpcRequest) GetTls ¶
func (x *GrpcRequest) GetTls() *TLS
func (*GrpcRequest) ProtoMessage ¶
func (*GrpcRequest) ProtoMessage()
func (*GrpcRequest) ProtoReflect ¶
func (x *GrpcRequest) ProtoReflect() protoreflect.Message
func (*GrpcRequest) Reset ¶
func (x *GrpcRequest) Reset()
func (*GrpcRequest) String ¶
func (x *GrpcRequest) String() string
type HeaderValues ¶
type HeaderValues struct {
Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
func (*HeaderValues) Descriptor
deprecated
func (*HeaderValues) Descriptor() ([]byte, []int)
Deprecated: Use HeaderValues.ProtoReflect.Descriptor instead.
func (*HeaderValues) GetValue ¶
func (x *HeaderValues) GetValue() []string
func (*HeaderValues) ProtoMessage ¶
func (*HeaderValues) ProtoMessage()
func (*HeaderValues) ProtoReflect ¶
func (x *HeaderValues) ProtoReflect() protoreflect.Message
func (*HeaderValues) Reset ¶
func (x *HeaderValues) Reset()
func (*HeaderValues) String ¶
func (x *HeaderValues) String() string
type HttpRequest ¶
type HttpRequest struct {
// The HTTP request method, such as `GET`, `POST`
Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
// The HTTP request headers. Header names are made canonical
// by golangs net/http.CanonicalHeaderKey
Headers map[string]string `` /* 155-byte string literal not displayed */
// The HTTP URL path
Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
// The HTTP request `Host`
Host string `protobuf:"bytes,4,opt,name=host,proto3" json:"host,omitempty"`
// The HTTP URL scheme, such as `http` or `https`
Scheme string `protobuf:"bytes,5,opt,name=scheme,proto3" json:"scheme,omitempty"`
// The HTTP URL query in the format of `name1=value1&name2=value2`, as it
// appears in the first line of the HTTP request. No decoding is performed
// TODO: maybe decode this for ease of use in the CEL rule?
Query string `protobuf:"bytes,6,opt,name=query,proto3" json:"query,omitempty"`
// The HTTP request size in bytes. If unkown, it will be -1
Size int64 `protobuf:"varint,7,opt,name=size,proto3" json:"size,omitempty"`
// The network protocol used with the request, such as "http/1.1"
// "spdy/3", "h2", "h2c", "webrtc", "tcp", "udp", "quick", See
// https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
Protocol string `protobuf:"bytes,8,opt,name=protocol,proto3" json:"protocol,omitempty"`
// The TLS information. May be absent for non TLS protected requests.
Tls *TLS `protobuf:"bytes,9,opt,name=tls,proto3" json:"tls,omitempty"`
// The jwt passed into the request. May be absent.
Jwt *JWT `protobuf:"bytes,10,opt,name=jwt,proto3" json:"jwt,omitempty"`
// contains filtered or unexported fields
}
func (*HttpRequest) Descriptor
deprecated
func (*HttpRequest) Descriptor() ([]byte, []int)
Deprecated: Use HttpRequest.ProtoReflect.Descriptor instead.
func (*HttpRequest) GetHeaders ¶
func (x *HttpRequest) GetHeaders() map[string]string
func (*HttpRequest) GetHost ¶
func (x *HttpRequest) GetHost() string
func (*HttpRequest) GetJwt ¶
func (x *HttpRequest) GetJwt() *JWT
func (*HttpRequest) GetMethod ¶
func (x *HttpRequest) GetMethod() string
func (*HttpRequest) GetPath ¶
func (x *HttpRequest) GetPath() string
func (*HttpRequest) GetProtocol ¶
func (x *HttpRequest) GetProtocol() string
func (*HttpRequest) GetQuery ¶
func (x *HttpRequest) GetQuery() string
func (*HttpRequest) GetScheme ¶
func (x *HttpRequest) GetScheme() string
func (*HttpRequest) GetSize ¶
func (x *HttpRequest) GetSize() int64
func (*HttpRequest) GetTls ¶
func (x *HttpRequest) GetTls() *TLS
func (*HttpRequest) ProtoMessage ¶
func (*HttpRequest) ProtoMessage()
func (*HttpRequest) ProtoReflect ¶
func (x *HttpRequest) ProtoReflect() protoreflect.Message
func (*HttpRequest) Reset ¶
func (x *HttpRequest) Reset()
func (*HttpRequest) String ¶
func (x *HttpRequest) String() string
type JWT ¶
type JWT struct {
Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"`
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
EmailVerified bool `protobuf:"varint,3,opt,name=email_verified,json=emailVerified,proto3" json:"email_verified,omitempty"`
Groups []string `protobuf:"bytes,4,rep,name=groups,proto3" json:"groups,omitempty"`
Issuer string `protobuf:"bytes,5,opt,name=issuer,proto3" json:"issuer,omitempty"`
Audience []string `protobuf:"bytes,6,rep,name=audience,proto3" json:"audience,omitempty"`
IssuedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=issued_at,json=issuedAt,proto3" json:"issued_at,omitempty"`
Expiry *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=expiry,proto3" json:"expiry,omitempty"`
// contains filtered or unexported fields
}
func (*JWT) Descriptor
deprecated
func (*JWT) GetAudience ¶
func (*JWT) GetEmailVerified ¶
func (*JWT) GetExpiry ¶
func (x *JWT) GetExpiry() *timestamppb.Timestamp
func (*JWT) GetIssuedAt ¶
func (x *JWT) GetIssuedAt() *timestamppb.Timestamp
func (*JWT) GetSubject ¶
func (*JWT) ProtoMessage ¶
func (*JWT) ProtoMessage()
func (*JWT) ProtoReflect ¶
func (x *JWT) ProtoReflect() protoreflect.Message
type TLS ¶
type TLS struct {
Version uint64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
SerialNumber uint64 `protobuf:"varint,2,opt,name=serial_number,json=serialNumber,proto3" json:"serial_number,omitempty"`
Issuer *TLSName `protobuf:"bytes,3,opt,name=issuer,proto3" json:"issuer,omitempty"`
Subject *TLSName `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"`
NotBefore *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=not_before,json=notBefore,proto3" json:"not_before,omitempty"`
NotAfter *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=not_after,json=notAfter,proto3" json:"not_after,omitempty"`
IsCa bool `protobuf:"varint,7,opt,name=is_ca,json=isCa,proto3" json:"is_ca,omitempty"`
// SAN values
DnsNames []string `protobuf:"bytes,8,rep,name=dns_names,json=dnsNames,proto3" json:"dns_names,omitempty"`
EmailAddresses []string `protobuf:"bytes,9,rep,name=email_addresses,json=emailAddresses,proto3" json:"email_addresses,omitempty"`
IpAddresses []string `protobuf:"bytes,10,rep,name=ip_addresses,json=ipAddresses,proto3" json:"ip_addresses,omitempty"`
Uris []string `protobuf:"bytes,11,rep,name=uris,proto3" json:"uris,omitempty"`
// contains filtered or unexported fields
}
func NewTLS ¶
func NewTLS(cert *x509.Certificate) *TLS
func (*TLS) Descriptor
deprecated
func (*TLS) GetDnsNames ¶
func (*TLS) GetEmailAddresses ¶
func (*TLS) GetIpAddresses ¶
func (*TLS) GetNotAfter ¶
func (x *TLS) GetNotAfter() *timestamppb.Timestamp
func (*TLS) GetNotBefore ¶
func (x *TLS) GetNotBefore() *timestamppb.Timestamp
func (*TLS) GetSerialNumber ¶
func (*TLS) GetSubject ¶
func (*TLS) GetVersion ¶
func (*TLS) ProtoMessage ¶
func (*TLS) ProtoMessage()
func (*TLS) ProtoReflect ¶
func (x *TLS) ProtoReflect() protoreflect.Message
type TLSName ¶
type TLSName struct {
Country []string `protobuf:"bytes,1,rep,name=country,proto3" json:"country,omitempty"`
Organization []string `protobuf:"bytes,2,rep,name=organization,proto3" json:"organization,omitempty"`
OrganizationalUnit []string `protobuf:"bytes,3,rep,name=organizational_unit,json=organizationalUnit,proto3" json:"organizational_unit,omitempty"`
Locality []string `protobuf:"bytes,4,rep,name=locality,proto3" json:"locality,omitempty"`
Province []string `protobuf:"bytes,5,rep,name=province,proto3" json:"province,omitempty"`
StreetAddress []string `protobuf:"bytes,6,rep,name=street_address,json=streetAddress,proto3" json:"street_address,omitempty"`
PostalCode []string `protobuf:"bytes,7,rep,name=postal_code,json=postalCode,proto3" json:"postal_code,omitempty"`
SerialNumber string `protobuf:"bytes,8,opt,name=serial_number,json=serialNumber,proto3" json:"serial_number,omitempty"`
CommonName string `protobuf:"bytes,9,opt,name=common_name,json=commonName,proto3" json:"common_name,omitempty"`
// contains filtered or unexported fields
}
func (*TLSName) Descriptor
deprecated
func (*TLSName) GetCommonName ¶
func (*TLSName) GetCountry ¶
func (*TLSName) GetLocality ¶
func (*TLSName) GetOrganization ¶
func (*TLSName) GetOrganizationalUnit ¶
func (*TLSName) GetPostalCode ¶
func (*TLSName) GetProvince ¶
func (*TLSName) GetSerialNumber ¶
func (*TLSName) GetStreetAddress ¶
func (*TLSName) ProtoMessage ¶
func (*TLSName) ProtoMessage()
func (*TLSName) ProtoReflect ¶
func (x *TLSName) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.