Skip to content

Commit cb33751

Browse files
authored
Update required settings for ENABLE_MULTI_SAML to prevent issues with cross-domain cookies (#252)
Co-authored-by: Simon Hammes <simonhammes@users.noreply.github.com>
1 parent a6de40f commit cb33751

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

docs/configuration/authentication/saml-team.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ search:
88

99
in `dtable_web_settings.py` add these settings:
1010

11-
```bash
11+
```python
1212
# to activate teams in general
1313
CLOUD_MODE = True
1414
MULTI_TENANCY = True
1515

1616
# to activate multi-saml in general
1717
ENABLE_MULTI_SAML = True
18-
SAML_CERTS_DIR = '/opt/seatable/seatable-data'
18+
SAML_CERTS_DIR = '/shared/certs'
1919
```
2020

2121
SAML for Teams is also a role permission that has to be assigned to a role.
2222

23-
```bash
23+
```python
2424
ENABLED_ROLE_PERMISSIONS = {
2525
'org_default': {
2626
'can_use_saml': True
@@ -40,11 +40,20 @@ cd /opt/seatable-server/
4040
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout sp.key -out sp.crt
4141
```
4242

43-
```bash
43+
```python
4444
#SAML_CERTS_DIR = '/opt/seatable/seatable-data'
4545
#SAML_ATTRIBUTE_MAP = {
4646
#'uid': 'uid',
4747
# 'contact_email': 'contact_email',
4848
# 'name': 'name',
4949
#}
5050
```
51+
52+
If the SAML provider is on a separate domain (which it will definitely be in case of `cloud.seatable.io`), the following settings must be configured to prevent issues with cross-site cookies:
53+
54+
```python
55+
SESSION_COOKIE_SECURE = True
56+
SESSION_COOKIE_SAMESITE = 'None'
57+
CSRF_COOKIE_SECURE = True
58+
CSRF_COOKIE_SAMESITE = 'None'
59+
```

0 commit comments

Comments
 (0)