Skip to content

Commit 0ece87e

Browse files
authored
Merge pull request #124688 from FlorentATo/issue-124686
doc: [124686] Specify SHA-1 thumbprint
2 parents bec0613 + 8459171 commit 0ece87e

File tree

1 file changed

+30
-14
lines changed

1 file changed

+30
-14
lines changed

articles/api-management/validate-client-certificate-policy.md

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ For more information about custom CA certificates and certificate authorities, s
5454

5555
| Name | Description | Required | Default |
5656
| ------------------------------- | -----------------| -------- | ----------- |
57-
| validate-revocation | Boolean. Specifies whether certificate is validated against online revocation list. Policy expressions aren't allowed. | No | `true` |
58-
| validate-trust| Boolean. Specifies if validation should fail in case chain cannot be successfully built up to trusted CA. Policy expressions aren't allowed. | No | `true` |
59-
| validate-not-before | Boolean. Validates value against current time. Policy expressions aren't allowed.| No| `true` |
60-
| validate-not-after | Boolean. Validates value against current time. Policy expressions aren't allowed.| No| `true`|
61-
| ignore-error | Boolean. Specifies if policy should proceed to the next handler or jump to on-error upon failed validation. Policy expressions aren't allowed. | No | `false` |
57+
| validate-revocation | Boolean. Specifies whether certificate is validated against online revocation list. Policy expressions aren't allowed. | No | `true` |
58+
| validate-trust| Boolean. Specifies if validation should fail in case chain cannot be successfully built up to trusted CA. Policy expressions aren't allowed. | No | `true` |
59+
| validate-not-before | Boolean. Validates value against current time. Policy expressions aren't allowed.| No| `true` |
60+
| validate-not-after | Boolean. Validates value against current time. Policy expressions aren't allowed.| No| `true`|
61+
| ignore-error | Boolean. Specifies if policy should proceed to the next handler or jump to on-error upon failed validation. Policy expressions aren't allowed. | No | `false` |
6262

6363
## Elements
6464

@@ -70,27 +70,24 @@ For more information about custom CA certificates and certificate authorities, s
7070

7171
| Name | Description | Required | Default |
7272
| ------------------------------- | -----------------| -------- | ----------- |
73-
| thumbprint | Certificate thumbprint. | No | N/A |
73+
| thumbprint | Certificate SHA-1 thumbprint. | No | N/A |
7474
| serial-number | Certificate serial number. | No | N/A |
7575
| common-name | Certificate common name (part of Subject string). | No | N/A |
7676
| subject | Subject string. Must follow format of Distinguished Name, which consists of comma-separated name attributes, for example, *"CN=MyName, OU=MyOrgUnit, C=US..."*.| No | N/A |
7777
| dns-name | Value of dnsName entry inside Subject Alternative Name claim. | No | N/A |
78-
| issuer-subject | Issuer's subject. Must follow format of Distinguished Name, which consists of comma-separated name attributes, for example, *"CN=MyName, OU=MyOrgUnit, C=US..."*. | No | N/A |
79-
| issuer-thumbprint | Issuer thumbprint. | No | N/A |
80-
| issuer-certificate-id | Identifier of existing certificate entity representing the issuer's public key. Mutually exclusive with other issuer attributes. | No | N/A |
78+
| issuer-subject | Issuer's subject. Must follow format of Distinguished Name. | No | N/A |
79+
| issuer-thumbprint | Issuer SHA-1 thumbprint. | No | N/A |
80+
| issuer-certificate-id | Identifier of existing certificate entity representing the issuer's public key. Mutually exclusive with other issuer attributes. | No | N/A |
81+
8182

8283
## Usage
8384

8485
- [**Policy sections:**](./api-management-howto-policies.md#understanding-policy-configuration) inbound
8586
- [**Policy scopes:**](./api-management-howto-policies.md#scopes) global, workspace, product, API, operation
8687
- [**Gateways:**](api-management-gateways-overview.md) classic, v2, consumption, self-hosted, workspace
8788

89+
## Examples
8890

89-
### Usage notes
90-
91-
* You must use double quotes to enclose values of name attributes in the `subject` and `issuer-subject` attributes when they contain certain special characters such as ",". For example, specify `O="Contoso, Inc."` instead of `O=Contoso, Inc.` for the organization name. [Learn more](/windows/win32/api/wincrypt/nf-wincrypt-certnametostra#remarks)
92-
93-
## Example
9491

9592
The following example validates a client certificate to match the policy's default validation rules and checks whether the subject and issuer name match specified values.
9693

@@ -109,6 +106,25 @@ The following example validates a client certificate to match the policy's defau
109106
</validate-client-certificate>
110107
```
111108

109+
The following example performs a stricter validation by cheking whether the subject thumbprint and the issuer thumbprint match specified values.
110+
111+
```xml
112+
<validate-client-certificate
113+
validate-revocation="true"
114+
validate-trust="true"
115+
validate-not-before="true"
116+
validate-not-after="true"
117+
ignore-error="false">
118+
<identities>
119+
<identity
120+
thumbprint="AA11BB22CC33DD44EE55FF66AA77BB88CC99DD00"
121+
issuer-thumbprint="BB22CC33DD44EE55FF66AA77BB88CC99DD00EE11" />
122+
</identities>
123+
</validate-client-certificate>
124+
```
125+
126+
127+
112128
## Related policies
113129

114130
* [Authentication and authorization](api-management-policies.md#authentication-and-authorization)

0 commit comments

Comments
 (0)