Commit 9dbf7e8
authored
chore(license): move owlicgen out of the product; add dev entitlement bypass (#702)
* chore(license): remove owlicgen from the product; add dev entitlement bypass
owlicgen mints/signs license JWTs — that is Hanalyx-as-issuer infrastructure,
not part of the product customers run (and the repo is heading to open source).
Remove cmd/owlicgen; it is preserved as issuer reference under
~/hanalyx/OWAR/licensing/ with an implementation guide for the hanalyx.com
dashboard team. The product keeps only license *verification* (internal/license),
never minting. Nothing automated depended on owlicgen (tests mint JWTs via their
own fixtures).
To keep local paid-feature testing working without minting a license, add a
build-tag-gated dev entitlement bypass:
- entitlements_release.go (//go:build !dev): devEntitlementsEnabled()=false —
physically absent from release binaries; IsEnabled behaves normally.
- entitlements_dev.go (//go:build dev): unlocks features only when
OPENWATCH_DEV_MODE=true. Two gates (build tag AND env), so a release binary
can never unlock paid features from the environment alone.
- IsEnabled short-circuits on the bypass.
- scripts/openwatch.sh builds with -tags dev and sets OPENWATCH_DEV_MODE=true.
- Tests both ways: release build asserts the bypass is OFF even with the env set
(release-safety guard); -tags dev build asserts it gates on the env var.
Also reword the api-license AC and the LoadJWT comment that name-dropped owlicgen.
* chore(license): dev entitlement bypass + drop owlicgen prose refs
Completes the owlicgen removal (the deletion landed in the previous commit):
- build-tag-gated dev entitlement bypass (entitlements_{release,dev}.go) wired
into IsEnabled; OFF in release builds, ON only under -tags dev with
OPENWATCH_DEV_MODE=true. Tests assert both directions.
- scripts/openwatch.sh builds -tags dev and sets OPENWATCH_DEV_MODE=true so local
dev keeps paid-feature access without minting a license.
- reword api-license AC-10 and the LoadJWT comment that referenced owlicgen.1 parent 38828f6 commit 9dbf7e8
9 files changed
Lines changed: 76 additions & 132 deletions
File tree
- cmd/owlicgen
- internal/license
- scripts
- specs/api
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
25 | 31 | | |
26 | 32 | | |
27 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
186 | 190 | | |
187 | 191 | | |
188 | 192 | | |
| |||
193 | 197 | | |
194 | 198 | | |
195 | 199 | | |
| 200 | + | |
196 | 201 | | |
197 | 202 | | |
198 | 203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
0 commit comments