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

Require authentication to visit API browser #18328

Merged
merged 4 commits into from
Feb 22, 2024
Merged

Conversation

thll
Copy link
Contributor

@thll thll commented Feb 20, 2024

Previously, the API browser could be accessed without any restrictions. A user only had to provide credentials when executing API requests through the API browser, which required an authenticated user to succeed.

With this change, a user has to log in before visiting the API browser. It is sufficient to log in with any user known to Graylog. No particular permissions are required.

The username/password field has been removed from the header of the API browser because a valid user is now required. If users want to perform API requests with different credentials, they now have to log out of Graylog and re-login again with a different user.

When users navigate to the API browser at /api/api-browser (or the cluster-global version) directly, without first logging into Graylog, they will be presented with a Basic Auth credentials prompt. This isn't very nice, but I didn't deem replacing this with a proper redirect to the login page worthwhile because that would entail additional changes. We should move away from our customised API browser anyway, so I didn't want to invest energy here.

@thll thll marked this pull request as ready for review February 21, 2024 08:25
@thll thll requested a review from bernd February 21, 2024 08:25
@bernd bernd self-assigned this Feb 21, 2024
Copy link
Member

@bernd bernd left a comment

Choose a reason for hiding this comment

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

Thank you! 👍

@thll thll merged commit 397255d into master Feb 22, 2024
5 checks passed
@thll thll deleted the change/auth-api-browser branch February 22, 2024 08:21
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