Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

Cross account config #24

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Aug 21, 2017

  1. Configuration menu
    Copy the full SHA
    1d939e7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8bedfdf View commit details
    Browse the repository at this point in the history
  3. Allow automatic role selection for cross-account role by following th…

    …e source_profile trail in .aws/config:
    
    If a source_profile is specified in the target profile, then we inspect that source_profile to see if a role_arn was set.
    If the source_profile has a role_arn set, then we use it as the cross-account role we are trying to find in the list of
    values from <saml2:Attribute Name="https://aws.amazon.com/SAML/Attributes/Role">.
    
    For example, if the configuration is:
    ```
    [default]
    region = us-east-1
    
    [profile role1]
    source_profile = default
    region = us-west-2
    role_arn = arn:aws:iam::123456789012:role/cross-account-role-1
    
    [profile role2]
    source_profile = role1
    region = ap-southeast-2
    role_arn = arn:aws:iam::987654321098:role/my-target-role
    ```
    
    Then when running `oktad role2 -- bash` we will be looking for the role_arn of the source_profile referenced in profile role2,
    that is we will try to find arn:aws:iam::123456789012:role/cross-account-role-1 in the values obtained from the SAML assertion.
    endemics committed Aug 21, 2017
    Configuration menu
    Copy the full SHA
    124b00f View commit details
    Browse the repository at this point in the history