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

Commit

Permalink
Merge pull request #3 from CirrusMD/rf/feature/roles-and-docs
Browse files Browse the repository at this point in the history
Support roles with paths in them
  • Loading branch information
ryanjfrizzell authored Mar 4, 2021
2 parents cb89104 + 73a7dbb commit b06b528
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 17 deletions.
48 changes: 33 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,42 @@ Allows you to authenticate with AWS using your JumpCloud credentials. Based on i
### via [Homebrew](https://brew.sh/)

```bash
brew tap GuildEducationInc/aws-jumpcloud https://github.com/GuildEducationInc/aws-jumpcloud.git
brew tap CirrusMD/aws-jumpcloud https://github.com/CirrusMD/homebrew-aws-jumpcloud.git
brew install aws-jumpcloud
```

### Manual

Prerequisite: Python 3.6 or newer.
Prerequisite: Python 3.8 or newer.

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.

To install `aws-jumpcloud` itself, just point `pip3` at the latest GitHub release:
```bash
$ pip3 install https://github.com/GuildEducationInc/aws-jumpcloud/archive/2.1.7.tar.gz
Grab the latest release .pex package from [this repo](https://github.com/CirrusMD/aws-jumpcloud/releases)
```
curl -L -O https://github.com/CirrusMD/aws-jumpcloud/releases/download/v2.1.8/aws_jumpcloud-macos-<VERSION>.pex
#ex: curl -L -O https://github.com/CirrusMD/aws-jumpcloud/releases/download/v2.1.8/aws_jumpcloud-macos-2.1.8.pex
```

Make the pex file executable:
```
chmod 0755 aws_jumpcloud-macos-<VERSION>.pex
#ex: chmod 0755 aws_jumpcloud-macos-2.1.8.pex
```

Run it!
```
./aws_jumpcloud-macos-<VERSION>.pex
#ex: ./aws_jumpcloud-macos-2.1.8.pex
```

Optionally move it somewhere in your PATH

```
mv ./aws_jumpcloud-macos-<VERSION>.pex /usr/local/bin/aws-jumpcloud
./aws-jumpcloud --version
```



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

Expand Down Expand Up @@ -237,23 +259,19 @@ aws-jumpcloud rotate duff
```
$ python3 setup.py develop
$ pip3 install -r test-requirements.txt
$ pycodestyle *.py aws_jumpcloud/
$ pylint -E *.py aws_jumpcloud/
$ black *.py aws_jumpcloud/
```

### Rolling out a new version

1. Merge any outstanding PRs/commits into the into `master` branch.
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.
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.
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`.
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.
6. On macOS, run `brew update && brew upgrade` to confirm that the Homebrew formula was saved correctly.
1. Update the version number in [version.py](https://github.com/CirrusMD/aws-jumpcloud/blob/main/aws_jumpcloud/version.py)
2. Create a PR to the `main` branch
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.

## Contributing

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

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

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.
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.
2 changes: 1 addition & 1 deletion aws_jumpcloud/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from aws_jumpcloud.saml import get_assertion_duration

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

# If the SAML assertion from JumpCloud doesn't include a SessionDuration
Expand Down
2 changes: 1 addition & 1 deletion aws_jumpcloud/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__VERSION__ = "2.1.8"
__VERSION__ = "2.1.9"

0 comments on commit b06b528

Please sign in to comment.