You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crd/auth/README.md
+76-15Lines changed: 76 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Define authentication and authorization policies on the Ingress Citrix ADC
1
+
# Authentication and authorization policies for Kubernetes with Citrix ADC
2
2
3
3
Authentication and authorization policies are used to enforce access restrictions to the resources hosted by an application or API server. While you can verify the identity using the authentication policies, authorization policies are used to verify whether a specified request has the necessary permissions to access a resource.
4
4
@@ -26,10 +26,10 @@ The name of the services for which the authentication and authorization policies
26
26
27
27
The following authentication mechanisms are supported:
28
28
29
-
- Using request headers:
29
+
-Using request headers:
30
30
Enables user authentication using the request header. You can use this mechanism when the credentials or API keys are passed in a header (typically Authorization header). For example, you can use authentication using request headers for basic, digest, bearer authentication, or API keys.
31
31
32
-
- Using forms:
32
+
-Using forms:
33
33
You can use this mechanism with user or web authentication including the relying party configuration for OpenID connect and the service provider configuration for SAML.
34
34
35
35
When the authentication mechanism is not specified, the default is authentication using the request header.
@@ -51,7 +51,7 @@ The following are the attributes for forms based authentication.
51
51
52
52
### Authentication providers
53
53
54
-
The **providers** define the authentication mechanism and parameters that are required for the authentication mechanism.
54
+
The **providers** define the authentication mechanism and parameters that are required for the authentication mechanism.
55
55
56
56
#### Basic authentication
57
57
@@ -140,28 +140,51 @@ The following are the attributes for LDAP authentication.
140
140
141
141
The **authentication_policies** allow you to define the traffic selection criteria to apply the authentication mechanism and also to specify the provider that you want to use for the selected traffic.
142
142
143
-
The following are the attributes for policies:
143
+
Authentication policy supports two formats through which you can specify authentication rules:
144
+
145
+
- resource format
146
+
- expression format
147
+
148
+
The following are the attributes for policies with resource format:
144
149
145
150
| Attribute | Description |
146
151
| --------- | ----------- |
147
152
|`path`| An array of URL path prefixes that refer to a specific API endpoint. For example, `/api/v1/products/`. |
148
153
|`method`| An array of HTTP methods. Allowed values are GET, PUT, POST, or DELETE. </br>**Note:** The traffic is selected if the incoming request URI matches with any of the paths AND any of the listed methods. If the method is not specified then the path alone is used for the traffic selection criteria.|
149
154
|`provider`| Specifies the authentication mechanism that needs to be used. If the authentication mechanism is not provided, then authentication is not performed.|
150
155
151
-
**Note:** If you want to skip authentication for a specific end point, create a policy with the `provider` attribute set as empty list. Otherwise, the request is denied.
156
+
The following attributes are for authentication policies with expression format:
157
+
158
+
| Attribute | Description |
159
+
| --------- | ----------- |
160
+
|`expression`| Specifies Citrix ADC expression to be evaluated based on authentication |
161
+
|`provider`| Specifies the authentication mechanism that needs to be used. If the authentication mechanism is not provided, then authentication is not performed.|
162
+
163
+
**Note:** If you want to skip authentication for a specific end point, create a policy with the `provider` attribute set as empty list. Otherwise, the request is denied.
152
164
153
165
### Authorization policies
154
166
155
167
Authorization policies allow you to define the traffic selection criteria to apply the authorization requirements for the selected traffic.
156
168
157
-
The following are the attributes for authorization policies:
169
+
Authorization policy supports two formats through which the you can specify the authorization rules:
170
+
171
+
- resource format
172
+
- expression format
173
+
174
+
The following are the attributes for authorization policies with resource format:
158
175
159
176
| Attribute | Description |
160
177
| --------- | ----------- |
161
178
|`path`| An array of URL path prefixes that refer to a specific API endpoint. For example, `/api/v1/products/`. |
162
179
|`method`| An array of HTTP methods. Allowed values are GET, PUT, POST, or DELETE. |
163
180
|`claims`| Specifies the claims required to access a specific API endpoint. `name` indicates the claim name and `values` indicate the required permissions. You can have more than one claim. If an empty list is specified, it implies that authorization is not required. </br> **Note:** Any claim that needs to be used for authorization, should be saved as part of authentication.|
164
181
182
+
The following are the attributes for authorization policies with expression format:
183
+
184
+
| Attribute | Description |
185
+
| --------- | ----------- |
186
+
|`expression`| Specifies an expression to be evaluated for authorization. |
187
+
165
188
**Note:** Citrix ADC requires both authentication and authorization policies for the API traffic. Therefore, you must configure an authorization policy with an authentication policy. Even if you do not have any authorization checks, you must create an authorization policy with empty claims. Otherwise, the request is denied with a 403 error.
166
189
167
190
**Note:** Authorization would be successful if the incoming request matches a policy (path, method, and claims). All policies are tried until there is a match. If it is required to selectively bypass authorization for a specific end point, an explicit policy needs to be created.
@@ -294,6 +317,7 @@ spec:
294
317
method: [GET]
295
318
claims: []
296
319
```
320
+
297
321
The sample policy definition performs the following:
298
322
299
323
- Citrix ADC performs JWT verification on the requests to the following:
@@ -303,11 +327,8 @@ The sample policy definition performs the following:
303
327
- Citrix ADC requires the scope claim with the read permission for **GET** operation on the **orders** endpoint.
304
328
- Citrix ADC does not need any permissions for **GET** operation on the **shipping** end point.
305
329
306
-
307
-
308
330
For OAuth, if the token is present in a custom header, it can be specified using the `token_in_hdr` attribute as follows:
Copy file name to clipboardExpand all lines: docs/crds/auth.md
+76-16Lines changed: 76 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Define authentication and authorization policies on the Ingress Citrix ADC
1
+
# Authentication and authorization policies for Kubernetes with Citrix ADC
2
2
3
3
Authentication and authorization policies are used to enforce access restrictions to the resources hosted by an application or API server. While you can verify the identity using the authentication policies, authorization policies are used to verify whether a specified request has the necessary permissions to access a resource.
4
4
@@ -26,10 +26,10 @@ The name of the services for which the authentication and authorization policies
26
26
27
27
The following authentication mechanisms are supported:
28
28
29
-
- Using request headers:
29
+
-Using request headers:
30
30
Enables user authentication using the request header. You can use this mechanism when the credentials or API keys are passed in a header (typically Authorization header). For example, you can use authentication using request headers for basic, digest, bearer authentication, or API keys.
31
31
32
-
- Using forms:
32
+
-Using forms:
33
33
You can use this mechanism with user or web authentication including the relying party configuration for OpenID connect and the service provider configuration for SAML.
34
34
35
35
When the authentication mechanism is not specified, the default is authentication using the request header.
@@ -51,7 +51,7 @@ The following are the attributes for forms based authentication.
51
51
52
52
### Authentication providers
53
53
54
-
The **providers** define the authentication mechanism and parameters that are required for the authentication mechanism.
54
+
The **providers** define the authentication mechanism and parameters that are required for the authentication mechanism.
55
55
56
56
#### Basic authentication
57
57
@@ -140,28 +140,51 @@ The following are the attributes for LDAP authentication.
140
140
141
141
The **authentication_policies** allow you to define the traffic selection criteria to apply the authentication mechanism and also to specify the provider that you want to use for the selected traffic.
142
142
143
-
The following are the attributes for policies:
143
+
Authentication policy supports two formats through which you can specify authentication rules:
144
+
145
+
- resource format
146
+
- expression format
147
+
148
+
The following are the attributes for policies with resource format:
144
149
145
150
| Attribute | Description |
146
151
| --------- | ----------- |
147
152
|`path`| An array of URL path prefixes that refer to a specific API endpoint. For example, `/api/v1/products/`. |
148
153
|`method`| An array of HTTP methods. Allowed values are GET, PUT, POST, or DELETE. </br>**Note:** The traffic is selected if the incoming request URI matches with any of the paths AND any of the listed methods. If the method is not specified then the path alone is used for the traffic selection criteria.|
149
154
|`provider`| Specifies the authentication mechanism that needs to be used. If the authentication mechanism is not provided, then authentication is not performed.|
150
155
151
-
**Note:** If you want to skip authentication for a specific end point, create a policy with the `provider` attribute set as empty list. Otherwise, the request is denied.
156
+
The following attributes are for authentication policies with expression format:
157
+
158
+
| Attribute | Description |
159
+
| --------- | ----------- |
160
+
|`expression`| Specifies Citrix ADC expression to be evaluated based on authentication |
161
+
|`provider`| Specifies the authentication mechanism that needs to be used. If the authentication mechanism is not provided, then authentication is not performed.|
162
+
163
+
**Note:** If you want to skip authentication for a specific end point, create a policy with the `provider` attribute set as empty list. Otherwise, the request is denied.
152
164
153
165
### Authorization policies
154
166
155
167
Authorization policies allow you to define the traffic selection criteria to apply the authorization requirements for the selected traffic.
156
168
157
-
The following are the attributes for authorization policies:
169
+
Authorization policy supports two formats through which the you can specify the authorization rules:
170
+
171
+
- resource format
172
+
- expression format
173
+
174
+
The following are the attributes for authorization policies with resource format:
158
175
159
176
| Attribute | Description |
160
177
| --------- | ----------- |
161
178
|`path`| An array of URL path prefixes that refer to a specific API endpoint. For example, `/api/v1/products/`. |
162
179
|`method`| An array of HTTP methods. Allowed values are GET, PUT, POST, or DELETE. |
163
180
|`claims`| Specifies the claims required to access a specific API endpoint. `name` indicates the claim name and `values` indicate the required permissions. You can have more than one claim. If an empty list is specified, it implies that authorization is not required. </br> **Note:** Any claim that needs to be used for authorization, should be saved as part of authentication.|
164
181
182
+
The following are the attributes for authorization policies with expression format:
183
+
184
+
| Attribute | Description |
185
+
| --------- | ----------- |
186
+
|`expression`| Specifies an expression to be evaluated for authorization. |
187
+
165
188
**Note:** Citrix ADC requires both authentication and authorization policies for the API traffic. Therefore, you must configure an authorization policy with an authentication policy. Even if you do not have any authorization checks, you must create an authorization policy with empty claims. Otherwise, the request is denied with a 403 error.
166
189
167
190
**Note:** Authorization would be successful if the incoming request matches a policy (path, method, and claims). All policies are tried until there is a match. If it is required to selectively bypass authorization for a specific end point, an explicit policy needs to be created.
@@ -294,6 +317,7 @@ spec:
294
317
method: [GET]
295
318
claims: []
296
319
```
320
+
297
321
The sample policy definition performs the following:
298
322
299
323
- Citrix ADC performs JWT verification on the requests to the following:
@@ -303,11 +327,8 @@ The sample policy definition performs the following:
303
327
- Citrix ADC requires the scope claim with the read permission for **GET** operation on the **orders** endpoint.
304
328
- Citrix ADC does not need any permissions for **GET** operation on the **shipping** end point.
305
329
306
-
307
-
308
330
For OAuth, if the token is present in a custom header, it can be specified using the `token_in_hdr` attribute as follows:
0 commit comments