-
Notifications
You must be signed in to change notification settings - Fork 0
Development
Nick Hamze edited this page Sep 1, 2026
·
6 revisions
- PHP 7.4 or newer
zip-
shellcheckfor the shell-script check - A WordPress 6.5+ HTTPS hub with OpenStation
- A separate HTTPS WordPress site with the OAuth-capable OpenStation build
Fleet has no Composer, npm, JavaScript framework, custom database, or hosted-service dependency.
fleet-for-openstation.php
includes/class-fleet-for-openstation.php
assets/admin.css
uninstall.php
readme.txt
tests/smoke.php
bin/build.sh
-
fleet-for-openstation.phpcontains the plugin header and bootstrap. -
includes/class-fleet-for-openstation.phpcontains the UI, OAuth client, credential storage, and REST orchestration. -
assets/admin.cssstyles the bounded OpenStation workspace. -
uninstall.phpremoves local Fleet user metadata. -
tests/smoke.phpchecks URL validation, plugin-state inspection, secret-box storage, REST URL construction, and hub self-detection without a framework. -
bin/build.shlints PHP, runs the smoke check, and builds the installable ZIP.
The managed-site OAuth server lives in OpenStation core at includes/fleet-oauth.php, with PHPUnit coverage in tests/phpunit/tests/fleetOAuth.php and protocol documentation in docs/fleet-oauth.md.
./bin/build.sh
shellcheck bin/build.shThe package is written to dist/fleet-for-openstation.zip. It contains only runtime files, including assets/admin.css.
Use two distinct HTTPS WordPress installations.
- Install OpenStation and Fleet on the hub; install OpenStation on the managed site.
- Confirm the Fleet page identifies the hub and opens in a centered window no wider than 1040 pixels.
- Connect the managed site and inspect the Full API consent screen.
- Confirm state, exact callback, issuer, and PKCE code exchange complete.
- Confirm the site card reports OAuth and Manage site stays inside the current window.
- Test Overview, Content, Plugins, and Settings against the managed site.
- Use the API console to read a Core route and write a reversible setting.
- Force access-token expiry; confirm Fleet rotates the refresh token and completes the request.
- Reuse an older refresh token in a disposable grant; confirm the family is revoked.
- Disconnect; confirm the grant is revoked and bearer access fails.
- Create another connection and revoke it under Users → Profile → Fleet connections.
- Test rejection, expired authorization code, wrong issuer, wrong redirect, malformed JSON, insufficient capability, and an unreachable site.
- Test the Application Password bootstrap with OpenStation absent, then install OpenStation and reconnect through OAuth.
- Confirm the hub cannot connect to itself and a path-based multisite sibling can connect.
- Prefer WordPress Core features over new infrastructure.
- Treat the managed site's endpoint permission callbacks as authoritative.
- Never log credentials, authorization codes, verifiers, or authorization headers.
- Keep tokens per user and encrypted at rest on the hub; store only hashes on the managed site.
- Keep exact redirect, issuer, PKCE, token rotation, replay revocation, and HTTPS checks intact.
- Keep unsafe-URL rejection and the public-HTTPS boundary intact.
- Keep Application Passwords limited to the OpenStation bootstrap path.
- Do not add a database table, JavaScript application, dependency, abstraction, or background worker without a concrete workflow that Core cannot cover.
- Run
./bin/build.shafter every Fleet implementation change and the OpenStation PHP/build checks after OAuth server changes.
- Update the plugin header,
readme.txt, and release notes to the same version. - Run the Fleet build, smoke check, and shell check.
- Run the OpenStation OAuth PHPUnit tests and PHP lint.
- Complete the manual two-site acceptance pass.
- Inspect the ZIP and test a clean WordPress upload.
- Tag the verified commit and attach the ZIP to the GitHub release.