-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat(wings): add auth, policy, and MOCITO install path #9458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 34 commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
1265095
feat(wings): add CLI auth and OCI install path
jdx 10b6d6a
feat(wings): consume mocito install config
jdx e97a345
feat(wings): apply mocito install env
jdx 056f740
fix(wings): recursively merge mocito layers
jdx d60ea1e
Update wings login for device auth API
jdx 978c8fa
Address wings review feedback
jdx 18aed3e
Gate wings installed env loading
jdx e33a195
Use apex wings login URL
jdx b4909d3
Canonicalize wings device login URLs
jdx 3a27c4f
Use app wings login URLs
jdx 2e58e3e
Address wings review feedback
jdx 66b3981
Avoid redundant wings enable hint
jdx 284909f
Add wings rebuild command
jdx c5d3665
[autofix.ci] apply automated fixes
autofix-ci[bot] 2b694f9
Address wings rebuild feedback
jdx 81d8321
Mark Wings-installed tool env
jdx afc5524
[autofix.ci] apply automated fixes
autofix-ci[bot] ed0fed0
Refresh Wings token while polling
jdx b202eb8
Tighten Wings auth retry paths
jdx 3554b36
[autofix.ci] apply automated fixes
autofix-ci[bot] 02a5511
Use resolved ToolVersion for Wings cleanup
jdx aabed8e
Handle Wings path env and install replacement
jdx bd33d99
Allow Wings raw binary installs without bin metadata
jdx 1e77c16
Verify Wings evidence referrers during install
jdx dc62af5
Verify Wings policy bundles during install
jdx 18176d0
Address Wings PR feedback
jdx 6175e4e
Replay locked Wings artifact digests
jdx 741fb3b
Use referrer artifact type for SBOM inspect
jdx c26d53d
Address Wings install feedback
jdx f1c0205
Box large Wings rebuild command
jdx f8030b5
Address Wings review nits
jdx a98e4fd
Harden Wings fallback handling
jdx a9bcfdb
Harden Wings policy and referrer validation
jdx 34fe1ea
Add Wings inventory reporting
jdx 6cbac57
Harden Wings feedback paths
jdx 7529a1e
Address Wings PR feedback
jdx a313e70
Fix GitHub retry URL classification
jdx fcfe1f8
Render Wings inventory docs
jdx 3b8d6db
Address Wings lockfile feedback
jdx ce6c129
Preserve Wings pins for same URL
jdx 86bf24f
Address Wings install feedback
jdx dfacc4f
Allow Wings lock fallback without auth
jdx 0c3bcb1
Report restored Wings installs as fallback
jdx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| <!-- @generated by usage-cli from usage spec --> | ||
| # `mise wings` | ||
|
|
||
| - **Usage**: `mise wings <SUBCOMMAND>` | ||
| - **Source code**: [`src/cli/wings/mod.rs`](https://github.com/jdx/mise/blob/main/src/cli/wings/mod.rs) | ||
|
|
||
| Manage `mise wings` authentication | ||
|
|
||
| `mise-wings` is a paid asset cache for tool installs. Run | ||
| `mise wings login` once to authenticate; subsequent installs | ||
| resolve through the mise-wings catalog and OCI registry when | ||
| `wings.enabled` is set. Set `wings = false` on a specific | ||
| `[tools]` entry to keep that tool on its normal backend path. | ||
|
|
||
| `mise wings inspect` provides read-only OCI debugging commands | ||
| for artifact manifests, referrers, and evidence blobs such as | ||
| SBOMs. | ||
|
|
||
| Bare `mise wings` with no subcommand prints the same status | ||
| summary as `mise wings status`. | ||
|
|
||
| ## Subcommands | ||
|
|
||
| - [`mise wings inspect <SUBCOMMAND>`](/cli/wings/inspect.md) | ||
| - [`mise wings inventory`](/cli/wings/inventory.md) | ||
| - [`mise wings login`](/cli/wings/login.md) | ||
| - [`mise wings logout [FLAGS]`](/cli/wings/logout.md) | ||
| - [`mise wings rebuild <TOOL@VERSION>`](/cli/wings/rebuild.md) | ||
| - [`mise wings status`](/cli/wings/status.md) | ||
| - [`mise wings whoami`](/cli/wings/whoami.md) |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| <!-- @generated by usage-cli from usage spec --> | ||
| # `mise wings inspect` | ||
|
|
||
| - **Usage**: `mise wings inspect <SUBCOMMAND>` | ||
| - **Source code**: [`src/cli/wings/mod.rs`](https://github.com/jdx/mise/blob/main/src/cli/wings/mod.rs) | ||
|
|
||
| Inspect Wings OCI artifacts and attached evidence. | ||
|
|
||
| Examples: | ||
|
|
||
| ```sh | ||
| $ mise wings inspect manifest registry.mise-wings.en.dev/acme/node:20 | ||
| {"schemaVersion":2,"mediaType":"application/vnd.oci.image.manifest.v1+json","layers":[{"mediaType":"application/vnd.mise-wings.artifact.v1","digest":"sha256:..."}]} | ||
| ``` | ||
|
|
||
| ## Subcommands | ||
|
|
||
| - [`mise wings inspect manifest [--digest <DIGEST>] <REFERENCE>`](/cli/wings/inspect/manifest.md) | ||
| - [`mise wings inspect referrers [--digest <DIGEST>] <REFERENCE>`](/cli/wings/inspect/referrers.md) | ||
| - [`mise wings inspect sbom [--digest <DIGEST>] <REFERENCE>`](/cli/wings/inspect/sbom.md) |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| <!-- @generated by usage-cli from usage spec --> | ||
| # `mise wings inspect manifest` | ||
|
|
||
| - **Usage**: `mise wings inspect manifest [--digest <DIGEST>] <REFERENCE>` | ||
| - **Source code**: [`src/cli/wings/inspect/manifest.rs`](https://github.com/jdx/mise/blob/main/src/cli/wings/inspect/manifest.rs) | ||
|
|
||
| Print the OCI image manifest for a Wings artifact. | ||
|
|
||
| Examples: | ||
|
|
||
| ```sh | ||
| $ mise wings inspect manifest registry.mise-wings.en.dev/acme/node:20 | ||
| {"schemaVersion":2,"mediaType":"application/vnd.oci.image.manifest.v1+json","layers":[{"mediaType":"application/vnd.mise-wings.artifact.v1","digest":"sha256:..."}]} | ||
| ``` | ||
|
|
||
| Fetch and verify a specific manifest digest: | ||
|
|
||
| ```sh | ||
| $ mise wings inspect manifest registry.mise-wings.en.dev/acme/node --digest sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | ||
| {"schemaVersion":2,"mediaType":"application/vnd.oci.image.manifest.v1+json"} | ||
| ``` | ||
|
|
||
| ## Arguments | ||
|
|
||
| ### `<REFERENCE>` | ||
|
|
||
| Wings OCI reference, optionally including @sha256:<digest> | ||
|
|
||
| ## Flags | ||
|
|
||
| ### `--digest <DIGEST>` | ||
|
|
||
| Manifest digest to fetch when the reference does not include one |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| <!-- @generated by usage-cli from usage spec --> | ||
| # `mise wings inspect referrers` | ||
|
|
||
| - **Usage**: `mise wings inspect referrers [--digest <DIGEST>] <REFERENCE>` | ||
| - **Source code**: [`src/cli/wings/inspect/referrers.rs`](https://github.com/jdx/mise/blob/main/src/cli/wings/inspect/referrers.rs) | ||
|
|
||
| Print the OCI referrers index for a Wings artifact. | ||
|
|
||
| Examples: | ||
|
|
||
| ```sh | ||
| $ mise wings inspect referrers registry.mise-wings.en.dev/acme/node@sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | ||
| {"schemaVersion":2,"mediaType":"application/vnd.oci.image.index.v1+json","manifests":[{"mediaType":"application/vnd.oci.image.manifest.v1+json","artifactType":"application/spdx+json","digest":"sha256:..."}]} | ||
| ``` | ||
|
|
||
| ## Arguments | ||
|
|
||
| ### `<REFERENCE>` | ||
|
|
||
| Wings OCI reference, including @sha256:<digest> or paired with --digest | ||
|
|
||
| ## Flags | ||
|
|
||
| ### `--digest <DIGEST>` | ||
|
|
||
| Subject manifest digest when the reference does not include one |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| <!-- @generated by usage-cli from usage spec --> | ||
| # `mise wings inspect sbom` | ||
|
|
||
| - **Usage**: `mise wings inspect sbom [--digest <DIGEST>] <REFERENCE>` | ||
| - **Source code**: [`src/cli/wings/inspect/sbom.rs`](https://github.com/jdx/mise/blob/main/src/cli/wings/inspect/sbom.rs) | ||
|
|
||
| Print the first SPDX or CycloneDX SBOM attached to a Wings artifact. | ||
|
|
||
| Examples: | ||
|
|
||
| ```sh | ||
| $ mise wings inspect sbom registry.mise-wings.en.dev/acme/node@sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | ||
| {"spdxVersion":"SPDX-2.3","name":"node-20.11.1-linux-x64","packages":[]} | ||
| ``` | ||
|
|
||
| If no SBOM is attached: | ||
|
|
||
| ```sh | ||
| $ mise wings inspect sbom registry.mise-wings.en.dev/acme/node@sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | ||
| no SBOM referrer found for sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; Wings may not have published SBOM referrers for this artifact yet | ||
| ``` | ||
|
|
||
| ## Arguments | ||
|
|
||
| ### `<REFERENCE>` | ||
|
|
||
| Wings OCI reference, including @sha256:<digest> or paired with --digest | ||
|
|
||
| ## Flags | ||
|
|
||
| ### `--digest <DIGEST>` | ||
|
|
||
| Subject manifest digest when the reference does not include one |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <!-- @generated by usage-cli from usage spec --> | ||
| # `mise wings inventory` | ||
|
|
||
| - **Usage**: `mise wings inventory` | ||
| - **Source code**: [`src/cli/wings/inventory.rs`](https://github.com/jdx/mise/blob/main/src/cli/wings/inventory.rs) | ||
|
|
||
| Upload current installed-tool inventory to mise-wings | ||
|
|
||
| Reports the current machine's installed tool versions, platform, and | ||
| Wings artifact digests when present. The snapshot is scoped to the | ||
| authenticated Wings org and intentionally excludes local paths, usernames, | ||
| hostnames, environment values, command arguments, and package-manager logs. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| <!-- @generated by usage-cli from usage spec --> | ||
| # `mise wings login` | ||
|
|
||
| - **Usage**: `mise wings login` | ||
| - **Source code**: [`src/cli/wings/login.rs`](https://github.com/jdx/mise/blob/main/src/cli/wings/login.rs) | ||
|
|
||
| Authenticate with mise-wings | ||
|
|
||
| By default, starts device-code auth and stores a device-bound | ||
| credential. | ||
|
|
||
| Examples: | ||
|
|
||
| ```sh | ||
| $ mise wings login | ||
| To sign in to mise-wings, open: | ||
|
|
||
| https://app.mise-wings.en.dev/cli-device?code=AB12CD34 | ||
|
|
||
| Enter code: AB12-CD34 | ||
| Waiting for browser approval... | ||
| Signed in to mise-wings as user_123 (acme). | ||
| ``` |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| <!-- @generated by usage-cli from usage spec --> | ||
| # `mise wings logout` | ||
|
|
||
| - **Usage**: `mise wings logout [FLAGS]` | ||
| - **Source code**: [`src/cli/wings/logout.rs`](https://github.com/jdx/mise/blob/main/src/cli/wings/logout.rs) | ||
|
|
||
| Sign out of mise-wings. | ||
|
|
||
| Deletes the local credentials file. With `--token-stdin` | ||
| or `--token`, also POSTs to `/auth/dev/revoke` to invalidate | ||
| every wings session belonging to the calling user | ||
| (including ones on other machines). | ||
|
|
||
| Examples: | ||
|
|
||
| ```sh | ||
| $ mise wings logout --local-only | ||
| Local mise-wings credentials cleared. | ||
| ``` | ||
|
|
||
| Revoke all server-side sessions for the current user: | ||
|
|
||
| ```sh | ||
| $ pbpaste | mise wings logout --token-stdin | ||
| Revoked every active mise-wings session for your user. | ||
| ``` | ||
|
|
||
| Without a token, logout still clears local credentials: | ||
|
|
||
| ```sh | ||
| $ mise wings logout | ||
| Local mise-wings credentials cleared. Server-side revoke skipped (no Clerk session token). | ||
| To revoke every session for your user (including other machines), run: | ||
|
|
||
| mise wings logout --token-stdin | ||
| ``` | ||
|
|
||
| ## Flags | ||
|
|
||
| ### `--local-only` | ||
|
|
||
| Skip the server-side revoke; only delete the local credentials file. Use this when you don't have a fresh Clerk session JWT handy and just want this machine signed out — the wings session JWT remains valid on the server until its `exp` (24 h default) | ||
|
|
||
| ### `--token <TOKEN>` | ||
|
|
||
| Clerk session JWT for the server-side revoke | ||
|
|
||
| ### `--token-stdin` | ||
|
|
||
| Read the Clerk session JWT from stdin (avoids shell history) |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| <!-- @generated by usage-cli from usage spec --> | ||
| # `mise wings rebuild` | ||
|
|
||
| - **Usage**: `mise wings rebuild <TOOL@VERSION>` | ||
| - **Source code**: [`src/cli/wings/rebuild.rs`](https://github.com/jdx/mise/blob/main/src/cli/wings/rebuild.rs) | ||
|
|
||
| Rebuild a Wings artifact for a tool version. | ||
|
|
||
| Resolves the tool exactly like an install would, asks the Wings API to evict | ||
| the current packaged catalog row for this org/tool/platform, and queues a | ||
| fresh server-side packaging job. | ||
|
|
||
| Examples: | ||
|
|
||
| ```sh | ||
| mise wings rebuild jq@1.7.1 | ||
| ``` | ||
|
|
||
| ## Arguments | ||
|
|
||
| ### `<TOOL@VERSION>` | ||
|
|
||
| Tool version to rebuild e.g.: node@20 |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.