Setting up a Service Account with auth0 as IdP (vCert bonus)
Objective
Certificate Manager offers the ability to automate certificate request process via Services Accounts
Users may don't have the expertise needed on how a IdP works and technical skills needed to setup a Service Account in Certificate Manager, SaaS
Environment
VaaS/TLSPC TLSPK8
Procedure
Creating an application
- Go to Applications -> APIs
- Create an API
- Call it Venafi JWT
- Identifier: https://api.venafi.cloud
- Signing Algorithm as RS256
- Click on "Create"
- Go to "Venafi JWT" application settings
- Scroll down until "Token expiration" sections
- In both set a smaller number like 1,000 or 2,000
- Click on "Save"
- Go to "Venafi JWT" application permissions
- Add certificate:request
- This will be used as the scope later on TLSPC
- Description: Requesting certificates
- Go to "Venafi JWT" Machine to Machine Applications
- Grant the permission just created to the API. In this step you will check "Authorized" box.
- Then, click on "Update"
- Go to "Venafi JWT" test
- Copy "client_id" in a separate file
- Scroll down until you see a hyperlink to jwt.io
- Copy and paste in a different file "PAYLOAD: DATA" text box
Next steps is to create a Service Account in TLPSC
- Login into your tenant as sys admin or resource owner
- Go to Settings -> Service Accounts
- Click on "New"
- Select "Custom API Integration"
- Name it as you wish.
- In Owning team select the team that the account is for the associated Application
- In Applications select one, a subset or all applications. Make sure the application selected has a certificate template associated
- You can skip Scope since currently there is only one provided and supported
- Next, you will prompted to fill some text fields, the input data will be taken from the file created from step 18*
- Issuer URL = iss
- JWKS URL = iss + /.well-known/jwks.json
- Subject Identifier = sub
- Audience = aud
- Click on "Save"
Final steps is to register web service into TLSPC, run
curl --location --globoff -X POST "TOKEN ENDPOINT URL" \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer' \
--data-urlencode 'client_assertion=XXX'
Where TOKEN ENDPOINT URL will be replaced by what you have here
And client_assertion with what you get from auth0
Bonus: vCert
CyberArk offers a tool which easy automation process by avoiding development of an API client from zero named vCert
GitHub - Venafi/vcert: Go client SDK and command line utility
Once you get a bearer token vCert request should look like this
vcert enroll -p vcp -t <access token> --cn <common name> -z <application name\issuing template alias>
Output will print certificate information along with the same in a base64 format.