Renamed 'AUTH_TOKEN' to 'AUTH_INTERNAL_BEARER_TOKEN'. Updated README.md

This commit is contained in:
Glenn de Haan
2024-10-04 11:38:27 +02:00
parent 0998c37467
commit 0b2b18307d
3 changed files with 9 additions and 5 deletions

View File

@@ -82,7 +82,7 @@ services:
# The password used to log in to the voucher portal Web UI
AUTH_INTERNAL_PASSWORD: '0000'
# The Bearer token used for the API
AUTH_TOKEN: '00000000-0000-0000-0000-000000000000'
AUTH_INTERNAL_BEARER_TOKEN: '00000000-0000-0000-0000-000000000000'
# Toggle to enable/disable OIDC authentication
AUTH_OIDC_ENABLED: 'false'
# OIDC issuer base url provided by oauth provider. Example: https://auth.example.com/.well-known/openid-configuration
@@ -230,7 +230,7 @@ the different endpoints available in the API:
```
> This endpoint is protected by a security mechanism. To access it, users need to include a bearer token in the
request authorization header. The token must match the value of the `AUTH_TOKEN` environment variable. Without
request authorization header. The token must match the value of the `AUTH_INTERNAL_BEARER_TOKEN` environment variable. Without
this token, access to the endpoint will be denied.
4. **`/api/vouchers`**
@@ -269,7 +269,7 @@ the different endpoints available in the API:
```
> This endpoint is protected by a security mechanism. To access it, users need to include a bearer token in the
request authorization header. The token must match the value of the `AUTH_TOKEN` environment variable. Without
request authorization header. The token must match the value of the `AUTH_INTERNAL_BEARER_TOKEN` environment variable. Without
this token, access to the endpoint will be denied.
## Authentication
@@ -509,6 +509,10 @@ When upgrading from 3.x to 4.x, the following changes need to be made:
- **`AUTH_PASSWORD`** has been renamed to **`AUTH_INTERNAL_PASSWORD`**.
- Update your environment variable to use `AUTH_INTERNAL_PASSWORD` if you rely on internal authentication.
5. **Bearer Token Variable Rename**
- **`AUTH_TOKEN`** has been replaced by **`AUTH_INTERNAL_BEARER_TOKEN`**.
- Update your environment variable to use `AUTH_INTERNAL_BEARER_TOKEN` for api bearer token authentication.
### Migration from 2.x to 3.x
When upgrading from 2.x to 3.x, the following changes need to be made:

View File

@@ -14,7 +14,7 @@ services:
UNIFI_SSID_PASSWORD: ''
AUTH_INTERNAL_ENABLED: 'true'
AUTH_INTERNAL_PASSWORD: '0000'
AUTH_TOKEN: '00000000-0000-0000-0000-000000000000'
AUTH_INTERNAL_BEARER_TOKEN: '00000000-0000-0000-0000-000000000000'
AUTH_OIDC_ENABLED: 'false'
AUTH_OIDC_ISSUER_BASE_URL: ''
AUTH_OIDC_APP_BASE_URL: ''

View File

@@ -20,7 +20,7 @@ module.exports = {
serviceApi: config('service_api') || (process.env.SERVICE_API === 'true') || false,
authInternalEnabled: config('auth_internal_enabled') !== null ? config('auth_internal_enabled') : process.env.AUTH_INTERNAL_ENABLED ? process.env.AUTH_INTERNAL_ENABLED !== 'false' : true,
authInternalPassword: config('auth_internal_password') || process.env.AUTH_INTERNAL_PASSWORD || '0000',
authToken: config('auth_token') || process.env.AUTH_TOKEN || '00000000-0000-0000-0000-000000000000',
authToken: config('auth_internal_bearer_token') || process.env.AUTH_INTERNAL_BEARER_TOKEN || '00000000-0000-0000-0000-000000000000',
authOidcEnabled: config('auth_oidc_enabled') || (process.env.AUTH_OIDC_ENABLED === 'true') || false,
authOidcIssuerBaseUrl: config('auth_oidc_issuer_base_url') || process.env.AUTH_OIDC_ISSUER_BASE_URL || '',
authOidcAppBaseUrl: config('auth_oidc_app_base_url') || process.env.AUTH_OIDC_APP_BASE_URL || '',