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

Support authentication using CLI and WeaverClient #400

Closed
fmigneault opened this issue Feb 2, 2022 · 0 comments · Fixed by #442
Closed

Support authentication using CLI and WeaverClient #400

fmigneault opened this issue Feb 2, 2022 · 0 comments · Fixed by #442
Assignees
Labels
feature/cli Issues or features related to CLI operations. triage/feature New requested feature.

Comments

@fmigneault
Copy link
Collaborator

Description

Some useful authentication handlers such as https://github.com/Ouranosinc/requests-magpie can be provided to auth parameter of requests to automatically resolve the authentication method before submitting a request.

Weaver should provide a way to support this kind of handlers when targeting a server that requires authentication.

For Python WeaverClient, this is straightforward. Simply expose an auth parameter that is passed down to any request operation it accomplishes. The user will then be able to call the client with its own implementation.

For the CLI, allowing custom auth handler implementations is a slightly trickier.
Parameters should be defined in a way to allow runtime instantiation of the auth handler implementation.
For example, https://github.com/Ouranosinc/requests-magpie, would be referenced as such:

weaver <operation> --auth-impl "requests_magpie.MagpieAuth" --auth-args "<magpie-url>,<magpie-user>,<magpie-pwd>"

When detecting those arguments, the CLI should instantiate the auth handler accordingly, and then pass it around as in the case of WeaverClient.

@fmigneault fmigneault added the triage/feature New requested feature. label Feb 2, 2022
@fmigneault fmigneault self-assigned this Feb 2, 2022
@fmigneault fmigneault added the feature/cli Issues or features related to CLI operations. label Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/cli Issues or features related to CLI operations. triage/feature New requested feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant