Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Single Sign-On Configuration.md #50

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion docs/Advanced Configuration/Single Sign-On Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@ These are
- ``oauth2.clientSecret`` Client Secret from your provider
- ``oauth2.autoCreateUser`` Set this to 'true' to allow auto-creation of non-existing users

Stirling PDF also displays an authentication provider on the button for your end users to press when attempting to login such as Google, Keycloak, or Github. You can also modify the button if you are not using one of those three to a Custom provider by using the below:
- ``oauth2.provider`` Set this to the String value you desire to see on the login screen.

The Callback URL (Redirect URL) for entering in your IdP is: ``https://<striling-pdf.yourdomain>/login/oauth2/code/<oidc-provider>`` eg ``https://<striling-pdf.yourdomain>/login/oauth2/code/keycloak``
If using a provider such as Authentik, you should replace the ``<oidc-provider>`` with ``oidc`` and not Authentik where it would appear as: ``https://<striling-pdf.yourdomain>/login/oauth2/code/oidc``

For more information on modifying Scopes, if required, see: https://github.com/Stirling-Tools/Stirling-PDF/blob/316b4e42afbac31696dc188bb2de1ab783d47a03/src/main/resources/settings.yml.template#L13-L21

It is highly recommended to use a SSL-enabled reverse-proxy, if the application is going to be exposed to the internet.

Expand All @@ -36,6 +42,7 @@ After the OAUTH2 login is enabled, a new button shows up on the login page as pe
clientId: "" # Client ID from your provider
clientSecret: "" # Client Secret from your provider
autoCreateUser: false # auto-creation of users
provider: name-you-want
```
</TabItem>
<TabItem value="local" label="Local Environment">
Expand All @@ -47,6 +54,7 @@ After the OAUTH2 login is enabled, a new button shows up on the login page as pe
export SECURITY_OAUTH2_ISSUER="<issuer-url>"
export SECURITY_OAUTH2_CLIENTID="<client-id>"
export SECURITY_OAUTH2_CLIENTSECRET="<client-secret>"
export SECURITY_OAUTH2_PROVIDER="<name-you-want>"
```
</TabItem>
<TabItem value="docker-run" label="Docker Run">
Expand All @@ -58,6 +66,7 @@ After the OAUTH2 login is enabled, a new button shows up on the login page as pe
-e SECURITY_OAUTH2_ISSUER="<issuer-url>" \
-e SECURITY_OAUTH2_CLIENTID="<client-id>" \
-e SECURITY_OAUTH2_CLIENTSECRET="<client-secret>" \
-e SECURITY_OAUTH2_PROVIDER="<name-you-want>" \
```
</TabItem>
<TabItem value="docker-compose" label="Docker Compose">
Expand All @@ -70,6 +79,7 @@ After the OAUTH2 login is enabled, a new button shows up on the login page as pe
SECURITY_OAUTH2_ISSUER: "<issuer-url>"
SECURITY_OAUTH2_CLIENTID: "<client-id>"
SECURITY_OAUTH2_CLIENTSECRET: "<client-secret>"
SECURITY_OAUTH2_PROVIDER: "<name-you-want>"
```
</TabItem>
</Tabs>
Expand Down Expand Up @@ -99,4 +109,4 @@ This can be done by changing the ``loginMethod`` setting accordingly to your nee
SECURITY_LOGINMETHOD: "oauth2" # to enable oauth2 only
```
</TabItem>
</Tabs>
</Tabs>