package
2.0.1+incompatible
Repository: https://github.com/snapp-incubator/cerberus.git
Documentation: pkg.go.dev

# README

v1alpha1

import "github.com/snapp-incubator/Cerberus/api/v1alpha1"

Package v1alpha1 contains API Schema definitions for the cerberus v1alpha1 API group +kubebuilder:object:generate=true +groupName=cerberus.snappcloud.io

Index

Variables

var (
    // GroupVersion is group version used to register these objects
    GroupVersion = schema.GroupVersion{Group: "cerberus.snappcloud.io", Version: "v1alpha1"}

    // SchemeBuilder is used to add go types to the GroupVersionKind scheme
    SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

    // AddToScheme adds the types in this group-version to the given scheme.
    AddToScheme = SchemeBuilder.AddToScheme
)

type AccessToken

AccessToken is the Schema for the accesstokens API

type AccessToken struct {
    metav1.TypeMeta   `json:",inline"`
    metav1.ObjectMeta `json:"metadata,omitempty"`

    Spec   AccessTokenSpec   `json:"spec,omitempty"`
    Status AccessTokenStatus `json:"status,omitempty"`
}

func (*AccessToken) DeepCopy

func (in *AccessToken) DeepCopy() *AccessToken

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessToken.

func (*AccessToken) DeepCopyInto

func (in *AccessToken) DeepCopyInto(out *AccessToken)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AccessToken) DeepCopyObject

func (in *AccessToken) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type AccessTokenList

AccessTokenList contains a list of AccessToken

type AccessTokenList struct {
    metav1.TypeMeta `json:",inline"`
    metav1.ListMeta `json:"metadata,omitempty"`
    Items           []AccessToken `json:"items"`
}

func (*AccessTokenList) DeepCopy

func (in *AccessTokenList) DeepCopy() *AccessTokenList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessTokenList.

func (*AccessTokenList) DeepCopyInto

func (in *AccessTokenList) DeepCopyInto(out *AccessTokenList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AccessTokenList) DeepCopyObject

func (in *AccessTokenList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type AccessTokenSpec

AccessTokenSpec defines the desired state of AccessToken

type AccessTokenSpec struct {

    // State shows the state of the token (whether use token or it's just a draft)
    // Valid values are:
    // - "Active" (default): uses token in authorization procedure
    // - "Expired": won't include token in authorization procedure
    // - "Suspended": shows that the token is currently not usable but it may become Active later
    // +optional
    State AccessTokenState `json:"active,omitempty"`

    // IP Allow List is a list of IP and IP CIDRs that will be tested against X-Forwarded-For
    // +optional
    IpAllowList []string `json:"ipAllowList,omitempty"`

    // Domain Allow list is a list of Domain glob patterns that will be tested against Referer header
    // +optional
    DomainAllowList []string `json:"domainAllowList,omitempty"`

    // Secret Ref points to secret containing the API Key secret
    // if it exists it will use the token value in it and will create a new secret if not exists
    TokenSecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty"`
}

func (*AccessTokenSpec) DeepCopy

func (in *AccessTokenSpec) DeepCopy() *AccessTokenSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessTokenSpec.

func (*AccessTokenSpec) DeepCopyInto

func (in *AccessTokenSpec) DeepCopyInto(out *AccessTokenSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AccessTokenState

AccessTokenState describes the state of the token and shows if it should be included in authorization or not +kubebuilder:validation:Enum=Active;Expired;Suspended

type AccessTokenState string

const (
    // Cerberus will allow access to the token
    ActiveState AccessTokenState = "Active"

    // Cerberus won't include the token and user needs to generate new one
    ExpiredState AccessTokenState = "Expired"

    // Cerberus won't include the token but it may become Active again
    SuspendedState AccessTokenState = "Suspended"
)

type AccessTokenStatus

AccessTokenStatus defines the observed state of AccessToken

type AccessTokenStatus struct {
}

func (*AccessTokenStatus) DeepCopy

func (in *AccessTokenStatus) DeepCopy() *AccessTokenStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessTokenStatus.

func (*AccessTokenStatus) DeepCopyInto

func (in *AccessTokenStatus) DeepCopyInto(out *AccessTokenStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UpstreamHttpAuthService

type UpstreamHttpAuthService struct {
    // Address of the upstream authentication service
    Address string `json:"address,omitempty"`

    // +kubebuilder:default=Authorization
    // ReadTokenFrom specifies which header contains the upstream Auth token in the request
    ReadTokenFrom string `json:"readTokenFrom"`

    // +kubebuilder:default=Authorization
    // WriteTokenTo specifies which header should carry token to upstream service
    WriteTokenTo string `json:"writeTokenTo"`
}

type WebService

WebService is the Schema for the webservices API

type WebService struct {
    metav1.TypeMeta   `json:",inline"`
    metav1.ObjectMeta `json:"metadata,omitempty"`

    Spec   WebServiceSpec   `json:"spec,omitempty"`
    Status WebServiceStatus `json:"status,omitempty"`
}

func (*WebService) DeepCopy

func (in *WebService) DeepCopy() *WebService

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebService.

func (*WebService) DeepCopyInto

func (in *WebService) DeepCopyInto(out *WebService)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WebService) DeepCopyObject

func (in *WebService) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type WebServiceList

WebServiceList contains a list of WebService

type WebServiceList struct {
    metav1.TypeMeta `json:",inline"`
    metav1.ListMeta `json:"metadata,omitempty"`
    Items           []WebService `json:"items"`
}

func (*WebServiceList) DeepCopy

func (in *WebServiceList) DeepCopy() *WebServiceList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebServiceList.

func (*WebServiceList) DeepCopyInto

func (in *WebServiceList) DeepCopyInto(out *WebServiceList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WebServiceList) DeepCopyObject

func (in *WebServiceList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type WebServiceSpec

WebServiceSpec defines the desired state of WebService

type WebServiceSpec struct {

    // LookupHeader tells Cerberus which header should be used as Webservice name for the authentication
    LookupHeader string `json:"lookupHeader,omitempty"`

    // UpstreamHttpAuth tells Cerberus whether it needs to forward
    // authentication to another (HTTP) service or not
    // +optional
    UpstreamHttpAuth UpstreamHttpAuthService `json:"upstreamHttpAuth"`
}

func (*WebServiceSpec) DeepCopy

func (in *WebServiceSpec) DeepCopy() *WebServiceSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebServiceSpec.

func (*WebServiceSpec) DeepCopyInto

func (in *WebServiceSpec) DeepCopyInto(out *WebServiceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WebServiceStatus

WebServiceStatus defines the observed state of WebService

type WebServiceStatus struct {
}

func (*WebServiceStatus) DeepCopy

func (in *WebServiceStatus) DeepCopy() *WebServiceStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebServiceStatus.

func (*WebServiceStatus) DeepCopyInto

func (in *WebServiceStatus) DeepCopyInto(out *WebServiceStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WebserviceAccessBinding

WebserviceAccessBinding is the Schema for the webserviceaccessbindings API

type WebserviceAccessBinding struct {
    metav1.TypeMeta   `json:",inline"`
    metav1.ObjectMeta `json:"metadata,omitempty"`

    Spec   WebserviceAccessBindingSpec   `json:"spec,omitempty"`
    Status WebserviceAccessBindingStatus `json:"status,omitempty"`
}

func (*WebserviceAccessBinding) DeepCopy

func (in *WebserviceAccessBinding) DeepCopy() *WebserviceAccessBinding

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebserviceAccessBinding.

func (*WebserviceAccessBinding) DeepCopyInto

func (in *WebserviceAccessBinding) DeepCopyInto(out *WebserviceAccessBinding)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WebserviceAccessBinding) DeepCopyObject

func (in *WebserviceAccessBinding) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type WebserviceAccessBindingList

WebserviceAccessBindingList contains a list of WebserviceAccessBinding

type WebserviceAccessBindingList struct {
    metav1.TypeMeta `json:",inline"`
    metav1.ListMeta `json:"metadata,omitempty"`
    Items           []WebserviceAccessBinding `json:"items"`
}

func (*WebserviceAccessBindingList) DeepCopy

func (in *WebserviceAccessBindingList) DeepCopy() *WebserviceAccessBindingList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebserviceAccessBindingList.

func (*WebserviceAccessBindingList) DeepCopyInto

func (in *WebserviceAccessBindingList) DeepCopyInto(out *WebserviceAccessBindingList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WebserviceAccessBindingList) DeepCopyObject

func (in *WebserviceAccessBindingList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type WebserviceAccessBindingSpec

WebserviceAccessBindingSpec defines the desired state of WebserviceAccessBinding

type WebserviceAccessBindingSpec struct {

    // Subjects are the name of AccessTokens which the access will be granted to
    Subjects []string `json:"subjects,omitempty"`

    // WebServices are the target service accesses
    Webservices []string `json:"webservices,omitempty"`
}

func (*WebserviceAccessBindingSpec) DeepCopy

func (in *WebserviceAccessBindingSpec) DeepCopy() *WebserviceAccessBindingSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebserviceAccessBindingSpec.

func (*WebserviceAccessBindingSpec) DeepCopyInto

func (in *WebserviceAccessBindingSpec) DeepCopyInto(out *WebserviceAccessBindingSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WebserviceAccessBindingStatus

WebserviceAccessBindingStatus defines the observed state of WebserviceAccessBinding

type WebserviceAccessBindingStatus struct {
}

func (*WebserviceAccessBindingStatus) DeepCopy

func (in *WebserviceAccessBindingStatus) DeepCopy() *WebserviceAccessBindingStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebserviceAccessBindingStatus.

func (*WebserviceAccessBindingStatus) DeepCopyInto

func (in *WebserviceAccessBindingStatus) DeepCopyInto(out *WebserviceAccessBindingStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Generated by gomarkdoc