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

Add approle role name to metadata #2985

Merged
merged 1 commit into from
Jul 13, 2017
Merged

Conversation

jefferai
Copy link
Member

@jefferai jefferai commented Jul 7, 2017

No description provided.

@jefferai jefferai added this to the 0.7.4 milestone Jul 7, 2017
@jefferai jefferai requested a review from vishalnayak July 7, 2017 14:45
@@ -38,6 +38,9 @@ func (b *backend) pathLoginUpdate(req *logical.Request, data *framework.FieldDat
return logical.ErrorResponse(fmt.Sprintf("failed to validate SecretID: %s", err)), nil
}

// Always include the role name, for later filtering
metadata["role_name"] = roleName
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about doing this in path_role.go handleRoleSecretIDCommon when we are persisting the metadata? We might also want to mention in docs that if SecretID metadata is not supplied, by default we add an entry there.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vishalnayak one problem with that approach is that existing roles/secret IDs won't have that metadata value persisted unless they're rewritten, whereas this will always work.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. That's true.

@jefferai jefferai merged commit c24f56d into master Jul 13, 2017
@jefferai jefferai deleted the approle-rolename-metadata branch July 13, 2017 23:07
@jefferai jefferai modified the milestones: 0.7.4, 0.8.0 Jul 24, 2017
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 this pull request may close these issues.

2 participants