Skip to content

Commit f7cf2ab

Browse files
Merge pull request #5546 from VivekVinushanth/vv-add-mtlsnew
Add thumbprint user & system user mapping doc
2 parents c45100e + 1ba547e commit f7cf2ab

File tree

1 file changed

+79
-1
lines changed
  • en/identity-server/next/docs/apis

1 file changed

+79
-1
lines changed

en/identity-server/next/docs/apis/index.md

Lines changed: 79 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,86 @@ Add the following configuration to the `deployment.toml` file to enable this fea
145145
- If the user is not a super tenant and belongs to the primary user store, the incoming cert CN should be `<username@tenant_doman>`, e.g., `[email protected]`.
146146
- If the user is not a super tenant and belongs to a secondary user store, the incoming cert CN should be `<userstore_domain>/<username@tenant_doman>` e.g., `SECONDARY/[email protected]`.
147147

148+
### Client certificate authentication mappings
148149

149-
## Additional configurations
150+
WSO2 Identity Server now supports two configuration models for mapping client certificates to users or system accounts. These mappings provide flexibility when securing System REST APIs with mTLS.
151+
152+
---
153+
154+
#### 1. Authentication with no user header
155+
156+
This mode is used for **machine-to-machine (M2M)** calls where no `WSO2-Identity-User` header is present. In this scenario certificates are mapped to **system users**.
157+
158+
| Configuration | Possible Value | Description |
159+
|---------------|----------------|-------------|
160+
| `[client_certificate_based_authentication] enable` | `true` | Enables mTLS-based authentication for System REST APIs. |
161+
| `trusted_issuer` | `"C=AU, ST=Northern, L=Colombo, O=WSO2, OU=IAM, CN=RootCA, [email protected]"` | Distinguished name (DN) of the permitted certificate issuer. |
162+
| `cert_thumbprint` | `"78:9B:25:49:5A:A6:DA:74:9C:F7:A8:90:CE:B9:21:EA:EC:C7:22:2A:B3:77:41:1B:6D:48:22:91:98:A9:FD:47"` or `*` | Exact certificate fingerprint, or `*` to allow all issued by the trusted issuer. |
163+
| `allowed_system_user` | `"admin"` or `"*"` | The system user mapped to the certificate. `*` means any system user. |
164+
165+
**Supported patterns:**
166+
167+
| Trusted Issuer | Thumbprint | Allowed System User | Description |
168+
|----------------|------------|---------------------|------------------------------------------------------------------------------------------------------------------------------|
169+
| Specific DN | * | * | Any certificate from the trusted issuer can be used by any system user.<br/> WSO2 doesn't recommend this for production use. |
170+
| Specific DN | * | system_user | Any certificate from the trusted issuer can be used by the specified system user. |
171+
| Specific DN | Specific | system_user | Certificates with a listed thumbprint can be used by the specified system user.<br/> **Recommended pattern**. |
172+
| Specific DN | Specific | * | Certificates with a listed thumbprint can be used by any system user. |
173+
174+
**Example:**
175+
176+
```toml
177+
[client_certificate_based_authentication]
178+
enable = true
179+
180+
[[client_certificate_based_authentication.system_thumbprint_mapping]]
181+
trusted_issuer = "C=US, ST=TX, L=Colombo, O=WSO2, OU=IAM, CN=RootCA, [email protected]"
182+
cert_thumbprint = "78:9B:25:49:5A:A6:DA:74:9C:F7:A8:90:CE:B9:21:EA:EC:C7:22:2A:B3:77:41:1B:6D:48:22:91:98:A9:FD:47"
183+
allowed_system_user = "admin"
184+
```
185+
#### 2. Authentication with `WSO2-Identity-User` header
186+
187+
This mode is used when the client presents both a **certificate** and a **user header**. The certificates are mapped to **application users**.
188+
189+
---
190+
191+
##### Configuration parameters
192+
193+
| Configuration | Possible Value | Description |
194+
|---------------|----------------|-------------|
195+
| `[client_certificate_based_authentication] enable` | `true` | Enables mTLS-based authentication for System REST APIs. |
196+
| `trusted_issuer` | `"C=AU, ST=Northern, L=Colombo, O=WSO2, OU=IAM, CN=RootCA, [email protected]"` | Distinguished name (DN) of the permitted certificate issuer. |
197+
| `cert_thumbprint` | `"78:9B:25:49:..."` or `*` | Exact certificate fingerprint, or `*` to allow all issued by the trusted issuer. |
198+
| `allowed_username` | `["admin", "[email protected]"]` or `["*"]` | List of usernames allowed to authenticate with this certificate. |
199+
200+
---
201+
202+
##### Supported patterns
203+
204+
| Trusted Issuer | Thumbprint | Allowed Usernames | Description |
205+
|----------------|------------|-------------------|----------------------------------------------------------------------------------------------------------------|
206+
| Specific DN | * | [*] | Any certificate from the trusted issuer can be used by any user.<br/>️ It's not recommended for production use. |
207+
| Specific DN | * | [user1, user2] | Any certificate from the trusted issuer can be used by specific users. |
208+
| Specific DN | Specific | [user1, user2] | Certificates with a listed thumbprint can be used by the specified users.<br/> **Recommended pattern**. |
209+
| Specific DN | Specific | [*] | Certificates with a listed thumbprint can be used by any user. |
210+
211+
---
212+
213+
##### Example
214+
215+
```toml
216+
[client_certificate_based_authentication]
217+
enable = true
218+
219+
[[client_certificate_based_authentication.user_thumbprint_mapping]]
220+
trusted_issuer = "C=AU, ST=Northern, L=Colombo, O=WSO2, OU=IAM, CN=RootCA, [email protected]"
221+
cert_thumbprint = "78:9B:25:49:5A:A6:DA:74:9C:F7:A8:90:CE:B9:21:EA:EC:C7:22:2A:B3:77:41:1B:6D:48:22:91:98:A9:FD:47"
222+
allowed_username = ["admin", "[email protected]"]
223+
```
224+
225+
!!! note
226+
WSO2 doesn't recommend using wildcards in production unless it necessitates.
227+
For stronger security, bind certificates to specific users or system accounts wherever possible.
150228

151229
This section covers the additional configurations that admins can use when using APIS.
152230

0 commit comments

Comments
 (0)