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

agent: route templating server through cache #10927

Merged
merged 14 commits into from
Feb 23, 2021
Merged

agent: route templating server through cache #10927

merged 14 commits into from
Feb 23, 2021

Conversation

jasonodonnell
Copy link
Contributor

@jasonodonnell jasonodonnell commented Feb 16, 2021

This PR enhances the Vault Agent Templating server to support using the local proxy cache. The templating server will automatically configure itself to use the cache if caching is enabled and a listener is present. If either of these requirements aren't satisfied, the templating server will use the vault configuration as it does today.

The only caveat to this change is we ignore TLS verification if the listener has TLS enabled. We do this because a CA would be required to verify the certificate but the proxy and templating server are spawned by the same Vault Agent process.

command/agent/template/template.go Outdated Show resolved Hide resolved
command/agent/template/template.go Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 17, 2021 20:04 Inactive
@vercel vercel bot temporarily deployed to Preview – vault February 17, 2021 20:04 Inactive
@jasonodonnell jasonodonnell requested a review from calvn February 17, 2021 20:06
command/agent/template/template.go Outdated Show resolved Hide resolved
command/agent/template/template.go Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 17, 2021 21:28 Inactive
@vercel vercel bot temporarily deployed to Preview – vault February 17, 2021 21:28 Inactive
@vercel vercel bot temporarily deployed to Preview – vault February 17, 2021 22:05 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 17, 2021 22:05 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 18, 2021 14:40 Inactive
@vercel vercel bot temporarily deployed to Preview – vault February 18, 2021 14:40 Inactive
command/agent/template/template.go Outdated Show resolved Hide resolved
command/agent/template/template.go Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 18, 2021 21:52 Inactive
@vercel vercel bot temporarily deployed to Preview – vault February 18, 2021 21:52 Inactive
Copy link
Member

@tvoran tvoran left a comment

Choose a reason for hiding this comment

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

Some comments in the tests. It also looks like the TestCacheConfig* tests could be combined into a table test if you wanted, since the only changing parameters are the listeners and the expected address.

command/agent/template/template_test.go Show resolved Hide resolved
command/agent/template/template_test.go Outdated Show resolved Hide resolved
command/agent/template/template_test.go Outdated Show resolved Hide resolved
command/agent/template/template_test.go Outdated Show resolved Hide resolved
command/agent/template/template_test.go Outdated Show resolved Hide resolved
command/agent/template/template_test.go Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview – vault February 19, 2021 14:42 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 19, 2021 14:42 Inactive
@vercel vercel bot temporarily deployed to Preview – vault February 19, 2021 14:42 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 19, 2021 14:42 Inactive
@vercel vercel bot temporarily deployed to Preview – vault February 19, 2021 14:42 Inactive
@vercel vercel bot temporarily deployed to Preview – vault February 19, 2021 14:43 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 19, 2021 14:45 Inactive
Copy link
Contributor

@calvn calvn 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, pending the change on removing client cert and keys around here that we discussed offline.

@vercel vercel bot temporarily deployed to Preview – vault February 19, 2021 22:06 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 19, 2021 22:06 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 22, 2021 15:38 Inactive
@vercel vercel bot temporarily deployed to Preview – vault February 22, 2021 15:38 Inactive
Copy link
Contributor

@tomhjp tomhjp left a comment

Choose a reason for hiding this comment

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

LGTM 👍

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.

4 participants