The reason for this post’s existence is to encourage more teams to make the
effort to move their credentials, certificates and other relevant files -
think bbl up to a proper secret store.
Most of us are guilty of taking the easy way out by checking in all our
secrets and certs into a private git repo . And although we install tools
like the cred-alert-cli git
hook
to keep us in check, let us face the reality of our frequent usage of the
--no-verify flag.
Eventually our hasty human nature coupled with --no-verify will lead us
to expensing the costly mistake of leaking credentials into a repo that is
public or may become public in the future - OSS for the win!.
We need to take the stance of not storing any credentials in git.
This post is one of a multi-part post that will be published to help us
deploy, configure and use Vault as part of our workday lives and CI systems.
This will NOT be a post to debate the pros and cons of other tools like
credhub or lpass and how those tools can be used to mitigate this problem.
## Helm Install
```bash
export NAMESPACE_NAME="myteam-vault"
kubectl create namespace "$NAMESPACE_NAME"
kubectl create secret generic vault-gcs-service-account \
--from-file=key.json="/tmp/sa.json" \
--namespace "$NAMESPACE_NAME"
kubectl create secret tls vault-tls \
--cert "/tmp/vault-tls.crt" \
--key "/tmp/vault-tls.key" \
--namespace "$NAMESPACE_NAME"
helm repo add incubator \
http://storage.googleapis.com/kubernetes-charts-incubator
helm install incubator/vault \
--name vault \
--values "/tmp/helm-config-values.yml" \
--namespace "$NAMESPACE_NAME"
```
## Other Manual Steps Required
After vault is deployed we need to manually edit the ingress service.
See the github issue below descrbing the reason for this change.
This will show you the ingress service.
```
kuebctl get ingresses --namespace $NAMESPACE_NAME
```
By default the name of the ingress will be `<ReleaseName>-<ChartName>` which
in this case will be `vault-vault`. If you'd like to override it, specify the
property `nameOverride` in the helm config.
Edit the ingress service and remove `path: /`
```
kubectl edit ingresses vault-vault --namespace $NAMESPACE_NAME
```
**More Info:**
- [`nameOverride`](https://github.com/helm/charts/blob/e64ba7aa8b2743715e0177dfc78a3a070e3a2b2d/incubator/vault/templates/_helpers.tpl#L13): If you'd like to override the ingress service name.
- [Github Issue](https://github.com/helm/charts/issues/6719): the reason we have to remove `path: /`
---
Tada!!
You may now target your vault using the `vault` CLI
```bash
export VAULT_ADDR=https://vault.myteam.ci.cf-app.com
vault status
```
Understandably this is a bit of a 🐔 and 🥚 problem where we need some
secrets to stand up our secret store. We've decided to store these secrets in
LastPass.
## Cleanup
- Make sure to destroy sensitive information like the service account key and
certs from your local machine.
## Next...
Let's [configure vault for your team](http://localhost/post/configure-vault-for-team/)
Previous
Let's use Vault - Part 2: Setting up Vault
Open Sesame!!
This post provides a guideline of simplest commands that are required to setup
vault locally ...
Next
Diagnosing Ruby Memory Issues in Cloud Foundry's API Server
Introduction
Debugging memory issues in software is a notoriously difficult problem. Thankfully, there are ...
When writing a Java Spring web application that uses an OAuth2 single sign-on (SSO) service for
authentication, testing can be difficult, especially if the SSO service is provided by a third...
My co-worker Belinda Liu turned to me and said, “I don’t like these tests at all;
they’re hard to follow, and I’m not sure what they’re testing.”
I looked at the tests that I had spent much of...
How To Enable IPv6 on Your Cloud Foundry's HAProxy
0. Abstract
HAProxy is an optional load balancer included in
the canonical open source Cloud Foundry
deployment. Its intended use is
on IaaSes (Infrastructures as a Service) that do not offer...
Scaling the Loggregator API
So you’ve used this article to correctly scale Dopplers
in your Loggregator system. Even so, you notice that you’re still experiencing log loss. It could be that your...
Why care about Dopplers
You might be wondering what a Doppler is (and why you care about it). Doppler VMs are a core component of log and metrics transport;
one that you probably won’t care about...
Studying the experience of Pair Programmers
This is the raw data (after anonymization, and after the removal of freeform fields, out of an abundance of caution, so as not to leak any intellectual...
Studying the experience of XP Teams
This is the raw data (after anonymization, and after the removal of freeform fields, out of an abundance of caution, so as not to leak any intellectual...
Pivotal Application Service for Windows introduced the -s windows stack name in PASW 2.4, reducing the operator and developer need to concern themselves with specific Windows Server versions. From...
A High-performing Mid-range NAS Server, Part 3: 10 GbE
Abstract
“How much faster will my VM’s disks be if I upgrade my
ZFS-based (Z File System) NAS to 10 GbE?”
The disks will be faster, in some cases, much faster. Our experience is that
sequential...
The Spring framework has grown and changed at a massive pace over the last years.
It has evolved from XML configured beans to annotation based beans, from synchronous to a non-blocking and...
Eureka, Zuul, and Cloud Configuration - Pivotal Cloud Foundry
Overview
In a previous post I explained how you could create several components to build a Netflix stack for local development. Now, I want to explain how Pivotal Cloud Foundry makes this much...
Eureka, Zuul, and Cloud Configuration - Local Development
Overview
A couple of recent projects I have been on have started our engagement with the Netflix stack described here, and because I wanted to have a way to quickly prototype, I set up this demo. ...
Custom Resource Validation with Admission Webhooks
Introduction
One way to extend the Kubernetes platform is by building custom controllers
that operate on custom resources. We can leverage custom resources to enhance
the cluster with features for...
Introduction
The kubelet exposes many useful metrics that can be used for a variety of
purposes. These metrics are already being scrapped by components like the
Metric Server.
The metrics from the...
Transferring Time-based One-time Passwords to a New Smartphone
Abstract
Smartphone authenticator apps such as Google
Authenticator
and Authy implement software tokens that are “two-step
verification services using the Time-based One-time Password Algorithm...
Managing Stateful Apps with the Operator Pattern; Orchestration Considerations
(This blog is the fourth installment of a four-part series)
The Operator Pattern
The Operator Pattern stipulates a process that is registered with the Kubernetes system layer, listening to...
Storing Stateful Data that Outlives a Container or a Cluster; Optimizing for Local Volumes
(This blog is the third installment of a four-part series)
Kubernetes can automatically provision “remote persistent” volumes with random names
Several types of storage volumes have built-in...
Provisioning Stateful Kubernetes Containers that Work Hard and Stay Alive
(This blog is the second installment of a four-part series)
By default, all containers are free from limits but subject to eviction
By default, Kubernetes places very few limits on a container. A...
Kubernetes is available across all public clouds nowadays, including Pivotal’s own PKS, which runs in the cloud and can also be run “on prem”, on the premises of an enterprise. Kubernetes promises...
Abstract
By using tcpdump to troubleshoot an elusive error, we uncovered a
man-in-the-middle (MITM) ssh proxy installed by our information security
(InfoSec) team to harden/protect a set of...