Skip to content

Commit d8415a3

Browse files
committed
doc changes for release 1.24.4
1 parent a57f2c4 commit d8415a3

2 files changed

Lines changed: 152 additions & 31 deletions

File tree

crd/auth/README.md

Lines changed: 76 additions & 15 deletions
Original file line numberDiff line numberDiff 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
22

33
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.
44

@@ -26,10 +26,10 @@ The name of the services for which the authentication and authorization policies
2626

2727
The following authentication mechanisms are supported:
2828

29-
- Using request headers:
29+
- Using request headers:
3030
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.
3131

32-
- Using forms:
32+
- Using forms:
3333
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.
3434

3535
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.
5151

5252
### Authentication providers
5353

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.
5555

5656
#### Basic authentication
5757

@@ -140,28 +140,51 @@ The following are the attributes for LDAP authentication.
140140

141141
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.
142142

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:
144149

145150
| Attribute | Description |
146151
| --------- | ----------- |
147152
| `path` | An array of URL path prefixes that refer to a specific API endpoint. For example, `/api/v1/products/`. |
148153
| `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.|
149154
| `provider` | Specifies the authentication mechanism that needs to be used. If the authentication mechanism is not provided, then authentication is not performed.|
150155

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.
152164

153165
### Authorization policies
154166

155167
Authorization policies allow you to define the traffic selection criteria to apply the authorization requirements for the selected traffic.
156168

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:
158175

159176
| Attribute | Description |
160177
| --------- | ----------- |
161178
| `path` | An array of URL path prefixes that refer to a specific API endpoint. For example, `/api/v1/products/`. |
162179
| `method` | An array of HTTP methods. Allowed values are GET, PUT, POST, or DELETE. |
163180
| `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.|
164181

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+
165188
**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.
166189

167190
**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:
294317
method: [GET]
295318
claims: []
296319
```
320+
297321
The sample policy definition performs the following:
298322
299323
- Citrix ADC performs JWT verification on the requests to the following:
@@ -303,11 +327,8 @@ The sample policy definition performs the following:
303327
- Citrix ADC requires the scope claim with the read permission for **GET** operation on the **orders** endpoint.
304328
- Citrix ADC does not need any permissions for **GET** operation on the **shipping** end point.
305329

306-
307-
308330
For OAuth, if the token is present in a custom header, it can be specified using the `token_in_hdr` attribute as follows:
309331

310-
311332
oauth:
312333
issuer: "https://sts.windows.net/tenant1/"
313334
jwks_uri: "https://login.microsoftonline.com/tenant1/discovery/v2.0/keys"
@@ -439,6 +460,7 @@ spec:
439460
claims: []
440461
441462
```
463+
442464
The sample policy definition performs the following:
443465

444466
- Citrix ADC performs SAML authentication as specified in the provider `saml-auth-provider` for all requests.
@@ -492,11 +514,12 @@ spec:
492514
method: []
493515
claims: []
494516
```
517+
495518
The sample policy definition performs the following:
496519

497-
- Citrix ADC performs OIDC authentication (relying party) as specified in the provider “oidc-provider” for all requests.
520+
- Citrix ADC performs OIDC authentication (relying party) as specified in the provider “oidc-provider” for all requests.
498521
**Note:** Granular authentication is not supported for the forms mechanism.
499-
- Citrix ADC does not require any authorization permissions.
522+
- Citrix ADC does not require any authorization permissions.
500523

501524
### LDAP authentication using the request header
502525

@@ -598,13 +621,12 @@ spec:
598621
```
599622

600623
The sample policy definition performs the following:
601-
- Citrix ADC performs the LDAP authentication for entire traffic (all requests).
602-
- Citrix ADC does not apply any authorization permission.
603624

625+
- Citrix ADC performs the LDAP authentication for entire traffic (all requests).
626+
- Citrix ADC does not apply any authorization permission.
604627

605628
**LDAP_secret.yaml**
606629

607-
608630
The following is an example for `LDAP_secret.yaml`.
609631

610632
```yaml
@@ -617,4 +639,43 @@ stringData:
617639
username: 'ldap_server_username'
618640
password: 'ldap_server_password'
619641
642+
```
643+
644+
### Example for Citrix ADC expression support with Auth CRD
645+
646+
This example shows how you can specify Citrix ADC expressions along with authentication and authorization policies:
647+
648+
```yaml
649+
apiVersion: citrix.com/v1beta1
650+
kind: authpolicy
651+
metadata:
652+
name: authexample
653+
spec:
654+
servicenames:
655+
- frontend
656+
657+
authentication_mechanism:
658+
using_request_header: 'ON'
659+
660+
authentication_providers:
661+
- name: "ldap-auth-provider"
662+
ldap:
663+
664+
server_ip: "192.2.156.160"
665+
base: 'dc=aaa,dc=local'
666+
login_name: accountname
667+
sub_attribute_name: CN
668+
server_login_credentials: ldapcredential
669+
# "memberof" attribute details are extracted from LDAP server.
670+
attributes_to_save: memberof
671+
672+
authentication_policies:
673+
# Perform LDAP authentication for the host hotdrink.beverages.com
674+
- expression: 'HTTP.REQ.HOSTNAME.SET_TEXT_MODE(IGNORECASE).EQ("hotdrink.beverages.com")'
675+
provider: ["ldap-auth-provider"]
676+
677+
678+
authorization_policies:
679+
# ALLOW the session only if the authenticated user is associated with attribute "memberof" having value "grp4"
680+
- expression: 'aaa.user.attribute("memberof").contains("grp4")'
620681
```

