26 Commits

Author SHA1 Message Date
Vlad Golubev
12ba45421c Merge branch 'master' into fix-average-functions-duration 2017-02-07 23:42:25 +02:00
Erik Erikson
5bd31687b5 Use STS getCallerIdentity instead of IAM getUser
A possible fix for https://github.com/serverless/serverless/issues/3151
Switch from using IAM `getUser` to get the account ID of the current user to calling STS `getCallerIdentity`.  It is expected that this is a less protected segment of rights and will, as a result, impact fewer users.  Of course, this is hard to guarantee.
Changes tests appropriately

Related Docs:
http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/STS.html#getCallerIdentity-property
2017-01-26 18:14:15 -08:00
Eslam λ Hefnawy
a19fbfbbb3 Merge pull request #3125 from serverless/refactor-function-arn-for-info-plugin
BREAKING - Refactor function arn generation for info plugin
2017-01-23 21:11:59 +07:00
Philipp Muens
a3ce3edb72 Remove getStackName() method 2017-01-23 10:51:06 +01:00
Philipp Muens
116c79dbf8 Refactor function arn generation for info plugin 2017-01-20 14:45:11 +01:00
Vlad Golubev
7d7f7c7054 Refactor getting aws provider stage 2017-01-06 20:53:08 +02:00
Vlad Golubev
0fb4cf6fba Refactor getting aws provider region 2017-01-06 20:53:08 +02:00
Erik Erikson
3210aff617 Detect Successful Async Credential Loading
Check for the roleArn attribute on ini file loaded credentials.  If that exists, then asynchronous (assume role) credentials are being loaded but they may not yet be received.  Accept these as valid credentials and use the containing credentials object as the current credentials object.

Clean up the test data (fakeCredentials didn't need so much)
Create a test that verifies the async credential loading functionality
Create a test that ensures a non-existent profile one attempts to load does not load any credentials

Bump the version of the aws-sdk so that the modified aws-sdk will be demanded for proper handling of this feature.
2016-12-01 01:45:14 -08:00
Erik Erikson
0ddd4ec804 Credential Fixes Roundup
Merge fixes from both #2373 & #2695, adding editorial suggestions and future-proofing them a bit (probably)

Clean up tests to broadly clean and restore process/test environment and simplify test code.
This work uncovered that we were returning profiles when no profile credentials were loaded.  This seems inappropriate.  The tests were modified to use the temporary credential file code that @stevecaldwell77 wrote, exclusively.  This way there are actual credentials to load from the given profile.

I am not sure how to test the assume-role/asynchronous STS credential loading capability and would love some help making sure that is right
2016-11-29 03:16:47 -08:00
Erik Erikson
e317399da4 Merge remote-tracking branch 'journeyapps/fix-async-credentials' into credentials-fixes 2016-11-28 23:06:03 -08:00
Stephen Caldwell
4969c74a17 add support for environment variable AWS_SHARED_CREDENTIALS_FILE when loading credentials 2016-11-28 09:58:29 -08:00
Erik Erikson
6cc5d1364a Merge branch 'master' into logical-ids-missed-details 2016-11-22 13:26:28 -08:00
Eslam A. Hefnawy
0519987cb8 moved getStackName method into provider class 2016-11-21 17:48:39 +07:00
Eslam A. Hefnawy
632e86ec2e fix typo 2016-11-21 16:42:38 +07:00
Eslam A. Hefnawy
4087921e0e bring back probider.getStackName() 2016-11-21 16:33:52 +07:00
Erik Erikson
61783191ee "sdk" => "provider"
Change the legacy "sdk" moniker to "provider" in line with the (good, clarifying) class name changes in order to reduce potential future confusion.
2016-11-16 17:14:48 -08:00
Ralf Kistner
a78ed09773 Use AWS.SharedIniFileCredentials directly for profile credentials. 2016-11-11 11:20:25 -08:00
Eslam A. Hefnawy
fef9b68e5a refactored naming-js method naming 2016-11-10 19:05:02 +07:00
Eslam A. Hefnawy
1a02e15d9b updated tests using name-js 2016-11-10 15:14:33 +07:00
Eslam A. Hefnawy
61efd35850 added logical id names in naming-js file 2016-11-09 19:31:08 +07:00
Phillip J. Roth
a669b46a37 Updates git.io URL to aws credential setup 2016-11-02 09:46:22 -04:00
Philipp Muens
300e21be9d DRY out setProvider() usage 2016-10-31 09:55:06 +01:00
Eslam A. Hefnawy
6beb3a802c update unit tests for overwrite bug fix 2016-10-19 16:50:41 +07:00
Eslam A. Hefnawy
402cc2c376 fixed overwrite resources bug 2016-10-19 16:50:41 +07:00
Nik Graf
360bfb814a Merge branch 'master' into ellipsis 2016-10-19 10:35:34 +02:00
Philipp Muens
c273abec68 Move AwsProvider plugin into aws directory 2016-10-19 08:32:06 +02:00