Repository navigation
Keep plugin secrets out of user data (#1590) - #1616
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This was referenced Nov 13, 2026
Contributor
Author
|
Live check (spore-host-dev, 2026-11-13). The build integrated #1612, #1613, #1614 and #1616 on main.
Not run live: Windows (#1617), the egress proxy (#1618), the release manifest (#1619), retiring a reused DCV/MPI group, and interactive |
Plugin declarations travel in EC2 user data, readable with ec2:DescribeInstanceAttribute, and were written to a 0644 /etc/spawn/plugins.json. The bootstrap now refuses a declaration whose config sets a secret-named key (password, token, *key, *secret*, ...), for every caller, and says to set it with spawn plugin install, which reaches spored over SSH or sealed over SSM. plugins.json is written 0600 under umask 077. Specs may mark a key secret: true, which spored refuses from a launch declaration.
scttfrdmn
force-pushed
the
fix/1590-plugin-config-userdata
branch
from
November 13, 2026 23:16
e83fdb5 to
db772f4
Compare
scttfrdmn
marked this pull request as ready for review
November 13, 2026 23:16
Merged
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.
Fixes #1590
What
BuildLinuxBootstrapwrites every launch's plugin declarations into user data. It now refuses a declaration whose config sets a secret-named key, for every caller:spawn launch --config, sweeps, and SDK callers ofpkg/launcher(lagotto, mcp).plugin.IsSecretConfigKey. It matches any key containingpassword,passwd,passphrase,secret,tokenorcredential, pluskeyor*keyunless the key is a public key.password, jupyterlabtoken, tailscaleauth_key, globussetup_key.spawn plugin install <instance> <ref> --config key=value. That path reaches spored over SSH, or sealed over SSM since Plugin push: encrypt calls that travel over SSM #1604.ConfigParamgainssecret: true. spored refuses a launch-declared plugin that sets such a key, and records the reason withrecordDeclarationFailure, sospawn plugin statusshows how to fix it. This catches a CLI older than this PR, or a secret whose name the pattern misses./etc/spawn/plugins.jsonis now 0600, and written inside(umask 077; cat > …)so it is never briefly world-readable. spored runs as root.Tests
TestIsSecretConfigKey,TestCheckDeclarationsCarryNoSecrets(the refusal never echoes the value),TestSpecSecretKeys.TestBuildLinuxBootstrap_PluginDeclarationsCarryNoSecretscovers the refusal plus 0600/umask. I watched it fail with the check disabled.TestDeclaredSecretsRefusesSpecMarkedSecrets.User data changes: the per-launch prefix's plugins.json write is now 0600/umask; the signed bootstrap body is untouched. No IAM or spored policy change, so no schema bump.
Live checks needed before merge (owner)
Run in 435415984226, with
--ttl 15m.--configfile declaringcode-serverwithconfig: {password: x}must makespawn launchrefuse before any RunInstances, namingcode-server: password. Check that no instance exists.--configfile declaring a plugin with only non-secret config (e.g.globus-connectendpoint_name) should launch normally.spawn connect <i> -- stat -c '%a %U' /etc/spawn/plugins.jsonshould print600 root.spawn plugin status <i>should show the plugin installed.spawn plugin install <i> code-server --config password=xshould work over SSM (sealed).aws ssm list-commands --region us-east-1 --query 'Commands[0].Parameters'should not containx.The registry specs (spore-plugins) can add
secret: trueto their password/token/auth_key params. This PR does not need it.