Customer License Key Management
Sourcegraph requires site administrators to input a license key to have access to various paid features. This page explains how to create, use, and maintain license keys for prospects and customers.
License keys are created and managed on Sourcegraph.com in the Site-admin > Subscriptions page. Valid license keys can only be generated by site administrators on Sourcegraph.com.
This page covers the following related to license key management:
- Prospective Customer Trials
- Converting Prospects to New Customers
- Creating a new licence key
- Handling Renewals or Upgrades
- Reissuing an Expired License
- License key sharing policy
- Out of contract license extensions
- Internal Licensing FAQ
Prospective Customer Trials
For a new Sales-led trial, create a new subscription. You will only use this for the trial. (Follow the instructions for issuing a new license from start to finish.).
A note on Sales-led cloud (managed instance) trials: as part of the Managed Instance creation process, the CE should create a license key for the new instance. Per our steps we ask CE to create the license.
Converting a Prospect to a New Customer
When the prospect converts to a customer, create a new subscription; do not reuse the trial subscription. (Follow the instructions for issuing a new license from start to finish.) This is to ensure data accuracy for the Sales Ops team.
Note: if the prospect was a PLG Cloud trial customer, do not reuse the plg-trial
tag on their production, paid license. This is for prospects only.
Creating a new license key
The CE should first create a Sourcegraph.com user account for the prospect/customer. Assuming there is not one already. The username of the account should have the following format CompanyName-UniqueId
. This is format is described below. The email of the account should be left blank. Once that is available, follow the steps below.
- Sign in to sourcegraph.com.
- If the customer does not have a license yet, navigate to the users page and create new user account. (You can also check for a user already exists following the instructions in the Internal Licensing FAQ document.)
- Create an account with the username
CompanyName-UniqueId
. ReplaceCompanyName
with the company name, and use the Unique ID from the Unique Account ID field on the Account record in Salesforce. - Navigate to the subscriptions page. For new prospects during trial and / or a new customer, click Create product subscription. Search for the user you just created.
- Click Generate new license manually.
- Fill out the customer name in lowercase. Fill spaces with the
-
character. - Fill out the license subscription plan name. See the plans section.
- Fill out the licensed number of users. Note that if you added the
true-up
tag, the customer will be able to exceed this count, but administrators will see a warning. - Fill out the number of days the license should be valid for. Most typically this should match the end date of the contract itself.
- Fill in the appropriate license tags. For tags, see the License Key Tags section. Note that licenses for Cloud trial managed instance requests should inclue the
plg-trial
tag. Remember: Tags must be separated by commas. You can see a list of tags generated under the tags input. If a tag is not recognized, it will be red and a warning will appear.
- Fill out the customer name in lowercase. Fill spaces with the
- Click Generate license.
- Finally, copy the license key, and send it to the relevant contact at the company. You can link them to the following docs for instructions on where to add the key: Updating your license key
Handling renewals or upgrades
If an existing company or customer needs a new license key for any reason (e.g., they purchase more seats, they upgrade product tiers, or they simply renew), the TA will add a new license key to the existing subscription. In that circumstance, do not click Create a product subscription; find the existing subscription on that page and then once viewing it, click Generate new license manually.
Visit the Site-admin > Subscriptions page, find the existing subscription, click into it, and follow the steps below (from the “Click Generate new license manually” step onwards).
- Sign in to sourcegraph.com and visit the Site-admin > Subscriptions page.
- Search for the user associated with the company, and click into the existing subscription ID (left-most column). (You can also check for a user already exists following the instructions in the Internal Licensing FAQ document.)
- Click Generate new license manually. Fill out the license end date (most typically to match the contract terms) and fill in the appropriate license tags. For tags, see License Key Tags for a list you can just copy. Remember: Tags must be separated by commas, with no spaces!
- Set the licensed number of users (note that if you added the
true-up
tag, the company will be able to exceed this count, but administrators will see a warning) and the end date for which the license should be valid, and click Generate license. - Finally, copy the license key, and send it to the relevant contact at the company. You can link them to the following docs for instructions on where to add the key: Updating your license key
Reissuing Expired Licenses
In most circumstances, license keys match the renewal dates on an account contract and are generated well ahead of time. Sometimes, license keys deviate from this format due to product trials and other special circumstances. If a license key is imminently expiring or has expired, follow these steps:
- Check with the account’s Technical Advisor & Account Executive, as well as the Salesforce Account record and the account running notes. This will help you understand any special context surrounding the current license key tags and expiration dates.
- Grab the contract end date by going to the Account page in Salesforce to look up the
"Active Contract Period End"
. - Follow the process below for generating a renewal license key. Unless otherwise noted during Step 1, use the same exact tags and user count as the existing key (make sure to comma separate each tag) and use the
"Active Contract Period End"
as the expiration date. - Send the new license key to the customer (follow the process outlined below).
License Key Sharing Policy
Within Sourcegraph we use 1Password for managing our credentials, including license keys. Follow these steps for safely sharing licensing credentials with customers.
- Create a new record in your private Vault (type = software license).
- Name the entry the customers’ name, enter the license key, and enter the admin’s email address. Click Save.
- Go to the newly created record and click Share. A prompt will be displayed with sharing options. Set the link to expire after 7 days, make it available only to some people, check the box for “Can be viewed only 1 time per person”, and enter the admin’s email address. Click Get Link to Share.
- Copy the private link that is generated and send to the admin. (Note: they must verify their email address to access the link).
Out of Contract License Extensions
In select circumstances, such as a bridge extension being requested due to the renewal process not aligning with license expiration, Sales must receive approval from the VP of Finance and VP of Sales to issue a licensing exception. This approval is granted via request in #deal-desk. If an AE requests a deviation from their contract licensing terms, please validate that the necessary approvals have been granted before making any changes to a customers’ license key.
Plans
Below is a list of supported plans:
enterprise-1
(from 4.0 onwards) for Enterprise customers,code-insights
andbatch-changes
includedNote: this should be the default plan for most of the enterprise customers.
enterprise-0
(until 4.0) for Enterprise customers, features above only included if tags of same name are addedbusiness-0
for Business customers,code-insights
andbatch-changes
includedteam-0
(until 4.0) for a handful of customers on the Team planfree-0
for legacy Free plan (until 4.5) customers, for which we need to generate a license to keep them using the existing feature setfree-1
for new Free plan (from 4.5 onwards). We should not generate licenses with this plan at the moment, because it is automatically assigned when no license key is given
License key tags
Below is a list of our license key tags along with a description of each which you may need to include.
First the tags that relate to license itself:
true-up
to allow the company to go over the user limit on the license. No tag is needed for hard cap.mau
to indicate that the company is on a monthly usage-based billing model.Note: For any MAU-based customers, the
true-up
tag must also be added as we do not have the ability to hard-cap MAU-based plans.trial
to show an indicate in Sourcegraph that the company is on a trial.plg-trial
to indicate that a Cloud trial managed instance has been requested through signup.sourcegraph.com.dev
for internal developer licensesinternal
for licenses used for internal sites (dotcom, k8s, etc.)
Second, the tags that enable specific features:
acls
for repository permissions from the code host. (Add this to all licenses.)batch-changes
for unlimited Batch Changes (formerlycampaigns
)code-insights
for unlimited Code Insightsprivate-extension-registry
to allow for a private Extension registry. All Enterprise licenses should have this added.remote-extensions-allow-disallow
to allow for the admin to enable/disable remote extensions. All Enterprise licenses should have this added.monitoring
- Monitoring. All licenses should have this added.
Example license key tags:
-
Enterprise Licenses:
acls
,private-extension-registry
,remote-extensions-allow-disallow
,monitoring
, should be added to every Enterprise license.- Optionally add
true-up
,mau
,trial
based on the context of the license. batch-changes
andcode-insights
tags should only be added to legacyenterprise-0
plan or other plans that do not automatically add the feature.enterprise-1
plan alreadty contains both.
- Optionally add
-
Non-enterprise Licenses: these depend on the contract & specified features.
Note: only add
batch-changes
andcode-insights
tags if the contract specifies unlimited usage of these features. -
Teams Licenses: Only applicable for team license renewals. Add
plan:team-0
,acls
,monitoring
, plus the customer name, to all Teams licenses.
See our Sourcegraph License Builder for more information or help compiling the correct license tag values.
Legacy tags
We used to tag each license with the customer name. Since the form to create licenses was revamped, we expect the customer tag to be in the format of customer:customer-name
. However this tag is now autogenerated from the form, if the customer name is filled in. No need to fill it in manually as a tag anymore.
Similarly, we now add a tag for the license subscription plan automatically, no need to specify that as a tag anymore.
The enterprise
tag is a legacy tag that should not be used anymore. It gives access to all features, including batch-changes
. Similarly, a license with no plan:
tag (no plan:team-0
, plan:enterprise-1
) allows access to all features.
plan:enterprise-0
represents our legacy enterprise pricing plan. plan:enterprise-1
was launched in with Sourcegraph 4.0.
These tags are supported but not currently saleable: - branding
: Whether custom branding of this Sourcegraph instance has been purchased. - backup-and-restore
: Whether builtin backup and restore on this Sourcegraph instance has been purchased.
If no plan:*
tag is supplied, the license will be treated as legacy enterprise tier which has unlimited access to all features.
Internal licensing FAQ
In case you have a question regarding licensing that is not discussed on this page, check if it is answered in the internal licensing FAQ.