-
Notifications
You must be signed in to change notification settings - Fork 39
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
feat(server): Add function to check if service request is authenticated #9806
base: master
Are you sure you want to change the base?
Conversation
server/parsec/config.py
Outdated
# Bearer token used to authenticate the service API | ||
service_token: str |
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.
note: By service we mainly mean the API that will use parsec-auth
.
It's different from admin-token
since the operation done by parsec-auth
are read-only
981f226
to
85f08ed
Compare
@@ -43,6 +43,7 @@ def backend_config( | |||
email_config=MockedEmailConfig("[email protected]", tmpdir), | |||
blockstore_config=blockstore_config, | |||
administration_token="s3cr3t", | |||
service_token="P4ssw0rd", |
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.
service_token="P4ssw0rd", | |
service_token="s3rv1c3", |
P4ssw0rd
as token is a bit weird...
@@ -197,6 +197,9 @@ class BackendConfig: | |||
|
|||
# Bearer token used to authenticate the administration API | |||
administration_token: str | |||
# Bearer token used to authenticate the service API | |||
# If not defined, the API is not accessible | |||
service_token: str | None = None |
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.
What is this service API ?
If we end up with two unrelated APIs both using a token, we must further document what each of them are for.
85f08ed
to
b42a8bd
Compare
b42a8bd
to
ac3a4d0
Compare
No description provided.