Repository navigation
refactor(config)!: split credential references into SecretRef and FileRef - #13222
Merged
Merged
Conversation
…eRef
One Credential type held both bearer values and local file paths: the
env value of `tls.*`, `kubeconfig`, and `image.metadata` is a file path,
while the gateway, inference provider, and web-search credentials hold
the secret itself. The schema and reference could not say which.
- SecretRef: external gateway credential, inference provider credential,
and web-search integration credential.
- FileRef: TLS CA, certificate, and key; managed Kubernetes kubeconfig;
sandbox image metadata.
Authored YAML stays `{env: NAME}`. Each reference keeps the reserved-name
rules and now reports a message naming its kind. The `file` and
`kubernetesSecret` forms from #13080 are left out: reading secrets from
files changes the credential model, and OpenShell cannot bind a Secret
by reference yet.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Hai Nguyen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Hai Nguyen <[email protected]>
Contributor
|
This repository limits you to 5 open pull requests. Please close or merge an existing PR before opening another one. |
Contributor
Bring the branch up to date with 108 v1 commits, including the provider reorganization (#13131), the key-authenticated HTTP API integration (#13403), and the web search sandbox variable (#13401). Resolutions: - config/integrations.rs: keep v1's API integration and web search sandboxEnv. The API key, the web search key, and the resolved web search key are SecretRef, because each holds the credential itself. - config/validation.rs: validate the API integration key as a SecretRef; the credential() helper it called no longer exists. - config/schema/validation.rs: keep v1's sandboxEnv rule for webSearch variants beside the SecretRef and FileRef env rules. - kubernetes/mod.rs: keep v1's boxed ManagedKubernetes; its kubeconfig is a FileRef. - nemoclaw-e2e deployment.rs: take v1's removal of the two inference credential tests. #13373 folded them into the export_observations.rs test, which now builds its reference as a SecretRef. - config_kubernetes.rs: keep the new tests from both sides, and add the API integration key to the reference-kind test as a secret. - Regenerate the JSON Schema and the configuration reference. No other v1 field used Credential; the Fabric model provider and driver configuration changes add none. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The OIDC profile from #13414 named the variable holding the managed gateway's bearer token as a bare `tokenEnv` string, so it was the one secret reference outside SecretRef. It is now `token: {env: NAME}`. - SecretRef's `env` rules apply to it. The token property adds the kubeconfig reference's reserved names, as tokenEnv did, because the token reaches OpenTofu beside the kubeconfig. - A reserved name now reports `secret reference …` for the SDK prefixes and `token environment reference …` for the kubeconfig names. - The provider's `oidc` attribute is the serialized settings, so it now carries `token.env`. Retained state written with `tokenEnv` fails as an invalid managed Kubernetes attribute instead of being adopted. - Update the Kubernetes and credential rotation guides and regenerate the schema and configuration reference. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Bring the branch up to date with v1's fix that keeps cargo run's OUT_DIR out of CI cargo steps (#13460). It changes only build tooling, CI setup, and the testing guide, none of which this branch touches, so the merge has no conflicts. Co-Authored-By: Claude Opus 5.5 <[email protected]>
cv
added a commit
that referenced
this pull request
Oct 19, 2026
…13492) ## Failure NemoClaw wrote a managed Docker or Podman gateway's `gateway.toml` as formatted text and spliced `sandboxDriverConfig` into it by searching for the driver's table header. Every OpenShell setting a user needed required its own NemoClaw field, type, validation, and docs. On Kubernetes, the same setting went through the chart's deprecated `server.drivers.kubernetes` alias. Part of #13473. ## Decision OpenShell already defines the format. Its Helm chart takes non-secret gateway configuration through one `gatewayConfig` value: each key names a TOML table and holds its fields, nested maps are inline tables, and a list of maps is an array of tables ([migration guide](https://github.com/NVIDIA/OpenShell/blob/5a7728c304b5528e954e9ae900cf21f84e1a12b1/docs/kubernetes/migrate-gateway-config.mdx)). - `spec.gateway.config` replaces `sandboxDriverConfig` and uses that format on every managed runtime. - **Docker and Podman:** NemoClaw builds `gateway.toml` as TOML values and merges the authored tables in, instead of formatting text. This needs `toml`'s `display` feature, which adds `toml_writer` from the same project. - **Kubernetes and OpenShift:** the tables go to the chart's `gatewayConfig`, where they can override NemoClaw's `workspace_mode` and workspace storage-size defaults. The deprecated alias is no longer used. - **Validation:** plan rejects a setting that replaces a key NemoClaw owns, whether written as a dotted table or a nested map. It also rejects malformed tables, and a table written both ways, as the chart does. OpenShell validates everything else; it rejects unknown fields in the selected driver's table and ignores other drivers' tables. - **External gateways:** take no `config`. No backward compatibility: the rendered file differs from earlier bytes, so existing Docker and Podman deployments need a fresh deployment UID, as before for any change to the file. The follow-up for #13473 writes the file whenever the gateway container is created, so a configuration change replaces the container instead. ## Validation - **New tests** (`managed_gateway_config`, and `kubernetes_managed_compile::authored_tables_reach_the_chart_gateway_config` / `chart_keys_nemoclaw_owns_are_rejected`) failed before the change. - **What they cover:** - authored tables, inline tables, and arrays of tables on Docker and Podman; - owned keys rejected in both forms; - a table defined twice, and malformed tables; - external gateways rejected; - the chart merge with overridable defaults. - **Regenerated:** the JSON Schema, the configuration reference, and the provider schema fixture. - **Checks:** - `cargo ci` passed, including the bundle and lifecycle steps, before and after rebasing onto #13222. - `cargo ci live-docker` passed (11 tests) and `cargo ci live-kind` passed (7 tests) before the rebase; the rebase brought in only #13222's credential-reference types.
cv
added a commit
that referenced
this pull request
Oct 19, 2026
gaveezy
added a commit
that referenced
this pull request
Oct 20, 2026
…ices The base branch merged v1 up to 0bc2601. Resolutions: - SecretRef/FileRef split (#13222): `credential` on an inference provider is now a `SecretRef`. The cluster key keeps its description (the same key as the service's `kubernetes.keySecret`), and `InferenceTarget::Service` carries `Option<&SecretRef>`. The authored form, `credential: {env: …}`, is unchanged, so the examples and fixtures stay as they are. - context_advisory.rs was removed (#13485). This branch had only widened its `InferenceTarget::Service` pattern, so the merge takes the deletion and drops the call in `Deployment::run`, keeping the NetworkPolicy warning before it. - Runtime images now build with Bake under image/ (#13507), which removed nemoclaw-build's runtime_source.rs and tests/runtime_engine.rs. The merge takes both deletions. That also removes 05fb557's `--offline` packaging and its test: on Live/Docker runners, archived tests ran with a Cargo home that lacked the OpenShell git checkout, so offline packaging failed ("you are in the offline mode"). - The authoring journey count is 41: v1 removed one single-sandbox example and this branch adds two. - The schema and configuration reference are regenerated. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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
Splits the configuration's one
Credentialtype intoSecretRef, whose environment variable holds a bearer or API credential, andFileRef, whose variable holds the path of a local file.Existing references keep their
{env: NAME}YAML; the managed Kubernetes OIDC token moves fromtokenEnv: NAMEtotoken: {env: NAME}. This is shape change 2 of #13080.Why
One type held both kinds of reference, so the schema, the generated reference, and editors could not say whether a variable must contain a secret or a path (types.rs).
gateway.credential(external)SecretRefinferenceProviders[].credential, inline route providersSecretRefintegrations.<name>.credentialSecretRefintegrations.<name>.credential(#13403)SecretRefgateway.kubernetes.authentication.token(#13414; wastokenEnv)SecretRefgateway.tls.ca,certificate,keyFileRefgateway.kubernetes.kubeconfigFileRefsandboxes[].image.metadataFileRefChange
SecretRefandFileRefreplaceCredentialin the Rust types, the schema, and the reference. There is no alias, so a misclassified reference is a compile error.envrules: the variable-name pattern and the reservedNEMOCLAW_KUBERNETES_STATE,NEMOCLAW_MANAGED_K8S_,HELM_, andKUBE_names. The kubeconfig andenvironmentrules are unchanged. A rejected name now reportssecret reference …orfile reference ….fileform for secrets and nokubernetesSecretform: reading secrets from files changes the credential model, and OpenShell cannot bind a Secret by reference yet. Adding either later is additive.tokenEnv). It is now aSecretRefundertoken. Its property keeps the kubeconfig reference's reserved names, whichtokenEnvalso excluded, because the token reaches OpenTofu beside the kubeconfig. A reserved SDK prefix reportssecret reference …; a kubeconfig-reserved name reportstoken environment reference ….Breaking for Rust SDK callers that name
CredentialorKubernetesAuthentication::token_env, and for documents using the OIDC profile, which must replacetokenEnv: NAMEwithtoken: {env: NAME}. Other authored documents are unchanged.Retained state is unchanged except for OIDC deployments made since #13414: the
openshell_kubernetes_authresource'soidcattribute is the serialized settings, so state that holdstokenEnvnow fails as an invalid managed Kubernetes attribute and is not adopted. Development-profile state stores no settings and is unaffected.Validation
config_kubernetes::a_reserved_reference_name_states_whether_the_reference_holds_a_secret_or_a_file_pathfailed before the change with the shared credential message. It checks eachSecretRefandFileReffield, including the API integration key from feat(config): add an integration for key-authenticated HTTP APIs #13403 and the OIDC token, along with the schema location and the message, and that the name is not echoed.config_kubernetes::an_oidc_profile_requires_its_issuer_and_development_takes_no_oidc_settingsand the reference-kind test failed ontokenas an unknown field before the token change. The OIDC test now also rejectstokenEnvand a bare stringtoken.tokenEnvfail to deserialize intoKubernetesAuthenticationwith an unknown-field error, whichSpec::from_rowmaps to the invalid-attribute error. This was checked with a temporary test that is not committed.cargo ciat64cfa22e5(linux_arm64;v1at1802b0611merged in): every step passed (tools,fmt,clippy,build,test,schema,bundle, andlifecycle).test: 1,601 tests, 19.2 s wall against a 45 s budget.lifecycle: 150 tests, 106.9 s wall against 300 s. Contract binaries summed 8.4 s of 25 s (fabric-provider), 42.0 s of 45 s (nemoclaw-provider), and 101.6 s of 105 s (openshell-provider).nemoclaw-build docs --checkalso passed.5ecebeb63mergesv1atd33d50647(fix(build): keep cargo run's OUT_DIR out of CI cargo steps #13460), which changes only build tooling. After the merge,cargo fmt --check, thenemoclaw-buildtests,schema --check, anddocs --checkpassed.kubernetes_live, andkubernetes_oidcsuites, which need live clusters and an issuer. They compile under clippy.Part of #13080.
🤖 Generated with Claude Code