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

api: require Authentication header when configured #76

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

TomasTomecek
Copy link
Collaborator

so we can run it securely without being bombed by bots

if LOGDETECTIVE_TOKEN is not set, the authentication check is disabled
for sake of local development

logdetective/server.py Fixed Show fixed Hide fixed
so we can run it securely without being bombed by bots

if LOGDETECTIVE_TOKEN is not set, the authentication check is disabled
for sake of local development

Signed-off-by: Tomas Tomecek <[email protected]>
Comment on lines +78 to +79
LOG.info("LOGDETECTIVE_TOKEN env var is set (%s), clien token = %s",
API_TOKEN, token)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just maybe not print the token value.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Why not? these are our logs; if someone can see that log, they can certainly access podman (and see the env var set there) or have shell access already.

Printing both values will make debugging much easier in case of issues.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Well if that's ok with you I'm not going to hold this PR over it.

@jpodivin jpodivin merged commit 8af1790 into fedora-copr:main Oct 11, 2024
3 checks passed
@TomasTomecek TomasTomecek deleted the require-api-token branch October 11, 2024 15:53
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.

2 participants