Vault
Enable multi-tenancy in HCP Vault with namespaces
When Vault is primarily used as a central location to manage
secrets, different teams may need to manage their secrets in a self-serving
manner. HashiCups can implement a Vault-as-a-Service model, allowing each business
unit or team (tenant) to manage their own secrets and policies. Most
importantly, tenants work within their own Vault scope, isolated from other tenants.

HCP Vault Dedicated uses the namespace feature. A namespace allows you to create
separate groups of secrets, and apply policies to those namespaces
to ensure each tenant can only access the secrets they have
permission to. When you create a new HCP Vault Dedicated cluster, a Vault
cluster with a default namespace of admin is provisioned.
In this tutorial, Oliver explores the creation of namespaces and learn how to navigate between them.
Prerequisites
- Completed the Create a Vault Cluster on HashiCorp Cloud Platform (HCP) tutorial.
- Completed the Access your HCP Vault Dedicated cluster tutorial.
Characteristics of Vault namespaces
A Vault namespace enables teams, organizations, or applications a dedicated, isolated environment. Each namespace has its own:
- Policies
- Auth methods
- Secrets engines
- Tokens
- Identity entities and groups
Create namespaces
(Persona: operations)
You can create nested namespaces within another namespace in a hierarchical relationship.
In the Vault UI, select Access from the menu.
Select Namespaces and then click the Create namespace action.

Enter
educationin the Path field.
Click Save.
The
educationnamespace is now a namespace under theadminnamespace. You can see this relationship represented in the pathadmin/education/.Click the admin namespace from the menu.

The namespace selector displays the namespaces of the current namespace.
Select the education namespace.
The current namespace changes to the
admin/education/.Navigate to Access > Namespaces and click the Create namespace action.
Enter
trainingin the Path field.
Click Save.
The
trainingnamespace is now a namespace under theadmin/educationnamespace. You can see this relationship represented in the pathadmin/education/training.Use the namespace selector to navigate to the training namespace and then to the admin namespace.

Summary
In this tutorial you created new namespaces. You can use namespaces to isolate access to resources. To gain a greater understanding of namespaces complete the Manage tenants with Vault namespaces tutorial.
Next steps
In the next tutorial, you will enable a secrets engine and store a static secret.