feat: initial licensing enforcment impl#4348
Conversation
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
There was a problem hiding this comment.
Pull Request Overview
Adds initial enterprise license enforcement for Flipt v2 by integrating Keygen-based license validation, embedding machine fingerprints, and propagating an enterprise/OSS “product” flag throughout the backend and UI.
- Introduces
EnterpriseConfig.LicenseKey, license manager (internal/enterprise/license), and CLI/build-time flags for license settings. - Extends the
Fliptinfo API with aproductfield and custom JSON marshaling to differentiate OSS vs Enterprise. - Exposes the edition badge in the UI (
Footer.tsx), restricts enterprise-only UI actions (e.g. branch merge), and updates tests for onboarding.
Reviewed Changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/config/config.go | Adds EnterpriseConfig and LicenseKey to main config |
| internal/enterprise/license/license.go | Implements Manager for license validation and periodic recheck |
| internal/info/flipt.go | Adds Product enum, licenseManager, IsEnterprise(), and JSON marshaling |
| internal/info/flipt_test.go | Tests JSON marshaling of product field based on license manager |
| cmd/flipt/main.go | Wires up license manager on startup and injects into GRPC server |
| ui/src/types/Meta.ts | Defines Product enum and adds product to IInfo |
| ui/src/app/meta/metaSlice.ts | Loads product in Redux meta slice and selector isEnterprise |
| ui/src/components/Footer.tsx | Renders edition badge dynamically based on info.product |
| ui/src/components/environments/...tsx | Hides merge actions unless enterprise license is active |
| ui/tests/support.spec.ts | Updates onboarding test expectations for new headings |
Comments suppressed due to low confidence (1)
ui/src/components/Footer.tsx:58
- Consider adding a UI test for the edition badge rendering in the Footer, verifying it shows 'Enterprise' or 'Open Source' based on
info.product.
info?.product && (
erka
left a comment
There was a problem hiding this comment.
I don't know what has changed but now I can stop Flipt only with kill -9...
Ugh it's probably due to the shutdown context change. I'll investigate. I was able to ctrl c kill it tho |
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Ok turns out there were two places where we were getting stuck on shutdown. They should both be fixed now |
Signed-off-by: Mark Phelps <[email protected]>
erka
left a comment
There was a problem hiding this comment.
One thing that I think over and over if this should be called business. Enterprises usually have the closed system and usually without direct access to the Internet
what about 'Pro'? I do plan to add support for offline license validation. But Pro might be more fitting than Enterprise, until we add more enterprisey features |
Signed-off-by: Mark Phelps <[email protected]>
I suppose you're aiming for something in between. It's possible that some companies may prefer to sign a direct agreement, which could fall under an enterprise plan with custom features per that agreement. |
This pr adds initial license validation for Flipt v2
EnterpriseProIt uses https://keygen.sh/ for the license validation
Ive got a server that im working on that integrates with stripe to manage license lifecycle and provision / deprovision licenses based on subscription payment from stripe
It does the following:
flipt.license.keyfrom config on startupFor development mode we just force enterprise version to make it simpler for us to develop commercial features.
TODO:
Notes: