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

Store original request path in WrapInfo #3100

Merged
merged 5 commits into from
Aug 2, 2017
Merged

Store original request path in WrapInfo #3100

merged 5 commits into from
Aug 2, 2017

Conversation

calvn
Copy link
Contributor

@calvn calvn commented Aug 2, 2017

Fixes #3009

@calvn calvn requested a review from jefferai August 2, 2017 19:21
// Store creation_path if not a rewrap
if req.Path != "sys/wrapping/rewrap" {
cubbyReq.Data["creation_path"] = req.Path
}
Copy link
Member

Choose a reason for hiding this comment

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

otherwise this should be the wrapinfo creation path right?

@@ -282,6 +282,12 @@ func TestSysMounts_headerAuth_Wrapped(t *testing.T) {
}
expected["wrap_info"].(map[string]interface{})["creation_time"] = actualCreationTime

actualCreationPath, ok := actual["wrap_info"].(map[string]interface{})["creation_path"]
if !ok || actualCreationPath == "" {
t.Fatal("creation_time missing in wrap info")
Copy link
Contributor

Choose a reason for hiding this comment

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

"creation_path"

Copy link
Contributor

@briankassouf briankassouf left a comment

Choose a reason for hiding this comment

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

Looks good!

@@ -58,7 +58,7 @@ $ curl \
"token": "3b6f1193-0707-ac17-284d-e41032e74d1f",
"ttl": 300,
"creation_time": "2016-09-28T14:22:26.486186607-04:00",
"wrapped_accessor": ""
Copy link
Contributor Author

Choose a reason for hiding this comment

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

wrapped_accessor is not returned if it's empty.

@jefferai jefferai changed the title [WIP] Store original request path in WrapInfo Store original request path in WrapInfo Aug 2, 2017
@jefferai jefferai added this to the 0.8.0 milestone Aug 2, 2017
@calvn calvn merged commit 15634f3 into master Aug 2, 2017
@calvn calvn deleted the wrap-request-path branch August 2, 2017 22:30
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.

3 participants