Repository navigation
License keys: read and checked with no server, and asked for anew - #380
Merged
Merged
Conversation
The second step of docs/design/license.md: what a key from the portal says, and what each plan gives, in crates/core (license), where the desktop and the phones both reach it. Nothing uses it yet; Settings › License and the limits come next. - A key is the portal's signed envelope under shellwing-license-v1: Ed25519ctx and ML-DSA-65, the portal's shared public keys built in, its development keys in debug builds only. A key of another product, a plan that is not shellwing's, a key naming installations, a change or one signature alone are refused, with a message that names nothing of the key. - Plans: Free, Plus, Pro, Business, by the portal's IDs (shellwing-*). Free gives two hosts to AI and no session logs, and no sync through Google Drive, OneDrive, iCloud or Dropbox; shellwing cloud is Pro's. - A key works through its end and its grace (none for a trial), then Free; a newer key of the same license replaces it. - The refresh: POST /api/licenses/refresh with the key alone, its answers read as the portal's contract says. SHELLWING_PORTAL points a debug build at another portal. The envelope was crates/update's, for the list of releases: it is crates/signed now, which both open. Its test data moves with it. The tests read keys the portal's own signer made with its development keys (crates/core/testdata/license, with how to make them again). Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Step 2 of
docs/design/license.md:crates/core'slicense, which the desktop and the phones both reach. Nothing calls it yet. Settings › License (step 3) and the limits (step 4) come next.What it does
shellwing-license-v1. It needs both signatures, Ed25519ctx and ML-DSA-65.pkg/licensesig/prodkeys/shared, the same files packwing uses.shellwing-plus,shellwing-pro,shellwing-business).FREE_AI_HOSTS); no session logs.newest).POST /api/licenses/refreshwith{"key": …}and nothing else. The answers are read as the portal's refresh contract says.SHELLWING_PORTALpoints a debug build at a portal that signs with the development keys.crates/signedThe envelope check was
crates/update/src/envelope.rs, used for the list of releases. It is now its own crate,shellwing-signed, which bothupdateandcoreuse.updatere-exports it asenvelope.crates/app/src/ui_tests/updates.rsanddocs/updates.mdnow point to the new paths.updateadds "the list of releases:" in front of them instead.Tests
license. They read keys made by the portal's own signer with its development keys;crates/core/testdata/license/README.mdhas the program that makes them again.cargo test --releasepasses too: a release build refuses a development key.cargo test -p shellwing-signed -p shellwing-update -p shellwing-core --lib,make lint,cargo clippy -p shellwing --features ui-tests --all-targets -D warnings, andi18n.py check.🤖 Generated with Claude Code