Skip to content

Commit

Permalink
AWS Auth: Update error message to include underlying error (#11638)
Browse files Browse the repository at this point in the history
  • Loading branch information
pcman312 committed May 17, 2021
1 parent 380d343 commit c1e9469
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion builtin/credential/aws/path_login.go
Expand Up @@ -1364,7 +1364,7 @@ func (b *backend) pathLoginUpdateIam(ctx context.Context, req *logical.Request,
if roleEntry.InferredEntityType == ec2EntityType {
instance, err := b.validateInstance(ctx, req.Storage, entity.SessionInfo, roleEntry.InferredAWSRegion, callerID.Account)
if err != nil {
return logical.ErrorResponse(fmt.Sprintf("failed to verify %s as a valid EC2 instance in region %s", entity.SessionInfo, roleEntry.InferredAWSRegion)), nil
return logical.ErrorResponse("failed to verify %s as a valid EC2 instance in region %s: %s", entity.SessionInfo, roleEntry.InferredAWSRegion, err), nil
}

// build a fake identity doc to pass on metadata about the instance to verifyInstanceMeetsRoleRequirements
Expand Down
3 changes: 3 additions & 0 deletions changelog/11638.txt
@@ -0,0 +1,3 @@
```release-note:improvement
auth/aws: Underlying error included in validation failure message.
```

0 comments on commit c1e9469

Please sign in to comment.