Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unabled to decrypt keys when hostname is too long with KMS #741

Closed
SinisterMinister opened this issue Sep 21, 2020 · 0 comments
Closed

Unabled to decrypt keys when hostname is too long with KMS #741

SinisterMinister opened this issue Sep 21, 2020 · 0 comments

Comments

@SinisterMinister
Copy link

If the role session name is longer than 64 characters, AWS rejects the request.

Group 0: FAILED
  arn:aws:kms:us-east-1:1234567890:key/64ccacc1-51ec-4bd4-a7ae-252aa4a0761a: FAILED
    - | Error creating AWS session: Failed to assume role
      | "arn:aws:iam::945855773920:role/sops-role": ValidationError:
      | 1 validation error detected: Value
      | 'sops@uilder-base-feature-2fcoredevop-67-ispec-container-test-2-ds4q3'
      | at 'roleSessionName' failed to satisfy constraint: Member
      | must have length less than or equal to 64
      | 	status code: 400, request id:
      | 5c68ad21-0a4e-4560-bad6-13557bb18166
  
  arn:aws:kms:us-east-1:1234567890:key/3a8b8ed7-3ed5-4f45-bf73-61819111babc: FAILED
    - | Error creating AWS session: Failed to assume role
      | "arn:aws:iam::583254977725:role/sops-role": ValidationError:
      | 1 validation error detected: Value
      | 'sops@uilder-base-feature-2fcoredevop-67-ispec-container-test-2-ds4q3'
      | at 'roleSessionName' failed to satisfy constraint: Member
      | must have length less than or equal to 64
      | 	status code: 400, request id:
      | 47fe5749-8aca-4072-8116-a701ae989952

In this case, it was caused by kubernetes pods created automatically via Jenkins. I'll submit a PR momentarily with a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants