Introduction
-
About
This guide provides instructions on how to:
- Set up Beyond Identity [BI} Authenticator to sign and verify with Azure Devops
- Beyond Identity authenticator with GPG key entitlements can be used to sign and verify code based on typical Devops events like push, pull, etc. This is a powerful tool to ensure security of SDLC process. The event triggers the signature validation process as part of CI/CD pipeline.
- A GPG key generated on BI Authenticator can be used to sign many repositories, but a repository can be signed with only one key.
- The email used to sign must be enrolled in the Beyond Identity tenant.
-
Prerequisites
Ensure that you have the following:
- You have a tenant configured for your organization and able to enroll users.
- Integration with your SSO provider. The instructions are different based on your SSO provider. Please refer to the integration guides available in the below link
https://beyondidentity.atlassian.net/wiki/spaces/CS/pages/1063813121/SSO+Integration+Guides
No need to setup up BI admin console or BI user console
- You have configured source code repository, project and entitled users to pull, commit, merge source code.
- The users who will sign code must enroll with BI tenant and download BI authenticator.
- You already have setup a CI/CD pipeline [optional]
-
Beyond Identity Tenant Configuration
Information to provide to the Beyond Identity Field Team to setup a tenant:
Your Company Name | |
(Optional) A logo for your corporation Logo requirements: 300 x 150 pixels or less File size of 10kb or less File types accepted: SVG, PNG, JPG, or GIF |
-
BI configuration for Azure Devops
- Generate Key management token
- Get authenticator entitlement to generate GPG keys
- Generate GPG Key
- Set repository path on the authenticator
-
Generate key management token
Beyond Identity Field Team: Please generate key management token through Beyond Identity Support Console for the tenant. This token will be used in the CI/CD pipeline as the value of BYNDID_KEY_MGMT_API_TOKEN in later steps.
-
Get authenticator entitlement to generate GPG keys
- Ensure “Commit-Signing” is enabled for the tenant. This can be done through the support console and BI SME can help with this.
- After this is enabled, any members of the Super administrator group in Beyond identity admin console should create a group with the exact name of “BI_SDO_GPG_Key_Creation”
- Members of “BI_SDO_GPG_Key_Creation” group will be entitled to generate GPG keys and configure repository paths
- Using Beyond Identity admin console, add users to this group. These users will see “GPG keys” in their platform authenticator as shown below
On clicking “GPG Keys” link, you should see a screen with options to create GPG keys and configure
Click “Create”
Ensure the email address matches the email configured to perform git operations. You can omit the expiration date
-
Set Repository Path on the authenticator
After creating the key, you should see the key in the Authenticator and “…” to the right. Click “…” and choose “Set repository”.
Browse to the local path of the repository root and click Configure.
-
Azure Devops configuration
- Sign up for a new account
- Create and upload ssh keys for cloning a repository using SSH URL
- Sign into your Azure Devops organization with the account that has same email that will be used to code sign/verify
- Create a Project / Repository or request the repository owner to add you to Azure Devops organization that hosts project/repository and grant “Basic” access
- Configure Azure Devops pipeline variable BYNDID_KEY_MGMT_API_TOKEN with value generated in step 4.1
- Your Azure Devops organization🡪project🡪Pipelines
- Click the dots that will open op “More options”, select ”Edit”
- Your Azure Devops organization🡪project🡪Pipelines
- Click “Variables” and click on “+” sign to create a new variable BYNDID_KEY_MGMT_API_TOKEN
- Check “Keep this value secret”. This variable is used in azure-pipelines.yml
- Create “azure-pipelines.yml” file in the repository root
trigger:
- master
jobs:
- job: VerifyCommitSignatureWithBeyondIdentity
container:
image: byndid/auth-commit-sig:0.4.1-debian
env: { API_TOKEN: $(BYNDID_KEY_MGMT_API_TOKEN)} # BYNDID_KEY_MGMT_API_TOKEN set as a pipeline secret variable
options: --entrypoint=""
steps:
- script: /bin/action
- Clone repository
- Make changes
- Commit with sign
- git commit -v -S -m "Modified README commit with -S"
- Push
- Verify successful pipeline run
- Your Azure Devops organization🡪project🡪Pipelines🡪Recent
- You should see a green mark
.
-
Appendix
Azure Devops Prerequisites.
- Create an account
- Use the same email account that you will use to code sign/verify
- Create a repository
- Sign in with the same email account that you will use to code sign/verify
- You should have privileges to clone, modify, commit changes.
-
Create an account
- Azure Devops: https://docs.Azure Devops.com/en/get-started/signing-up-for-Azure Devops/signing-up-for-a-new-Azure Devops-account
-
Create Repository
- Azure Devops: https://Azure Devops.com/new
-
Starting with Git
Comments
0 comments
Please sign in to leave a comment.