fleet/ee/tools/license
dependabot[bot] bd5071058e
Bump semver from 7.3.8 to 7.5.3 in /ee/tools/license (#12470)
Bumps [semver](https://github.com/npm/node-semver) from 7.3.8 to 7.5.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/npm/node-semver/releases">semver's
releases</a>.</em></p>
<blockquote>
<h2>v7.5.3</h2>
<h2><a
href="https://github.com/npm/node-semver/compare/v7.5.2...v7.5.3">7.5.3</a>
(2023-06-22)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><a
href="abdd93d554"><code>abdd93d</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/571">#571</a>
set max lengths in regex for numeric and build identifiers (<a
href="https://redirect.github.com/npm/node-semver/issues/571">#571</a>)
(<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li><a
href="bf53dd8da1"><code>bf53dd8</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/569">#569</a>
add example for <code>&gt;</code> comparator (<a
href="https://redirect.github.com/npm/node-semver/issues/569">#569</a>)
(<a href="https://github.com/mbtools"><code>@​mbtools</code></a>)</li>
</ul>
<h2>v7.5.2</h2>
<h2><a
href="https://github.com/npm/node-semver/compare/v7.5.1...v7.5.2">7.5.2</a>
(2023-06-15)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><a
href="58c791f40b"><code>58c791f</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/566">#566</a>
diff when detecting major change from prerelease (<a
href="https://redirect.github.com/npm/node-semver/issues/566">#566</a>)
(<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
<li><a
href="5c8efbcb3c"><code>5c8efbc</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/565">#565</a>
preserve build in raw after inc (<a
href="https://redirect.github.com/npm/node-semver/issues/565">#565</a>)
(<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
<li><a
href="717534ee35"><code>717534e</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/564">#564</a>
better handling of whitespace (<a
href="https://redirect.github.com/npm/node-semver/issues/564">#564</a>)
(<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
</ul>
<h2>v7.5.1</h2>
<h2><a
href="https://github.com/npm/node-semver/compare/v7.5.0...v7.5.1">7.5.1</a>
(2023-05-12)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><a
href="d30d25a5c1"><code>d30d25a</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/559">#559</a>
show type on invalid semver error (<a
href="https://redirect.github.com/npm/node-semver/issues/559">#559</a>)
(<a
href="https://github.com/tjenkinson"><code>@​tjenkinson</code></a>)</li>
</ul>
<h2>v7.5.0</h2>
<h2><a
href="https://github.com/npm/node-semver/compare/v7.4.0...v7.5.0">7.5.0</a>
(2023-04-17)</h2>
<h3>Features</h3>
<ul>
<li><a
href="503a4e52fe"><code>503a4e5</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/548">#548</a>
allow identifierBase to be false (<a
href="https://redirect.github.com/npm/node-semver/issues/548">#548</a>)
(<a href="https://github.com/lsvalina"><code>@​lsvalina</code></a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><a
href="e219bb4540"><code>e219bb4</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/552">#552</a>
throw on bad version with correct error message (<a
href="https://redirect.github.com/npm/node-semver/issues/552">#552</a>)
(<a
href="https://github.com/wraithgar"><code>@​wraithgar</code></a>)</li>
<li><a
href="fc2f3df0b5"><code>fc2f3df</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/546">#546</a>
incorrect results from diff sometimes with prerelease versions (<a
href="https://redirect.github.com/npm/node-semver/issues/546">#546</a>)
(<a
href="https://github.com/tjenkinson"><code>@​tjenkinson</code></a>)</li>
<li><a
href="2781767779"><code>2781767</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/547">#547</a>
avoid re-instantiating SemVer during diff compare (<a
href="https://redirect.github.com/npm/node-semver/issues/547">#547</a>)
(<a href="https://github.com/macno"><code>@​macno</code></a>)</li>
</ul>
<h2>v7.4.0</h2>
<h2><a
href="https://github.com/npm/node-semver/compare/v7.3.8...v7.4.0">7.4.0</a>
(2023-04-10)</h2>
<h3>Features</h3>
<ul>
<li><a
href="113f51312a"><code>113f513</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/532">#532</a>
identifierBase parameter for .inc (<a
href="https://redirect.github.com/npm/node-semver/issues/532">#532</a>)
(<a href="https://github.com/wraithgar"><code>@​wraithgar</code></a>, <a
href="https://github.com/b-bly"><code>@​b-bly</code></a>)</li>
<li><a
href="48d8f8fa63"><code>48d8f8f</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/530">#530</a>
export new RELEASE_TYPES constant (<a
href="https://github.com/hcharley"><code>@​hcharley</code></a>)</li>
</ul>
<h3>Bug Fixes</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/npm/node-semver/blob/main/CHANGELOG.md">semver's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/npm/node-semver/compare/v7.5.2...v7.5.3">7.5.3</a>
(2023-06-22)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><a
href="abdd93d554"><code>abdd93d</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/571">#571</a>
set max lengths in regex for numeric and build identifiers (<a
href="https://redirect.github.com/npm/node-semver/issues/571">#571</a>)
(<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li><a
href="bf53dd8da1"><code>bf53dd8</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/569">#569</a>
add example for <code>&gt;</code> comparator (<a
href="https://redirect.github.com/npm/node-semver/issues/569">#569</a>)
(<a href="https://github.com/mbtools"><code>@​mbtools</code></a>)</li>
</ul>
<h2><a
href="https://github.com/npm/node-semver/compare/v7.5.1...v7.5.2">7.5.2</a>
(2023-06-15)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><a
href="58c791f40b"><code>58c791f</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/566">#566</a>
diff when detecting major change from prerelease (<a
href="https://redirect.github.com/npm/node-semver/issues/566">#566</a>)
(<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
<li><a
href="5c8efbcb3c"><code>5c8efbc</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/565">#565</a>
preserve build in raw after inc (<a
href="https://redirect.github.com/npm/node-semver/issues/565">#565</a>)
(<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
<li><a
href="717534ee35"><code>717534e</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/564">#564</a>
better handling of whitespace (<a
href="https://redirect.github.com/npm/node-semver/issues/564">#564</a>)
(<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
</ul>
<h2><a
href="https://github.com/npm/node-semver/compare/v7.5.0...v7.5.1">7.5.1</a>
(2023-05-12)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><a
href="d30d25a5c1"><code>d30d25a</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/559">#559</a>
show type on invalid semver error (<a
href="https://redirect.github.com/npm/node-semver/issues/559">#559</a>)
(<a
href="https://github.com/tjenkinson"><code>@​tjenkinson</code></a>)</li>
</ul>
<h2><a
href="https://github.com/npm/node-semver/compare/v7.4.0...v7.5.0">7.5.0</a>
(2023-04-17)</h2>
<h3>Features</h3>
<ul>
<li><a
href="503a4e52fe"><code>503a4e5</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/548">#548</a>
allow identifierBase to be false (<a
href="https://redirect.github.com/npm/node-semver/issues/548">#548</a>)
(<a href="https://github.com/lsvalina"><code>@​lsvalina</code></a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><a
href="e219bb4540"><code>e219bb4</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/552">#552</a>
throw on bad version with correct error message (<a
href="https://redirect.github.com/npm/node-semver/issues/552">#552</a>)
(<a
href="https://github.com/wraithgar"><code>@​wraithgar</code></a>)</li>
<li><a
href="fc2f3df0b5"><code>fc2f3df</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/546">#546</a>
incorrect results from diff sometimes with prerelease versions (<a
href="https://redirect.github.com/npm/node-semver/issues/546">#546</a>)
(<a
href="https://github.com/tjenkinson"><code>@​tjenkinson</code></a>)</li>
<li><a
href="2781767779"><code>2781767</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/547">#547</a>
avoid re-instantiating SemVer during diff compare (<a
href="https://redirect.github.com/npm/node-semver/issues/547">#547</a>)
(<a href="https://github.com/macno"><code>@​macno</code></a>)</li>
</ul>
<h2><a
href="https://github.com/npm/node-semver/compare/v7.3.8...v7.4.0">7.4.0</a>
(2023-04-10)</h2>
<h3>Features</h3>
<ul>
<li><a
href="113f51312a"><code>113f513</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/532">#532</a>
identifierBase parameter for .inc (<a
href="https://redirect.github.com/npm/node-semver/issues/532">#532</a>)
(<a href="https://github.com/wraithgar"><code>@​wraithgar</code></a>, <a
href="https://github.com/b-bly"><code>@​b-bly</code></a>)</li>
<li><a
href="48d8f8fa63"><code>48d8f8f</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/530">#530</a>
export new RELEASE_TYPES constant (<a
href="https://github.com/hcharley"><code>@​hcharley</code></a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><a
href="940723d22b"><code>940723d</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/538">#538</a>
intersects with v0.0.0 and v0.0.0-0 (<a
href="https://redirect.github.com/npm/node-semver/issues/538">#538</a>)
(<a
href="https://github.com/wraithgar"><code>@​wraithgar</code></a>)</li>
<li><a
href="aa516b50b3"><code>aa516b5</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/535">#535</a>
faster parse options (<a
href="https://redirect.github.com/npm/node-semver/issues/535">#535</a>)
(<a href="https://github.com/H4ad"><code>@​H4ad</code></a>)</li>
<li><a
href="61e6ea1e9b"><code>61e6ea1</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/536">#536</a>
faster cache key factory for range (<a
href="https://redirect.github.com/npm/node-semver/issues/536">#536</a>)
(<a href="https://github.com/H4ad"><code>@​H4ad</code></a>)</li>
<li><a
href="f8b8b619e7"><code>f8b8b61</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/541">#541</a>
optimistic parse (<a
href="https://redirect.github.com/npm/node-semver/issues/541">#541</a>)
(<a href="https://github.com/H4ad"><code>@​H4ad</code></a>)</li>
<li><a
href="796cbe29b0"><code>796cbe2</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/533">#533</a>
semver.diff prerelease to release recognition (<a
href="https://redirect.github.com/npm/node-semver/issues/533">#533</a>)
(<a href="https://github.com/wraithgar"><code>@​wraithgar</code></a>, <a
href="https://github.com/dominique-blockchain"><code>@​dominique-blockchain</code></a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7fdf1ef223"><code>7fdf1ef</code></a>
chore: release 7.5.3</li>
<li><a
href="bf53dd8da1"><code>bf53dd8</code></a>
docs: add example for <code>&gt;</code> comparator (<a
href="https://redirect.github.com/npm/node-semver/issues/569">#569</a>)</li>
<li><a
href="abdd93d554"><code>abdd93d</code></a>
fix: set max lengths in regex for numeric and build identifiers (<a
href="https://redirect.github.com/npm/node-semver/issues/571">#571</a>)</li>
<li><a
href="e7b78de06e"><code>e7b78de</code></a>
chore: release 7.5.2</li>
<li><a
href="58c791f40b"><code>58c791f</code></a>
fix: diff when detecting major change from prerelease (<a
href="https://redirect.github.com/npm/node-semver/issues/566">#566</a>)</li>
<li><a
href="5c8efbcb3c"><code>5c8efbc</code></a>
fix: preserve build in raw after inc (<a
href="https://redirect.github.com/npm/node-semver/issues/565">#565</a>)</li>
<li><a
href="717534ee35"><code>717534e</code></a>
fix: better handling of whitespace (<a
href="https://redirect.github.com/npm/node-semver/issues/564">#564</a>)</li>
<li><a
href="2f738e9a70"><code>2f738e9</code></a>
chore: bump <code>@​npmcli/template-oss</code> from 4.14.1 to 4.15.1 (<a
href="https://redirect.github.com/npm/node-semver/issues/558">#558</a>)</li>
<li><a
href="aa016a6716"><code>aa016a6</code></a>
chore: release 7.5.1</li>
<li><a
href="d30d25a5c1"><code>d30d25a</code></a>
fix: show type on invalid semver error (<a
href="https://redirect.github.com/npm/node-semver/issues/559">#559</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/npm/node-semver/compare/v7.3.8...v7.5.3">compare
view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by <a
href="https://www.npmjs.com/~npm-cli-ops">npm-cli-ops</a>, a new
releaser for semver since your current version.</p>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=semver&package-manager=npm_and_yarn&previous-version=7.3.8&new-version=7.5.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts page](https://github.com/fleetdm/fleet/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-23 12:27:36 -07:00
..
license.js Rename core->free and basic->premium (#1870) 2021-09-03 13:05:23 -03:00
package.json Bump jsonwebtoken from 8.5.1 to 9.0.0 in /ee/tools/license (#9109) 2023-02-27 18:23:18 -08:00
README.md Rename core->free and basic->premium (#1870) 2021-09-03 13:05:23 -03:00
yarn.lock Bump semver from 7.3.8 to 7.5.3 in /ee/tools/license (#12470) 2023-06-23 12:27:36 -07:00

Fleet license key generation

This directory contains the Node script for generating Fleet license keys.

Usage

Setup

Install the JS dependencies:

yarn

Put the private key and passphrase into files (avoid using shell commands to prevent secrets from leaking into shell history). They are in the "Licensing" Vault in 1Password. Speak to @zwass or @mikermcneil if you need to get access to these secrets.

nano key.pem
nano passphrase.txt

Generate a key

Run ./license.js generate to generate a key. For example:

./license.js generate --private-key key.pem --key-passphrase passphrase.txt --expiration 2022-01-01 --customer test --devices 100 --note 'for development only'
eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJGbGVldCBEZXZpY2UgTWFuYWdlbWVudCBJbmMuIiwiZXhwIjoxNjQwOTk1MjAwLCJzdWIiOiJkZXZlbG9wbWVudCIsImRldmljZXMiOjEwMCwibm90ZSI6ImZvciBkZXZlbG9wbWVudCBvbmx5IiwidGllciI6ImJhc2ljIiwiaWF0IjoxNjIyNDI2NTg2fQ.WmZ0kG4seW3IrNvULCHUPBSfFdqj38A_eiXdV_DFunMHechjHbkwtfkf1J6JQJoDyqn8raXpgbdhafDwv3rmDw

See ./license.js generate --help for more details on arguments.

Key format

License keys are JWTs signed with the ES256 method.

Check the contents of a key with https://jwt.io/.

The key generated above contains the following payload:

{
  "iss": "Fleet Device Management Inc.",
  "exp": 1640995200,
  "sub": "development",
  "devices": 100,
  "note": "for development only",
  "tier": "premium",
  "iat": 1622426586
}
  • devices refers to the number of licensed devices.
  • note includes any additional note about the terms of the license.
  • tier is the license Tier: currently premium = paid, free = free (though we do not plan to issue license keys for free)
  • Other claims use the meanings described in the JWT specification.