This page lists the fields of every Tyk Operator Custom Resource under its
spec. Field names use dot notation for nested objects (proxy.target_url), [] for list items (tags[]), and .{key} for map entries (auth_configs.{key}). Within each group, required fields are listed first. Read-only status fields are not listed.TykOasApiDefinition
TykOasApiDefinitionSpec defines the desired state of TykOasApiDefinition. You can change the target, but you can’t add or removetargetRefs after you create the resource. To change between an attached definition and a standalone API, delete the resource and create it again.
Top-Level Fields
Categories serve as identifiers for the API definitions, subsequently enabling the filtering of API listings based on these categories.
tykOAS
ConfigmapRef points at the ConfigMap storing the Tyk OAS API definition. Required when this resource runs in standalone mode. Leave unset when using Gateway API attachment mode (
targetRefs set). In that mode the API definition is derived from the attached route instead.Namespace is the namespace of configmap. If Namespace is not provided, we assume that the ConfigMap is in the same namespace as TykOasApiDefinition resource.
certificatePinning
CertificatePinning contains the configuration related to certificate pinning. It is possible to set Kubernetes secrets containing certificates. It is used to set
upstream.certificatePinning in Tyk OAS API Definition.Enabled is a boolean flag, if set to
true, it enables certificate pinning for the API. Tyk classic API definition: certificate_pinning_disabledDomainToPublicKeysMapping maintains the mapping of domain to pinned public keys. Tyk classic API definition:
pinned_public_keysPublicKeyRefs holds a list of Kubernetes secret names that reside in the same namespace as current TykOasApiDefinition resource. The secret needs to be a type of TLS secret where the pinned public key is stored in
tls.crt field. Each secret must contain a public key associated with the specified domain name. NOTE If you want to continue using secrets that are already created on Tyk Dashboard, specify their IDs in publicKeys field of TykOasApiDefinition CR. And then, Tyk Operator will merge this array which is specified through publicKeys field with new Tyk Secrets which will be created based on Kubernetes secrets defined in publicKeyRefs.PublicKeys contains a list of the public keys IDs pinned to the domain name. It only accepts Tyk IDs of the public keys. If you have Kubernetes secrets containing public keys of the domain, please use
publicKeysRefs field instead of this one. As this one only works with already existing public keys on Tyk Dashboard.clientCertificate
ClientCertificate is used to configure client certificates settings needed for MTLS connection between Tyk and client. It is used to set
server.clientCertificate field of Tyk OAS APIcontextRef
Context specify namespace/name of the OperatorContext object used for reconciling this APIDefinition
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
customDomain
CustomDomain is the domain to bind this API to. This enforces domain matching for client requests. Tyk classic API definition:
domainCertificates defines a field for specifying certificate IDs that the Tyk can utilise to dynamically load certificates for your custom domain. Tyk classic API definition:
certificatesCertificatesRef defines a field for specifying certificates through Kubernetes secrets. Secrets need to be installed within the namespace of the TykOasApiDefinition resource.
jwtAuth
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
mutualTLS
targetRefs
TargetRefs attaches this resource to an HTTPRoute or a Gateway. When set, this resource runs in attachment mode: the route or Gateway sets the routing configuration (listen path, custom domain, upstream services and Gateway tags), and this definition sets everything else, such as authentication, rate limits and middleware. Each target must have group
gateway.networking.k8s.io, kind HTTPRoute or Gateway, and be in the same namespace as this resource.upstreamRequestSigning
UpstreamRequestSigning configures HMAC-based request signing for upstream requests. When enabled, it ensures requests are signed before being sent to the upstream service using hmac-sha256 algorithm.
Algorithm for request signing. For Certificate, it can rsa-sha256. For Secret, it can be any of hmac-sha1, hmac-sha256, hmac-sha384, hmac-sha512. Allowed values:
hmac-sha1, hmac-sha256, hmac-sha384, hmac-sha512, rsa-sha256.Namespace is the namespace of secret. If Namespace is not provided, we assume that the secret is in the same namespace as TykOasApiDefinition resource.
versioning
FallbackToDefault specifies that the default version of the OAS API should be used if the requested version does not exist.”
Location contains versioning location information. It can be one of the following: header, url-param, url. Allowed values:
header, url-param, url.StripVersioningData if enabled, specifies that the API responses will be stripped of versioning data.
UrlVersioningPattern configure with a regex that matches the versioning identifier format in your URLs. This is essential when using stripVersioningData and fallbackToDefault with location=url.”
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
ApiDefinition
APIDefinitionSpec represents the configuration for a single proxied API and it’s versions.Top-Level Fields
APIProtocol is the network transport protocol supported by the gateway Allowed values: “,
h2c, tcp, tls, http, https.AllowedIPs is a list of IP address that are whitelisted.When this is provided all IP address that is not on this list will be blocked and a 403 http status will be returned. The IP address can be IPv4 or IPv6.IP in CIDR notation is also supported.
Only set this field if you are referring to an existing API def. The Operator will use this APIID to link the CR with the API in Tyk Note: The values in the CR will become the new source of truth, overriding the existing API Definition
BaseIdentityProvidedBy sets Base Identity Provider for situation when multiple authentication mechanisms are used Allowed values:
auth_token, hmac_key, basic_auth_user, jwt_claim, oidc_user, oauth_key.BlacklistedIPs is a list of IP address that will be blacklisted.This means if origin IP matches any IP in this list a 403 http status code will be returned. The IP address can be IPv4 or IPv6. IP in CIDR notation is also supported.
CertificateSecretNames represents the names of the secrets that the controller should look for in the current namespace which contain the certificates.
Certificates is a list of Tyk Certificate IDs. e.g. orgid+fingerprint. Use CertificateSecretNames if using cert-manager
ConfigData can be used to pass custom attributes (a JSON object) into your middleware, such as a virtual endpoint or header transform. Free-form object with arbitrary keys.
EnableContextVars extracts request context variables from the start of the middleware chain. Set this to true to make them available to your transforms. Context Variables are available in the url rewriter, modify headers and body transforms.
EnableDetailedRecording instructs Tyk store the inbound request and outbound response data in HTTP Wire format as part of the Analytics data
Internal tells Tyk Gateway that this is a virtual API. It can only be routed to from other APIs.
JWTClientIDBaseField is the name of the field on JWT claim to use for client id. This field is mutually exclusive to jwt_identity_base_field, meaning you can only set/use one and jwt_identity_base_field takes precedence when both are set.
JWTDefaultPolicies is a list of policies that will be used when base policy can’t be extracted from the JWT token. When this list is provided the first element will be used as the base policy while the rest of elements will be applied.
JWTExpiresAtValidationSkew adds validation for expired at JWT claim. Given now = current unix time skew = jwt_expires_at_validation_skew exp = expired at If exp > (now - skew) then validation will fail with “token has expired”
JWTIdentityBaseField Identifies the user or identity to be used in the Claims of the JWT. This will fallback to sub if not found. This field forms the basis of a new “virtual” token that gets used after validation. It means policy attributes are carried forward through Tyk for attribution purposes.
JWTIssuedAtValidationSkew adds validation for issued at JWT claim. Given now = current unix time skew = jwt_issued_at_validation_skew iat = the issued at jwt claim If iat > (now + skew) then validation will fail with “token used before issued”
JWTNotBeforeValidationSkew adds validation for not before JWT claim. Given now = current unix time skew = jwt_not_before_validation_skew nbf = the not before jwt claim If nbf > (now + skew) then validation will fail with “token is not valid yet”
JWTScopeClaimName overides the key used for scope values in the JWT claims. By default the value is “scope”
JWTSkipKid when true we ingore using kid as the identity for a JWT token and instead use jwt_identity_base_field if it was set or fallback to sub JWT claim.
JWTSource Must either be a base64 encoded valid RSA/HMAC key or a url to a resource serving JWK, this key will then be used to validate inbound JWT and throttle them according to the centralised JWT options and fields set in the configuration.
SessionLifetime this is duration in seconds before the session key expires in redis. Example: If you want the session keys to be alive only 24 hours you can set this value to 86400 that we can break down to 60 * 60 * 24 = Total seconds in a day
StripAuthData ensures that any security tokens used for accessing APIs are stripped and not leaked to the upstream
Tags are named gateway nodes which tell gateway clusters whether to load an API or not. for example, to load the API in an ARA gateway, you might want to include an
edge tag.UseKeylessAccess will switch off all key checking. Some analytics will still be recorded, but rate-limiting, quotas and security policies will not be possible (there is no session to attach requests to).
proxy
CheckHostAgainstUptimeTests will check the hostname of the outbound request against the downtime list generated by the uptime test host checker. If the host is found, then it is skipped or removed from the load balancer. This is only valid if uptime tests for the api are enabled.
DisableStripSlash disables the stripping of the slash suffix from a URL. when
true a request to http://foo.bar/baz/ will be retained. when false a request to http://foo.bar/baz/ will be matched to http://foo.bar/bazDNSDiscovery enables dynamic discovery of upstream pods by DNS, so the gateway resolves and load balances upstream hosts at request time. It applies only to h2c (gRPC) upstreams. Requires
enable_load_balancing to be set to true, and cannot be combined with service_discovery.ConnectionDraining controls the behaviour when an address is no longer returned by the DNS resolver. Disabled by default.
Enabled maintains connections for the timeout period after they are no longer returned by the DNS resolver. Default: false. When disabled, connections close once idle.
Timeout is how long connections to a removed address stay open, as a human-readable duration string. Default: 30s when enabled.
RefreshInterval is how often the hostname is resolved, as a human-readable duration string (for example 45s). Defaults to 30s, minimum 5s.
StaleTTL is how long the last known good addresses keep being used if the resolver becomes unreachable, as a human-readable duration string (for example 300s). Empty or 0 means known addresses continue to be used until a lookup succeeds. Once that expires, requests fail with a 503.
EnableLoadBalancing enables Tyk’s round-robin loadbalancer. Tyk will ignore the TargetURL field, and rely on the hosts in the Targets list
ListenPath represents the path to listen on. e.g.
/api or / or /httpbin. Any requests coming into the host, on the port that Tyk is configured to run on, that match this path will have the rules defined in the API Definition applied. Versioning assumes that different versions of an API will live on the same URL structure. If you are using URL-based versioning (e.g. /v1/function, /v2/function) then it is recommended to set up a separate non-versioned definition for each version as they are essentially separate APIs.If PreserveHostHeader is set to true then the host header in the outbound request is retained to be the inbound hostname of the proxy.
ServiceDiscovery configures integration with an external service discovery system (for example Consul, etcd or Eureka) that the gateway queries to resolve the upstream target hosts at runtime.
StripListenPath removes the inbound listen path in the outgoing request. e.g. http://acme.com/httpbin/get where
httpbin is the listen path. The httpbin listen path which is used to identify the API loaded in Tyk is removed, and the outbound request would be http://httpbin.org/getThe k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
Targets defines a list of upstream host targets. Tyk will then round-robin load balance between these targets. EnableLoadBalancing must be set to true in order to take advantage of this feature.
Transport section exposes advanced transport level configurations such as minimum TLS version.
SSLCipherSuites is an array of acceptable cipher suites. A list of allowed cipher suites can be found in the Go Crypto TLS package constants documentation https://golang.org/pkg/crypto/tls/#pkg-constants
SSLInsecureSkipVerify controls whether it is possible to use self-signed certificates when connecting to the upstream. This is applied to
TykMakeHttpRequest & TykMakeBatchRequest in virtual endpoint middleware.SSLMinVersion defines the minimum TLS version the gateway will use to establish a connection to the upstream. 1.0: 769; 1.1: 770; 1.2: 771; 1.3: 772. Allowed values:
769, 770, 771, 772.analytics_plugin
AnalyticsPlugin is used to configure analytics plugin which enables editing or removal of all parts of analytics records, raw
request and responses recorded by Tyk at the gateway levelauth
auth_configs
cache_options
CacheAllSafeRequests caches responses to (GET, HEAD, OPTIONS) requests overrides per-path cache settings in versions, applies across versions
CacheControlTTLHeader is the response header which tells Tyk how long it is safe to cache the response for
EnableCache turns global cache middleware on or off. It is still possible to enable caching on a per-path basis by explicitly setting the endpoint cache middleware. see
spec.version_data.versions.{VERSION}.extended_paths.cache[]contextRef
Context specify namespace/name of the OperatorContext object used for reconciling this APIDefinition
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
CORS
AllowedMethods is a list of methods to allow access via. Allowed values:
GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, CONNECT, TRACE.OptionsPassthrough allow CORS OPTIONS preflight request to be proxied directly to upstream, without authentication and rest of checks. This means that pre-flight requests generated by web-clients such as SwaggerUI or the Tyk Portal documentation system will be able to test the API using trial keys. If your service handles CORS natively, then enable this option.
custom_middleware
definition
event_handlers
MapStringInterfaceType represents a generic struct used as a map[string]interface{}. Since an arbitrary JSON fields defined as map[string]interface{} is not feasible to use as a Kubernetes CRD, unstructured.Unstructured type is used. Free-form object with arbitrary keys.
global_rate_limit
GlobalRateLimit is an API Level Global Rate Limit, which assesses all traffic coming into the API from all sources and ensures that the overall rate limit is not exceeded.
graphql
GraphQLExecutionMode is the mode to define how an api behaves. Allowed values: “,
proxyOnly, executionEngine, supergraph, subgraph.MapStringInterfaceType represents a generic struct used as a map[string]interface{}. Since an arbitrary JSON fields defined as map[string]interface{} is not feasible to use as a Kubernetes CRD, unstructured.Unstructured type is used. Free-form object with arbitrary keys.
LastSchemaUpdate contains the date and time of the last triggered schema update to the upstream.
SubscriptionType is the subscription protocol to use for graphql subscriptions Allowed values: “,
graphql-ws, graphql-transport-ws, sse.Kind defines the unique identifier of the DataSource Kind needs to match to the Planner “DataSourceName” name Allowed values:
GraphQLDataSource, HTTPJSONDataSource.Config is the DataSource specific configuration object Each Planner needs to make sure to parse their Config Object correctly
HttpMethod represents HTTP request method Allowed values:
GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, CONNECT, TRACE.Version defines the version of the GraphQL config and engine to be used. Allowed values:
1, 2.jwt_scope_to_policy_mapping
JWTScopeToPolicyMapping this is a mapping of scope value to policy id. If this is set then a scope value found in this map will make the mappend policy to be applied.
oauth_meta
AllowedAccessTypes are an array of allowable access types. Allowed values:
authorization_code, refresh_token, password, client_credentials.AllowedAuthorizeTypes is an array of allowable
response_type parameters token or authorization code code. Choose token for client_credentials or implicit grant types. Allowed values: code, token.pinned_public_keys
PinnedPublicKeys allows you to whitelist public keys used to generate certificates, so you will be protected in case an upstream certificate is compromised. Please use PinnedPublicKeysRefs if using cert-manager.
pinned_public_keys_refs
PinnedPublicKeysRefs allows you to specify public keys using k8s secret. It takes domain name as a key and secret name as a value.
response_processors
upstream_certificate_refs
UpstreamCertificateRefs is a map of domains and secret names that is used internally to obtain certificates from secrets in order to establish mTLS support for upstreams
upstream_certificates
UpstreamCertificates is a map of domains and certificate IDs that is used by the Tyk Gateway to provide mTLS support for upstreams
uptime_tests
HttpMethod represents HTTP request method Allowed values:
GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, CONNECT, TRACE.A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years.
must have an expireAt TTL index set (http://docs.mongodb.org/manual/tutorial/expire-data/)
version_data
HttpMethod represents HTTP request method Allowed values:
GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, CONNECT, TRACE.HttpMethod represents HTTP request method Allowed values:
GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, CONNECT, TRACE.HttpMethod represents HTTP request method Allowed values:
GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, CONNECT, TRACE.HttpMethod represents HTTP request method Allowed values:
GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, CONNECT, TRACE.HttpMethod represents HTTP request method Allowed values:
GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, CONNECT, TRACE.HttpMethod represents HTTP request method Allowed values:
GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, CONNECT, TRACE.HttpMethod represents HTTP request method Allowed values:
GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, CONNECT, TRACE.HttpMethod represents HTTP request method Allowed values:
GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, CONNECT, TRACE.HttpMethod represents HTTP request method Allowed values:
GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, CONNECT, TRACE.HttpMethod represents HTTP request method Allowed values:
GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, CONNECT, TRACE.HttpMethod represents HTTP request method Allowed values:
GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, CONNECT, TRACE.HttpMethod represents HTTP request method Allowed values:
GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, CONNECT, TRACE.HttpMethod represents HTTP request method Allowed values:
GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, CONNECT, TRACE.HttpMethod represents HTTP request method Allowed values:
GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, CONNECT, TRACE.HttpMethod represents HTTP request method Allowed values:
GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, CONNECT, TRACE.HttpMethod represents HTTP request method Allowed values:
GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, CONNECT, TRACE.RewriteToInternal serves as rewrite_to but used when rewriting to target internal api’s When rewrite_to and rewrite_to_internal are both provided then rewrite_to will take rewrite_to_internal
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
Maps an HTTP header name to a match rule tested against that header’s value. Header names are matched case insensitively.
Match rule evaluated against the request value named by its key (the header, query parameter, session metadata key or context variable). For path parts the key is not used to select a specific part: the rule is tested against all parts.
A set of match rules tested against every ”/“-separated part of the request path. The map key is not used to select which part is checked; each rule is tested against all parts.
Match rule evaluated against the request value named by its key (the header, query parameter, session metadata key or context variable). For path parts the key is not used to select a specific part: the rule is tested against all parts.
Maps a query parameter name to a match rule tested against that parameter’s value. Parameter names are case sensitive.
Match rule evaluated against the request value named by its key (the header, query parameter, session metadata key or context variable). For path parts the key is not used to select a specific part: the rule is tested against all parts.
Maps the name of a context variable, exposed elsewhere as
$tyk_context.<name>, such as remote_addr or request_id, to a match rule tested against that variable’s value. Only works with string values. Requires enable_context_vars on the API.Match rule evaluated against the request value named by its key (the header, query parameter, session metadata key or context variable). For path parts the key is not used to select a specific part: the rule is tested against all parts.
Maps a session metadata key, exposed elsewhere as
$tyk_meta.<name>, to a match rule tested against that metadata value. Only works with string values.Match rule evaluated against the request value named by its key (the header, query parameter, session metadata key or context variable). For path parts the key is not used to select a specific part: the rule is tested against all parts.
RewriteToInternal defines options that constructs a url that refers to an api that is loaded into the gateway.
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
Allows override of default 422 Unprocessable Entity response code for validation errors.
HttpMethod represents HTTP request method Allowed values:
GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, CONNECT, TRACE.Schema represents schema field that verifies user requests against a specified JSON schema and check that the data sent to your API by a consumer is in the right format. Free-form object with arbitrary keys.
HttpMethod represents HTTP request method Allowed values:
GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, CONNECT, TRACE.TykStreamsApiDefinition
TykStreamsApiDefinitionSpec defines the desired state of TykStreamsApiDefinitiontykStreams
Namespace is the namespace of configmap. If Namespace is not provided, we assume that the ConfigMap is in the same namespace as TykOasApiDefinition resource.
contextRef
Context specify namespace/name of the OperatorContext object used for reconciling this APIDefinition
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
TykMcpProxyDefinition
TykMcpProxyDefinitionSpec defines the desired state of TykMcpProxyDefinitiontykMCP
Namespace is the namespace of configmap. If Namespace is not provided, we assume that the ConfigMap is in the same namespace as TykOasApiDefinition resource.
contextRef
Context specify namespace/name of the OperatorContext object used for reconciling this APIDefinition
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
SecurityPolicy
SecurityPolicySpec defines the desired state of SecurityPolicyTop-Level Fields
State can be active, draft or deny active: All keys are active and new keys can be created. draft: All keys are active but no new keys can be created. deny: All keys are deactivated and no keys can be created. Allowed values:
active, draft, deny.If you are linking an existing Policy ID to a new YAML CRD, then fill in this ID field with the “_id” field. See policies.md readme for more info
IsInactive applies to the key itself. Allows enabling or disabling the policy without deleting it.
KeyExpiresIn is the number of seconds till key expiry. For 1 hour is 3600. Default never expire or 0
To be used in conjunction with “Rate”. Per seconds. 1 minute=60. 1 hour=3600 omit or “-1” for unlimited
access_rights
Field access of GraphQL APIs can be restricted by setting up an allowed types list in a policy or directly on a key.
On controls how the configured match options combine.
all requires every option to match; any requires only one. An empty value behaves as all.Options holds the match rules evaluated against the request. At least one match type must be configured, or the condition fails validation. For access conditions, a repeated header or query parameter matches only if every value matches
match_rx. With reverse set, a rule is satisfied when the header, parameter, metadata key or context variable is absent, or when no value matches; for path parts, when no part matches; for the payload, when the body does not match.Maps an HTTP header name to a match rule tested against that header’s value. Header names are matched case insensitively.
Match rule evaluated against the request value named by its key (the header, query parameter, session metadata key or context variable). For path parts the key is not used to select a specific part: the rule is tested against all parts.
A set of match rules tested against every ”/“-separated part of the request path. The map key is not used to select which part is checked; each rule is tested against all parts.
Match rule evaluated against the request value named by its key (the header, query parameter, session metadata key or context variable). For path parts the key is not used to select a specific part: the rule is tested against all parts.
Maps a query parameter name to a match rule tested against that parameter’s value. Parameter names are case sensitive.
Match rule evaluated against the request value named by its key (the header, query parameter, session metadata key or context variable). For path parts the key is not used to select a specific part: the rule is tested against all parts.
Maps the name of a context variable, exposed elsewhere as
$tyk_context.<name>, such as remote_addr or request_id, to a match rule tested against that variable’s value. Only works with string values. Requires enable_context_vars on the API.Match rule evaluated against the request value named by its key (the header, query parameter, session metadata key or context variable). For path parts the key is not used to select a specific part: the rule is tested against all parts.
Maps a session metadata key, exposed elsewhere as
$tyk_meta.<name>, to a match rule tested against that metadata value. Only works with string values.Match rule evaluated against the request value named by its key (the header, query parameter, session metadata key or context variable). For path parts the key is not used to select a specific part: the rule is tested against all parts.
APIID is the ID of the API this access rule grants access to. It is normally resolved automatically from the referenced ApiDefinition resource, so you do not usually need to set it manually.
APIName is the name of the API this access rule grants access to. It is normally resolved automatically from the referenced ApiDefinition resource, so you do not usually need to set it manually.
TypeName points to a type on which depth limit is set. It can be either Query (most common case) or Mutation
Kind of the linked API Definition resource, case sensitive. Defaults to
ApiDefinition. Use TykOasApiDefinition for a Tyk OAS API Definition, TykStreamsApiDefinition for a Tyk Streams API Definition, TykMcpProxyDefinition for a Tyk MCP Proxy Definition, ApiDefinition for a Tyk Classic API Definition, or HTTPRoute for every API definition synthesized from a Gateway API HTTPRoute. One HTTPRoute entry expands to one access right per synthesized API definition (one per path group, effective domain, and accepted parentRef), not one per route. Allowed values: ApiDefinition, TykOasApiDefinition, TykStreamsApiDefinition, TykMcpProxyDefinition, HTTPRoute.Type is the MCP primitive type: “tool”, “resource”, or “prompt”. Allowed values:
tool, resource, prompt.Namespace of the ApiDefinition resource to target. Optional: a controller that supports it (TykSession) defaults it to the referring resource’s own namespace, which a required field would make unreachable.
Field access of GraphQL APIs can be restricted by setting up an allowed types list in a policy or directly on a key.
access_rights_array
Field access of GraphQL APIs can be restricted by setting up an allowed types list in a policy or directly on a key.
On controls how the configured match options combine.
all requires every option to match; any requires only one. An empty value behaves as all.Options holds the match rules evaluated against the request. At least one match type must be configured, or the condition fails validation. For access conditions, a repeated header or query parameter matches only if every value matches
match_rx. With reverse set, a rule is satisfied when the header, parameter, metadata key or context variable is absent, or when no value matches; for path parts, when no part matches; for the payload, when the body does not match.Maps an HTTP header name to a match rule tested against that header’s value. Header names are matched case insensitively.
Match rule evaluated against the request value named by its key (the header, query parameter, session metadata key or context variable). For path parts the key is not used to select a specific part: the rule is tested against all parts.
A set of match rules tested against every ”/“-separated part of the request path. The map key is not used to select which part is checked; each rule is tested against all parts.
Match rule evaluated against the request value named by its key (the header, query parameter, session metadata key or context variable). For path parts the key is not used to select a specific part: the rule is tested against all parts.
Maps a query parameter name to a match rule tested against that parameter’s value. Parameter names are case sensitive.
Match rule evaluated against the request value named by its key (the header, query parameter, session metadata key or context variable). For path parts the key is not used to select a specific part: the rule is tested against all parts.
Maps the name of a context variable, exposed elsewhere as
$tyk_context.<name>, such as remote_addr or request_id, to a match rule tested against that variable’s value. Only works with string values. Requires enable_context_vars on the API.Match rule evaluated against the request value named by its key (the header, query parameter, session metadata key or context variable). For path parts the key is not used to select a specific part: the rule is tested against all parts.
Maps a session metadata key, exposed elsewhere as
$tyk_meta.<name>, to a match rule tested against that metadata value. Only works with string values.Match rule evaluated against the request value named by its key (the header, query parameter, session metadata key or context variable). For path parts the key is not used to select a specific part: the rule is tested against all parts.
APIID is the ID of the API this access rule grants access to. It is normally resolved automatically from the referenced ApiDefinition resource, so you do not usually need to set it manually.
APIName is the name of the API this access rule grants access to. It is normally resolved automatically from the referenced ApiDefinition resource, so you do not usually need to set it manually.
TypeName points to a type on which depth limit is set. It can be either Query (most common case) or Mutation
Kind of the linked API Definition resource, case sensitive. Defaults to
ApiDefinition. Use TykOasApiDefinition for a Tyk OAS API Definition, TykStreamsApiDefinition for a Tyk Streams API Definition, TykMcpProxyDefinition for a Tyk MCP Proxy Definition, ApiDefinition for a Tyk Classic API Definition, or HTTPRoute for every API definition synthesized from a Gateway API HTTPRoute. One HTTPRoute entry expands to one access right per synthesized API definition (one per path group, effective domain, and accepted parentRef), not one per route. Allowed values: ApiDefinition, TykOasApiDefinition, TykStreamsApiDefinition, TykMcpProxyDefinition, HTTPRoute.Type is the MCP primitive type: “tool”, “resource”, or “prompt”. Allowed values:
tool, resource, prompt.Namespace of the ApiDefinition resource to target. Optional: a controller that supports it (TykSession) defaults it to the referring resource’s own namespace, which a required field would make unreachable.
Field access of GraphQL APIs can be restricted by setting up an allowed types list in a policy or directly on a key.
contextRef
Context specify namespace/name of the OperatorContext object used for reconciling this APIDefinition
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
meta_data
partitions
APIDescription
APIDescriptionSpec defines the desired state of APIDescriptionTop-Level Fields
AuthType displays as a badge next to the name of the API Allowed values:
keyless, jwt, oauth, authToken.IsKeyless toggles visibility of the
Request an API Key button. Use this when AuthType is keyless, jwt or oauth.LongDescription can be markdown. It allows you to describe the capabilities of the API and is displayed just below the name and AuthType in the catalogue listing page.
PolicyID explicitly sets the policy_id to be published. We do not recommend that this value is set directly. Rather, use
policyRef instead.ShortDescription is a brief summary of the API shown in the portal catalogue. Note that it may not be rendered by the default portal templates.
config
Config optionally overrides individual fields of the portal’s PortalConfig for this catalogue.
GrantTypes is an array of OAuth 2.0 grant type strings that the client can use at the token endpoint. Allowed values:
client_credentials, authorization_code, refresh_token.IDPHost is the fully qualified hostname of the Identity Provider. e.g. https://mysubdomain.eu.auth0.com
RegistrationEndpoint is the registration_endpoint as presented in the /.well-known/openid-configuration document.
TokenEndpointAuthMethod is an indicator of the requested authentication method for the token endpoint. “none”: The client is a public client and does not have a client secret. “client_secret_post”: The client uses the HTTP POST parameters “client_secret_basic”: The client uses HTTP Basic authentication Allowed values:
client_secret_basic, client_secret_post, client_secret_jwt, private_key_jwt, none.AccessToken represents an optional bearer token to authenticate with against the registration endpoint
Provider is an optional enum of the provider which allows Tyk to register clients outside the standard DCR spec and perform provider specific logic. If your provider is not in this list, please omit. Upon failure, submit a support ticket so that we may extend support for your provider. Allowed values:
gluu, keycloak, okta.ResponseTypes is an array of OAuth 2.0 response type strings that the client can use at the authorization endpoint. Allowed values:
code, token.DisableLogin disables login on developer portal.If you do not want developers to be able to login, set this value to true. You can use this configuration option in the portal templates to display or hide the login form as well as disabling the actual login method.
DisableSignup stop developer sign-up to the portal.This will stop developers from being able to signup, they will need to be created manually, or assigned keys via the key management API.
EnableMultiSelection enables subscribing to multiple APIs with single key.User will be able subscript any combination of exposed catalogues of the same authentication type
KeyRequestFields is a slice of fields which are asked of the portal developer when requesting an api key
Override overides global settings. These Catalogue settings are currently being overwritten by the Global Catalogue settings. Toggle the checkbox below to override them for this Catalogue.
RedirectOnKeyRequest redirects key requests. WHen set to true it will redirect key requests to the url specified in RedirectTo field
RequireKeyApproval requires reviewing of all key requests before approving them. By default developers will auto-enroll into an API and be given an API key. If you wish to review key requests before giving developers access to the API, enable this option and you will manually need to approve them in the ‘Key requests’ section of the dashboard.
SecureKeyApproval enables Secure key approval.By default, API keys when approved are sent in an email to the Developer. By enabling this option, the Developer will instead receive a link where they can go to generate the API key securely
SignUpFields is a slice of fields which are asked of the portal developer when they register for an account
contextRef
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
docs
fields
Fields is a generic map of key:value pairs. You may wish to use this to tag a catalogue as type:internal or type:public Then apply logic at the template layer to dynamically display catalogue apis to different user types.
policyRef
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
OperatorContext
OperatorContextSpec defines the desired state of OperatorContextdataPlane
DataPlane binds this context to a data plane group (environment): one or more Gateways that share the same data plane Service and tags. Only takes effect on an OperatorContext referenced from a Gateway’s
infrastructure.parametersRef; set on the GatewayClass’s parametersRef instead, it has no effect.ServiceRef is the Kubernetes Service fronting this environment’s data plane gateways. It must be in the same namespace as this resource. Gateway status addresses and listener port validation are derived from it.
Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
Tags are the segment tags of this environment, set as
server.gatewayTags on every synthesized API. Optional, but must contain at least one tag if set. Omitting it leaves gatewayTags unset on synthesized APIs.env
OperatorContextMode is the mode to which the admin api binding is done values are ce for community edition and pro for dashboard Allowed values:
ce, pro.secretRef
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
PortalAPICatalogue
PortalAPICatalogueSpec defines the desired state of PortalAPICatalogueTop-Level Fields
Email is Catalogue owner email address.Catalogue owner will be notified at this email address when an API subscription request is submitted or granted
apis
APIDescriptionList is a list of PortalCatalogueDescription published on this PortalAPICatalogue
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
AuthType displays as a badge next to the name of the API Allowed values:
keyless, jwt, oauth, authToken.Config optionally overrides individual fields of the portal’s PortalConfig for this catalogue.
GrantTypes is an array of OAuth 2.0 grant type strings that the client can use at the token endpoint. Allowed values:
client_credentials, authorization_code, refresh_token.IDPHost is the fully qualified hostname of the Identity Provider. e.g. https://mysubdomain.eu.auth0.com
RegistrationEndpoint is the registration_endpoint as presented in the /.well-known/openid-configuration document.
TokenEndpointAuthMethod is an indicator of the requested authentication method for the token endpoint. “none”: The client is a public client and does not have a client secret. “client_secret_post”: The client uses the HTTP POST parameters “client_secret_basic”: The client uses HTTP Basic authentication Allowed values:
client_secret_basic, client_secret_post, client_secret_jwt, private_key_jwt, none.AccessToken represents an optional bearer token to authenticate with against the registration endpoint
Provider is an optional enum of the provider which allows Tyk to register clients outside the standard DCR spec and perform provider specific logic. If your provider is not in this list, please omit. Upon failure, submit a support ticket so that we may extend support for your provider. Allowed values:
gluu, keycloak, okta.ResponseTypes is an array of OAuth 2.0 response type strings that the client can use at the authorization endpoint. Allowed values:
code, token.DisableLogin disables login on developer portal.If you do not want developers to be able to login, set this value to true. You can use this configuration option in the portal templates to display or hide the login form as well as disabling the actual login method.
DisableSignup stop developer sign-up to the portal.This will stop developers from being able to signup, they will need to be created manually, or assigned keys via the key management API.
EnableMultiSelection enables subscribing to multiple APIs with single key.User will be able subscript any combination of exposed catalogues of the same authentication type
KeyRequestFields is a slice of fields which are asked of the portal developer when requesting an api key
Override overides global settings. These Catalogue settings are currently being overwritten by the Global Catalogue settings. Toggle the checkbox below to override them for this Catalogue.
RedirectOnKeyRequest redirects key requests. WHen set to true it will redirect key requests to the url specified in RedirectTo field
RequireKeyApproval requires reviewing of all key requests before approving them. By default developers will auto-enroll into an API and be given an API key. If you wish to review key requests before giving developers access to the API, enable this option and you will manually need to approve them in the ‘Key requests’ section of the dashboard.
SecureKeyApproval enables Secure key approval.By default, API keys when approved are sent in an email to the Developer. By enabling this option, the Developer will instead receive a link where they can go to generate the API key securely
SignUpFields is a slice of fields which are asked of the portal developer when they register for an account
Fields is a generic map of key:value pairs. You may wish to use this to tag a catalogue as type:internal or type:public Then apply logic at the template layer to dynamically display catalogue apis to different user types.
IsKeyless toggles visibility of the
Request an API Key button. Use this when AuthType is keyless, jwt or oauth.LongDescription can be markdown. It allows you to describe the capabilities of the API and is displayed just below the name and AuthType in the catalogue listing page.
PolicyID explicitly sets the policy_id to be published. We do not recommend that this value is set directly. Rather, use
policyRef instead.The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
ShortDescription is a brief summary of the API shown in the portal catalogue. Note that it may not be rendered by the default portal templates.
contextRef
Context is reference to OperatorContext resource. Set this if you want to target a specific OperatorContext. When omitted default OperatorContext is used.
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
PortalConfig
PortalConfigSpec defines the desired state of PortalConfigTop-Level Fields
DisableLogin disables login on developer portal.If you do not want developers to be able to login, set this value to true. You can use this configuration option in the portal templates to display or hide the login form as well as disabling the actual login method.
DisableSignup stop developer sign-up to the portal.This will stop developers from being able to signup, they will need to be created manually, or assigned keys via the key management API.
EnableMultiSelection enables subscribing to multiple APIs with single key.User will be able subscript any combination of exposed catalogues of the same authentication type
KeyRequestFields is a slice of fields which are asked of the portal developer when requesting an api key
Override overides global settings. These Catalogue settings are currently being overwritten by the Global Catalogue settings. Toggle the checkbox below to override them for this Catalogue.
RedirectOnKeyRequest redirects key requests. WHen set to true it will redirect key requests to the url specified in RedirectTo field
RequireKeyApproval requires reviewing of all key requests before approving them. By default developers will auto-enroll into an API and be given an API key. If you wish to review key requests before giving developers access to the API, enable this option and you will manually need to approve them in the ‘Key requests’ section of the dashboard.
SecureKeyApproval enables Secure key approval.By default, API keys when approved are sent in an email to the Developer. By enabling this option, the Developer will instead receive a link where they can go to generate the API key securely
SignUpFields is a slice of fields which are asked of the portal developer when they register for an account
contextRef
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
dcr_options
GrantTypes is an array of OAuth 2.0 grant type strings that the client can use at the token endpoint. Allowed values:
client_credentials, authorization_code, refresh_token.IDPHost is the fully qualified hostname of the Identity Provider. e.g. https://mysubdomain.eu.auth0.com
RegistrationEndpoint is the registration_endpoint as presented in the /.well-known/openid-configuration document.
TokenEndpointAuthMethod is an indicator of the requested authentication method for the token endpoint. “none”: The client is a public client and does not have a client secret. “client_secret_post”: The client uses the HTTP POST parameters “client_secret_basic”: The client uses HTTP Basic authentication Allowed values:
client_secret_basic, client_secret_post, client_secret_jwt, private_key_jwt, none.AccessToken represents an optional bearer token to authenticate with against the registration endpoint
Provider is an optional enum of the provider which allows Tyk to register clients outside the standard DCR spec and perform provider specific logic. If your provider is not in this list, please omit. Upon failure, submit a support ticket so that we may extend support for your provider. Allowed values:
gluu, keycloak, okta.ResponseTypes is an array of OAuth 2.0 response type strings that the client can use at the authorization endpoint. Allowed values:
code, token.mail_options
SubGraph
SubGraphSpec defines the desired state of SubGraphTop-Level Fields
SuperGraph
SuperGraphSpec defines the desired state of SuperGraphTop-Level Fields
subgraph_refs
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
TykCertificate
TykCertificateSpec defines the desired state of TykCertificate.certificateSecretRef
CertificateSecretRef references a same-namespace Kubernetes TLS Secret (type kubernetes.io/tls) holding the certificate in tls.crt and its private key in tls.key. The Secret is the single source of truth for the certificate; the operator only reads it and never writes to or deletes it.
Namespace is the namespace of the Secret. When empty the TykCertificate’s own namespace is assumed; a cross-namespace reference is rejected by the admission webhook (a TLS Secret is same-namespace only, like every operator input Secret).
contextRef
Context specifies namespace/name of the OperatorContext object used for reconciling this TykCertificate. It defaults to the TykCertificate’s own namespace; an OperatorContext in another namespace may only be referenced when it opts in with the label tyk.tyk.io/allow-cross-namespace: “true”. The reference is immutable; create a new certificate to target another backend context.
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
TykIdentityProfile
TykIdentityProfileSpec defines the desired state of TykIdentityProfile. A TykIdentityProfile is a declarative Tyk Identity Broker (TIB) profile stored by the (embedded) Dashboard. It pairs a Provider (providerName + providerConfig) with an Action (actionType + identityHandlerConfig). The two config blocks are genuinely schemaless per provider, so they are carried as free-form JSON; secret leaves may reference a same-namespace Secret with the ${secretName:key} placeholder syntax (resolved in memory at reconcile time and never written back to the CR, status, events or logs).Top-Level Fields
ActionType selects what to do once an external identity is confirmed. Allowed values:
GenerateOrLoginDeveloperProfile, GenerateOrLoginUserProfile, GenerateOAuthTokenForClient, GenerateTemporaryAuthToken, GenerateOAuthTokenForPassword.ProviderConfig is the free-form, provider-specific configuration. Required. Secret leaves may use the ${secretName:key} placeholder to pull a value from a same-namespace Secret at reconcile time.
ProviderName selects the provider implementation (e.g. SocialProvider, ADProvider, SAMLProvider, ProxyProvider). Required, non-empty.
CustomUserGroupField is the IdP claim carrying the user’s group(s). It is the missing half of userGroupMapping: without it the broker has no claim to read group names from, so the mapping is inert. Broker payload, not operator scoping.
CustomUserOrgField is the IdP claim carrying the tenant/organisation, used by the broker to route a login to a Tyk organisation at login time (multi-org SSO). It is broker login-time routing payload (same category as userGroupMapping), NOT this profile’s owning org: it does not set or override spec/status org identity. When set, defaultOrgID is required.
DefaultOrgID is the fallback Tyk organisation id (24-char hex ObjectId) the broker routes a login to when the customUserOrgField claim is absent or unmapped. Required whenever customUserOrgField is set, so an unmapped login never resolves to no organisation. It is a login-time routing target, not this profile’s owning org.
DefaultUserGroupID is the fallback Tyk user group id for the minted session. It is a public identifier (like a pol_id), not a secret.
IdentityHandlerConfig is the free-form action/handler configuration. The Dashboard injects DashboardCredential server-side, so it must not be set here; secret leaves may use the ${secretName:key} placeholder.
ProfileName is the human-readable Name stored on the profile. Defaults to the CR name when empty.
UserGroupSeparator splits a multi-valued group claim (e.g. ”,” when the IdP packs several groups into one claim value) before userGroupMapping is applied.
apiRef
APIRef references an ApiDefinition or TykOasApiDefinition; it is resolved to the API’s Tyk api_id and injected into identityHandlerConfig.BaseAPIID. Optional, same-namespace only.
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
contextRef
Context specifies namespace/name of the OperatorContext used for reconciling this profile. It defaults to the profile’s own namespace; an OperatorContext in another namespace may only be referenced when it opts in with the label tyk.tyk.io/allow-cross-namespace: “true”. The reference is immutable; create a new profile to target another backend context.
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
matchedPolicyRef
MatchedPolicyRef references a SecurityPolicy applied to the minted session; it is resolved to the policy’s pol_id. Optional, same-namespace only.
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
orgMapping
OrgMapping maps a customUserOrgField claim value to a Tyk organisation id (a 24-char hex ObjectId). Keys are opaque claim values; values are login-time routing targets, broker payload in the same category as userGroupMapping — they are NOT this profile’s owning org.
providerConstraints
userGroupMapping
TykOAuthClient
TykOAuthClientSpec defines the desired state of TykOAuthClient.Top-Level Fields
ClientID is a custom (bring-your-own) client_id. Immutable once set. When empty, Tyk generates the client_id.
RedirectURI is the allowed OAuth redirect URI. Optional, but the client_credentials grant needs one: the Gateway refuses every token grant while it is empty. If set, it must be a valid absolute URL.
apiRef
APIRef references the OAuth2-enabled ApiDefinition or TykOasApiDefinition the client is bound to, by metadata.name; it is resolved to the API’s Tyk api_id. Required, and must live in the same namespace as the TykOAuthClient.
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
contextRef
Context specifies namespace/name of the OperatorContext object used for reconciling this TykOAuthClient. It defaults to the TykOAuthClient’s own namespace; an OperatorContext in another namespace may only be referenced when it opts in with the label tyk.tyk.io/allow-cross-namespace: “true”. The reference is immutable; create a new client to target another backend context.
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
credentialSecretRef
CredentialSecretRef references a Secret holding the user-supplied client_secret. Must be in the same namespace as the TykOAuthClient. When empty, Tyk generates the secret. The client_secret is honoured only at CREATE. Tyk ignores a submitted client_secret on update (both the Gateway’s updateOauthClient and the Dashboard, which proxies to it, reuse the stored secret), so rotating the referenced Secret does NOT change the live client’s secret - the operator emits a Warning “BYOSecretRotationIgnored” event when it detects this. To change the secret, delete and re-apply the TykOAuthClient.
Namespace is the namespace of secret. If Namespace is not provided, we assume that the secret is in the same namespace as TykOasApiDefinition resource.
metaData
policyRef
PolicyRef references a SecurityPolicy applied to tokens issued for this client; it is resolved to the policy’s pol_id. Optional, same-namespace. Be aware that the client_credentials grant requires a policy: the gateway builds each token’s session from the client’s policy, so a client provisioned without one reports Successful but every client_credentials token request fails with server_error (verified on Tyk Pro 5.8.14). Changing policyRef to a different policy on an already-provisioned client is not free: Tyk invalidates every live access token issued for this client the moment the policy binding changes (gateway invalidateTokens). The operator emits a Normal “PolicyChanged” event when a reconcile changes the resolved policy so the blast radius is visible in
kubectl describe.The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
writeToSecretRef
WriteToSecretRef names the operator-owned Secret the resulting client_id and client_secret are written to. Must be in the same namespace as the TykOAuthClient. Defaults to <name>-tyk-oauth.
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
TykRuleset
TykRuleset is the Schema for the tykrulesets API.Top-Level Fields
Action governs what happens when the Operator finds violations for this ruleset. Allowed values:
none, warn, block.ResourceType is what this ruleset applies to. Allowed values:
oas-api, mcp-api.ruleset
Ruleset is the source of the Spectral JSON/YAML body. Exactly one of raw or objRef must be set.
contextRef
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
TykSession
TykSessionSpec defines the desired state of TykSessionTop-Level Fields
KeyID is a custom (bring-your-own) key ID. Immutable once set. When empty, Tyk generates the key ID.
Type is the authentication mode of the key. Immutable. Allowed values:
token, basicAuth.accessRights
AccessRights grants direct (policy-less) access to APIs, keyed by an arbitrary identifier. They must reference resources in the same namespace as the TykSession.
Field access of GraphQL APIs can be restricted by setting up an allowed types list in a policy or directly on a key.
On controls how the configured match options combine.
all requires every option to match; any requires only one. An empty value behaves as all.Options holds the match rules evaluated against the request. At least one match type must be configured, or the condition fails validation. For access conditions, a repeated header or query parameter matches only if every value matches
match_rx. With reverse set, a rule is satisfied when the header, parameter, metadata key or context variable is absent, or when no value matches; for path parts, when no part matches; for the payload, when the body does not match.Maps an HTTP header name to a match rule tested against that header’s value. Header names are matched case insensitively.
Match rule evaluated against the request value named by its key (the header, query parameter, session metadata key or context variable). For path parts the key is not used to select a specific part: the rule is tested against all parts.
A set of match rules tested against every ”/“-separated part of the request path. The map key is not used to select which part is checked; each rule is tested against all parts.
Match rule evaluated against the request value named by its key (the header, query parameter, session metadata key or context variable). For path parts the key is not used to select a specific part: the rule is tested against all parts.
Maps a query parameter name to a match rule tested against that parameter’s value. Parameter names are case sensitive.
Match rule evaluated against the request value named by its key (the header, query parameter, session metadata key or context variable). For path parts the key is not used to select a specific part: the rule is tested against all parts.
Maps the name of a context variable, exposed elsewhere as
$tyk_context.<name>, such as remote_addr or request_id, to a match rule tested against that variable’s value. Only works with string values. Requires enable_context_vars on the API.Match rule evaluated against the request value named by its key (the header, query parameter, session metadata key or context variable). For path parts the key is not used to select a specific part: the rule is tested against all parts.
Maps a session metadata key, exposed elsewhere as
$tyk_meta.<name>, to a match rule tested against that metadata value. Only works with string values.Match rule evaluated against the request value named by its key (the header, query parameter, session metadata key or context variable). For path parts the key is not used to select a specific part: the rule is tested against all parts.
APIID is the ID of the API this access rule grants access to. It is normally resolved automatically from the referenced ApiDefinition resource, so you do not usually need to set it manually.
APIName is the name of the API this access rule grants access to. It is normally resolved automatically from the referenced ApiDefinition resource, so you do not usually need to set it manually.
TypeName points to a type on which depth limit is set. It can be either Query (most common case) or Mutation
Kind of the linked API Definition resource, case sensitive. Defaults to
ApiDefinition. Use TykOasApiDefinition for a Tyk OAS API Definition, TykStreamsApiDefinition for a Tyk Streams API Definition, TykMcpProxyDefinition for a Tyk MCP Proxy Definition, ApiDefinition for a Tyk Classic API Definition, or HTTPRoute for every API definition synthesized from a Gateway API HTTPRoute. One HTTPRoute entry expands to one access right per synthesized API definition (one per path group, effective domain, and accepted parentRef), not one per route. Allowed values: ApiDefinition, TykOasApiDefinition, TykStreamsApiDefinition, TykMcpProxyDefinition, HTTPRoute.Type is the MCP primitive type: “tool”, “resource”, or “prompt”. Allowed values:
tool, resource, prompt.Namespace of the ApiDefinition resource to target. Optional: a controller that supports it (TykSession) defaults it to the referring resource’s own namespace, which a required field would make unreachable.
Field access of GraphQL APIs can be restricted by setting up an allowed types list in a policy or directly on a key.
basicAuth
BasicAuth holds basic-auth configuration; required when type is basicAuth and forbidden otherwise.
contextRef
Context specifies namespace/name of the OperatorContext object used for reconciling this TykSession. It defaults to the TykSession’s own namespace; an OperatorContext in another namespace may only be referenced when it opts in with the label tyk.tyk.io/allow-cross-namespace: “true”. The reference is immutable; create a new key to target another backend context.
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
credentialSecretRef
CredentialSecretRef references a Secret holding the user-supplied credential value (the key seed, or the basic-auth password). Must be in the same namespace as the TykSession.
Namespace is the namespace of secret. If Namespace is not provided, we assume that the secret is in the same namespace as TykOasApiDefinition resource.
hmac
metaData
policies
Policies are references to SecurityPolicy resources applied to this key. They must live in the same namespace as the TykSession.
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
writeToSecretRef
WriteToSecretRef names the operator-owned Secret the resulting credential is written to. Must be in the same namespace as the TykSession.
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
TykUserGroup
TykUserGroupSpec defines the desired state of TykUserGroup. A TykUserGroup is a declarative, org-scoped Dashboard user group: a shared RBAC permission set (user_permissions) that Dashboard users are grouped under, and that TIB profiles / API ownership reference by id. It is Pro/Dashboard-only (the Gateway has no /usergroups API). It carries NO secret material — its whole payload is a name, description, active flag and an RBAC permission map.Top-Level Fields
Description is free text stored on the group. The operator also stamps a UID-bound, random-token ownership marker here; the user text is preserved.
GroupID optionally adopts/imports a pre-existing group by its 24-hex Mongo id (requires the tyk.tyk.io/adopt annotation). When empty the operator derives a deterministic id from the CR identity (design D1).
GroupName is the human-readable group name stored on the group. Defaults to the CR name when empty.
userPermissions
UserPermissions is the RBAC grant map (maps to user_permissions). Keys are Tyk ObjectGroups (apis, keys, policies, certs, hooks, analytics, users, user_groups, oauth, portal, system, …); values are read|write|admin|deny. The keys “IsAdmin” and “ResetPassword” are rejected (the Dashboard 403s them).
contextRef
Context specifies namespace/name of the OperatorContext used for reconciling this group. It defaults to the group’s own namespace; an OperatorContext in another namespace may only be referenced when it opts in with the label tyk.tyk.io/allow-cross-namespace: “true”. The reference is immutable; create a new group to target another backend context.
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
TykWebhook
TykWebhookSpec defines the desired state of TykWebhook. A TykWebhook is a declarative, reusable, org-scoped Dashboard webhook object (the object stored under /api/hooks that an API’s event handler fires by id). It is fully typed: every field is a first-class, validated CRD field. Header values are the single secret vector and may reference a same-namespace Secret with the ${secretName:key} placeholder syntax (resolved in memory at reconcile time and never written back to the CR, status, events or logs).Top-Level Fields
Method is the HTTP method fired at the target. Required. Allowed values:
GET, POST, PUT, PATCH, DELETE.TargetURL is the destination the webhook fires at (maps to target_path). Required, and must be an absolute URL.
WebhookName is the human-readable Name stored on the webhook. Defaults to the CR name when empty.
TemplatePath optionally names a request-body template file that MUST already exist on the Dashboard/gateway host; the operator only references it, it does not manage the file’s content.
contextRef
Context specifies namespace/name of the OperatorContext used for reconciling this webhook. It defaults to the webhook’s own namespace; an OperatorContext in another namespace may only be referenced when it opts in with the label tyk.tyk.io/allow-cross-namespace: “true”. The reference is immutable; create a new webhook to target another backend context.
The k8s namespace of the resource being targeted. When omitted this will be set to the namespace of the object that is being reconciled.
headers
Headers are sent with the webhook (maps to header_map). Values may embed ${secretName:key} to pull a value from a same-namespace Secret at reconcile time; the resolved value is never stored back to the CR, status or logs.