-
Notifications
You must be signed in to change notification settings - Fork 0
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
JWT token only #73
Merged
Merged
JWT token only #73
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
309ae98
Use asymmetric jwt key instead of doing user management
sverhoeven debc103
Merge remote-tracking branch 'origin/main' into asym-jwt-only
sverhoeven c7ad0c6
No need to store access token anymore
sverhoeven bc5dc59
Ping db in /api/health
sverhoeven 79ac248
Use private to generate token + public key to verify
sverhoeven d5b6ff8
Add submitting user to picker
sverhoeven a7b047f
Fix tests + move jwt decoder creation from settings to lifespan + mak…
sverhoeven d3718df
Add public key in docker compose
sverhoeven 21cb45e
Make role claim in JWT optional
sverhoeven 1505b9c
Move allowed_roles to admin app + Add bind example for private key
sverhoeven a20d098
Move job root dir chapter up
sverhoeven File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -145,3 +145,5 @@ cython_debug/ | |
|
||
# The app config | ||
/config.yaml | ||
/private_key.pem | ||
/public_key.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../docs/deploy.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Deploy with docker compose | ||
|
||
Create config file `config.yaml` as described at [configuration.md](configuration.md). | ||
The `job_root_dir` property should be set to `/tmp/jobs` | ||
which is a Docker compose volume. | ||
|
||
Store public RSA key for JWT auth in `public_key.pem` file next to `config.yaml`. | ||
|
||
Start with | ||
|
||
```bash | ||
docker compose -f deploy/docker-compose.yml up | ||
``` | ||
|
||
Web service will running on <http://0.0.0.0:8000>. | ||
|
||
To login to web service you need to generate token and sign it with | ||
the private counterpart of the public key.g | ||
If you want to generate a token with the | ||
`docker compose -f deploy/docker-compose.yml exec api bartender generate-token` command | ||
you should uncomment the private key volume bind in `deploy/docker-compose.yml`. | ||
See [configuration.md#authentication](configuration.md#authentication). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,6 @@ | |
|
||
self | ||
develop | ||
user_management | ||
configuration | ||
deploy | ||
``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At first I couldn't find that setting on the linked page. It would be helpful if the
job_root_dir
section on that page was closer to this header. Perhaps just right above "applications"There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in a20d098