Skip to content
A web interface for CredHub
HTML Go Shell Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ci
screenshots
templates
.envvars-example
.gitignore
Dockerfile
LICENSE
Makefile
README.md
delete_credentials.go
docker-compose.yml
edit_credentials.go
generate_credentials.go
get_credentials.go
login.go
main.go
set_credentials.go

README.md

CredHub Web Interface

A web interface for performing basic functions with CredHub.

Log in

You need to log in with valid Credentials Currently supports:

  • OAuth via UAA

OR

  • client_id
  • client_secret

Features

Currently supports:

  • View
  • Delete
  • Generate
  • Search

Screenshots

Sign in sign in List all credentials in CredHub list creds Search credentials by using a search term, it uses name-like from CredHub search creds View a selected credential view cred Generate a credential generate cred View a generated credential view generated Set a credential set credential

Deploy

Use BOSH to deploy this, see this BOSH release

Build

go get -v .
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o credhub-webui .

Run

./credhub-webui \
  -ui-ssl-cert server.crt \
  -ui-ssl-key server.key \
  -cookie-key "super-secret-key" \
  -cookie-name "auth-cookie" \
  -credhub-server "https://192.168.50.6:8844" \
  -ui-url "https://localhost:8443" \
  -client-id "credhub" \
  -client-secret "credhubsecret" \
  -custom-name "XYZ Credhub"

Docker

Build

Docker

make build-docker

Docker compose

make build

Run

Docker

docker run -p 8443:8443 \
  -e CLIENT_ID=credhub \
  -e CLIENT_SECRET=credhubsecret \
  -e UI_URL=https://localhost:8443 \
  -e CREDHUB_SERVER=https://<ip>:<port> \
  shreddedbacon/credhub-webui

E.g

docker run -p 8443:8443 \
  -e CLIENT_ID=credhub \
  -e CLIENT_SECRET=credhubsecret \
  -e UI_URL=https://localhost:8443 \
  -e CREDHUB_SERVER=https://192.168.50.6:8844 \
  shreddedbacon/credhub-webui

Docker compose

cp .envvars-example .envvars
vi .envvars # edit with your requirements
make run

Access

https://localhost:8443

UAA Ops

# add a credhub user to bosh deployed uaa
- type: replace
  path: /instance_groups/name=bosh/jobs/name=uaa/properties/uaa/scim/users/-
  value:
    name: credhub
    groups: [credhub.write, credhub.read]
    password: credhub

# add a credhub webui client and button to uaa portal
- type: replace
  path: /instance_groups/name=bosh/jobs/name=uaa/properties/uaa/clients/credhub_webui?
  value:
    override: true
    authorized-grant-types: authorization_code,refresh_token
    scope: credhub.read,credhub.write
    authorities: ""
    access-token-validity: 300
    refresh-token-validity: 1800
    secret: "credhubsecret"
    autoapprove: true
    override: true
    redirect-uri: https://localhost:8443/login/callback
    show-on-homepage: true
    app-launch-url: https://localhost:8443
    app-icon: "iVBORw0KGgoAAAANSUhEUgAAAG4AAABuCAYAAADGWyb7AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAB3RJTUUH4gwOCQgJDKODOAAAFgNJREFUeNrtnXl0nNV5xn/3W2bVbkle5F2SF8lC3ohZbBZjG5KSQAnQppTQhpQmTZt0IaG0aXJySlpyspWSQICQQjgYAmFpATveN+x6ky3JkmzLWixbsiRrX0azft/bP2Yk2SAb5xSskTXPOT5HPiNp7nefebfnvvcVJJBAAgkkMN7QffaUbH/lB/L8171yYP2vxNfT/viV+JzqSnmQgd6Oh05W7numdMMTdDXtwXTNJuwvI2v23RSv+Qpzl65SCeLiDPUVe6Ri21rq9/0Mw5uDbqYCNqARCbZhh9rIX/5PFK74Q6bNu1oliBtlnD11TI7seIOa//1ngj5wpS0FO4hIZOjxlGYAJv6uErwZ05m74mEKl3+WjEmzVIK4y4z+7rbXju9bf8+RLU/R27IXR1IBuunCtgYu+Eia7iES6iHiqyF9+iquWv0V8hevXO1OzticIO4y4Nj+DXJ4/RO0n1yH7piE4co5x8qGH0cphYic85OCUiYok0igDivUzbTiL1O8+svMWnCNShD3CeHUsQNSuesNat9/HOWciOHMRqEQCf0ejyEx92kiIoT9R1FWhHkrH6Nw+Z1MmrVAJYj7mNDedEIqd79L9a7vMdDTjTttMUgYlIbSHCCCSBjEQrCj3HCOpSkVJQsNNB2lDBBihIOITqD7MMnZ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