Merge pull request #348 from haiwen/SSO_LDAP_USE_SAME_UID
Some checks are pending
Deploy CI / deploy (push) Waiting to run

SSO_LDAP_USE_SAME_UID
This commit is contained in:
Daniel Pan 2024-10-17 11:01:04 +08:00 committed by GitHub
commit ea9b5556d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 0 deletions

View File

@ -422,6 +422,16 @@ DEL_GROUP_IF_NOT_FOUND = False # Set to "true", sync process will dele
DEL_DEPARTMENT_IF_NOT_FOUND = False # Set to "true", sync process will deleted the department if not found it in LDAP server.
```
### SSO and LDAP users use the same uid
If you sync users from LDAP to Seafile, when the user login via SSO (ADFS or OAuth), you want Seafile to find the existing account for this user instead of creating a new one, you can set `SSO_LDAP_USE_SAME_UID = True`:
```python
SSO_LDAP_USE_SAME_UID = True
```
Note, here the UID means the unique user ID, in LDAP it is the attribute you use for `LDAP_LOGIN_ATTR` (not `LDAP_UID_ATTR`), in ADFS it is `uid` attribute. You need make sure you use the same attribute for the two settings.
## Importing Roles from LDAP
Seafile Pro Edition supports syncing roles from LDAP or Active Directory.

View File

@ -179,6 +179,14 @@ DEL_GROUP_IF_NOT_FOUND = False # Set to "true", sync process will dele
DEL_DEPARTMENT_IF_NOT_FOUND = False # Set to "true", sync process will deleted the department if not found it in LDAP server.
```
If you sync users from LDAP to Seafile, when the user login via SSO (ADFS or OAuth), you want Seafile to find the existing account for this user instead of creating a new one, you can set `SSO_LDAP_USE_SAME_UID = True`:
```python
SSO_LDAP_USE_SAME_UID = True
```
Note, here the UID means the unique user ID, in LDAP it is the attribute you use for `LDAP_LOGIN_ATTR` (not `LDAP_UID_ATTR`), in ADFS it is `uid` attribute. You need make sure you use the same attribute for the two settings.
#### Migrate LDAP records
Run the following script to migrate users in `LDAPImported` to `EmailUsers`