Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the oathkeeper v1alpha1 API group +kubebuilder:object:generate=true +groupName=oathkeeper.ory.sh
Index ¶
- Constants
- Variables
- type Authenticator
- type Authorizer
- type Error
- type Handler
- type Match
- type Mutator
- type Rule
- type RuleJSON
- type RuleList
- func (in *RuleList) DeepCopy() *RuleList
- func (in *RuleList) DeepCopyInto(out *RuleList)
- func (in *RuleList) DeepCopyObject() runtime.Object
- func (rl RuleList) FilterConfigMapName(name *string) RuleList
- func (rl RuleList) FilterNotValid() RuleList
- func (rl RuleList) FilterOutRule(r Rule) RuleList
- func (rl RuleList) ToOathkeeperRules() ([]byte, error)
- type RuleSpec
- type RuleStatus
- type Upstream
- type UpstreamJSON
- type Validation
Constants ¶
const ( AuthenticatorsAvailableEnv = "authenticatorsAvailable" AuthorizersAvailableEnv = "authorizersAvailable" MutatorsAvailableEnv = "mutatorsAvailable" ErrorsAvailableEnv = "errorsAvailable" RulesFileNameRegexp = "\\A[-._a-zA-Z0-9]+\\z" )
Variables ¶
var ( DefaultAuthenticatorsAvailable = [...]string{"noop", "unauthorized", "anonymous", "cookie_session", "oauth2_client_credentials", "oauth2_introspection", "jwt", "bearer_token"} DefaultAuthorizersAvailable = [...]string{"allow", "deny", "keto_engine_acp_ory", "remote", "remote_json"} DefaultMutatorsAvailable = [...]string{"noop", "id_token", "header", "cookie", "hydrator"} DefaultErrorsAvailable = [...]string{"json", "redirect", "www_authenticate"} )
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "oathkeeper.ory.sh", 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 )
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator struct {
*Handler `json:",inline"`
}
Authenticator represents a handler that authenticates provided credentials.
func (*Authenticator) DeepCopy ¶
func (in *Authenticator) DeepCopy() *Authenticator
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Authenticator.
func (*Authenticator) DeepCopyInto ¶
func (in *Authenticator) DeepCopyInto(out *Authenticator)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Authorizer ¶
type Authorizer struct {
*Handler `json:",inline"`
}
Authorizer represents a handler that authorizes the subject ("user") from the previously validated credentials making the request.
func (*Authorizer) DeepCopy ¶
func (in *Authorizer) DeepCopy() *Authorizer
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Authorizer.
func (*Authorizer) DeepCopyInto ¶
func (in *Authorizer) DeepCopyInto(out *Authorizer)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Error ¶ added in v0.1.8
type Error struct {
*Handler `json:",inline"`
}
Error represents a handler that is responsible for executing logic when an error happens.
func (*Error) DeepCopy ¶ added in v0.1.8
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Error.
func (*Error) DeepCopyInto ¶ added in v0.1.8
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Handler ¶
type Handler struct { // Name is the name of a handler Name string `json:"handler"` // Config configures the handler. Configuration keys vary per handler. // +kubebuilder:validation:Type=object // +kubebuilder:pruning:PreserveUnknownFields // +kubebuilder:validation:XPreserveUnknownFields Config *runtime.RawExtension `json:"config,omitempty"` }
Handler represents an Oathkeeper routine that operates on incoming requests. It is used to either validate a request (Authenticator, Authorizer) or modify it (Mutator).
func (*Handler) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Handler.
func (*Handler) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Match ¶
type Match struct { // URL is the URL that should be matched. It supports regex templates. URL string `json:"url"` // Methods represent an array of HTTP methods (e.g. GET, POST, PUT, DELETE, ...) Methods []string `json:"methods"` }
Match defines the URL(s) that an access rule should match.
func (*Match) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Match.
func (*Match) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Mutator ¶
type Mutator struct {
*Handler `json:",inline"`
}
Mutator represents a handler that transforms the HTTP request before forwarding it.
func (*Mutator) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Mutator.
func (*Mutator) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Rule ¶
type Rule struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec RuleSpec `json:"spec,omitempty"` Status RuleStatus `json:"status,omitempty"` }
+kubebuilder:object:root=true Rule is the Schema for the rules API
func (*Rule) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule.
func (*Rule) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Rule) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (Rule) ToRuleJSON ¶
ToRuleJSON transforms a Rule object into an intermediary RuleJSON object
func (Rule) ValidateWith ¶
func (r Rule) ValidateWith(config validation.Config) error
ValidateWith uses provided validation configuration to check whether the rule have proper handlers set. Nil is a valid handler.
type RuleJSON ¶
RuleJson is a representation of an Oathkeeper rule.
func (*RuleJSON) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleJSON.
func (*RuleJSON) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (RuleJSON) MarshalJSON ¶
MarshalJSON is a custom marshal function that converts RuleJSON objects into JSON objects digestible by Oathkeeper
type RuleList ¶
type RuleList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Rule `json:"items"` }
+kubebuilder:object:root=true RuleList contains a list of Rule
func (*RuleList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleList.
func (*RuleList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RuleList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (RuleList) FilterConfigMapName ¶
FilterConfigMapName filters out Rules that don't effect the given ConfigMap
func (RuleList) FilterNotValid ¶
FilterNotValid filters out Rules which doesn't pass validation due to being not processed yet or due to negative result of validation. It returns a list of Rules which passed validation successfully.
func (RuleList) FilterOutRule ¶
FilterOutRule filters out the provided rule from the rule list, for re-generating the rules when a rule is deleted
func (RuleList) ToOathkeeperRules ¶
ToOathkeeperRules transforms a RuleList object into a JSON object digestible by Oathkeeper.
type RuleSpec ¶
type RuleSpec struct { // +kubebuilder:validation:Optional // +optional Upstream *Upstream `json:"upstream,omitempty"` Match *Match `json:"match"` Authenticators []*Authenticator `json:"authenticators,omitempty"` Authorizer *Authorizer `json:"authorizer,omitempty"` Mutators []*Mutator `json:"mutators,omitempty"` Errors []*Error `json:"errors,omitempty"` // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=253 // +kubebuilder:validation:Pattern=[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)* // // ConfigMapName points to the K8s ConfigMap that contains these rules ConfigMapName *string `json:"configMapName,omitempty"` }
RuleSpec defines the desired state of Rule
func (*RuleSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleSpec.
func (*RuleSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RuleStatus ¶
type RuleStatus struct { // +optional Validation *Validation `json:"validation,omitempty"` }
RuleStatus defines the observed state of Rule
func (*RuleStatus) DeepCopy ¶
func (in *RuleStatus) DeepCopy() *RuleStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleStatus.
func (*RuleStatus) DeepCopyInto ¶
func (in *RuleStatus) DeepCopyInto(out *RuleStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Upstream ¶
type Upstream struct { // URL defines the target URL for incoming requests // +kubebuilder:validation:MinLength=3 // +kubebuilder:validation:MaxLength=256 // +kubebuilder:validation:Pattern=`^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:\/\n]+)` URL string `json:"url"` // StripPath replaces the provided path prefix when forwarding the requested URL to the upstream URL. // +optional StripPath *string `json:"stripPath,omitempty"` // PreserveHost includes the host and port of the url value if set to false. If true, the host and port of the ORY Oathkeeper Proxy will be used instead. // +optional PreserveHost *bool `json:"preserveHost,omitempty"` }
Upstream represents the location of a server where requests matching a rule should be forwarded to.
func (*Upstream) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Upstream.
func (*Upstream) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UpstreamJSON ¶
type UpstreamJSON struct { URL string `json:"url"` StripPath *string `json:"strip_path,omitempty"` PreserveHost *bool `json:"preserve_host"` }
UpstreamJSON is a helper struct that representats Oathkeeper's upstream object.
func (*UpstreamJSON) DeepCopy ¶
func (in *UpstreamJSON) DeepCopy() *UpstreamJSON
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpstreamJSON.
func (*UpstreamJSON) DeepCopyInto ¶
func (in *UpstreamJSON) DeepCopyInto(out *UpstreamJSON)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Validation ¶
type Validation struct { // +optional Valid *bool `json:"valid,omitempty"` // +optional Error *string `json:"validationError,omitempty"` }
Validation defines the validation state of Rule
func (*Validation) DeepCopy ¶
func (in *Validation) DeepCopy() *Validation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Validation.
func (*Validation) DeepCopyInto ¶
func (in *Validation) DeepCopyInto(out *Validation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.