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

[POC] auth support for paasta APIs #3985

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

piax93
Copy link
Contributor

@piax93 piax93 commented Nov 1, 2024

Proof of concept support for an authn/z tween in the PaaSTA API (mostly inspired by previous work).

There's nothing too surprising here. Maybe the only unusual aspect is that I picked to make "dry-run" the default rather then the other way around. It'd make things easier to roll out if this becomes a thing.

I'll draft the client side change soon as well.


EDIT:

So, for how the codebase is structured loading the token transparently could be a bit of a pain, especially if we want to maintain a bunch of un-auth endpoints, so I just added the option to set the token header in the API client. From there in the CLI implementation that need auth we can do

from paasta_tools.cli.utils import get_sso_service_auth_token
...
get_paasta_oapi_client(..., get_sso_service_auth_token())

@piax93 piax93 requested a review from Qmando November 1, 2024 15:02
@piax93 piax93 requested a review from a team as a code owner November 1, 2024 15:02
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