Skip to content

Add mount type to request earlier#9389

Merged
sgmiller merged 2 commits into
masterfrom
mount-type-on-perm-fail
Jul 6, 2020
Merged

Add mount type to request earlier#9389
sgmiller merged 2 commits into
masterfrom
mount-type-on-perm-fail

Conversation

@sgmiller
Copy link
Copy Markdown
Collaborator

@sgmiller sgmiller commented Jul 2, 2020

In the case of requests with no vault token, routing never happens, where
MountType is typically populated on request. We have it from the
MatchingMountEntry check earlier in request handling, so this populates it
earlier, ensuring "mount_type" is on all audit entries.

@sgmiller sgmiller requested a review from alexanderbez July 2, 2020 19:43
Comment thread vault/request_handling.go
@@ -582,6 +582,8 @@ func (c *Core) handleRequest(ctx context.Context, req *logical.Request) (retResp
var nonHMACReqDataKeys []string
entry := c.router.MatchingMountEntry(ctx, req.Path)
if entry != nil {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: I think formatting is off here.

Copy link
Copy Markdown
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

LGTM (just format). Should this be backported to 1.4.x?

@sgmiller sgmiller merged commit 2179d19 into master Jul 6, 2020
@sgmiller sgmiller deleted the mount-type-on-perm-fail branch July 6, 2020 16:17
@sgmiller
Copy link
Copy Markdown
Collaborator Author

sgmiller commented Jul 6, 2020

LGTM (just format). Should this be backported to 1.4.x?

No, the field was introduced in 1.5 in the first place.

sgmiller added a commit that referenced this pull request Jul 6, 2020
sgmiller added a commit that referenced this pull request Jul 7, 2020
andaley pushed a commit that referenced this pull request Jul 17, 2020
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