Documentation
¶
Overview ¶
Package v1alpha1 contains API types for the kontxt.io API group.
+kubebuilder:object:generate=true +groupName=kontxt.io
Index ¶
- Variables
- type ClaimMappings
- type ClaimOrExpression
- type ClaimValidationRule
- type EndpointSpec
- type ExtraMapping
- type IssuanceRule
- type IssuerConfig
- type NamespaceSelector
- type PolicyConstraints
- type RequesterRule
- type ServiceReference
- type ServiceTokenRequirement
- type ServiceTokenRequirementList
- type ServiceTokenRequirementSpec
- type ServiceTokenRequirementStatus
- type SubjectTokenAuthenticator
- type TctxEnrichment
- type TctxFieldMapping
- type TokenDefaults
- type TokenPolicy
- type TokenPolicyList
- type TokenPolicySpec
- type TokenPolicyStatus
- type TransactionType
- type TransactionTypeList
- type TransactionTypeSpec
- type TransactionTypeStatus
- type TxTokenConfig
- type TxTokenConfigList
- type TxTokenConfigSpec
- type TxTokenConfigStatus
- type VerificationRule
- type VerificationSpec
- type WebhookConfig
- type WorkloadAuthConfig
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is the API group and version for kontxt types. GroupVersion = schema.GroupVersion{Group: "kontxt.io", Version: "v1alpha1"} // SchemeBuilder is used to add Go types to the GroupVersionResource scheme. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type ClaimMappings ¶
type ClaimMappings struct {
// Subject determines which claim becomes the TxToken's `sub`.
// Exactly one of Claim or Expression must be set.
Subject ClaimOrExpression `json:"subject"`
// Extra carries additional identity attributes from the IdP token.
// +optional
Extra []ExtraMapping `json:"extra,omitempty"`
}
ClaimMappings defines how JWT claims are mapped to SubjectInfo fields.
func (*ClaimMappings) DeepCopy ¶
func (in *ClaimMappings) DeepCopy() *ClaimMappings
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClaimMappings.
func (*ClaimMappings) DeepCopyInto ¶
func (in *ClaimMappings) DeepCopyInto(out *ClaimMappings)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClaimOrExpression ¶
type ClaimOrExpression struct {
// Claim is a simple JWT claim name (e.g., "email", "sub", "oid").
// +optional
Claim string `json:"claim,omitempty"`
// Expression is a CEL expression evaluated against the `claims` map.
// +optional
Expression string `json:"expression,omitempty"`
}
ClaimOrExpression specifies either a simple claim name or a CEL expression.
func (*ClaimOrExpression) DeepCopy ¶
func (in *ClaimOrExpression) DeepCopy() *ClaimOrExpression
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClaimOrExpression.
func (*ClaimOrExpression) DeepCopyInto ¶
func (in *ClaimOrExpression) DeepCopyInto(out *ClaimOrExpression)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClaimValidationRule ¶
type ClaimValidationRule struct {
// Expression is a CEL expression that must evaluate to true.
// The variable `claims` is available as a map[string]any.
// +kubebuilder:validation:Required
Expression string `json:"expression"`
// Message is the error message returned when the expression evaluates to false.
// +kubebuilder:validation:Required
Message string `json:"message"`
}
ClaimValidationRule is a CEL expression evaluated against raw JWT claims.
func (*ClaimValidationRule) DeepCopy ¶
func (in *ClaimValidationRule) DeepCopy() *ClaimValidationRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClaimValidationRule.
func (*ClaimValidationRule) DeepCopyInto ¶
func (in *ClaimValidationRule) DeepCopyInto(out *ClaimValidationRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EndpointSpec ¶
type EndpointSpec struct {
// Path is the URL path pattern (e.g., "/api/v1/datasets/{datasetId}/analyze").
// +kubebuilder:validation:Required
Path string `json:"path"`
// Method is the HTTP method (e.g., "POST", "GET").
// +kubebuilder:validation:Required
Method string `json:"method"`
}
EndpointSpec identifies an API endpoint.
func (*EndpointSpec) DeepCopy ¶
func (in *EndpointSpec) DeepCopy() *EndpointSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointSpec.
func (*EndpointSpec) DeepCopyInto ¶
func (in *EndpointSpec) DeepCopyInto(out *EndpointSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExtraMapping ¶
type ExtraMapping struct {
// Key is the extra attribute key (e.g., "tenant", "name").
// +kubebuilder:validation:Required
Key string `json:"key"`
// ValueExpression is a CEL expression producing the value.
// +kubebuilder:validation:Required
ValueExpression string `json:"valueExpression"`
}
ExtraMapping maps a JWT claim to an extra key-value pair.
func (*ExtraMapping) DeepCopy ¶
func (in *ExtraMapping) DeepCopy() *ExtraMapping
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtraMapping.
func (*ExtraMapping) DeepCopyInto ¶
func (in *ExtraMapping) DeepCopyInto(out *ExtraMapping)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IssuanceRule ¶
type IssuanceRule struct {
// Name identifies this rule.
// +kubebuilder:validation:Required
Name string `json:"name"`
// CEL is a CEL expression that must evaluate to true.
// Available variables: subject, scope, tctx, rctx, workload, namespace.
// +kubebuilder:validation:Required
CEL string `json:"cel"`
// Message is the error message when the rule fails.
// +kubebuilder:validation:Required
Message string `json:"message"`
}
IssuanceRule is a CEL expression evaluated before issuing a TxToken.
func (*IssuanceRule) DeepCopy ¶
func (in *IssuanceRule) DeepCopy() *IssuanceRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IssuanceRule.
func (*IssuanceRule) DeepCopyInto ¶
func (in *IssuanceRule) DeepCopyInto(out *IssuanceRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IssuerConfig ¶
type IssuerConfig struct {
// URL is the issuer identifier. Must match the `iss` claim in incoming tokens.
// +kubebuilder:validation:Required
URL string `json:"url"`
// DiscoveryURL overrides where to fetch OIDC discovery metadata.
// If empty, defaults to {URL}/.well-known/openid-configuration.
// +optional
DiscoveryURL string `json:"discoveryURL,omitempty"`
// Audiences is the list of acceptable audience values.
// +kubebuilder:validation:MinItems=1
Audiences []string `json:"audiences"`
// AudienceMatchPolicy determines how audiences are matched.
// "MatchAny" means the token's aud must contain at least one configured audience.
// +kubebuilder:validation:Enum=MatchAny
// +optional
AudienceMatchPolicy string `json:"audienceMatchPolicy,omitempty"`
}
IssuerConfig defines the OIDC issuer configuration.
func (*IssuerConfig) DeepCopy ¶
func (in *IssuerConfig) DeepCopy() *IssuerConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IssuerConfig.
func (*IssuerConfig) DeepCopyInto ¶
func (in *IssuerConfig) DeepCopyInto(out *IssuerConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NamespaceSelector ¶
type NamespaceSelector struct {
// MatchNames selects namespaces by exact name.
// +optional
MatchNames []string `json:"matchNames,omitempty"`
// MatchLabels selects namespaces by label.
// +optional
MatchLabels map[string]string `json:"matchLabels,omitempty"`
}
NamespaceSelector selects namespaces by name or labels.
func (*NamespaceSelector) DeepCopy ¶
func (in *NamespaceSelector) DeepCopy() *NamespaceSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceSelector.
func (*NamespaceSelector) DeepCopyInto ¶
func (in *NamespaceSelector) DeepCopyInto(out *NamespaceSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PolicyConstraints ¶
type PolicyConstraints struct {
// MaxTokenLifetime is the maximum allowed token lifetime.
// +optional
MaxTokenLifetime string `json:"maxTokenLifetime,omitempty"`
// MandatoryTctxFields are tctx fields required in ALL tokens.
// +optional
MandatoryTctxFields []string `json:"mandatoryTctxFields,omitempty"`
// MandatoryRctxFields are rctx fields required in ALL tokens.
// +optional
MandatoryRctxFields []string `json:"mandatoryRctxFields,omitempty"`
// DisallowedEnrichers blocks specific enricher plugins.
// +optional
DisallowedEnrichers []string `json:"disallowedEnrichers,omitempty"`
}
PolicyConstraints define ceilings for token settings.
func (*PolicyConstraints) DeepCopy ¶
func (in *PolicyConstraints) DeepCopy() *PolicyConstraints
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyConstraints.
func (*PolicyConstraints) DeepCopyInto ¶
func (in *PolicyConstraints) DeepCopyInto(out *PolicyConstraints)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RequesterRule ¶
type RequesterRule struct {
// NamespaceSelector selects namespaces for this rule.
// +optional
NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"`
// ServiceAccountNames is a list of allowed service account names.
// Supports wildcards (e.g., "agent-*").
// +optional
ServiceAccountNames []string `json:"serviceAccountNames,omitempty"`
}
RequesterRule defines which service accounts can request TxTokens.
func (*RequesterRule) DeepCopy ¶
func (in *RequesterRule) DeepCopy() *RequesterRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequesterRule.
func (*RequesterRule) DeepCopyInto ¶
func (in *RequesterRule) DeepCopyInto(out *RequesterRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceReference ¶
type ServiceReference struct {
// Name is the Kubernetes service name.
// +kubebuilder:validation:Required
Name string `json:"name"`
}
ServiceReference identifies a Kubernetes service.
func (*ServiceReference) DeepCopy ¶
func (in *ServiceReference) DeepCopy() *ServiceReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceReference.
func (*ServiceReference) DeepCopyInto ¶
func (in *ServiceReference) DeepCopyInto(out *ServiceReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceTokenRequirement ¶
type ServiceTokenRequirement struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ServiceTokenRequirementSpec `json:"spec,omitempty"`
Status ServiceTokenRequirementStatus `json:"status,omitempty"`
}
ServiceTokenRequirement defines what a service requires in incoming TxTokens. Owned by the service owner in their namespace.
func (*ServiceTokenRequirement) DeepCopy ¶
func (in *ServiceTokenRequirement) DeepCopy() *ServiceTokenRequirement
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceTokenRequirement.
func (*ServiceTokenRequirement) DeepCopyInto ¶
func (in *ServiceTokenRequirement) DeepCopyInto(out *ServiceTokenRequirement)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ServiceTokenRequirement) DeepCopyObject ¶
func (in *ServiceTokenRequirement) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ServiceTokenRequirementList ¶
type ServiceTokenRequirementList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ServiceTokenRequirement `json:"items"`
}
ServiceTokenRequirementList contains a list of ServiceTokenRequirement.
func (*ServiceTokenRequirementList) DeepCopy ¶
func (in *ServiceTokenRequirementList) DeepCopy() *ServiceTokenRequirementList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceTokenRequirementList.
func (*ServiceTokenRequirementList) DeepCopyInto ¶
func (in *ServiceTokenRequirementList) DeepCopyInto(out *ServiceTokenRequirementList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ServiceTokenRequirementList) DeepCopyObject ¶
func (in *ServiceTokenRequirementList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ServiceTokenRequirementSpec ¶
type ServiceTokenRequirementSpec struct {
// ServiceRef references the Kubernetes service this requirement applies to.
ServiceRef ServiceReference `json:"serviceRef"`
// Verification defines the TxToken verification requirements.
Verification VerificationSpec `json:"verification"`
// ExcludedEndpoints lists endpoints that skip TxToken verification.
// +optional
ExcludedEndpoints []EndpointSpec `json:"excludedEndpoints,omitempty"`
// AutoNarrow, when true, causes the ext auth adapter to automatically
// request a scope-narrowed replacement token when the inbound TxToken
// has broader scope than requiredScope.
// +optional
AutoNarrow bool `json:"autoNarrow,omitempty"`
}
ServiceTokenRequirementSpec defines verification requirements for incoming TxTokens.
func (*ServiceTokenRequirementSpec) DeepCopy ¶
func (in *ServiceTokenRequirementSpec) DeepCopy() *ServiceTokenRequirementSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceTokenRequirementSpec.
func (*ServiceTokenRequirementSpec) DeepCopyInto ¶
func (in *ServiceTokenRequirementSpec) DeepCopyInto(out *ServiceTokenRequirementSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceTokenRequirementStatus ¶
type ServiceTokenRequirementStatus struct {
// Conditions represent the latest available observations.
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
// ActiveVerificationRules is the count of active verification rules.
// +optional
ActiveVerificationRules int `json:"activeVerificationRules,omitempty"`
// ExcludedEndpointCount is the count of excluded endpoints.
// +optional
ExcludedEndpointCount int `json:"excludedEndpointCount,omitempty"`
}
ServiceTokenRequirementStatus defines the observed state.
func (*ServiceTokenRequirementStatus) DeepCopy ¶
func (in *ServiceTokenRequirementStatus) DeepCopy() *ServiceTokenRequirementStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceTokenRequirementStatus.
func (*ServiceTokenRequirementStatus) DeepCopyInto ¶
func (in *ServiceTokenRequirementStatus) DeepCopyInto(out *ServiceTokenRequirementStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SubjectTokenAuthenticator ¶
type SubjectTokenAuthenticator struct {
// Issuer configures the OIDC issuer for this authenticator.
Issuer IssuerConfig `json:"issuer"`
// ClaimValidationRules are CEL expressions evaluated against raw JWT claims.
// Each rule must evaluate to true for the token to be accepted.
// +optional
ClaimValidationRules []ClaimValidationRule `json:"claimValidationRules,omitempty"`
// ClaimMappings defines how JWT claims are mapped to the TxToken subject.
ClaimMappings ClaimMappings `json:"claimMappings"`
}
SubjectTokenAuthenticator configures a single JWT authenticator for subject tokens.
func (*SubjectTokenAuthenticator) DeepCopy ¶
func (in *SubjectTokenAuthenticator) DeepCopy() *SubjectTokenAuthenticator
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectTokenAuthenticator.
func (*SubjectTokenAuthenticator) DeepCopyInto ¶
func (in *SubjectTokenAuthenticator) DeepCopyInto(out *SubjectTokenAuthenticator)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TctxEnrichment ¶
type TctxEnrichment struct {
// Field is the tctx field name.
// +kubebuilder:validation:Required
Field string `json:"field"`
// Enricher is the name of the enricher plugin to invoke.
// +kubebuilder:validation:Required
Enricher string `json:"enricher"`
}
TctxEnrichment defines a tctx field computed by the TTS.
func (*TctxEnrichment) DeepCopy ¶
func (in *TctxEnrichment) DeepCopy() *TctxEnrichment
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TctxEnrichment.
func (*TctxEnrichment) DeepCopyInto ¶
func (in *TctxEnrichment) DeepCopyInto(out *TctxEnrichment)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TctxFieldMapping ¶
type TctxFieldMapping struct {
// Source is where to extract the value from: "path", "body", "header", "query".
// +kubebuilder:validation:Enum=path;body;header;query
Source string `json:"source"`
// Field is the field name to extract from the source.
// +kubebuilder:validation:Required
Field string `json:"field"`
// Required indicates whether this field must be present in the request.
// +optional
Required bool `json:"required,omitempty"`
}
TctxFieldMapping defines how to extract a single tctx field from the request.
func (*TctxFieldMapping) DeepCopy ¶
func (in *TctxFieldMapping) DeepCopy() *TctxFieldMapping
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TctxFieldMapping.
func (*TctxFieldMapping) DeepCopyInto ¶
func (in *TctxFieldMapping) DeepCopyInto(out *TctxFieldMapping)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TokenDefaults ¶
type TokenDefaults struct {
// TokenLifetime is the default TxToken lifetime (e.g., "15s").
// +kubebuilder:default="15s"
TokenLifetime string `json:"tokenLifetime,omitempty"`
// SigningAlgorithm is the JWT signing algorithm.
// +kubebuilder:default="RS256"
SigningAlgorithm string `json:"signingAlgorithm,omitempty"`
}
TokenDefaults contains default token configuration.
func (*TokenDefaults) DeepCopy ¶
func (in *TokenDefaults) DeepCopy() *TokenDefaults
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TokenDefaults.
func (*TokenDefaults) DeepCopyInto ¶
func (in *TokenDefaults) DeepCopyInto(out *TokenDefaults)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TokenPolicy ¶
type TokenPolicy struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec TokenPolicySpec `json:"spec,omitempty"`
Status TokenPolicyStatus `json:"status,omitempty"`
}
TokenPolicy defines security guardrails for transaction tokens. Owned by the security admin.
func (*TokenPolicy) DeepCopy ¶
func (in *TokenPolicy) DeepCopy() *TokenPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TokenPolicy.
func (*TokenPolicy) DeepCopyInto ¶
func (in *TokenPolicy) DeepCopyInto(out *TokenPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TokenPolicy) DeepCopyObject ¶
func (in *TokenPolicy) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TokenPolicyList ¶
type TokenPolicyList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []TokenPolicy `json:"items"`
}
TokenPolicyList contains a list of TokenPolicy.
func (*TokenPolicyList) DeepCopy ¶
func (in *TokenPolicyList) DeepCopy() *TokenPolicyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TokenPolicyList.
func (*TokenPolicyList) DeepCopyInto ¶
func (in *TokenPolicyList) DeepCopyInto(out *TokenPolicyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TokenPolicyList) DeepCopyObject ¶
func (in *TokenPolicyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TokenPolicySpec ¶
type TokenPolicySpec struct {
// TargetNamespaces limits this policy to specific namespaces.
// If empty, the policy applies to all namespaces.
// +optional
TargetNamespaces *NamespaceSelector `json:"targetNamespaces,omitempty"`
// AuthorizedTransactionNamespaces restricts which namespaces can define TransactionTypes.
// +optional
AuthorizedTransactionNamespaces *metav1.LabelSelector `json:"authorizedTransactionNamespaces,omitempty"`
// AuthorizedRequesters restricts which service accounts can request TxTokens.
// +optional
AuthorizedRequesters []RequesterRule `json:"authorizedRequesters,omitempty"`
// Constraints define ceilings that TransactionTypes cannot exceed.
Constraints PolicyConstraints `json:"constraints,omitempty"`
// IssuanceRules are CEL expressions evaluated by the TTS before issuing a TxToken.
// All rules must evaluate to true for the token to be issued.
// +optional
IssuanceRules []IssuanceRule `json:"issuanceRules,omitempty"`
// AccessEvaluationWebhook is an optional external webhook for policy decisions
// that CEL cannot express.
// +optional
AccessEvaluationWebhook *WebhookConfig `json:"accessEvaluationWebhook,omitempty"`
}
TokenPolicySpec defines the policy constraints.
func (*TokenPolicySpec) DeepCopy ¶
func (in *TokenPolicySpec) DeepCopy() *TokenPolicySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TokenPolicySpec.
func (*TokenPolicySpec) DeepCopyInto ¶
func (in *TokenPolicySpec) DeepCopyInto(out *TokenPolicySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TokenPolicyStatus ¶
type TokenPolicyStatus struct {
// Conditions represent the latest available observations.
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
TokenPolicyStatus defines the observed state of TokenPolicy.
func (*TokenPolicyStatus) DeepCopy ¶
func (in *TokenPolicyStatus) DeepCopy() *TokenPolicyStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TokenPolicyStatus.
func (*TokenPolicyStatus) DeepCopyInto ¶
func (in *TokenPolicyStatus) DeepCopyInto(out *TokenPolicyStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TransactionType ¶
type TransactionType struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec TransactionTypeSpec `json:"spec,omitempty"`
Status TransactionTypeStatus `json:"status,omitempty"`
}
TransactionType defines what TxToken to generate for a specific API endpoint. Owned by the transaction owner (agent developer) in their namespace.
func (*TransactionType) DeepCopy ¶
func (in *TransactionType) DeepCopy() *TransactionType
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TransactionType.
func (*TransactionType) DeepCopyInto ¶
func (in *TransactionType) DeepCopyInto(out *TransactionType)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TransactionType) DeepCopyObject ¶
func (in *TransactionType) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TransactionTypeList ¶
type TransactionTypeList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []TransactionType `json:"items"`
}
TransactionTypeList contains a list of TransactionType.
func (*TransactionTypeList) DeepCopy ¶
func (in *TransactionTypeList) DeepCopy() *TransactionTypeList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TransactionTypeList.
func (*TransactionTypeList) DeepCopyInto ¶
func (in *TransactionTypeList) DeepCopyInto(out *TransactionTypeList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TransactionTypeList) DeepCopyObject ¶
func (in *TransactionTypeList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TransactionTypeSpec ¶
type TransactionTypeSpec struct {
// Endpoint specifies which inbound API endpoint triggers this transaction.
Endpoint EndpointSpec `json:"endpoint"`
// Purpose describes the intent of this transaction (becomes a field in tctx).
// +kubebuilder:validation:Required
Purpose string `json:"purpose"`
// Scope is the requested scope for the TxToken (space-delimited).
// Must be ≤ subject token scope and ≤ TokenPolicy ceiling.
// +kubebuilder:validation:Required
Scope string `json:"scope"`
// TctxMapping defines how to build the `tctx` claim from the inbound request.
// +optional
TctxMapping map[string]TctxFieldMapping `json:"tctxMapping,omitempty"`
// TctxEnrichments define values computed by the TTS (not in the original request).
// +optional
TctxEnrichments []TctxEnrichment `json:"tctxEnrichments,omitempty"`
// RctxFields specifies which rctx fields to populate (e.g., "req_ip", "authn").
// +optional
RctxFields []string `json:"rctxFields,omitempty"`
// TokenLifetime overrides the default token lifetime.
// Subject to TokenPolicy ceiling.
// +optional
TokenLifetime string `json:"tokenLifetime,omitempty"`
}
TransactionTypeSpec defines the generation rules for a transaction.
func (*TransactionTypeSpec) DeepCopy ¶
func (in *TransactionTypeSpec) DeepCopy() *TransactionTypeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TransactionTypeSpec.
func (*TransactionTypeSpec) DeepCopyInto ¶
func (in *TransactionTypeSpec) DeepCopyInto(out *TransactionTypeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TransactionTypeStatus ¶
type TransactionTypeStatus struct {
// Conditions represent the latest available observations.
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
// ProducedTctxFields lists all tctx fields this transaction type produces
// (extracted + enriched + purpose).
// +optional
ProducedTctxFields []string `json:"producedTctxFields,omitempty"`
// EffectiveTokenLifetime is the token lifetime after TokenPolicy ceiling is applied.
// +optional
EffectiveTokenLifetime string `json:"effectiveTokenLifetime,omitempty"`
}
TransactionTypeStatus defines the observed state of TransactionType.
func (*TransactionTypeStatus) DeepCopy ¶
func (in *TransactionTypeStatus) DeepCopy() *TransactionTypeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TransactionTypeStatus.
func (*TransactionTypeStatus) DeepCopyInto ¶
func (in *TransactionTypeStatus) DeepCopyInto(out *TransactionTypeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TxTokenConfig ¶
type TxTokenConfig struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec TxTokenConfigSpec `json:"spec,omitempty"`
Status TxTokenConfigStatus `json:"status,omitempty"`
}
TxTokenConfig is the cluster-scoped configuration for the Transaction Token Service. Owned by the platform admin.
func (*TxTokenConfig) DeepCopy ¶
func (in *TxTokenConfig) DeepCopy() *TxTokenConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TxTokenConfig.
func (*TxTokenConfig) DeepCopyInto ¶
func (in *TxTokenConfig) DeepCopyInto(out *TxTokenConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TxTokenConfig) DeepCopyObject ¶
func (in *TxTokenConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TxTokenConfigList ¶
type TxTokenConfigList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []TxTokenConfig `json:"items"`
}
TxTokenConfigList contains a list of TxTokenConfig.
func (*TxTokenConfigList) DeepCopy ¶
func (in *TxTokenConfigList) DeepCopy() *TxTokenConfigList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TxTokenConfigList.
func (*TxTokenConfigList) DeepCopyInto ¶
func (in *TxTokenConfigList) DeepCopyInto(out *TxTokenConfigList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TxTokenConfigList) DeepCopyObject ¶
func (in *TxTokenConfigList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TxTokenConfigSpec ¶
type TxTokenConfigSpec struct {
// TrustDomain is the trust domain identifier, used as the `aud` claim in TxTokens.
// +kubebuilder:validation:Required
TrustDomain string `json:"trustDomain"`
// Issuer is the TTS issuer URI, used as the `iss` claim in TxTokens.
// +kubebuilder:validation:Required
Issuer string `json:"issuer"`
// SubjectTokens is an ordered list of JWT authenticators for subject token validation.
// The first authenticator whose issuer URL matches the token's `iss` claim handles it.
// Inspired by KEP-3331 (Structured Authentication Configuration).
// +kubebuilder:validation:MinItems=1
SubjectTokens []SubjectTokenAuthenticator `json:"subjectTokens"`
// WorkloadAuth configures how the TTS authenticates the requesting workload.
WorkloadAuth WorkloadAuthConfig `json:"workloadAuth,omitempty"`
// Defaults contains default token settings.
Defaults TokenDefaults `json:"defaults,omitempty"`
}
TxTokenConfigSpec defines the TTS infrastructure configuration.
func (*TxTokenConfigSpec) DeepCopy ¶
func (in *TxTokenConfigSpec) DeepCopy() *TxTokenConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TxTokenConfigSpec.
func (*TxTokenConfigSpec) DeepCopyInto ¶
func (in *TxTokenConfigSpec) DeepCopyInto(out *TxTokenConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TxTokenConfigStatus ¶
type TxTokenConfigStatus struct {
// Conditions represent the latest available observations.
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
TxTokenConfigStatus defines the observed state of TxTokenConfig.
func (*TxTokenConfigStatus) DeepCopy ¶
func (in *TxTokenConfigStatus) DeepCopy() *TxTokenConfigStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TxTokenConfigStatus.
func (*TxTokenConfigStatus) DeepCopyInto ¶
func (in *TxTokenConfigStatus) DeepCopyInto(out *TxTokenConfigStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VerificationRule ¶
type VerificationRule struct {
// Name identifies this rule (used in error messages and metrics).
// +kubebuilder:validation:Required
Name string `json:"name"`
// CEL is a CEL expression that must evaluate to true.
// Available variables: `txtoken` (all TxToken claims), `request` (HTTP request).
// +kubebuilder:validation:Required
CEL string `json:"cel"`
// Message is the error message when the rule fails.
// +kubebuilder:validation:Required
Message string `json:"message"`
}
VerificationRule is a CEL expression evaluated against a TxToken.
func (*VerificationRule) DeepCopy ¶
func (in *VerificationRule) DeepCopy() *VerificationRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VerificationRule.
func (*VerificationRule) DeepCopyInto ¶
func (in *VerificationRule) DeepCopyInto(out *VerificationRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VerificationSpec ¶
type VerificationSpec struct {
// RequiredScope is the minimum scope the TxToken must have.
// +optional
RequiredScope string `json:"requiredScope,omitempty"`
// RequiredTctxFields lists tctx fields that must be present in the TxToken.
// +optional
RequiredTctxFields []string `json:"requiredTctxFields,omitempty"`
// Rules are CEL-based verification rules evaluated against the TxToken.
// +optional
Rules []VerificationRule `json:"rules,omitempty"`
}
VerificationSpec defines what to verify in incoming TxTokens.
func (*VerificationSpec) DeepCopy ¶
func (in *VerificationSpec) DeepCopy() *VerificationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VerificationSpec.
func (*VerificationSpec) DeepCopyInto ¶
func (in *VerificationSpec) DeepCopyInto(out *VerificationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WebhookConfig ¶
type WebhookConfig struct {
// Enabled controls whether the webhook is active.
Enabled bool `json:"enabled"`
// Endpoint is the URL of the webhook.
// +optional
Endpoint string `json:"endpoint,omitempty"`
// FailurePolicy determines behavior on webhook failure.
// +kubebuilder:validation:Enum=Deny;Allow
// +kubebuilder:default=Deny
FailurePolicy string `json:"failurePolicy,omitempty"`
}
WebhookConfig configures an external policy evaluation webhook.
func (*WebhookConfig) DeepCopy ¶
func (in *WebhookConfig) DeepCopy() *WebhookConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookConfig.
func (*WebhookConfig) DeepCopyInto ¶
func (in *WebhookConfig) DeepCopyInto(out *WebhookConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkloadAuthConfig ¶
type WorkloadAuthConfig struct {
// Type is the workload authentication mechanism.
// +kubebuilder:validation:Enum=kubernetes-sa;spiffe
// +kubebuilder:default=kubernetes-sa
Type string `json:"type,omitempty"`
}
WorkloadAuthConfig configures workload authentication to the TTS.
func (*WorkloadAuthConfig) DeepCopy ¶
func (in *WorkloadAuthConfig) DeepCopy() *WorkloadAuthConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadAuthConfig.
func (*WorkloadAuthConfig) DeepCopyInto ¶
func (in *WorkloadAuthConfig) DeepCopyInto(out *WorkloadAuthConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.