How to verify a token from VMware Harbor Registry Tile
search cancel

How to verify a token from VMware Harbor Registry Tile

book

Article ID: 451973

calendar_today

Updated On:

Products

VMware Tanzu Kubernetes Grid Integrated Edition

Issue/Introduction

Some users may want to verify the JWT token programmatically when generating it outside of the docker CLI

For example:

curl -u '<USERNAME>:<PASSWORD>' 'https://<HARBOR_FQDN>/service/token?service=harbor-registry&scope=registry:catalog:*'

Environment

VMware Harbor Registry Tile

Resolution

You can get the token signing certificate from the harbor-app VM in your harbor deployment. The following command will print the public certificate:

bosh -d <HARBOR_DEPLOYMENT> ssh harbor-app/0 -c 'sudo cat /var/vcap/store/harbor/secret/registry/root.crt' -r

You can then use this cert to verify the JWT token with your preferred tools