Skip to content
This repository was archived by the owner on Nov 2, 2022. It is now read-only.

Commit b06b528

Browse files
Merge pull request #3 from CirrusMD/rf/feature/roles-and-docs
Support roles with paths in them
2 parents cb89104 + 73a7dbb commit b06b528

File tree

3 files changed

+35
-17
lines changed

3 files changed

+35
-17
lines changed

README.md

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,42 @@ Allows you to authenticate with AWS using your JumpCloud credentials. Based on i
2222
### via [Homebrew](https://brew.sh/)
2323

2424
```bash
25-
brew tap GuildEducationInc/aws-jumpcloud https://github.com/GuildEducationInc/aws-jumpcloud.git
25+
brew tap CirrusMD/aws-jumpcloud https://github.com/CirrusMD/homebrew-aws-jumpcloud.git
2626
brew install aws-jumpcloud
2727
```
2828

2929
### Manual
3030

31-
Prerequisite: Python 3.6 or newer.
31+
Prerequisite: Python 3.8 or newer.
3232

3333
If you're running macOS but don't have Python 3, I recommend installing it with [Homebrew](https://brew.sh/). The command `brew install python` will install it without breaking your existing Python installation.
3434

35-
To install `aws-jumpcloud` itself, just point `pip3` at the latest GitHub release:
36-
```bash
37-
$ pip3 install https://github.com/GuildEducationInc/aws-jumpcloud/archive/2.1.7.tar.gz
35+
Grab the latest release .pex package from [this repo](https://github.com/CirrusMD/aws-jumpcloud/releases)
36+
```
37+
curl -L -O https://github.com/CirrusMD/aws-jumpcloud/releases/download/v2.1.8/aws_jumpcloud-macos-<VERSION>.pex
38+
#ex: curl -L -O https://github.com/CirrusMD/aws-jumpcloud/releases/download/v2.1.8/aws_jumpcloud-macos-2.1.8.pex
39+
```
40+
41+
Make the pex file executable:
42+
```
43+
chmod 0755 aws_jumpcloud-macos-<VERSION>.pex
44+
#ex: chmod 0755 aws_jumpcloud-macos-2.1.8.pex
45+
```
46+
47+
Run it!
3848
```
49+
./aws_jumpcloud-macos-<VERSION>.pex
50+
#ex: ./aws_jumpcloud-macos-2.1.8.pex
51+
```
52+
53+
Optionally move it somewhere in your PATH
54+
55+
```
56+
mv ./aws_jumpcloud-macos-<VERSION>.pex /usr/local/bin/aws-jumpcloud
57+
./aws-jumpcloud --version
58+
```
59+
60+
3961

4062
### Migrating from `~/.aws` credentials
4163

@@ -237,23 +259,19 @@ aws-jumpcloud rotate duff
237259
```
238260
$ python3 setup.py develop
239261
$ pip3 install -r test-requirements.txt
240-
$ pycodestyle *.py aws_jumpcloud/
241-
$ pylint -E *.py aws_jumpcloud/
262+
$ black *.py aws_jumpcloud/
242263
```
243264

244265
### Rolling out a new version
245266

246-
1. Merge any outstanding PRs/commits into the into `master` branch.
247-
2. Update the version number in [version.py](https://github.com/GuildEducationInc/aws-jumpcloud/blob/master/aws_jumpcloud/version.py) and in the `pip3 install` line of [README.md](https://github.com/GuildEducationInc/aws-jumpcloud/blob/master/README.md). Save these changes in `master` also.
248-
3. [Create a new GitHub release](https://github.com/GuildEducationInc/aws-jumpcloud/releases/new) with a tag that matches the version number (e.g. `1.2.3`). Add some release notes to describe what's changed, and publish the release.
249-
4. Download the `tar.gz` archive from the [releases page](https://github.com/GuildEducationInc/aws-jumpcloud/releases) and calculate the sha256 checksum. On macOS, you can use the tool `sha256sum`.
250-
5. Update the [URL and sha256 checksum in the Homebrew formula](https://github.com/GuildEducationInc/aws-jumpcloud/blob/master/HomebrewFormula/aws-jumpcloud.rb#L6-L7) and save that to the `master` branch.
251-
6. On macOS, run `brew update && brew upgrade` to confirm that the Homebrew formula was saved correctly.
267+
1. Update the version number in [version.py](https://github.com/CirrusMD/aws-jumpcloud/blob/main/aws_jumpcloud/version.py)
268+
2. Create a PR to the `main` branch
269+
3. Release maintainer, tag and push the branch with the corresponding tag for the version ex: ```git tag v2.1.8```. Homebrew will automatically update after that.
252270

253271
## Contributing
254272

255273
aws-jumpcloud is open-source and licensed under the [MIT License](LICENSE).
256274

257-
Use the project's [GitHub Issues feature](https://github.com/GuildEducationInc/aws-jumpcloud/issues) to report bugs and make feature requests.
275+
Use the project's [GitHub Issues feature](https://github.com/CirrusMD/aws-jumpcloud/issues) to report bugs and make feature requests.
258276

259-
Even better, if you're able to write code yourself to fix bugs or implement new features, [submit a pull request on GitHub](https://github.com/GuildEducationInc/aws-jumpcloud/pulls) which will help us move the software forward much faster.
277+
Even better, if you're able to write code yourself to fix bugs or implement new features, [submit a pull request on GitHub](https://github.com/CirrusMD/aws-jumpcloud/pulls) which will help us move the software forward much faster.

aws_jumpcloud/aws.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from aws_jumpcloud.saml import get_assertion_duration
1111

1212
# Regular expression to extract an account number and role name from an ARN.
13-
ROLE_ARN_REGEXP = re.compile(r"^arn:aws:iam::([0-9]{12}):role/([\w+=,.@-]+)$")
13+
ROLE_ARN_REGEXP = re.compile(r"^arn:aws:iam::([0-9]{12}):role/([\w+=,.@-]+.*$)")
1414
ParseResult = namedtuple("ArnParts", ["aws_account_id", "aws_role"])
1515

1616
# If the SAML assertion from JumpCloud doesn't include a SessionDuration

aws_jumpcloud/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__VERSION__ = "2.1.8"
1+
__VERSION__ = "2.1.9"

0 commit comments

Comments
 (0)