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

Vault Agent Cache #6220

Merged
merged 15 commits into from
Feb 15, 2019
Merged

Vault Agent Cache #6220

merged 15 commits into from
Feb 15, 2019

Conversation

vishalnayak
Copy link
Member

No description provided.

@vishalnayak vishalnayak changed the base branch from master to 1.1-beta February 12, 2019 21:35
@vishalnayak vishalnayak added this to the 1.1 milestone Feb 12, 2019
command/agent.go Outdated Show resolved Hide resolved
command/agent.go Outdated Show resolved Hide resolved
command/agent/cache/api_proxy.go Show resolved Hide resolved
command/agent/cache/api_proxy.go Show resolved Hide resolved
command/agent/cache/cachememdb/cache_memdb.go Outdated Show resolved Hide resolved
command/agent/cache/lease_cache.go Show resolved Hide resolved
command/agent/cache/lease_cache.go Show resolved Hide resolved
command/agent/cache/lease_cache.go Outdated Show resolved Hide resolved
command/agent/cache/lease_cache.go Outdated Show resolved Hide resolved
command/agent/cache/lease_cache.go Outdated Show resolved Hide resolved
command/agent/config/config_test.go Outdated Show resolved Hide resolved
command/agent/cache/proxy.go Show resolved Hide resolved
command/agent/config/config_test.go Outdated Show resolved Hide resolved
command/agent/cache/cache_test.go Outdated Show resolved Hide resolved
command/agent/cache/lease_cache.go Outdated Show resolved Hide resolved
command/agent/cache/cache_test.go Outdated Show resolved Hide resolved
command/agent/cache/lease_cache.go Outdated Show resolved Hide resolved
@hashicorp-cla
Copy link

hashicorp-cla commented Feb 13, 2019

CLA assistant check
All committers have signed the CLA.

@vishalnayak vishalnayak merged commit e39a5f2 into 1.1-beta Feb 15, 2019
@vishalnayak vishalnayak deleted the agent-cache branch February 15, 2019 01:10
req.Request.Body.Close()
}
req.Request.Body = ioutil.NopCloser(bytes.NewBuffer(req.RequestBody))

Copy link
Member

Choose a reason for hiding this comment

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

Won't this function not compute an equivalent index if the parameters are given in a different order?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, we settled on being acceptable for this first iteration (I forget if it was over Slack or one of the sync-ups). The expectation is that clients won't be switching back and forth on the ordering of the params that they request through agent since these are mainly going to be scripts or application services making the request.

Copy link
Member

Choose a reason for hiding this comment

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

The problem with that argument is that you assume JSON marshaling behavior is consistent from language to language or library to library. It may be, but it may not. Go lexically orders JSON keys, but there's a performance impact to doing so, so speed demon libs or implementations may simply randomly order the parameters.

As an example, even in Go such applications may use jsoniter instead of stdlib json, and in jsoniter sorting the keys is an option that is not turned on by default.

@vishalnayak
Copy link
Member Author

@jefferai While you continue to give comments on this PR, I'll be addressing the review comments in here https://github.com/hashicorp/vault/pull/6237/files.

Listeners []*Listener `hcl:"listeners"`
}

type Listener struct {
Copy link
Member

Choose a reason for hiding this comment

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

Can you instead just use the same Listener that we use in Vault? I think the parsing code below is basically a straight copy so it seems like a win to factor it out somewhere (e.g. helper/listener or so).

@@ -72,7 +72,7 @@ func listenerWrapProxy(ln net.Listener, config map[string]interface{}) (net.List
return newLn, nil
}

func listenerWrapTLS(
func ListenerWrapTLS(
Copy link
Member

Choose a reason for hiding this comment

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

Same comment basically -- I think we should move the listener stuff out somewhere common.

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.

7 participants