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

Support referencing AWS KMS keys by aliases #415

Merged
merged 3 commits into from
Jan 11, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Support referencing AWS KMS keys by aliases
- addresses issue #381
  • Loading branch information
darend committed Jan 10, 2019
commit 532c36eebc72097c6a2799ae78060dbc100cc1b8
2 changes: 1 addition & 1 deletion kms/keysource.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func (key MasterKey) createStsSession(config aws.Config, sess *session.Session)
}

func (key MasterKey) createSession() (*session.Session, error) {
re := regexp.MustCompile(`^arn:aws[\w-]*:kms:(.+):[0-9]+:key/.+$`)
re := regexp.MustCompile(`^arn:aws[\w-]*:kms:(.+):[0-9]+:(key|alias)/.+$`)
matches := re.FindStringSubmatch(key.Arn)
if matches == nil {
return nil, fmt.Errorf("No valid ARN found in %q", key.Arn)
Expand Down