Skip to content

Yamcs action: support HTTP Basic authentication for servers behind an authenticating reverse proxy #1435

Description

@paullizer

Summary

Add optional HTTP Basic authentication to the Yamcs action so SimpleChat can reach a Yamcs server that is published through a reverse proxy enforcing HTTP Basic authentication.

User Value

A partner team's Yamcs dev server, which runs their simulation environment, sits behind an Apache reverse proxy that challenges every request with HTTP Basic authentication backed by Active Directory. Operators sign in with a directory username and a temporary password. Once past the proxy, Yamcs itself has no authentication enabled.

The Yamcs action can authenticate to Yamcs, but it had no way to answer a front-door proxy challenge, so that server was unreachable even when every Yamcs setting was correct. The same topology is expected on the mission server, so this also unblocks that path.

Proxy authentication must stay optional: a Yamcs simulator running locally has no proxy and must not send an unnecessary credential.

Proposed Behavior

A Reverse Proxy Authentication toggle on the Yamcs action. When enabled, the action sends an HTTP Basic Authorization header on every request, which the proxy consumes before Yamcs sees it. Off by default.

Credentials can be entered inline on the action, with the password stored in Key Vault, or supplied by a reusable username and password identity. Because the directory issues temporary passwords, the identity path matters: the credential is rotated once under Workspace → Identities and every referencing action picks it up without being edited. The proxy credential gets its own identity reference, separate from the Yamcs credential, so one action can use both.

Compatibility with Yamcs authentication methods

Only one Authorization header can be sent, which makes some combinations impossible rather than merely unimplemented:

Yamcs authentication method Allowed Reason
No Authentication Yes Yamcs sends nothing, so the header is free for the proxy. This is the dev-server case.
API Key Yes The Yamcs API key uses x-api-key, leaving Authorization for the proxy.
Username and Password No Yamcs exchanges credentials for a bearer token on Authorization, and the /auth/token request would itself be refused by the proxy.
Access Token No The bearer token also needs Authorization.

Blocked combinations are reported at save time and by Test Yamcs Connection rather than failing later during an agent turn.

Acceptance Criteria

  • A Yamcs action can connect to an unauthenticated Yamcs server behind a Basic-auth proxy
  • The toggle is off by default, so a directly reachable Yamcs server is unaffected
  • Proxy credentials can come from a reusable username/password identity, distinct from the Yamcs credential reference
  • The proxy password is stored in Key Vault and never returned to the browser
  • Incompatible authentication combinations are rejected at save time, by the health checker, by the test-connection route, and in the action modal
  • Test Yamcs Connection exercises the proxy credential and distinguishes a proxy rejection from a Yamcs rejection
  • Functional test coverage
  • Action reference, feature documentation, and release notes updated

Notes

yamcs-client==2.1.0, already pinned in requirements.txt, ships BasicAuthCredentials, so no dependency change is needed. It is imported separately from the other credential classes so a deployment on an older client keeps working for every non-proxy method.

Known limitation: an identity resolves within the workspace scope that owns the action, so a shared group action resolves one group-scoped credential. Per-user credentials on a single shared action would require runtime per-user credential resolution and is not in scope here.

Implemented in version 0.261.010.

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

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions