trek10inc / awsume

A utility for easily assuming AWS IAM roles from the command line.
https://awsu.me
MIT License
487 stars 90 forks source link

fix specifying both role-arn and principal-arn as command-line arguments fails with TypeError #150

Closed Tantalon closed 11 months ago

Tantalon commented 3 years ago

Fix for #149

  File "/usr/local/lib/python3.9/site-packages/awsume/awsumepy/app.py", line 132, in get_saml_credentials
    principal_plus_role_arn = ','.join(args.role_arn, args.principal_arn)
TypeError: str.join() takes exactly one argument (2 given)

This is the line of code, it's missing brackets: principal_plus_role_arn = ','.join(args.role_arn, args.principal_arn) should be: principal_plus_role_arn = ','.join([args.role_arn, args.principal_arn])

mbarneyjr commented 3 years ago

Good catch! We'll try to merge this and include it along with #148 after we test it a little more internally

Thanks for the PR!

Tantalon commented 2 years ago

Hi @mbarneyjr, any update on the outstanding PRs?

TheLandolorien commented 11 months ago

I also ran into this issue and would like to resolve it for a SAML plugin I'm building. Though we probably need a unit test to validate this fully solves the issue.

mtskillman commented 11 months ago

cherry-picked the relevant commit and included into https://github.com/trek10inc/awsume/pull/224