docs/crds/auth.md

Lines changed: 76 additions & 16 deletions
Original file line numberDiff line numberDiff 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
22

33
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.
44

@@ -26,10 +26,10 @@ The name of the services for which the authentication and authorization policies
2626

2727
The following authentication mechanisms are supported:
2828

29-
- Using request headers:
29+
- Using request headers:
3030
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.
3131

32-
- Using forms:
32+
- Using forms:
3333
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.
3434

3535
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.
5151

5252
### Authentication providers
5353

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.
5555

5656
#### Basic authentication
5757

@@ -140,28 +140,51 @@ The following are the attributes for LDAP authentication.
140140

141141
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.
142142

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:
144149

145150
| Attribute | Description |
146151
| --------- | ----------- |
147152
| `path` | An array of URL path prefixes that refer to a specific API endpoint. For example, `/api/v1/products/`. |
148153
| `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.|
149154
| `provider` | Specifies the authentication mechanism that needs to be used. If the authentication mechanism is not provided, then authentication is not performed.|
150155

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.
152164

153165
### Authorization policies
154166

155167
Authorization policies allow you to define the traffic selection criteria to apply the authorization requirements for the selected traffic.
156168

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:
158175

159176
| Attribute | Description |
160177
| --------- | ----------- |
161178
| `path` | An array of URL path prefixes that refer to a specific API endpoint. For example, `/api/v1/products/`. |
162179
| `method` | An array of HTTP methods. Allowed values are GET, PUT, POST, or DELETE. |
163180
| `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.|
164181

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+
165188
**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.
166189

167190
**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:
294317
method: [GET]
295318
claims: []
296319
```
320+
297321
The sample policy definition performs the following:
298322
299323
- Citrix ADC performs JWT verification on the requests to the following:
@@ -303,11 +327,8 @@ The sample policy definition performs the following:
303327
- Citrix ADC requires the scope claim with the read permission for **GET** operation on the **orders** endpoint.
304328
- Citrix ADC does not need any permissions for **GET** operation on the **shipping** end point.
305329

306-
307-
308330
For OAuth, if the token is present in a custom header, it can be specified using the `token_in_hdr` attribute as follows:
309331

310-
311332
oauth:
312333
issuer: "https://sts.windows.net/tenant1/"
313334
jwks_uri: "https://login.microsoftonline.com/tenant1/discovery/v2.0/keys"
@@ -439,6 +460,7 @@ spec:
439460
claims: []
440461
441462
```
463+
442464
The sample policy definition performs the following:
443465

444466
- Citrix ADC performs SAML authentication as specified in the provider `saml-auth-provider` for all requests.
@@ -492,11 +514,12 @@ spec:
492514
method: []
493515
claims: []
494516
```
517+
495518
The sample policy definition performs the following:
496519

497-
- Citrix ADC performs OIDC authentication (relying party) as specified in the provider “oidc-provider” for all requests.
520+
- Citrix ADC performs OIDC authentication (relying party) as specified in the provider “oidc-provider” for all requests.
498521
**Note:** Granular authentication is not supported for the forms mechanism.
499-
- Citrix ADC does not require any authorization permissions.
522+
- Citrix ADC does not require any authorization permissions.
500523

501524
### LDAP authentication using the request header
502525

@@ -598,13 +621,12 @@ spec:
598621
```
599622

600623
The sample policy definition performs the following:
601-
- Citrix ADC performs the LDAP authentication for entire traffic (all requests).
602-
- Citrix ADC does not apply any authorization permission.
603624

625+
- Citrix ADC performs the LDAP authentication for entire traffic (all requests).
626+
- Citrix ADC does not apply any authorization permission.
604627

605628
**LDAP_secret.yaml**
606629

607-
608630
The following is an example for `LDAP_secret.yaml`.
609631

610632
```yaml
@@ -618,4 +640,42 @@ stringData:
618640
password: 'ldap_server_password'
619641
620642
```
621-
643+
644+
### Example for Citrix ADC expression support with Auth CRD
645+
646+
This example shows how you can specify Citrix ADC expressions along with authentication and authorization policies:
647+
648+
```yaml
649+
apiVersion: citrix.com/v1beta1
650+
kind: authpolicy
651+
metadata:
652+
name: authexample
653+
spec:
654+
servicenames:
655+
- frontend
656+
657+
authentication_mechanism:
658+
using_request_header: 'ON'
659+
660+
authentication_providers:
661+
- name: "ldap-auth-provider"
662+
ldap:
663+
664+
server_ip: "192.2.156.160"
665+
base: 'dc=aaa,dc=local'
666+
login_name: accountname
667+
sub_attribute_name: CN
668+
server_login_credentials: ldapcredential
669+
# "memberof" attribute details are extracted from LDAP server.
670+
attributes_to_save: memberof
671+
672+
authentication_policies:
673+
# Perform LDAP authentication for the host hotdrink.beverages.com
674+
- expression: 'HTTP.REQ.HOSTNAME.SET_TEXT_MODE(IGNORECASE).EQ("hotdrink.beverages.com")'
675+
provider: ["ldap-auth-provider"]
676+
677+
678+
authorization_policies:
679+
# ALLOW the session only if the authenticated user is associated with attribute "memberof" having value "grp4"
680+
- expression: 'aaa.user.attribute("memberof").contains("grp4")'
681+
```

0 commit comments

Comments
 (0)