Skip to content

Credential Manager and Bug Fixes - #155

Merged
mstrhakr merged 82 commits into
mainfrom
dev
Oct 7, 2026
Merged

mstrhakr merged 82 commits into
mainfrom
dev

Conversation

@mstrhakr

@mstrhakr mstrhakr commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

This pull request introduces a comprehensive registry credential management system to the Compose Manager plugin. It adds support for securely storing, assigning, and managing registry credentials, allowing users to associate credentials with individual stacks for pull operations. The UI is updated with a new "Credentials" tab, and various backend enhancements ensure credentials are securely handled and integrated throughout the stack lifecycle.

Credential management features:

  • Added a new "Credentials" tab in the UI (compose.manager.settings.page), allowing users to add, view, test, and delete registry credentials, and see which stacks use each credential. [1] [2] [3]
  • Implemented backend endpoints for listing, saving, deleting, and testing credentials, as well as GitHub device authentication flows, via the CredentialVault and GitHubDeviceAuth classes. [1] [2]
  • Introduced secure storage for credentials, with new constants for vault and key file locations.

Stack integration and assignment:

  • Added the ability to assign a registry credential to a stack in the stack settings UI, with validation to ensure the credential exists and cannot be deleted if in use. [1] [2] [3]
  • Backend and command execution updated to propagate the assigned credential ID through stack actions, auto-update, and compose commands. [1] [2] [3] [4] [5]

UI/UX improvements:

  • The "Credentials" tab triggers credential loading on tab activation and on page load if previously selected. [1] [2]
  • The global settings actions are hidden when the "Credentials" tab is active for a cleaner interface.

Supporting infrastructure:

  • Added a function to efficiently map credentials to their assigned stacks, used for display and validation.
  • New configuration option for GitHub OAuth client ID to support device authentication.

Issues Resolved

mstrhakr and others added 22 commits September 13, 2026 17:25
- Show the verification URL as readable text alongside the existing link
- Add a dedicated Copy button next to the device code so it can be
  re-copied anytime (e.g. after a clipboard manager clears it)
- Render a QR code (vendored qrcode-generator, MIT licensed) so the
  GitHub device sign-in can be completed from a phone by scanning
- GitHubDeviceAuth now also returns verification_uri_complete when
  GitHub provides it, used to pre-fill the code in the QR flow
…operations

- CredentialVault::materializeDockerConfig() now logs the credential's
  friendly name and registry host (never the secret) whenever it's
  used to build a Docker auth config
- compose.sh logs when up/pull/update run with no credential attached
  to the stack, so anonymous pulls are visible instead of silent
- compose_autoupdate.sh logs the same for scheduled auto-updates, and
  resolves the credential after the project name is finalized so the
  log line always includes it
…edential test/renewal check

- credential_config.php now also prints the credential's friendly
  name/registry as a second line so callers can echo it, instead of
  only logging it to syslog where it was easy to miss
- compose.sh and compose_autoupdate.sh now log 'Using registry
  credential ...' inline alongside the other DEBUG command lines,
  fixing the case where a configured credential produced no visible
  log line at all
- Add CredentialVault::testCredential(), which performs the standard
  Docker Registry v2 auth handshake (ping /v2/, follow the Bearer
  challenge to the token endpoint) to verify a saved credential still
  authenticates, without ever exposing the secret
- Add a 'testCredential' Exec.php action and a Test button per
  credential row in the UI; failures surface a message suggesting the
  token may have expired/been revoked and prompting renewal
- Add CredentialVault::getCredentialSummary() and a unit test
- GitHubDeviceAuth::start()/poll() accept an existing credential id so
  a re-authorization updates that credential in place (same id, same
  stack assignments, original custom name preserved) instead of
  creating a duplicate
- Add a 'Renew access' button in the edit modal for GitHub OAuth
  credentials that re-runs the device sign-in flow against the
  existing credential
- The 'Credential rejected' result from Test now offers a one-click
  Renew action (kicks off GitHub sign-in immediately) or opens the
  edit modal focused on the token field for manual credentials
- Add a unit test covering renewal id/name preservation
Add registry credential management and UI enhancements
fix(ui): wait for profile dialog to close
Copilot AI lite review requested due to automatic review settings September 24, 2026 20:25

This comment was marked as resolved.

mstrhakr and others added 13 commits October 2, 2026 10:03
Signed-off-by: mstrhakr <mstrhakr@gmail.com>
…rting a stack

Docker Compose never creates networks marked `external: true`, so a stack
that uses one fails to start until someone creates the network by hand, and
Unraid can remove user-defined networks when Docker restarts.

A new setting, Create Missing External Networks (off by default), makes
compose.sh create each missing external network as a plain bridge right
before `up` or `update`. Manual actions and autostart both go through that
path. Networks that need another driver or options are left to the user.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-networks

feat(compose): optionally create missing external networks before starting a stack
Save rebuild-on-update when it is the only changed setting
pruneOrphanOverrideServices() asks docker compose which services the main
compose file defines, so it can drop override entries for the rest. The
-f list it used included the managed override itself, so an entry for a
removed or renamed service (labels only, no image) made compose fail with
'has neither an image nor a build context', the list came back empty, and
nothing was ever pruned. The following up then failed on the same entry.

The services are now asked for without the managed override and the icon
override generated from it. Default file discovery mode is unchanged: it
passes no -f flags to leave one out of.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011iUWDG8wTp8MhsFDqNC4NL
With use_default_compose_files on, the services query ran with only
--project-directory, so compose found compose.override.yaml next to the
compose file by itself and refused the project over the orphan entry.
Pruning stayed off in that mode.

Name the files with -f in that mode as well, from the same project
directory, leaving out the managed override as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PnMScBowJk7yyfEwraTdgg
…rvices

fix(override): prune services the compose file no longer has
@mstrhakr

mstrhakr commented Oct 6, 2026

Copy link
Copy Markdown
Owner Author

No more edits to this besides bug fixes related to these changes. This will be merged to main / released later this week. If you are on the beta and have an issue please post here so I can take a look.

This comment was marked as resolved.

@mstrhakr

mstrhakr commented Oct 7, 2026

Copy link
Copy Markdown
Owner Author

To any running the beta and using the GitHub OAuth flow for the credential manager, I found the issue causing it to logout daily, so I'll be merging this in at some point today. There was an extra setting in the config causing logins to expire after 8 hours. If you've been signing in with GitHub, you shouldn't get randomly kicked out anymore. Just a heads up that this only impacted the OAuth sign-in flow and left access tokens completely untouched.

image

@mstrhakr
mstrhakr merged commit 1c42e90 into main Oct 7, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

5 participants