Skip to content

Commit

Permalink
Merge branch 'main' into patch-7
Browse files Browse the repository at this point in the history
  • Loading branch information
diemade authored Apr 30, 2024
2 parents 3fa14f1 + a453d66 commit fd82eaa
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 8 deletions.
69 changes: 69 additions & 0 deletions docs/Advanced Configuration/Single Sign-On (SSO) Configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@

---
sidebar_position: 1
---
# Single Sign-On (SSO) Configuration

Stirling PDF allows login via Single Sign-On (SSO) using OAUTH2 OpenID Connect (OIDC)
These are
- ``oauth2.enabled`` Set this to 'true' to enable login (Note: ``enableLogin`` must also be 'true' for this to work)
- ``oauth2.issuer`` Set this to any provider that supports OpenID Connect Discovery ``/.well-known/openid-configuration`` end-point
- ``oauth2.clientId`` Client ID from your provider
- ``oauth2.clientSecret`` Client Secret from your provider
- ``oauth2.autoCreateUser`` Set this to 'true' to allow auto-creation of non-existing users

After the OAUTH2 login is enabled, a new button shows up on the login page as per the screenshot below:

![image](https://github.com/sahilph/Stirling-Tools.github.io/assets/812110/b0a84120-e8bb-4ea2-ac9e-4ec37520f7af)


## Settings file
```
security:
enableLogin: true # set to 'true' to enable login
...
...
oauth2:
enabled: false # set to 'true' to enable SSO login (Note: enableLogin must also be 'true' for this to work)
issuer: "" # set to any provider that supports OpenID Connect Discovery (/.well-known/openid-configuration) end-point
clientId: "" # Client ID from your provider
clientSecret: "" # Client Secret from your provider
autoCreateUser: false # set to 'true' to allow auto-creation of non-existing users
```

## Local
If running Java directly, you can set these via environment variables by running before starting the application
```
export DOCKER_ENABLE_SECURITY=true
export SECURITY_ENABLELOGIN=true
export SECURITY_OAUTH2_ENABLED=true
export SECURITY_OAUTH2_AUTOCREATEUSER=false
export SECURITY_OAUTH2_ISSUER="<issuer-url>"
export SECURITY_OAUTH2_CLIENTID="<client-id>"
export SECURITY_OAUTH2_CLIENTSECRET="<client-secret>"
```

## Docker

### Docker run
```
-e DOCKER_ENABLE_SECURITY=true \
-e SECURITY_ENABLELOGIN=true \
-e SECURITY_OAUTH2_ENABLED=true \
-e SECURITY_OAUTH2_AUTOCREATEUSER=false \
-e SECURITY_OAUTH2_ISSUER="<issuer-url>" \
-e SECURITY_OAUTH2_CLIENTID="<client-id>" \
-e SECURITY_OAUTH2_CLIENTSECRET="<client-secret>" \
```

### Docker Compose
```
environment:
DOCKER_ENABLE_SECURITY: true
SECURITY_ENABLELOGIN: true
SECURITY_OAUTH2_ENABLED: true
SECURITY_OAUTH2_AUTOCREATEUSER: false
SECURITY_OAUTH2_ISSUER: "<issuer-url>"
SECURITY_OAUTH2_CLIENTID: "<client-id>"
SECURITY_OAUTH2_CLIENTSECRET: "<client-secret>"
```
2 changes: 1 addition & 1 deletion docs/Functionality/Conversions/Overview.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 1
sidebar_position: 2
---
# Features - File Conversions

Expand Down
8 changes: 4 additions & 4 deletions docs/Functionality/Other/Overview.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 1
sidebar_position: 4
---
# Features - Additional Utilities

Expand All @@ -15,7 +15,7 @@ sidebar_position: 1

- `extract-image-scans`: This feature enables users to extract scanned images from PDF files.

- `sign`: This feature allows users to add their signature to PDF documents.
- `sign`: This feature allows users to add their writen signature to PDF documents. For digitally signing PDFs see Features - Security --> `cert_sign`

- `flatten`: This functionality enables users to flatten a PDF, merging interactive form fields with the document.

Expand All @@ -33,6 +33,6 @@ sidebar_position: 1

- `get-info-on-pdf`: Grabs and displays all information of a PDF and allows export of info into JSON format

- `show-javascript`: Shows any embedded javascript within a PDF.
- `show-javascript`: Shows any embedded javascript within a PDF

- `stamp`: Adds a user-defined text or image to the corner of certain or all PDF pages.
- `stamp`: Adds a user-defined text or image to the corner of certain or all PDF pages
5 changes: 3 additions & 2 deletions docs/Functionality/Security/Overview.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 1
sidebar_position: 3
---
# Features - Security

Expand All @@ -11,8 +11,9 @@ sidebar_position: 1

- `add-watermark`: This feature enables users to add custom watermarks to their PDFs.

- `cert-sign`: This feature enables users to digitally sign their PDFs using a certificate.
- `cert-sign`: This feature enables users to digitally sign their PDFs using a certificate. For (hand-)written signatures see Features - Additional Utilities --> `sign`

- `sanitize-pdf`: This allows the user to remove various things within the PDF which may cause security concern such as javascript, files, links, fonts and metadata.

- `auto-redact`: This features lets the user input text (or regex) to be redacted/blacked out from the pdf document.

2 changes: 1 addition & 1 deletion docs/Functionality/_category_.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"position": 2,
"link": {
"type": "generated-index",
"description": "All functionality and their catagories within Stirling-PDF."
"description": "All functionality and their categories within Stirling-PDF."
}
}

0 comments on commit fd82eaa

Please sign in to comment.