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

Disable identity for local mounts #4407

Merged
merged 4 commits into from
Apr 23, 2018
Merged

Disable identity for local mounts #4407

merged 4 commits into from
Apr 23, 2018

Conversation

vishalnayak
Copy link
Member

No description provided.

@vishalnayak vishalnayak added this to the 0.10.1 milestone Apr 20, 2018
if auth.Alias != nil {
mEntry := c.router.MatchingMountEntry(req.Path)

if auth.Alias != nil && mEntry != nil && !mEntry.Local {
Copy link
Member

Choose a reason for hiding this comment

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

You're missing the auth/token/renew path earlier on, which can also end up updating memberships.

Copy link
Member Author

Choose a reason for hiding this comment

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

I left the renewal flow as it is to allow it to work if the tokens were created before this fix. The thought I had was to only disallow entity attachment for the newly created tokens.

@@ -329,6 +329,10 @@ func (i *IdentityStore) CreateOrFetchEntity(alias *logical.Alias) (*identity.Ent
return nil, fmt.Errorf("invalid mount accessor %q", alias.MountAccessor)
}

if mountValidationResp.MountLocal {
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this happen later so that existing values are returned?

Copy link
Member Author

Choose a reason for hiding this comment

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

It wouldn't matter. This function will not be called for the new tokens.

Copy link
Member

Choose a reason for hiding this comment

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

OK, I just figured from the name (Create or Fetch) that it could end up creating new entities...which it can... :-)

@vishalnayak vishalnayak merged commit 6c464cf into master Apr 23, 2018
@vishalnayak vishalnayak deleted the identity-local-mount branch April 23, 2018 17:46
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