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

Docs Update: Graceful shutdown request needs X-Trino-User header #22593

Open
mgorbatenko opened this issue Jul 5, 2024 · 9 comments
Open

Docs Update: Graceful shutdown request needs X-Trino-User header #22593

mgorbatenko opened this issue Jul 5, 2024 · 9 comments
Labels
good first issue Good for newcomers

Comments

@mgorbatenko
Copy link

mgorbatenko commented Jul 5, 2024

Not a huge deal, but the docs show this as an example api request for graceful shutdowns on worker nodes:

curl -v -X PUT -d '"SHUTTING_DOWN"' -H "Content-type: application/json" \
    http://worker:8081/v1/info/state

Without an X-Trino-User header, the request results in 401 Unauthorized.

It'd be nice if the docs include the header so that future users know to add it.

I've outlined some of my learnings on the Trino slack here.

@wendigo
Copy link
Contributor

wendigo commented Jul 5, 2024

cc @mosabua

@mosabua
Copy link
Member

mosabua commented Jul 5, 2024

Sounds good. Did you want to supply a complete example here or send a PR @mgorbatenko ?

@mgorbatenko
Copy link
Author

@mosabua I don't have the CLA signed but something like this example should do 😄

curl -v -X PUT -d '"SHUTTING_DOWN"' -H "Content-type: application/json" -H "X-Trino-User: authorizeduser" \
    http://worker:8081/v1/info/state

@mosabua mosabua added the good first issue Good for newcomers label Jul 5, 2024
@hashhar
Copy link
Member

hashhar commented Jul 8, 2024

X-Trino-User isn't the only requirement. The user must also have permissions to write "system information" (for a file-based access control example see #22589).

Additionally if cluster is protected by authentication then the request must be authenticated too.

@datasundae
Copy link

I am a new potential contributor focused on documentation. Would it make sense for me to make this change and submit a pull request (as a training exercise of sorts)?

@wendigo
Copy link
Contributor

wendigo commented Aug 10, 2024

@datasundae please do :)

@datasundae
Copy link

Does the @hashhar concern regarding "The user must also have permissions to write "system information" need to be addressed in the docs also? Would that just be a "Remember: The user must also have permissions to write "system information" statement?

datasundae added a commit to datasundae/trino that referenced this issue Aug 10, 2024
@datasundae
Copy link

OK I created a pull request. So far so good but I need to sign the CLA and it's not clear how I do that - expected a bot to direct me but didn't see anything. Will ask in the beginner Slack

@datasundae
Copy link

Nevermind CLA form came via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Development

No branches or pull requests

5 participants