Skip to content

Allow configuring the Agentlet connection token with generated fallback #254

Description

@mydmdm

Problem

Huabu currently uses an internally generated Agentlet connection token. Users who want additional Agentlet daemons to connect cannot configure the connection token themselves.

Desired behavior

Add one optional Agentlet connection token setting:

  • When the setting contains a non-empty token, Huabu uses that configured value as the Agentlet connection token.
  • When the setting is absent or empty, Huabu falls back to the existing internally generated connection token behavior.
  • The configured token applies consistently to the Huabu/Agentlet connection path that currently uses the generated token.

Scope

  • Add the optional persisted setting and Settings UI control.
  • Wire the effective value into Agentlet connection/authentication.
  • Preserve the current internally generated token as the default fallback.
  • Make configuration changes take effect using the lifecycle required by the existing Agentlet connection (for example, reconnect/restart if that is already necessary).
  • Do not expose the token in ordinary logs or error messages.

Acceptance criteria

  • With no configured value, existing internally generated token behavior is unchanged.
  • With a configured non-empty value, Agentlet connections authenticate using that value instead of the generated token.
  • Clearing the configured value restores generated-token fallback behavior.
  • Settings clearly communicates whether the configured token or generated fallback is active.
  • Focused tests cover configured, empty/absent, and cleared-value behavior.
  • Relevant Agentlet connection documentation is updated.

Non-goals

  • Per-daemon credentials, enrollment flows, token rotation/revocation, expiry, audit UI, daemon identity management, or a broader multi-Agentlet management system.

Related

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions