Gloo Edge Product
Open Source
Gloo Edge Version
1.19
Kubernetes Version
1.32
Describe the bug
When running the glooctl license validate command with a Gloo Edge or Gloo Gateway license, the command always returns
Error: can't parse license key.
Looking at the source code
|
func validateLicense(licenseKey string) error { |
|
var licenseClaims LicenseClaims |
|
|
|
_, _, err := new(jwt.Parser).ParseUnverified(licenseKey, &licenseClaims) |
|
if err != nil { |
|
return fmt.Errorf("can't parse license key") |
|
} |
|
fmt.Print(formatLicenseDetail(licenseClaims.CreationDate, licenseClaims.ExpirationDate, licenseClaims.Product, licenseClaims.LicenseType == "trial")) |
|
return nil |
|
} |
|
|
|
func validateLegacyLicense(licenseKey string) error { |
|
var licenseLegacyClaim LicenseLegacyClaims |
|
var standardizedLicenseKey = base64.RawURLEncoding.EncodeToString([]byte(`{"alg":"HS256","typ":"JWT"}`)) + "." + licenseKey |
|
_, _, err := new(jwt.Parser).ParseUnverified(standardizedLicenseKey, &licenseLegacyClaim) |
|
if err != nil { |
|
return fmt.Errorf("can't parse license key") |
|
} |
|
fmt.Print(formatLicenseDetail(licenseLegacyClaim.Iat, licenseLegacyClaim.Exp, licenseLegacyClaim.Product, licenseLegacyClaim.LicType == "trial")) |
|
return nil |
|
} |
we seem to be looking for a
CreationDate and
ExpirationDate.
The current format however seems to use IssuedAt and ExpiresAt.
Expected Behavior
the glooctl license validate should show the result for a validated license
Steps to reproduce the bug
Run glooctl license validate with a new Gloo Edge or Gloo Gateway license key.
Additional Environment Detail
No response
Additional Context
No response
Gloo Edge Product
Open Source
Gloo Edge Version
1.19
Kubernetes Version
1.32
Describe the bug
When running the
glooctl license validatecommand with a Gloo Edge or Gloo Gateway license, the command always returnsLooking at the source code
gloo/projects/gloo/cli/pkg/cmd/license/validate.go
Lines 63 to 83 in 88095b0
CreationDateandExpirationDate.The current format however seems to use
IssuedAtandExpiresAt.Expected Behavior
the glooctl license validate should show the result for a validated license
Steps to reproduce the bug
Run
glooctl license validatewith a new Gloo Edge or Gloo Gateway license key.Additional Environment Detail
No response
Additional Context
No response