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

Authenticating a python script #446

Closed
swhitman0 opened this issue Nov 11, 2021 · 3 comments
Closed

Authenticating a python script #446

swhitman0 opened this issue Nov 11, 2021 · 3 comments
Labels

Comments

@swhitman0
Copy link

Hello,

We use vouch-proxy to authenticate a web application. However, besides running the web application in a browser, we need to access some API endpoints programmatically from a Jupyter notebook. How can a python script authenticate a user to an API protected with vouch-proxy?

Thanks

@bnfinet
Copy link
Member

bnfinet commented Nov 11, 2021

@swhitman0 ...

if the script will run from within the network local to your protected API you could use satisfy any as per #378 (comment)

Otherwise it's going to have to wait for either #362 or perhaps #422 to be implemented.

How can a python script authenticate a user

If you do need a user to be specified you may want to populate the X-Vouch-User header to mimic the header that VP adds

@swhitman0
Copy link
Author

@bnfinet ...

Thanks for the response.

We were wondering if the device code flow could be used? (https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-device-code) We have successfully used the MSAL python library to authenticate using the device code flow, but we are at a loss as to what to do with the token returned by the flow.

@bnfinet
Copy link
Member

bnfinet commented Nov 11, 2021

@swhitman0 VP does not support the device code flow

@bnfinet bnfinet closed this as completed Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants