Skip to content

Commit

Permalink
Merge pull request #22 from Cox-Automotive/develop
Browse files Browse the repository at this point in the history
2.1.1 Patch Release
  • Loading branch information
brianantonelli authored Dec 7, 2016
2 parents ae3c1d9 + acf636b commit 47c7641
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ Optional arguments:
* `-r [role]` The ALKS role to use, be sure to wrap in quotes
* `-o [output]` Output format. Supports: `json`, `env`, `docker`, `creds`, `idea`
* `-n` If output is set to creds, use this named profile (defaults to default)
* `-N` Forces a new session to be generated
* `-f` If output is set to creds, force overwriting of AWS credentials if they already exist

Output values:
Expand Down Expand Up @@ -135,7 +136,7 @@ Optional arguments:
Optional arguments:

* `-p [password]` Your password
* `-d [duration]` Duration of the key, in hours. Supports: 2, 6, 12, 18, 24, 36
* `-d [duration]` Duration of the key, in hours. Supports: 2, 6, 12, 18
* `-o [output]` Output format. Supports: `json`, `env`, `docker`, `creds`, `idea`
* `-n` If output is set to creds, use this named profile (defaults to default)
* `-f` If output is set to creds, force overwriting of AWS credentials if they already exist
Expand Down
4 changes: 3 additions & 1 deletion bin/alks-sessions-open
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ program
.option('-o, --output [format]', 'output format (' + outputValues.join(', ') + '), default: ' + outputValues[0], outputValues[0])
.option('-n, --namedProfile [profile]', 'if output is set to creds, use this profile, default: default')
.option('-f, --force', 'if output is set to creds, force overwriting of AWS credentials')
.option('-N, --newSession', 'forces a new session to be generated')
.option('-v, --verbose', 'be verbose')
.parse(process.argv);

var alksAccountIdx = program.args[0],
alksAccountIdxInt = parseInt(alksAccountIdx),
alksAccount = program.account,
alksRole = program.role,
forceNewSession = program.newSession,
hasAlksAcctRole = !_.isEmpty(alksAccount) && !_.isEmpty(alksRole),
output = program.output,
logger = 'sessions-open';
Expand Down Expand Up @@ -91,7 +93,7 @@ async.waterfall([
},
// look for existing session
function(developer, password, alksAccount, alksRole, existingKeys, callback){
if(existingKeys.length){
if(existingKeys.length && !forceNewSession){
utils.log(program, logger, 'filtering keys by account/role - ' + alksAccount + ' - ' + alksRole);

// filter keys for the selected alks account/role
Expand Down
3 changes: 2 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
Release Notes: 2016-12-06
Release Notes: 2016-12-07
============================

Thanks for upgrading to the latest version of the ALKS CLI! :)

- Adds support for `alks sessions console` - finally!
- Reduced session duration, resolves an EB bug where it was not honoring the max time
- Changes supported key durations to: 2, 6, 12, 18
- Adds `-N` argument to `alks sessions open`, this will force new session

Happy Holidays! 🎄
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "alks",
"version": "2.1.0",
"version": "2.1.1",
"description": "CLI for working with ALKS",
"main": "bin/alks",
"scripts": {
Expand Down

0 comments on commit 47c7641

Please sign in to comment.