From 42637bb9ae21e1d8b1a1fb6e401cd2f1028df16a Mon Sep 17 00:00:00 2001 From: Daniel Pan Date: Tue, 12 Nov 2024 15:29:30 +0800 Subject: [PATCH] Update document on multi-tenancy --- manual/config/multi_tenancy.md | 45 +++++++++------------------------- 1 file changed, 11 insertions(+), 34 deletions(-) diff --git a/manual/config/multi_tenancy.md b/manual/config/multi_tenancy.md index 1e439beb..6dff451c 100644 --- a/manual/config/multi_tenancy.md +++ b/manual/config/multi_tenancy.md @@ -1,7 +1,3 @@ ---- -status: new ---- - Multi-tenancy feature is designed for hosting providers that what to host several customers in a single Seafile instance. You can create multi-organizations. Organizations is separated from each other. Users can't share libraries between organizations. ## Seafile Config ## @@ -45,33 +41,31 @@ After creating an organization, the first user will become the admin of that org ### Preparation for ADFS/SAML -**The _system admin_ has to complete the following works.** - -**Fisrt**, install xmlsec1 package: - -``` -$ apt update -$ apt install xmlsec1 -``` - -**Second**, prepare SP(Seafile) certificate directory and SP certificates: +1) Prepare SP(Seafile) certificate directory and SP certificates: Create sp certs dir ``` -$ mkdir -p /opt/seafile/seahub-data/certs +$ mkdir -p /opt/seafile-data/seafile/seahub-data/certs ``` The SP certificate can be generated by the openssl command, or you can apply to the certificate manufacturer, it is up to you. For example, generate the SP certs using the following command: ``` -$ cd /opt/seafile/seahub-data/certs +$ cd /opt/seafile-data/seafile/seahub-data/certs $ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout sp.key -out sp.crt ``` !!! tip "The `days` option indicates the validity period of the generated certificate. The unit is day. The system admin needs to update the certificate regularly" -**Finally**, add the following configuration to seahub_settings.py and then restart Seafile: +!!! note + If certificates are **not placed in** `/opt/seafile-data/seafile/seahub-data/certs`, you need to add the following configuration in seahub_settings.py: + + ```python + SAML_CERTS_DIR = '/path/to/certs' + ``` + +2) Add the following configuration to seahub_settings.py and then restart Seafile: ```python ENABLE_MULTI_ADFS = True @@ -83,23 +77,6 @@ SAML_ATTRIBUTE_MAPPING = { } ``` -!!! note - - If the xmlsec1 binary is **not located in** `/usr/bin/xmlsec1`, you need to add the following configuration in seahub_settings.py: - - ```python - SAML_XMLSEC_BINARY_PATH = '/path/to/xmlsec1' - ``` - - View where the xmlsec1 binary is located: - - ``` - $ which xmlsec1 - ``` - - If certificates are **not placed in** `/opt/seafile/seahub-data/certs`, you need to add the following configuration in seahub_settings.py: - - ```python - SAML_CERTS_DIR = '/path/to/certs' - ``` ### Integration with ADFS/SAML single sign-on