This repository was archived by the owner on Sep 30, 2024. It is now read-only.
Reimplement license checks#63068
Merged
Merged
Conversation
…/reimplement-license-checks
…/reimplement-license-checks
eseliger
approved these changes
Jun 10, 2024
…/reimplement-license-checks
eseliger
approved these changes
Jun 11, 2024
|
|
||
| flags := featureflag.FromContext(ctx) | ||
| // This feature flag allows us to temporarily allow conflicting Site IDs | ||
| conflictingSiteIDsValid := flags.GetBoolOr("markConflictingSiteIDsAsValid", false) |
Member
There was a problem hiding this comment.
off by default is what we want, correct? just double checking
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR reintroduces the licensing checks that will block a customer's instance if an invalid license is used.
An instance gets blocked (i.e. only Site Admins can sign in and modify the site config) if the license has been:
If a customer creates a new Sourcegraph instance with a new Site ID, they'll need a new license key as well.
If we receive irregular pings from the same Site ID + License key combination, we'll receive a Slack ping about it as that would require manual investigation.
One change made in this PR as well is to only alert when we receive irregular pings from the exact same Site ID + License key. Previously it only checked Site ID, but due to many customers creating a copy of their production instance for testing, this is not particularly reliable and leads to noise.
Test plan
Unit tests updated, also lots of manual testing by starting a dotcom instance with
docker runand doing license checks against that instance.Changelog