|
| 1 | +--- |
| 2 | +apiVersion: apiextensions.k8s.io/v1 |
| 3 | +kind: CustomResourceDefinition |
| 4 | +metadata: |
| 5 | + annotations: |
| 6 | + controller-gen.kubebuilder.io/version: v0.17.3 |
| 7 | + name: workspaceauthenticationconfigurations.tenancy.kcp.io |
| 8 | +spec: |
| 9 | + group: tenancy.kcp.io |
| 10 | + names: |
| 11 | + categories: |
| 12 | + - kcp |
| 13 | + kind: WorkspaceAuthenticationConfiguration |
| 14 | + listKind: WorkspaceAuthenticationConfigurationList |
| 15 | + plural: workspaceauthenticationconfigurations |
| 16 | + singular: workspaceauthenticationconfiguration |
| 17 | + scope: Cluster |
| 18 | + versions: |
| 19 | + - name: v1alpha1 |
| 20 | + schema: |
| 21 | + openAPIV3Schema: |
| 22 | + description: |- |
| 23 | + WorkspaceAuthenticationConfiguration specifies additional authentication options |
| 24 | + for workspaces. |
| 25 | + properties: |
| 26 | + apiVersion: |
| 27 | + description: |- |
| 28 | + APIVersion defines the versioned schema of this representation of an object. |
| 29 | + Servers should convert recognized schemas to the latest internal value, and |
| 30 | + may reject unrecognized values. |
| 31 | + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
| 32 | + type: string |
| 33 | + kind: |
| 34 | + description: |- |
| 35 | + Kind is a string value representing the REST resource this object represents. |
| 36 | + Servers may infer this from the endpoint the client submits requests to. |
| 37 | + Cannot be updated. |
| 38 | + In CamelCase. |
| 39 | + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
| 40 | + type: string |
| 41 | + metadata: |
| 42 | + type: object |
| 43 | + spec: |
| 44 | + properties: |
| 45 | + jwt: |
| 46 | + items: |
| 47 | + properties: |
| 48 | + claimMappings: |
| 49 | + description: ClaimMappings provides the configuration for claim |
| 50 | + mapping. |
| 51 | + properties: |
| 52 | + extra: |
| 53 | + items: |
| 54 | + description: ExtraMapping provides the configuration for |
| 55 | + a single extra mapping. |
| 56 | + properties: |
| 57 | + key: |
| 58 | + type: string |
| 59 | + valueExpression: |
| 60 | + type: string |
| 61 | + required: |
| 62 | + - key |
| 63 | + - valueExpression |
| 64 | + type: object |
| 65 | + type: array |
| 66 | + groups: |
| 67 | + description: PrefixedClaimOrExpression provides the configuration |
| 68 | + for a single prefixed claim or expression. |
| 69 | + properties: |
| 70 | + claim: |
| 71 | + type: string |
| 72 | + expression: |
| 73 | + type: string |
| 74 | + prefix: |
| 75 | + type: string |
| 76 | + required: |
| 77 | + - claim |
| 78 | + type: object |
| 79 | + uid: |
| 80 | + description: ClaimOrExpression provides the configuration |
| 81 | + for a single claim or expression. |
| 82 | + properties: |
| 83 | + claim: |
| 84 | + type: string |
| 85 | + expression: |
| 86 | + type: string |
| 87 | + required: |
| 88 | + - claim |
| 89 | + type: object |
| 90 | + username: |
| 91 | + description: PrefixedClaimOrExpression provides the configuration |
| 92 | + for a single prefixed claim or expression. |
| 93 | + properties: |
| 94 | + claim: |
| 95 | + type: string |
| 96 | + expression: |
| 97 | + type: string |
| 98 | + prefix: |
| 99 | + type: string |
| 100 | + required: |
| 101 | + - claim |
| 102 | + type: object |
| 103 | + required: |
| 104 | + - groups |
| 105 | + - username |
| 106 | + type: object |
| 107 | + claimValidationRules: |
| 108 | + items: |
| 109 | + description: ClaimValidationRule provides the configuration |
| 110 | + for a single claim validation rule. |
| 111 | + properties: |
| 112 | + claim: |
| 113 | + type: string |
| 114 | + expression: |
| 115 | + type: string |
| 116 | + message: |
| 117 | + type: string |
| 118 | + requiredValue: |
| 119 | + type: string |
| 120 | + required: |
| 121 | + - claim |
| 122 | + - expression |
| 123 | + - message |
| 124 | + - requiredValue |
| 125 | + type: object |
| 126 | + type: array |
| 127 | + issuer: |
| 128 | + description: Issuer provides the configuration for an external |
| 129 | + provider's specific settings. |
| 130 | + properties: |
| 131 | + audienceMatchPolicy: |
| 132 | + description: AudienceMatchPolicyType is a set of valid values |
| 133 | + for Issuer.AudienceMatchPolicy. |
| 134 | + type: string |
| 135 | + audiences: |
| 136 | + items: |
| 137 | + type: string |
| 138 | + type: array |
| 139 | + certificateAuthority: |
| 140 | + type: string |
| 141 | + discoveryURL: |
| 142 | + description: |- |
| 143 | + discoveryURL, if specified, overrides the URL used to fetch discovery |
| 144 | + information instead of using "{url}/.well-known/openid-configuration". |
| 145 | + The exact value specified is used, so "/.well-known/openid-configuration" |
| 146 | + must be included in discoveryURL if needed. |
| 147 | +
|
| 148 | + The "issuer" field in the fetched discovery information must match the "issuer.url" field |
| 149 | + in the AuthenticationConfiguration and will be used to validate the "iss" claim in the presented JWT. |
| 150 | + This is for scenarios where the well-known and jwks endpoints are hosted at a different |
| 151 | + location than the issuer (such as locally in the cluster). |
| 152 | +
|
| 153 | + Example: |
| 154 | + A discovery url that is exposed using kubernetes service 'oidc' in namespace 'oidc-namespace' |
| 155 | + and discovery information is available at '/.well-known/openid-configuration'. |
| 156 | + discoveryURL: "https://oidc.oidc-namespace/.well-known/openid-configuration" |
| 157 | + certificateAuthority is used to verify the TLS connection and the hostname on the leaf certificate |
| 158 | + must be set to 'oidc.oidc-namespace'. |
| 159 | +
|
| 160 | + curl https://oidc.oidc-namespace/.well-known/openid-configuration (.discoveryURL field) |
| 161 | + { |
| 162 | + issuer: "https://oidc.example.com" (.url field) |
| 163 | + } |
| 164 | +
|
| 165 | + discoveryURL must be different from url. |
| 166 | + Required to be unique across all JWT authenticators. |
| 167 | + Note that egress selection configuration is not used for this network connection. |
| 168 | + type: string |
| 169 | + url: |
| 170 | + description: |- |
| 171 | + url points to the issuer URL in a format https://url or https://url/path. |
| 172 | + This must match the "iss" claim in the presented JWT, and the issuer returned from discovery. |
| 173 | + Same value as the --oidc-issuer-url flag. |
| 174 | + Discovery information is fetched from "{url}/.well-known/openid-configuration" unless overridden by discoveryURL. |
| 175 | + Required to be unique across all JWT authenticators. |
| 176 | + Note that egress selection configuration is not used for this network connection. |
| 177 | + type: string |
| 178 | + required: |
| 179 | + - url |
| 180 | + type: object |
| 181 | + userValidationRules: |
| 182 | + items: |
| 183 | + description: UserValidationRule provides the configuration |
| 184 | + for a single user validation rule. |
| 185 | + properties: |
| 186 | + expression: |
| 187 | + type: string |
| 188 | + message: |
| 189 | + type: string |
| 190 | + required: |
| 191 | + - expression |
| 192 | + - message |
| 193 | + type: object |
| 194 | + type: array |
| 195 | + required: |
| 196 | + - claimMappings |
| 197 | + - issuer |
| 198 | + type: object |
| 199 | + type: array |
| 200 | + required: |
| 201 | + - jwt |
| 202 | + type: object |
| 203 | + required: |
| 204 | + - metadata |
| 205 | + - spec |
| 206 | + type: object |
| 207 | + served: true |
| 208 | + storage: true |
0 commit comments