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

WeaverClient/CLI with auth handler and other CLI adjustments #442

Merged
merged 25 commits into from
Jun 9, 2022

Conversation

fmigneault
Copy link
Collaborator

@fmigneault fmigneault commented Jun 2, 2022

Changes:

  • Add CLI Authentication Handler parameters and corresponding auth argument of instantiated classes for
    WeaverClient methods that allows inline request authentication and authorization resolution to access a
    protected service. Any Authentication Handler implementation can be used to fulfill required server functionalities.
  • Replaced CLI option -t by -T (Docker token) during deploy operation to match naming convention of
    other options (resolves Support authentication using CLI and WeaverClient #400).
  • Replaced CLI option -H by nH (--no-headers) and wH (--with-headers) to respectively
    enable or (explicitly) disable return of headers from response of the executed operation.
  • Replaced CLI option -L by nL (--no-links) and wL (--with-links) to respectively
    enable (explicitly) or disable return of links from response of the executed operation.
  • Replaced previously defined -H option by new -H/--header argument allowing insertion of explicitly provided
    request headers for relevant requests called by the executed operation.

Fixes:

  • Fix CLI operations assuming valid JSON response to instead return error response content and status code.
  • Fix CLI rendering of various optional arguments and groups when displaying help messages.

References

Resolves DAC-460

@fmigneault fmigneault self-assigned this Jun 2, 2022
@github-actions github-actions bot added ci/doc Issue related to documentation of the package ci/tests Tests of the package and features feature/cli Issues or features related to CLI operations. process/workflow Related to a Workflow process. labels Jun 2, 2022
@github-actions github-actions bot added the ci/operations Related to CI operations (actions, execution, install, builds, etc.) label Jun 2, 2022
@github-actions github-actions bot added the feature/db Related to database or datatype manipulation. label Jun 3, 2022
@codecov
Copy link

codecov bot commented Jun 3, 2022

Codecov Report

Merging #442 (fdbbc8a) into master (44c72d8) will increase coverage by 0.31%.
The diff coverage is 80.89%.

@@            Coverage Diff             @@
##           master     #442      +/-   ##
==========================================
+ Coverage   81.17%   81.48%   +0.31%     
==========================================
  Files          76       76              
  Lines       14281    14542     +261     
  Branches     3109     3158      +49     
==========================================
+ Hits        11592    11850     +258     
+ Misses       1982     1974       -8     
- Partials      707      718      +11     
Impacted Files Coverage Δ
weaver/store/base.py 100.00% <ø> (ø)
weaver/store/mongodb.py 73.67% <ø> (ø)
weaver/typedefs.py 0.00% <ø> (ø)
weaver/utils.py 80.70% <42.30%> (-0.69%) ⬇️
weaver/cli.py 84.80% <82.73%> (+4.32%) ⬆️
weaver/base.py 100.00% <100.00%> (+26.66%) ⬆️
weaver/formats.py 87.45% <100.00%> (ø)
weaver/wps_restapi/swagger_definitions.py 99.87% <100.00%> (+<0.01%) ⬆️
weaver/wps/utils.py 79.22% <0.00%> (-0.87%) ⬇️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44c72d8...fdbbc8a. Read the comment docs.

@github-actions github-actions bot added feature/oas Issues related to OpenAPI specifications. process/wps3 Issue related to WPS 3.x (REST-JSON) processes support labels Jun 3, 2022
@francisPLT
Copy link
Contributor

Went through most of it and up until now, everything looks pretty good. Also started testing the CLI directly. So far I like the changes and the inclusion of the Magpie Auth provider. Will continue tomorrow, especially the CLI, relevant documentation and live tests.

docs/source/cli.rst Outdated Show resolved Hide resolved
francisPLT
francisPLT previously approved these changes Jun 8, 2022
@fmigneault fmigneault merged commit 9d51aa8 into master Jun 9, 2022
@fmigneault fmigneault deleted the cli-auth branch June 9, 2022 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/doc Issue related to documentation of the package ci/operations Related to CI operations (actions, execution, install, builds, etc.) ci/tests Tests of the package and features feature/cli Issues or features related to CLI operations. feature/db Related to database or datatype manipulation. feature/oas Issues related to OpenAPI specifications. process/workflow Related to a Workflow process. process/wps3 Issue related to WPS 3.x (REST-JSON) processes support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support authentication using CLI and WeaverClient
2 participants