getsops / getsops/sops

MFA is requested by sops all the time

Open
#997 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

area/keyservice keyservice/awskms
Dominant language
Go
Stars
23.1k
Forks
1.1k
Avg merge
1d 11h
Merged PRs (30d)
9

Description

I have next in ~/.aws/credentials

[extra]
source_profile = default
region = us-east-1
mfa_serial = arn:aws:iam::xxx
role_arn = arn:aws:iam::xxx
assumed_role = True
assumed_role_arn = arn:aws:iam::xxx
aws_access_key_id = xxx
aws_secret_access_key = xxx
aws_session_token = xxx
aws_security_token = xxx
expiration = 2022-02-02 20:46:38

[default]
region = us-east-1
aws_access_key_id = xxx
aws_secret_access_key = xxx

Next, I do:
export AWS_PROFILE=extra aws s3 ls
it asks MFA code only one time, but when I do
sops -d secrets.prod.yaml
it asks Assume Role MFA token code: all the time

Why? It is so inconvenient.
The same with helm plugin (https://github.com/jkroepke/helm-secrets)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the difference between AWS_PROFILE=extra aws s3 ls and sops -d secrets.prod.yaml using the shown ~/.aws/credentials profile, including its MFA and role settings. Compare the credential and role-assumption behavior used by sops with the AWS CLI; done means identifying why MFA is repeatedly requested and establishing the expected behavior for the sops command and the referenced helm-secrets integration.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
authentication, cloud, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.