Skip to content

Commit

Permalink
docs: move settings to seperate file
Browse files Browse the repository at this point in the history
  • Loading branch information
dnikolay-ebc committed Jul 7, 2022
1 parent 18a2a73 commit 09688b9
Show file tree
Hide file tree
Showing 2 changed files with 146 additions and 125 deletions.
147 changes: 22 additions & 125 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,131 +36,6 @@ pre-commit
cp .env.EXAMPLE .env
```

#### Available settings

***ALLOWED_HOSTS***

*description:* Hosts that are allowed to access the application.
Only neccessary if DJANGO_DEBUG=FALSE

*default:* []

***COMPRESS_ENABLED***

*description:* Compress js/css files

*default:* not DJANGO_DEBUG

***DJANGO_DEBUG***

*description:* Run Django with debug options. Not for production use!

*default:* False

***DJANGO_SECRET_KEY***

*description:* Django secret

*default:* Auto generated key

***LANGUAGE_CODE***

*description:* Application default language

*default:* en-us

***LOGIN_REDIRECT_URL***

*description:* Application successful login redirect url.

*default:* /oidc/callback/

***LOGIN_URL***

*description:* Application login url. Requires further changes.

*default:* /oidc/authenticate

***LOGOUT_REDIRECT_URL***

*description:* Application successful logout redirect url.

*default:* /

***OIDC_OP_AUTHORIZATION_ENDPOINT***

*description:* OIDC provider authorization endpoint.

*default:* None

***OIDC_OP_JWKS_ENDPOINT***

*description:* OIDC provider jwks endpoint.

*default:* None

***OIDC_OP_TOKEN_ENDPOINT***

*description:* OIDC provider token endpoint.

*default:* None

***OIDC_OP_USER_ENDPOINT***

*description:* OIDC provider user endpoint.

*default:* None

***OIDC_PROJECT_ADMIN_ROLE***

*description:* Project admin role configured in OIDC provider.
Project admins can create projects and edit their own projects.

*default:* project_admin

***OIDC_RP_CLIENT_ID***

*description:* Client id from OIDC provider.

*default:* None

***OIDC_RP_CLIENT_SECRET***

*description:* Client secret from OIDC provider.

*default:* None

***OIDC_SERVER_ADMIN_ROLE***

*description:* Server admin role configured in OIDC provider.
Server admins can create/update projects for any project admin.

*default:* server_admin

***OIDC_SUPER_ADMIN_ROLE***

*description:* Super admin role configured in OIDC provider.

*default:* super_admin

***OIDC_TOKEN_ROLE_FIELD***

*description:* Field in ID token that represents user roles.

*default:* roles

***OIDC_USER_ROLE***

*description:* User role configured in OIDC provider.

*default:* user

***TIME_ZONE***

*description:* Application timezone

*default:* Europe/Berlin

## Usage

Migrate Database
Expand All @@ -180,6 +55,28 @@ Starting the Django server:

See the [contributing guide](./docs/CONTRIBUTING.md) for detailed instructions on how to get started with our project.

## Development

To run the application in your development setup you'll need to
provide following settings in your env file.

### Required

* [DJANGO_SECRET_KEY](./docs/SETTINGS.md#django_secret_key)
* [OIDC_OP_AUTHORIZATION_ENDPOINT](./docs/SETTINGS.md#oidc_op_authorization_endpoint)
* [OIDC_OP_JWKS_ENDPOINT](./docs/SETTINGS.md#oidc_op_jwks_endpoint)
* [OIDC_OP_TOKEN_ENDPOINT](./docs/SETTINGS.md#oidc_op_token_endpoint)
* [OIDC_OP_USER_ENDPOINT](./docs/SETTINGS.md#oidc_op_user_endpoint)
* [OIDC_RP_CLIENT_ID](./docs/SETTINGS.md#oidc_rp_client_id)
* [OIDC_RP_CLIENT_SECRET](./docs/SETTINGS.md#oidc_rp_client_secret)

### Optional

* [DJANGO_DEBUG](./docs/SETTINGS.md#django_debug)
* [COMPRESS_ENABLED](./docs/SETTINGS.md#compress_enabled)

For a full list of settings see [settings](./docs/SETTINGS.md).

## Changelog

See [changelog](./docs/CHANGELOG.md) for detailed overview of changes.
Expand Down
124 changes: 124 additions & 0 deletions docs/SETTINGS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# Settings

### ALLOWED_HOSTS

> *description:* Hosts that are allowed to access the application.
> Only neccessary if DJANGO_DEBUG=FALSE
>
> *default:* []
### COMPRESS_ENABLED

> *description:* Compress js/css files
>
> *default:* not DJANGO_DEBUG
### DJANGO_DEBUG

> *description:* Run Django with debug options. Not for production use!
>
> *default:* False
### DJANGO_SECRET_KEY

> *description:* Django secret (min. 32 characters)
>
> *default:* Auto generated key
### LANGUAGE_CODE

> *description:* Application default language
>
> *default:* en-us
### LOGIN_REDIRECT_URL

> *description:* Application successful login redirect url.
>
> *default:* /oidc/callback/
### LOGIN_URL

> *description:* Application login url. Requires further changes.
>
> *default:* /oidc/authenticate
### LOGOUT_REDIRECT_URL

> *description:* Application successful logout redirect url.
>
> *default:* /
### OIDC_OP_AUTHORIZATION_ENDPOINT

> *description:* OIDC provider authorization endpoint.
>
> *default:* None
### OIDC_OP_JWKS_ENDPOINT

> *description:* OIDC provider jwks endpoint.
>
> *default:* None
### OIDC_OP_TOKEN_ENDPOINT

> *description:* OIDC provider token endpoint.
>
> *default:* None
### OIDC_OP_USER_ENDPOINT

> *description:* OIDC provider user endpoint.
>
> *default:* None
### OIDC_PROJECT_ADMIN_ROLE

> *description:* Project admin role configured in OIDC provider.
Project admins can create projects and edit their own projects.
>
> *default:* project_admin
### OIDC_RP_CLIENT_ID

> *description:* Client id from OIDC provider.
>
> *default:* None
### OIDC_RP_CLIENT_SECRET

> *description:* Client secret from OIDC provider.
>
> *default:* None
### OIDC_SERVER_ADMIN_ROLE

> *description:* Server admin role configured in OIDC provider.
Server admins can create/update projects for any project admin.
>
> *default:* server_admin
### OIDC_SUPER_ADMIN_ROLE

> *description:* Super admin role configured in OIDC provider.
>
> *default:* super_admin
### OIDC_TOKEN_ROLE_FIELD

> *description:* Field in ID token that represents user roles.
>
> *default:* roles
### OIDC_USER_ROLE

> *description:* User role configured in OIDC provider.
>
> *default:* user
### TIME_ZONE

> *description:* Application timezone
>
> *default:* Europe/Berlin

0 comments on commit 09688b9

Please sign in to comment.