Skip to content

Commit 02dee36

Browse files
author
Lin Liu
committed
CP-311260: ldaps: update design document
- Update error codes * Current error code handing requires POOL_AUTH_ENABLE_FAILED error code prefix for enabling failed * Replace AUTH_LDAPS_PING_FAILED to general AUTH_SET_LDAPS_FAILED and provide ldaps failed as error message - Drop xapi configuration support * /etc/samba/smb.extra.conf drop the xapi configure passthrough - Log warning instead of sending warning message on ldap query failed * It is the current behavior * Send warning message got circle dependencies Xapi_subject->Xapi_messsage->Xapi_http->Xapi_session ->Xapi_subject This is because xapi message itself requires subject auth Signed-off-by: Lin Liu <lin.liu01@citrix.com>
1 parent ac1d2d2 commit 02dee36

File tree

1 file changed

+5
-34
lines changed

1 file changed

+5
-34
lines changed

doc/content/design/external-auth-ldaps.md

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,9 @@ Given `ldaps` default to `false`, this feature is **NOT** enabled until explicit
9191

9292
#### 3.1.2 Error code
9393
Following new error codes added to indicate ldaps enable related error
94-
- AUTH_NO_CERT, no certs can be used for ldaps, refer to 4.1.2 for certs finding.
95-
- AUTH_INVALID_CERT, found certs, but none of the certs can be used to connect to DC
94+
- POOL_AUTH_ENABLE_FAILED_NO_CERTS, no certs can be used for ldaps, refer to 4.1.2 for certs finding.
95+
- POOL_AUTH_ENABLE_FAILED_INVALID_CERTS, found certs, but none of the certs can be used to connect to DC
96+
**Note**: Current error code handing infrustrucure requires the error code prefix with POOL_AUTH_ENABLE_FAILED
9697

9798
### 3.2 Set/Get Pool LDAPS Status
9899

@@ -137,7 +138,7 @@ This API may raise following errors
137138
- AUTH_NO_CERT, no certs found to enable ldaps, refer to 4.1.2 for certs finding
138139
- AUTH_INVALID_CERT, found certs, but none of the certs can be used to connect to DC
139140
- AUTH_IS_DISABLED, AD is not enabled
140-
- AUTH_LDAPS_PING_FAILED, failed to do ldaps query on all DCs with valid certs
141+
- AUTH_SET_LDAPS_FAILED, Failed to set ldaps, the error message contains the details like ldap query on domain failed
141142

142143
#### 3.2.2 Get Pool LDAPS Status
143144

@@ -211,24 +212,6 @@ This design is following [trusted-certificates.md](https://github.com/xapi-proje
211212
- `pool.external_auth_set_ldaps` API
212213
- (Re)join domain
213214

214-
### 4.2 Xapi Configuration
215-
216-
#### 4.2.1 winbind-tls-verify-peer
217-
218-
For security, xapi asks winbind to verify CA certificate. `ca_and_name_if_available` is the default.
219-
220-
However, user may want to disable this verification for debug purpose.
221-
222-
`winbind-tls-verify-peer` is introduced for xapi configuration, and the possible values are `no_check`, `ca_only`, `ca_and_name_if_available`, `ca_and_name` and `as_strict_as_possible`.
223-
The configured value will override `tls verify peer` value in xapi generated samba configuration. Refer to [smb.conf](https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html) for the details.
224-
225-
226-
**Note:** This item is not intended for public documentation. This is only for debug purpose, or system tuning for specific scenarios from engineering/support team.
227-
228-
#### 4.2.2 ad-warning-message-interval
229-
230-
xapi sends warning message to user with this interval on LDAP query failure. Default to 1 week. Refer to section "Session revalidate" for the details.
231-
232215
## 5. Session Revalidate
233216

234217
xapi LDAP queries domain user status (if user has been added to manage XenServer) at configurable interval, and destroys the session created by domain user if user no longer in healthy status.
@@ -238,23 +221,11 @@ However, the LDAP query may fail due to various issues as follows:
238221
- Temporary network issues
239222
- CA certificate is not properly configured, or expired, etc.
240223

241-
Instead of destroying user session for stability, a warning message will be sent to user with the details at configurable interval `ad-warning-message-interval`.
242-
243-
- If no LDAP error, do nothing
244-
- If error happens, send the warning message if:
245-
- first time see the error through xapi start up (so no need to persist last send time) or
246-
- `current_time - last_sent_time > winbind_warning_message_interval`
247-
248-
The message is defined as follows:
249-
- name: AD_DC_LDAP_CHECK
250-
- priority: Warning
251-
- cls: `Host
252-
- Body: LDAP(S) query check to `<DC>` of `<domain>` failed from `<host>` of `<pool>`
224+
Instead of destroying user session for stability, a warning will be printed in xensource.log
253225

254226
Note:
255227
- The backend session revalidate check only performs on pool coordinator, thus the backend LDAP(S) query check only on coordinator
256228
- `external_auth_set_ldaps` perform LDAP(S) query check on every host
257-
- All previous AD_DC_LDAP_CHECK warning of a host will be cleaned on a successful LDAP(s) query from that host
258229

259230
## 6. Pool Join/Leave
260231

0 commit comments

Comments
 (0)