Skip to content

Authentication

Package v1alpha1 contains the API Schema definitions for WSO2 APK.

Authentication

Authentication

Authentication is the Schema for the authentications API

Field Description
apiVersion
string
dp.wso2.com/v1alpha2
kind
string
Authentication
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
AuthenticationSpec


default
AuthSpec
override
AuthSpec
targetRef
sigs.k8s.io/gateway-api/apis/v1alpha2.PolicyTargetReference
status
AuthenticationStatus

APIAuth

(Appears on: AuthSpec)

APIAuth Authentication scheme type and details

Field Description
oauth2
Oauth2Auth
(Optional)

Oauth2 is to specify the Oauth2 authentication scheme details

apiKey
[]APIKeyAuth
(Optional)

APIKey is to specify the APIKey authentication scheme details

jwt
JWT
(Optional)

JWT is to specify the JWT authentication scheme details

mtls
MutualSSLConfig
(Optional)

MutualSSL is to specify the features and certificates for mutual SSL

AuthSpec

(Appears on: AuthenticationSpec)

AuthSpec specification of the authentication service

Field Description
disabled
bool

Disabled is to disable all authentications

authTypes
APIAuth

AuthTypes is to specify the authentication scheme types and details

AuthenticationSpec

(Appears on: Authentication)

AuthenticationSpec defines the desired state of Authentication

Field Description
default
AuthSpec
override
AuthSpec
targetRef
sigs.k8s.io/gateway-api/apis/v1alpha2.PolicyTargetReference

AuthenticationStatus

(Appears on: Authentication)

Oauth2Auth

(Appears on: APIAuth)

Oauth2Auth OAuth2 Authentication scheme details

Field Description
required
string
(Optional)

Required indicates whether OAuth2 is mandatory or optional

disabled
bool
(Optional)

Disabled is to disable OAuth2 authentication

header
string
(Optional)

Header is the header name used to pass the OAuth2 token

sendTokenToUpstream
bool
(Optional)

SendTokenToUpstream is to specify whether the OAuth2 token should be sent to the upstream

MutualSSLConfig

(Appears on: APIAuth)

MutualSSLConfig scheme type and details

Field Description
disabled
bool
(Optional)

Disabled is to disable mTLS authentication

required
string
(Optional)

Required indicates whether mutualSSL is mandatory or optional

certificatesInline
[]*string

CertificatesInline is the Inline Certificate entry

secretRefs

SecretRefs denotes the reference to the Secret that contains the Certificate

configMapRefs

ConfigMapRefs denotes the reference to the ConfigMap that contains the Certificate

RefConfig

RefConfig holds a config for a secret or a configmap

Field Description
name
string

Name of the secret or configmap

key
string

Key of the secret or configmap


Generated with gen-crd-api-reference-docs.

Authentication Sample

The following is a sample CR for adding authentication to an API.

apiVersion: "dp.wso2.com/v1alpha2"
kind: "Authentication"
metadata:
  name: http-bin-authentication
spec:
  default:
    authTypes:
      oauth2:
        header: "Authorization"
        sendTokenToUpstream: true
        disabled: false
      mtls:
        required: optional
        configMapRefs:
          - name: mtls-test-configmap
            key: tls.crt
    disabled: false
  targetRef:
    group: "gateway.networking.k8s.io"
    kind: "API"
    name: default