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

allow API token secret to be set through env var #141

Merged
merged 1 commit into from
Nov 1, 2023
Merged

Conversation

pmeier
Copy link
Member

@pmeier pmeier commented Nov 1, 2023

Without this, restarting the API will invalidate all active tokens up to this point, since they API has a new secret to verify them. The old default behavior is preserved. Meaning, if you don't set the RAGNA_DEMO_AUTHENTICATION_SECRET env var, we'll use a random on that changes with every start of the API.

This also removes the option to set the document upload secret for local documents through the configuration file. We shouldn't have done that in the first place. It can still be set through the same env var RAGNA_API_DOCUMENT_UPLOAD_SECRET as before.

Copy link
Contributor

@pierrotsmnrd pierrotsmnrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. tested locally

@pierrotsmnrd pierrotsmnrd merged commit 9b721fd into main Nov 1, 2023
10 checks passed
@pierrotsmnrd pierrotsmnrd deleted the stable-auth branch November 1, 2023 13:08
pierrotsmnrd added a commit that referenced this pull request Nov 1, 2023
commit 9b721fd
Author: Philip Meier <github.pmeier@posteo.de>
Date:   Wed Nov 1 14:08:20 2023 +0100

    allow API token secret to be set through env var (#141)

commit 17c227e
Author: Philip Meier <github.pmeier@posteo.de>
Date:   Wed Nov 1 10:13:08 2023 +0100

    dont create DB session as dependency (#138)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants