feat(base): Enforceable SSO ONLY

this setting removes the login form and forces a redirect to the SSO signin page.

!20 #1
This commit is contained in:
2024-06-07 19:33:57 +09:30
parent 3040d4afe7
commit b38984fcb9
4 changed files with 17 additions and 5 deletions

View File

@ -13,7 +13,7 @@ This page details the configuration for setting up the application.
- `SSO_ENABLED`, boolean
Single Sign on (SSO) is made possible through the [social django application](https://python-social-auth.readthedocs.io/en/latest/configuration/django.html). Specific configuration for the backend that you would like to configure can be viewed within it's [documentation](https://python-social-auth.readthedocs.io/en/latest/backends/index.html). In most cases the only configuration will need to be done for the following attributes: `SSO_ENABLED`, `SSO_BACKENDS` and `SOCIAL_AUTH_`.
Single Sign on (SSO) is made possible through the [social django application](https://python-social-auth.readthedocs.io/en/latest/configuration/django.html). Specific configuration for the backend that you would like to configure can be viewed within it's [documentation](https://python-social-auth.readthedocs.io/en/latest/backends/index.html). In most cases the only configuration that will need to be defined are for the following attributes: `SSO_ENABLED`, optionally `SSO_BACKENDS` and those with prefix `SOCIAL_AUTH_`.
!!! danger
Within the social django documentation, it will state the the configuration key for the backends is within attribute `AUTHENTICATION_BACKENDS`, don't use this attribute. Instead use attribute `SSO_BACKENDS` so as not to effect the authentication of the ITSM application.
@ -27,6 +27,8 @@ Attributes with prefix `SSO_` are specifically for this application.
SSO_ENABLED = True # Optional, boolean. Enable SSO Authentication
SSO_LOGIN_ONLY_BACKEND = 'oidc' # Optional, string. To only use SSO authentication, specify the backend name here
SSO_BACKENDS = ( # this attribute replaces `AUTHENTICATION_BACKENDS` and must be used instead of.
"social_core.backends.open_id_connect.OpenIdConnectAuth",
)

View File

@ -52,7 +52,7 @@ Settings for the application are stored within a docker volume at path `/etc/its
### Settings file
The settings file is a python file `.py` and must remain a valid python file for the application to work.
The settings file is a python file `.py` and must remain a valid python file for the application to work.
``` py title="settings.py"