Skip to content

Rename default tenant in single-tenant instance #15

@benoitblanc

Description

@benoitblanc

Hi,

I was trying to deploy qwc-docker with a single tenant but I would like to set its name to something different than default.

I have set env var QWC_TENANT to mytenant. But I saw that having a tenant_name is one of conditions to consider multitenancy https://github.com/qwc-services/qwc-services-core/blob/master/qwc_services_core/tenant_handler.py#L25 so then I need to deal with TENANT_ACCESS_COOKIE_PATH and/or OVERRIDE_ACCESS_COOKIE_PATH and/or TENANT_PATH_PREFIX to be able to use qwc-services with renamed single tenant.

I finally set TENANT_PATH_PREFIX to '' and it seems to work fine.

I did not test the whole application but my first error when renaming the tenant name (only by setting QWC_TENANT) was at the login page. qwc-db-auth service can not load style file because url_for is prefixing static URL with JWT_ACCESS_COOKIE_PATH. (e.g try to access to /mytenant/style/style.css).

I was wondering some questions:

  • do we consider that renaming tenant with QWC_TENANT and having tenant_name is really a multitenancy case ?
  • is there another way to deal with default tenant renaming ?

Thanks for your inputs.

Benoît

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions