Skip to content

fix(kubernetes)!: require explicit TCP for the standalone driver - #6079

Open
alangou wants to merge 6 commits into
ai-openshell:mainfrom
alangou:fix/standalone-driver-transport/alangou
Open

alangou wants to merge 6 commits into
ai-openshell:mainfrom
alangou:fix/standalone-driver-transport/alangou

Conversation

@alangou

@alangou alangou commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Standalone Kubernetes drivers now require a private Unix socket or an explicit TCP bind address and opt-in. The shared listener helper preserves an existing socket directory's permissions, rejects a parent writable by the group or others, and keeps the socket at 0600.

The Podman port and Docker/Podman socket changes are in ai-openshell/desktop#35. The desktop draft depends on this shared API. Merge this PR first, then update the desktop dependency to the integrated core revision. This is the core part of the split tracked in #6167.

Release Notes

Standalone Kubernetes services that relied on the default TCP listener must configure --bind-socket PATH or, for local TCP development, both --allow-unauthenticated-tcp and --bind-address.

Testing

  • Verified the core socket and transport tests, including existing 0755, shared-writable and newly created directories.
  • Exercised the Kubernetes CLI with Unix and TCP transports and ran the unchanged Docker/Podman serve_configure tests under umask 0002.
  • Ran Frozen Paths, Rust formatting, targeted Clippy, and docs checks.

Use a private Unix socket for standalone Podman and Kubernetes driver services. Local TCP development now requires an explicit address and opt-in.

BREAKING CHANGE: standalone invocations relying on the default TCP listener must configure --bind-socket or pass --allow-unauthenticated-tcp with --bind-address.

Signed-off-by: Adrien Langou <alangou@nvidia.com>
@github-actions github-actions Bot added the state:accepted A maintainer decided OpenShell should pursue this issue label Nov 30, 2026
Signed-off-by: Adrien Langou <alangou@nvidia.com>
Comment on lines +70 to +71
The driver sets the socket's parent directory to mode `0700`, even if it already exists.
If you used the default TCP listener for

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the driver set the permissions on a folder that already exists?

@elezar

elezar commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Heads-up: this PR changes both files in paths that are frozen in this repository while the Docker, Podman and VM drivers move to ai-openshell/desktop, and files that stay in core. The move is tracked in #5200, and this PR in #6167.

Frozen files in this PR: crates/openshell-driver-podman/README.md, crates/openshell-driver-podman/src/main.rs, crates/openshell-driver-podman/tests/podman_preflight.rs.

The Frozen Paths check (#6124) fails PRs that change those files, so this PR has to be split into a core part and a desktop part that land separately. The desktop part is to be ported to desktop with your authorship preserved.

Signed-off-by: Adrien Langou <alangou@nvidia.com>
Create missing directories privately and reject group- or world-writable socket parents before replacing a stale socket. Preserve existing directory modes and keep setting the socket itself to 0600.

Signed-off-by: Adrien Langou <alangou@nvidia.com>
@alangou
alangou marked this pull request as ready for review December 4, 2026 11:46
Keep the Kubernetes listener and the shared socket API in core. Preserve the directory contract of existing callers until desktop drivers adopt the new API.

Signed-off-by: Adrien Langou <alangou@nvidia.com>
Signed-off-by: Adrien Langou <alangou@nvidia.com>
@alangou alangou changed the title fix(drivers)!: require explicit TCP for standalone drivers fix(kubernetes)!: require explicit TCP for the standalone driver Dec 4, 2026

This branch has not been deployed

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

Labels

state:accepted A maintainer decided OpenShell should pursue this issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants