Skip to content

Add a system-level plugin-auth.js#468

Open
reynoldsalec wants to merge 4 commits into
mainfrom
plugin-auth-path
Open

Add a system-level plugin-auth.js#468
reynoldsalec wants to merge 4 commits into
mainfrom
plugin-auth-path

Conversation

@reynoldsalec
Copy link
Copy Markdown
Member

@reynoldsalec reynoldsalec commented May 12, 2026

NOTE: this includes/supersedes #467

Lando currently only reads plugin registry credentials from ~/.lando/plugin-auth.json, which requires every user on a machine to set up their own auth. This makes it awkward for IT/MDM-managed environments
where credentials should be deployed once for all users.

This PR adds a system-level plugin-auth.json that Lando merges as a base before the user-level file. System paths are /Library/Application Support/Lando/plugin-auth.json on macOS,
/srv/lando/plugin-auth.json on Linux, and %PROGRAMDATA%\Lando\plugin-auth.json on Windows.

User-level credentials always win over system-level ones. lando plugin-login and lando plugin-logout continue to operate on the user-level file only — the docs now call this out explicitly.

Robustness: if the system file exists but isn't readable (e.g. wrong permissions), Lando skips it silently rather than crashing at startup.

Docs: the new hosting-and-distributing-a-private-plugin guide gains an "Option D" with platform-specific snippets for deploying system-level credentials via MDM or configuration management.

Lando now reads and merges a system-level plugin-auth.json in addition to
the user-level ~/.lando/plugin-auth.json. The system file acts as a base
that user config overrides, enabling IT/MDM-managed machines to deploy
registry credentials once for all users.

System paths: /Library/Application Support/Lando/ (macOS),
/srv/lando/ (Linux), %PROGRAMDATA%\Lando\ (Windows).
Wrap system file read in try/catch so a permission-denied error doesn't
crash Lando at startup. Also note in plugin-logout docs that the command
only clears user-level credentials, not system-level ones.
Verifies that a private plugin can be installed using only credentials in
/srv/lando/plugin-auth.json (no user-level ~/.lando/plugin-auth.json),
exercising the new system-level auth merge. Test runs before plugin-login
so there is no user-level file present to mask a failure.
@netlify
Copy link
Copy Markdown

netlify Bot commented May 12, 2026

Deploy Preview for lando-core failed. Why did it fail? →

Name Link
🔨 Latest commit ac42144
🔍 Latest deploy log https://app.netlify.com/projects/lando-core/deploys/6a035e4904d3980008df5d53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant