Skip to content

fix: use dedicated secret for offline match auth instead of node name#8

Open
Flegma wants to merge 2 commits intomainfrom
audit/409-auth-secret
Open

fix: use dedicated secret for offline match auth instead of node name#8
Flegma wants to merge 2 commits intomainfrom
audit/409-auth-secret

Conversation

@Flegma
Copy link
Copy Markdown
Contributor

@Flegma Flegma commented Apr 2, 2026

Summary

Offline match endpoint basic auth now reads OFFLINE_MATCHES_PASSWORD env var instead of using NODE_NAME as the password. Falls back to NODE_NAME for backwards compatibility.

Why: NODE_NAME is publicly visible from Kubernetes pod names and should not be used as an authentication credential.

Follow-up needed: Set OFFLINE_MATCHES_PASSWORD in the DaemonSet environment from a K8s Secret. Until then, the fallback to NODE_NAME maintains existing behavior.

Test plan

  • Without OFFLINE_MATCHES_PASSWORD set: auth still works with node name (backwards compatible)
  • With OFFLINE_MATCHES_PASSWORD set: auth uses the dedicated password

Closes 5stackgg/5stack-panel#409

Flegma added 2 commits April 2, 2026 15:13
Read OFFLINE_MATCHES_PASSWORD env var for basic auth, falling back to
NODE_NAME for backwards compatibility. NODE_NAME is publicly known
from K8s pod names and should not be used as a credential.

To complete the fix, set OFFLINE_MATCHES_PASSWORD in the DaemonSet
environment (e.g., from a K8s Secret).

Closes 5stackgg/5stack-panel#409
The as string cast should apply to the entire fallback expression,
not just process.env.NODE_NAME.
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.

[Connector] Improve offline match endpoint authentication

1 participant