Querying the LDAP Configuration
Function
This API is used to query the LDAP configuration. Lightweight Directory Access Protocol (LDAP) is a standard protocol used for accessing and controlling directory servers. An LDAP server can centrally manage the relationship between users and groups. After an LDAP server is bound, when a user accesses a file in your file system, SFS Turbo accesses your LDAP server for user authentication and obtains the relationship between users and groups. In this way, standards Linux file UGO permissions are checked. To use this function, you need to first set up an LDAP server. SFS Turbo only supports LDAP v3 currently. Common directory servers that provide LDAP access include OpenLDAP (Linux) and Active Directory (Windows). The implementation varies depending on the directory server. When binding an LDAP server, you need to specify the corresponding schema. If the configured schema is incorrect, SFS Turbo cannot obtain the correct user and group information. As a result, users may fail to access files in the file system. Schemas that SFS Turbo supports include:
-
RFC2307 (Usually selected for OpenLDAP)
-
MS-AD-BIS (Usually selected for Active Directory. It supports RFC2307bis and nested groups.)
SFS Turbo also supports active and standby LDAP servers. If one LDAP server fails and cannot be accessed, SFS Turbo automatically switches to the standby LDAP server. In addition, if you set allow_local_user to Yes (default value is No), when both LDAP servers fail, SFS Turbo will use your local user and group information instead of the information configured on the LDAP server for identity authentication and UGO permissions check to minimize the fault impact.
URI
GET /v1/{project_id}/sfs-turbo/shares/{share_id}/fs/ldap
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID |
share_id |
Yes |
String |
File system ID |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Account token |
Content-Type |
Yes |
String |
MIME type |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
url |
String |
URL of the LDAP server |
base_dn |
String |
Base DN |
user_dn |
String |
User DN |
filter_condition |
String |
Filter criteria. This is a reserved field and is not supported currently. |
backup_url |
String |
URL of the standby LDAP server. |
schema |
String |
LDAP schema. If it is not specified, RFC2307 is used by default. |
search_timeout |
Integer |
LDAP search timeout interval, in seconds. If it is not specified, 3 seconds is used by default. |
allow_local_user |
String |
Whether to allow local user authentication after access to the LDAP server failed. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
errCode |
String |
Error code |
errMsg |
String |
Error description |
Example Requests
None
Example Responses
Status code: 200
Successful query
{ "url" : "ldap://192.168.xx.xx:60000", "base_dn" : "dc=example,dc=com", "user_dn" : "cn=admin,dc=example,dc=com", "backup_url" : "ldap://192.168.xx.xx:60000", "schema" : "RFC2307", "search_timeout" : 10, "allow_local_user" : "Yes" }
Status code: 500
Error response
{ "errCode" : "SFS.TURBO.0005", "errMsg" : "Internal server error" }
Status Codes
Status Code |
Description |
---|---|
200 |
Successful query |
500 |
Error response |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot