Skip to content

feat(openshell): register a remote gateway for the CLI - #29

Merged
kunal0137 merged 1 commit into
masterfrom
feat/openshell-client-registration
Nov 18, 2026
Merged

kunal0137 merged 1 commit into
masterfrom
feat/openshell-client-registration

Conversation

@kunal0137

Copy link
Copy Markdown
Contributor

Summary

  • setOpenShell.sh (feat(sandbox): template lines and scripts for the sandbox settings #28) writes the OPENSHELL_* settings into RDF_Map.prop, but nothing registers a remote gateway for the openshell CLI. A Monolith that talks to a gateway in another cluster has no gateway or mTLS files under OPENSHELL_CLI_HOME, so every sandbox call fails to connect.
  • When OPENSHELL_CLIENT_URL is set, the script now copies ca.crt, tls.crt and tls.key from OPENSHELL_CLIENT_CERT_DIR (default /mnt/openshell-mtls) into OPENSHELL_CLI_HOME/.config/openshell/gateways/<name>/mtls, writes metadata.json and active_gateway (OPENSHELL_CLIENT_NAME, default sandbox), and defaults OPENSHELL_CLI_HOME to /opt/openshell-home when only a URL is given. With no URL nothing changes.
  • The new names deliberately avoid OPENSHELL_GATEWAY*: the CLI reads OPENSHELL_GATEWAY and OPENSHELL_GATEWAY_ENDPOINT from its own environment, and the latter would bypass the registered gateway and its mTLS files.
  • AGENTS.md documents the three variables.

Verification

  • Ran the script in the semoss-sandbox image (GNU sed, bash): an image digest (repo@sha256:...) is written intact, two runs leave no duplicate keys, the registration files and metadata.json are correct, tls.key is mode 600, and nothing is created when OPENSHELL_CLIENT_URL is unset.
  • Registration layout matches what a working CLI 0.1.9 gateway registration looks like; a CLI home built this way connected to the sandbox-cluster gateway over mTLS.
  • Not yet run in a pod: the mounted cert directory, and the Monolith deployment that sets these variables.

setOpenShell.sh writes the OPENSHELL_* settings but nothing creates the gateway
registration the openshell CLI needs when the gateway is remote (for example the
sandbox GKE cluster reached over an internal load balancer). Without it the CLI has
no gateway or mTLS files under OPENSHELL_CLI_HOME.

When OPENSHELL_CLIENT_URL is set, copy ca.crt, tls.crt and tls.key from
OPENSHELL_CLIENT_CERT_DIR (default /mnt/openshell-mtls) into the CLI home, write
metadata.json and active_gateway, and default OPENSHELL_CLI_HOME to
/opt/openshell-home. The names avoid OPENSHELL_GATEWAY*, which the CLI reads from
its own environment.
@kunal0137
kunal0137 merged commit 7b38e28 into master Nov 18, 2026
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.

1 participant