CredHub is a component designed for centralized credential management in Pivotal Cloud Foundry (PCF). It is a single component that can address several scenarios in the PCF ecosystem. At the highest level, CredHub centralizes and secures credential generation, storage, lifecycle management, and access.
CredHub performs a number of different functions to help generate and protect the credentials in your PCF deployment.
- Securing data for storage
- Access and change logging
- Data typing
- Credential generation
- Credential metadata
- Credential versioning
CredHub consists of a REST API and a CLI. The REST API conforms to the Config Server API spec. CredHub is an OAuth2 resource server that integrates with User Account Authentication (UAA) to provide core authentication and federation capabilities.
A PCF deployment stores credentials in the following locations:
- BOSH CredHub: Colocated with the BOSH Director on a single VM. This CredHub instance stores credentials for the BOSH Director.
- Runtime CredHub: Deployed as an independent service and stores service instance credentials.
In PCF, BOSH Director VM includes a CredHub job. This provides a lightweight credential storage instance for the BOSH Director. The Ops Manager Director, Pivotal Application Service (PAS), and other tiles store credentials in BOSH CredHub. For more information, see Retrieving Credentials from Your Deployment.
Note: This configuration does not provide high availability.
In this colocated deployment architecture, the BOSH Director, CredHub, UAA, and the Director database are all installed on a single BOSH VM, as shown in the following diagram:
The PAS tile deploys CredHub as an independent service on its own VM. This provides a highly available credential storage instance for securing service instance credentials. For more information, see Securing Service Instance Credentials with Runtime CredHub.
CredHub is a stateless application, so you can scale it to multiple instances that share a common database cluster and encryption provider.
With CredHub as a service, the load balancer and external databases communicate directly with the CredHub VMs, as shown in the following diagram:
If you develop a service tile for PCF and want to store its credentials in BOSH CredHub, see the CredHub section of the Tile Developer Guide.
Credentials exist in multiple places in the PCF ecosystem. PCF components use credentials to authenticate connections between components. PCF installations often have hundreds of active credentials. Leaked credentials are common causes of data and security breaches, so managing them securely is very important.
For more information, read CredHub Credential Types.
The CredHub application does not hold state, but you must ensure its dependent components are backed up. Redundant backups can help prevent data loss if an individual component fails. For more information, read Backing Up and Restoring CredHub Instances.