Skip to content

Commit 00c6f68

Browse files
authored
CP-311020: ldaps design: declare error codes (#6877)
2 parents 3aa0929 + 6faf396 commit 00c6f68

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ The [trusted-certificates.md](https://github.com/xapi-project/xen-api/blob/maste
6666

6767
### 3.1 pool.enable_external_auth
6868

69+
#### 3.1.1 Interface
70+
6971
To enable external auth, the current API arguments are as follows:
7072

7173
- `pool` (Ref _pool): The pool whose external authentication should be enabled
@@ -87,9 +89,15 @@ This API signature does not change. Regarding the config map, one new option is
8789

8890
Given `ldaps` default to `false`, this feature is **NOT** enabled until explicitly set.
8991

92+
#### 3.1.2 Error code
93+
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
96+
9097
### 3.2 Set/Get Pool LDAPS Status
9198

9299
#### 3.2.1 pool.external_auth_set_ldaps
100+
#### 3.2.1.1 Interface
93101

94102
User can specify LDAPS during join domain as in 3.1.
95103

@@ -123,6 +131,13 @@ So following xe command can be used to switch between LDAP and LDAPS:
123131
xe pool-external-auth-set-ldaps uuid=<uuid> ldaps=<true|false>
124132
```
125133

134+
#### 3.2.1.2 Error code
135+
This API may raise following errors
136+
- AUTH_NO_CERT, no certs found to enable ldaps, refer to 4.1.2 for certs finding
137+
- AUTH_INVALID_CERT, found certs, but none of the certs can be used to connect to DC
138+
- AUTH_IS_DISABLED, AD is not enabled
139+
- AUTH_LDAPS_PING_FAILED, failed to do ldaps query on all DCs with valid certs
140+
126141
#### 3.2.2 Get Pool LDAPS Status
127142

128143
xapi generates a get message for each field automatically. To query the LDAPS status, client only needs to query the get method of `host` (class) → `external-auth-configuration` (field), and parse the result. The example as follows:

0 commit comments

Comments
 (0)