Repository navigation
feat(openshell): register a remote gateway for the CLI - #29
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
setOpenShell.sh(feat(sandbox): template lines and scripts for the sandbox settings #28) writes theOPENSHELL_*settings intoRDF_Map.prop, but nothing registers a remote gateway for theopenshellCLI. A Monolith that talks to a gateway in another cluster has no gateway or mTLS files underOPENSHELL_CLI_HOME, so every sandbox call fails to connect.OPENSHELL_CLIENT_URLis set, the script now copiesca.crt,tls.crtandtls.keyfromOPENSHELL_CLIENT_CERT_DIR(default/mnt/openshell-mtls) intoOPENSHELL_CLI_HOME/.config/openshell/gateways/<name>/mtls, writesmetadata.jsonandactive_gateway(OPENSHELL_CLIENT_NAME, defaultsandbox), and defaultsOPENSHELL_CLI_HOMEto/opt/openshell-homewhen only a URL is given. With no URL nothing changes.OPENSHELL_GATEWAY*: the CLI readsOPENSHELL_GATEWAYandOPENSHELL_GATEWAY_ENDPOINTfrom its own environment, and the latter would bypass the registered gateway and its mTLS files.AGENTS.mddocuments the three variables.Verification
semoss-sandboximage (GNUsed,bash): an image digest (repo@sha256:...) is written intact, two runs leave no duplicate keys, the registration files andmetadata.jsonare correct,tls.keyis mode 600, and nothing is created whenOPENSHELL_CLIENT_URLis unset.