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: saml order of principal and role mixed #164

Closed Timboo89 closed 11 months ago

Timboo89 commented 2 years ago

Hi there,

I was just writing a saml plugin, realizing that it always came to issues because of the order between role arn and principal arn. Fixes:

  1. In the saml response, you get the arns like this: "role-arn,principal-arn" [1] You had it correct once and once and than once the other way around.
  2. Parsing the actual role arn and principal arn from the saml response was also in the wrong order here and here

In case (1) differs from response to response I'd be glad to write a less static check here.

[1] At least this is how the response looked like I was receiving.