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

Users with role "user" can view config #1004

Closed
CannonLock opened this issue Mar 27, 2024 · 3 comments · Fixed by #1013
Closed

Users with role "user" can view config #1004

CannonLock opened this issue Mar 27, 2024 · 3 comments · Fixed by #1013
Assignees
Labels
bug Something isn't working
Milestone

Comments

@CannonLock
Copy link
Contributor

Pelican Version: Latest

Pelican Service:

  • [X ] Registry

Describe the bug
A clear and concise description of what the bug is.

If I login through CIlogon and gain the role of a user I can view the config.

{"authenticated":true,"role":"user","user":"http://cilogon.org/serverA/users/46022246"}

To Reproduce
Steps to reproduce the behavior.

Go to the registry page: https://osdf-registry.osg-htc.org/view/registry/

Sign in via CIlogon with a non admin account and view the config.

Expected behavior
A clear and concise description of what you expected to happen.

I expect the config to return a 403 which will redirect the user.

@CannonLock CannonLock added the bug Something isn't working label Mar 27, 2024
@haoming29
Copy link
Contributor

Thanks for catching this! I think #963 should fix it though, where we have a "whitelist" for pages that are open to the general public. For now, it's only "/view/director", "/view/registry", and "/view" (for the server selection page), other pages should be protected behind admin auth.

@CannonLock
Copy link
Contributor Author

@haoming29 Wouldn't I be able to login as user and hit the api though?

@haoming29
Copy link
Contributor

ah you are right. The API is also not protected by admin auth. Will have a separate PR to address all the issues here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants