Skip to content

Cisco NX-OS: gNOI endpoint LoadCertificateRequest does not allow setting ca_certificate #162

Open

Description

@swagner-de

Problem Statement

The Cisco NXOS gNOI API for the LoadCertificateRequest endpoint (see here) does not allow setting a ca_certificate, which prevents installing certificates from a private CA. The client cannot validate the chain of trust as it cannot be linked to the issuing CA because the field is missing. This restriction effectively limits certificate installation to self-signed certificates only.

This script can be run to trigger the condition.

Vendor Acknowledgement

Cisco has labeled this issue as a feature request rather than a bug, but we argue that in conjunction with #161, the gNOI endpoint cannot handle private CA installations at all. See CSCws33167.

Additionally, this gNOI endpoint leaks private keys to the disk by running crypto ca import $trustpoint pkcs bootflash:temp_pkcs_$hex_value cisco123 in the background, where cisco123 is a static password used on every import.

Workarounds

Provision and manage TLS certificates via ZTP and NX-API for better security and control over the certificate installation process.

Activity

  1. added
    vendor/ciscoEverything related to the Cisco that uses GNMI/GNOI.
    firmware-bugAn issue that is caused by a firmware malfunction.
    platform/nxEverything related to Cisco NX-OS
    on Jan 29, 2026
  2. changed the title [-]Cisco NXOS gNOI endpoint `LoadCertificateRequest` does not allow setting `ca_certificate`[/-] [+]Cisco NX-OS: gNOI endpoint `LoadCertificateRequest` does not allow setting `ca_certificate`[/+] on Feb 4, 2026
  3. added
    area/switch-automationAutomation processes for network switch management and operations.
    and removed
    area/metal-automationAutomation processes within the Metal project.
    on Mar 23, 2026
  4. swagner-de commented on Jun 12, 2026

    @swagner-de
    CollaboratorAuthor

    Tested on NX-OS prerelease build 10.7(0)IMG9(0.81), both issues now work with caveats.

    We wrote a test script that exercises the full bootstrap flow end to end:

    1. LoadCertificate with a CA-signed leaf cert (CN/SAN = device IP, ca_certificates field populated)
    2. LoadCertificateAuthorityBundle to push the CA
    3. gNMI Set on System/grpc-items to configure cert + certClientRoot + port
    4. Verified mTLS gNMI Get with no InsecureSkipVerify, using a client cert signed by the same CA

    Results:

    ❯ go run ./hack/gnoi-cert-test/ \
        -address $DEVICE:9339 \
        -username $USER \
        -password $PASSWORD \
        -trustpoint see-if-fixed
      saved ca.crt
      saved ca.key
      saved client.crt
      saved client.key
    === Step 1: LoadCertificate with CA-signed cert (CN/SAN = device IP) ===
        Bug: NX-OS rejects non-self-signed certs with 'Certificate is not a valid self-signed CA'
    OK — NX-OS accepted a CA-signed cert
    
    === Step 2: LoadCertificateAuthorityBundle (issue #161) ===
        Bug: NX-OS returns 'ca_certificates is unsupported'
      deleting old CA bundle trustpoint: gNOI-CA-BUNDLE-TP
    OK — NX-OS accepted LoadCertificateAuthorityBundle
      found CA bundle trustpoint: gNOI-CA-BUNDLE-TP_1
    
    === Step 3: Set gNMI trustpoint (grpc certificate + grpc client root certificate) ===
    OK — cert=see-if-fixed clientRoot=gNOI-CA-BUNDLE-TP_1
      waiting for device to apply new cert... applied
    
    === Step 4: gNMI Get /System/showversion-items/nxosImageFile via mTLS (no skip-verify, username only) ===
      nxosImageFile: bootflash:///nxos64-cs.10.7.0.IMG9.0.81.F.bin
    OK
    
    

    Remaining issue: CA bundle trustpoint identification

    LoadCertificateAuthorityBundle creates a trustpoint named gNOI-CA-BUNDLE-TP (and gNOI-CA-BUNDLE-TP_1, _2, ... on subsequent calls; old ones are not cleaned up automatically). To wire up certClientRoot we need to identify which of these trustpoints holds the CA we just pushed.

    gNMI exposes the trustpoint list at System/userext-items/pkiext-items/tp-items/TP-list but does not expose any cert fingerprint, subject, or serial number, only the trustpoint name and a cabundleLabel presence flag. There is no way to match a trustpoint back to the cert that was loaded into it via gNMI alone.

    Workaround
    Before calling LoadCertificateAuthorityBundle, delete all existing gNOI-CA-BUNDLE-TP* trustpoints via gNMI Set delete, then call the bundle RPC, then pick the only remaining gNOI-CA-BUNDLE-TP* entry. This works but is destructive and not atomic.

    The clean fix would be for NX-OS to expose cert metadata (fingerprint, subject, or serial) for trustpoints via gNMI.

  5. github-actions commented on Sep 11, 2026

    @github-actions

    This issue is stale because it has been open for 90 days with no activity.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/switch-automationAutomation processes for network switch management and operations.firmware-bugAn issue that is caused by a firmware malfunction.platform/nxEverything related to Cisco NX-OSvendor/ciscoEverything related to the Cisco that uses GNMI/GNOI.

    Type

    Projects

    • Status
      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions