GuildEducationInc / aws-jumpcloud

DEPRECATED: aws-vault like tool for JumpCloud authentication
MIT License
17 stars 8 forks source link

Support roles with paths in them #50

Closed ryanjfrizzell closed 3 years ago

ryanjfrizzell commented 3 years ago

small example of this working

from collections import namedtuple
import re

ROLE_ARN_REGEXP = re.compile(r"^arn:aws:iam::([0-9]{12}):role/([\w+=,.@-]+.*$)")
ParseResult = namedtuple("ArnParts", ["aws_account_id", "aws_role"])
normal = 'arn:aws:iam::584999999999:role/superNeatRole'
slashes = 'arn:aws:iam::584999999999:role/some/other/role/withSlashes'
def parse_arn(role_arn):
    return ParseResult(*ROLE_ARN_REGEXP.match(role_arn).groups())
print(type(ROLE_ARN_REGEXP))

print("###Normal")
normal_res = parse_arn(normal)
print(normal_res)

print("####Slashes")
slashes_res = parse_arn(slashes)
print(slashes_res)

output:

###Normal
ArnParts(aws_account_id='584999999999', aws_role='superNeatRole')
####Slashes
ArnParts(aws_account_id='584999999999', aws_role='some/other/role/withSlashes')
ryanjfrizzell commented 3 years ago

@ionosphere80 - here's that PR

ryanjfrizzell commented 3 years ago

@javs-perez @treyx any chance we could get some 👀 and or comments on this?

javs-perez commented 3 years ago

@ryanjfrizzell we apologize for the delay in response here. We are currently working on deprecating this repo and will add a deprecation warning shortly.

We are not making any changes to the code moving forward.

ryanjfrizzell commented 3 years ago

@ryanjfrizzell we apologize for the delay in response here. We are currently working on deprecating this repo and will add a deprecation warning shortly.

We are not making any changes to the code moving forward.

thanks for the quick reply @javs-perez any details on why this is going away?

javs-perez commented 3 years ago

Guild Education is not using JumpCloud anymore and we are not able to debug changes in the code.

ionosphere80 commented 3 years ago

Can someone take this project over?

ryanjfrizzell commented 3 years ago

Can someone take this project over?

+1 I think we'd be happy to take over the project...

javs-perez commented 3 years ago

@ryanjfrizzell that's great to hear! Send me a link to the fork and I'll add it to the ReadMe.

On a personal note, if you need a collaborator, I will gladly help.

ryanjfrizzell commented 3 years ago

@ryanjfrizzell that's great to hear! Send me a link to the fork and I'll add it to the ReadMe.

On a personal note, if you need a collaborator, I will gladly help.

@javs-perez thanks! We just setup a fork here: https://github.com/CirrusMD/aws-jumpcloud

ryanjfrizzell commented 3 years ago

@javs-perez we've completed setup of this over on our side now:

https://github.com/CirrusMD/aws-jumpcloud

complete with automatic homebrew updates and all.

javs-perez commented 3 years ago

added the info to the ReadMe, closing this PR.