Versent / saml2aws

CLI tool which enables you to login and retrieve AWS temporary credentials using a SAML IDP
https://github.com/Versent/saml2aws
MIT License
2.09k stars 563 forks source link

Fix missing provider when passing as an argument #1305

Closed tinaboyce closed 4 months ago

tinaboyce commented 4 months ago

This PR will fix missing providers that exists in the interactive "provider" drop-down but when attempt to pass it in as an argument from the command line, it doesn't matches the hard-coded list which is a sub-set of the providers in the drop-down list.

Current version of saml2aws v2.36.16: (note the enum value, it is missing a few values like PingOne)

➜  saml2aws_darwin_arm64 git:(1294-missing-idp-provider) ✗ saml2aws configure --idp-provider=PingOne
saml2aws: error: enum value must be one of Akamai,AzureAD,ADFS,ADFS2,Browser,GoogleApps,Ping,JumpCloud,Okta,OneLogin,PSU,KeyCloak,F5APM,Shibboleth,ShibbolethECP,NetIQ,Auth0, got 'PingOne', try --help

The binary built to test the current PR: (note the enum value, PingOne is there)

➜  saml2aws_darwin_arm64 git:(1294-missing-idp-provider) ✗ ./saml2aws configure --idp-provider=PingOn
saml2aws: error: enum value must be one of ADFS,ADFS2,Akamai,Auth0,Authentik,AzureAD,Browser,F5APM,GoogleApps,JumpCloud,KeyCloak,NetIQ,Okta,OneLogin,Ping,PingNTLM,PingOne,Shibboleth,ShibbolethECP, got 'PingOn', try --help
➜  saml2aws_darwin_arm64 git:(1294-missing-idp-provider) ✗ ./saml2aws configure --idp-provider=PingOne
? Please choose a provider:  [Use arrows to move, type to filter]
  Okta
  OneLogin
  Ping
  PingNTLM
> PingOne
  Shibboleth
  ShibbolethECP
failed to input configuration: error selecting provider file: bad input
➜  saml2aws_darwin_arm64 git:(1294-missing-idp-provider) ✗

Closes #1294

codecov-commenter commented 4 months ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 42.19%. Comparing base (99d6fe4) to head (0543508). Report is 27 commits behind head on master.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1305 +/- ## ======================================= Coverage 42.19% 42.19% ======================================= Files 54 54 Lines 6456 6456 ======================================= Hits 2724 2724 Misses 3283 3283 Partials 449 449 ``` | [Flag](https://app.codecov.io/gh/Versent/saml2aws/pull/1305/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Versent) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/Versent/saml2aws/pull/1305/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Versent) | `42.19% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Versent#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.