Comments (6)
mfa credential doesn’t set default credential forcibly.
default credential has used it in default.
But if mfa credential file is to exist and to validate, used it.
from gossm.
@gjbae1212 if a user does not set AWS_SHARED_CREDENTIALS_FILE
, then the default behavior for the golang AWS SDK is not used (gossm
doesn't try to use $HOME/.aws/credentials
, but instead replaces the value with $HOME/.aws/credentials_mfa
on this line
Line 117 in 961c577
from gossm.
you should read more than code.
Line 156 in dd5f3c6
from gossm.
When attempting to use gossm
, I get the following error:
[err] [err][cmd.initConfig:209] [err][internal.NewSharedConfig:61] failed to load assume role *my role arn*, of profile default, <nil>
If I run this, the error goes away:
export AWS_SHARED_CREDENTIALS_FILE=$HOME/.aws/credentials
In my setup, I'm performing role assumption and handling MFA outside of gossm
.
This is what my ~/.aws/credentials
file looks like:
[default]
aws_session_token = session token
aws_access_key_id = temporary access key id
aws_secret_access_key = temporary secret key
[my-profile]
role_arn = role arn
source_profile = default
This is what my ~/.aws/config
file looks like:
[default]
output = json
mfa_serial = mfa arn
[profile my-profile]
role_arn = role arn
source_profile = default
Let me know if you think I'm using gossm
wrong. Thanks for your help!
from gossm.
Update gossm v1.4.2. Ignore a panic.
from gossm.
Thanks for addressing this @gjbae1212 !
I think the issue might still exist:
$ gossm --version
gossm version v1.4.2
$ gossm start
[err] [err][cmd.initConfig:249] [err][internal.NewSharedConfig:61] failed to load assume role *my-role-arn*, of profile default, <nil>
It seems you're open to having gossm change to make this use-case work, though. I'll try to get you a PR addressing this today.
from gossm.
Related Issues (20)
- Feature Request: Add Command for Port-Forwarding HOT 2
- Cloud security
- Feature Request: SSO auth HOT 2
- Extend support to ECS exec HOT 1
- Ability to connect to an instance via "Name" tag. HOT 3
- Better documentation around how gossm looks for creds HOT 2
- authenticate with aws credential_process HOT 1
- get EOF error with fish shell and oh-my-fish HOT 2
- Document Permissions Required for gossm HOT 1
- Something like this for K8S would be awesome HOT 1
- FilterLimitExceeded: The maximum number of filter values specified on a single call is 200 HOT 1
- Brew upgrade states a deprecation HOT 2
- The UI is broken when running k9s on the server connected using gossm. HOT 1
- Not working for hybrid images HOT 2
- ssh and scp not working using GOSSM
- Feature Request: Support for StartPortForwardingSessionToRemoteHost HOT 1
- [err] Incorrect function. when running on windows 10
- Feature Request: Support for Amazon ECS Exec to access containers on AWS Fargate and Amazon EC2 HOT 2
- session-manager-plugin incorrect arch for arm64
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gossm.