MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / jwt_signing_secret

Function jwt_signing_secret

crates/openshell-server/src/certgen.rs:321–341  ·  view source on GitHub ↗

Build an `Opaque` Secret carrying the gateway-minted sandbox JWT signing material. Mounted only on the gateway pod — sandbox pods receive a per-pod gateway-signed token, never the signing key itself.

(name: &str, signing_pem: &str, public_pem: &str, kid: &str)

Source from the content-addressed store, hash-verified

319/// signing material. Mounted only on the gateway pod — sandbox pods
320/// receive a per-pod gateway-signed token, never the signing key itself.
321fn jwt_signing_secret(name: &str, signing_pem: &str, public_pem: &str, kid: &str) -> Secret {
322 let mut data = BTreeMap::new();
323 data.insert(
324 "signing.pem".to_string(),
325 ByteString(signing_pem.as_bytes().to_vec()),
326 );
327 data.insert(
328 "public.pem".to_string(),
329 ByteString(public_pem.as_bytes().to_vec()),
330 );
331 data.insert("kid".to_string(), ByteString(kid.as_bytes().to_vec()));
332 Secret {
333 metadata: ObjectMeta {
334 name: Some(name.to_string()),
335 ..Default::default()
336 },
337 type_: Some("Opaque".to_string()),
338 data: Some(data),
339 ..Default::default()
340 }
341}
342
343// ─────────────────────────────── Local mode ───────────────────────────────
344

Calls

no outgoing calls