{"id":237,"date":"2026-04-28T00:00:00","date_gmt":"2026-04-27T20:30:00","guid":{"rendered":"https:\/\/www.anynet.ir\/blog\/%d9%85%d8%b9%d8%b1%d9%81%db%8c-gnsi-%d8%a7%d8%ad%d8%b1%d8%a7%d8%b2-%d9%87%d9%88%db%8c%d8%aa-%d9%85%d8%ac%d9%88%d8%b2-%d9%88-%d8%ad%d8%b3%d8%a7%d8%a8%d8%b1%d8%b3%db%8c-aaa-%d9%85%d8%a8%d8%aa%d9%86-en\/"},"modified":"2026-10-19T16:16:55","modified_gmt":"2026-10-19T12:46:55","slug":"%d9%85%d8%b9%d8%b1%d9%81%db%8c-gnsi-%d8%a7%d8%ad%d8%b1%d8%a7%d8%b2-%d9%87%d9%88%db%8c%d8%aa-%d9%85%d8%ac%d9%88%d8%b2-%d9%88-%d8%ad%d8%b3%d8%a7%d8%a8%d8%b1%d8%b3%db%8c-aaa-%d9%85%d8%a8%d8%aa%d9%86-en","status":"publish","type":"post","link":"https:\/\/www.anynet.ir\/blog\/en\/%d9%85%d8%b9%d8%b1%d9%81%db%8c-gnsi-%d8%a7%d8%ad%d8%b1%d8%a7%d8%b2-%d9%87%d9%88%db%8c%d8%aa-%d9%85%d8%ac%d9%88%d8%b2-%d9%88-%d8%ad%d8%b3%d8%a7%d8%a8%d8%b1%d8%b3%db%8c-aaa-%d9%85%d8%a8%d8%aa%d9%86-en\/","title":{"rendered":"Introducing gNSI: gRPC-native AAA for Cisco IOS XR"},"content":{"rendered":"<div><\/div>\n<div>\n<div><\/div>\n<\/div>\n<div>\n<div>\n<div>\n<h2 style=\"color: rgb(26, 26, 26); font-weight: 700\">The Problem<\/h2>\n<p>For CLI, NETCONF, and SNMP, security is a solved problem. AAA (<strong style=\"color: rgb(26, 26, 26)\">A<\/strong>uthentication, <strong style=\"color: rgb(26, 26, 26)\">A<\/strong>uthorization, and <strong style=\"color: rgb(26, 26, 26)\">A<\/strong>ccounting) with TACACS+ and Syslog takes care of all three pillars. But when the Management Plane moved to gRPC and gNMI, that same security story did not come along for the ride.<\/p>\n<p>TLS handles Authentication, but nobody standardized how to actually &#8220;manage&#8221; the Certificates \u2014 issuing them, renewing them, revoking them, rotating Trust Bundles and CRLs. Most operators end up copying PEM files around or using vendor-specific tools.<\/p>\n<p>Authorization got worse, not better. gRPC needs Service-level control (&#8220;can this client call gNMI Set?&#8221;) while gNMI needs Path-level control (&#8220;can this client write to <code>\/system\/<\/code>?&#8221;). A single broad role does not cover either case well.<\/p>\n<p>Accounting \u2014 the &#8220;A&#8221; that tells what actually happened \u2014 works fine for CLI and NETCONF sessions but does not automatically cover gRPC traffic.<\/p>\n<p>And then there is Credential Rotation. gRPC TLS Certificates and <strong style=\"color: rgb(26, 26, 26)\">SSH<\/strong> Host Keys live on completely different tracks. One can go stale without anyone noticing the other is fine.<\/p>\n<p>Put it all together: inconsistent Security Posture and automation that breaks in ways that are hard to debug.<\/p>\n<h2 style=\"color: rgb(26, 26, 26); font-weight: 700\">What is gNSI<\/h2>\n<p><strong style=\"color: rgb(26, 26, 26)\">gNSI<\/strong> stands for <strong style=\"color: rgb(26, 26, 26)\">gRPC Network Security Interface<\/strong>. It is a set of gRPC Services defined by OpenConfig \u2014 the same community behind gNMI, gNOI, and gRIBI. Where those focus on config, operations, and routing, gNSI focuses on <strong style=\"color: rgb(26, 26, 26)\">Security<\/strong>:<\/p>\n<p>The five services map directly to the AAA model \u2014 Authentication, Authorization, and Accounting \u2014 in that order:<\/p>\n<ul>\n<li><strong style=\"color: rgb(26, 26, 26)\">How<\/strong> TLS Certificates and Trust Bundles get rotated \u2014 that is <a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/gnsi-certz-tls-certificate-lifecycle-on-cisco-ios-xr\" style=\"color: rgb(0, 102, 204)\"><strong style=\"color: rgb(26, 26, 26)\">Certz<\/strong><\/a> <em>(Authentication)<\/em><\/li>\n<li><strong style=\"color: rgb(26, 26, 26)\">How<\/strong> SSH Credentials get rotated \u2014 that is <a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/gnsi-credentialz-ssh-credential-rotation-on-cisco-ios-xr\" style=\"color: rgb(0, 102, 204)\"><strong style=\"color: rgb(26, 26, 26)\">Credentialz<\/strong><\/a> <em>(Authentication)<\/em><\/li>\n<li><strong style=\"color: rgb(26, 26, 26)\">Who<\/strong> can call which RPCs \u2014 that is <a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/grpc-authorization-with-authz\" style=\"color: rgb(0, 102, 204)\"><strong style=\"color: rgb(26, 26, 26)\">Authz<\/strong><\/a> <em>(Authorization)<\/em><\/li>\n<li><strong style=\"color: rgb(26, 26, 26)\">Which<\/strong> gNMI Paths a caller can touch \u2014 that is <a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/securing-gnmi-with-pathz\" style=\"color: rgb(0, 102, 204)\"><strong style=\"color: rgb(26, 26, 26)\">Pathz<\/strong><\/a> <em>(Authorization)<\/em><\/li>\n<li><strong style=\"color: rgb(26, 26, 26)\">What<\/strong> happened on the box (the Audit Trail) \u2014 that is <a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/gnsi-acctz-management-plane-accounting-on-cisco-ios-xr\" style=\"color: rgb(0, 102, 204)\"><strong style=\"color: rgb(26, 26, 26)\">Acctz<\/strong><\/a> <em>(Accounting)<\/em><\/li>\n<\/ul>\n<p>Every service has a <strong style=\"color: rgb(26, 26, 26)\">Protobuf<\/strong> (Protocol Buffers \u2014 the serialization format gRPC uses) definition in the <a href=\"https:\/\/github.com\/openconfig\/gnsi\" style=\"color: rgb(0, 102, 204)\">OpenConfig gNSI repository<\/a>. Each IOS XR release pins to a specific API version of these definitions.<\/p>\n<h2 style=\"color: rgb(26, 26, 26); font-weight: 700\">Why gNSI matters<\/h2>\n<p>Without gNSI, security configuration lives in CLI commands and manual file copies \u2014 hard to automate, hard to roll back, hard to verify at scale.<\/p>\n<p>With gNSI, Controllers can <strong style=\"color: rgb(26, 26, 26)\">Stage<\/strong> a new Policy or Certificate, <strong style=\"color: rgb(26, 26, 26)\">Validate<\/strong> it, and <strong style=\"color: rgb(26, 26, 26)\">Commit<\/strong> \u2014 all through a gRPC API. If something goes wrong, <strong style=\"color: rgb(26, 26, 26)\">Rollback<\/strong> is built into the spec. This plugs directly into <strong style=\"color: rgb(26, 26, 26)\">ZTP<\/strong> (Zero-Touch Provisioning) \/ <strong style=\"color: rgb(26, 26, 26)\">Bootz<\/strong> (Bootstrap) pipelines, and the state is visible through <strong style=\"color: rgb(26, 26, 26)\">YANG Telemetry<\/strong> (see <a href=\"https:\/\/github.com\/openconfig\/public\/tree\/master\/release\/models\/gnsi\" style=\"color: rgb(0, 102, 204)\">OpenConfig public models \u2014 gNSI<\/a>).<\/p>\n<p>In short: repeatable, programmable security operations instead of one-off fixes.<\/p>\n<h2 style=\"color: rgb(26, 26, 26); font-weight: 700\">Before and after gNSI<\/h2>\n<p><strong style=\"color: rgb(26, 26, 26)\">Rotating a gRPC TLS Certificate \u2014 the old way:<\/strong><\/p>\n<pre><code><span>1. Generate key + CSR on a workstation\n<\/span><span>2. Get it signed by the CA\n<\/span><span>3. SCP the PEM files to the router's \/misc\/config\/grpc\/\n<\/span><span>4. Hope the filenames and paths are correct\n<\/span><span>5. Reload the gRPC server (or wait for a process restart)\n<\/span><span>6. If it breaks, SSH in and manually fix the files\n<\/span><span>7. No audit trail of what changed or who did it\n<\/span><\/code><\/pre>\n<p><strong style=\"color: rgb(26, 26, 26)\">The same operation with gNSI Certz:<\/strong><\/p>\n<pre><code><span>1. Generate key + CSR (or let the router generate it)\n<\/span><span>2. Get it signed by the CA\n<\/span><span>3. grpcurl \u2192 Certz.Rotate: upload cert + key + trust bundle\n<\/span><span>4. Router validates the material before committing\n<\/span><span>5. grpcurl \u2192 Certz.Rotate: finalize (or cancel to roll back)\n<\/span><span>6. New cert takes effect for new connections \u2014 zero downtime\n<\/span><span>7. Acctz streams an audit record of the rotation\n<\/span><\/code><\/pre>\n<p>The same stage-validate-finalize pattern applies to Authorization Policies (Authz, Pathz) and SSH Credentials (Credentialz).<\/p>\n<h2 style=\"color: rgb(26, 26, 26); font-weight: 700\">gNSI Services at a glance<\/h2>\n<p>Here is what each service does. IOS XR adds support for these across releases \u2014 always check the <a href=\"https:\/\/www.cisco.com\/c\/en\/us\/td\/docs\/iosxr\/cisco8000\/programmability\/b-programmability-configuration-guide-cisco8000\/m-grpc-authentication.html\" style=\"color: rgb(0, 102, 204)\">IOS XR Programmability Documentation<\/a> for the target platform.<\/p>\n<table class=\"english-numbers\">\n<thead>\n<tr>\n<th>Service<\/th>\n<th>What it controls<\/th>\n<th>Example<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong style=\"color: rgb(26, 26, 26)\">Authentication<\/strong><\/td>\n<td><a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/gnsi-certz-tls-certificate-lifecycle-on-cisco-ios-xr\" style=\"color: rgb(0, 102, 204)\"><strong style=\"color: rgb(26, 26, 26)\">Certz<\/strong><\/a><\/td>\n<td>TLS Certificate Lifecycle<\/td>\n<td>Rotate the gRPC Server Certificate and Trust Bundle with zero downtime<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/gnsi-credentialz-ssh-credential-rotation-on-cisco-ios-xr\" style=\"color: rgb(0, 102, 204)\"><strong style=\"color: rgb(26, 26, 26)\">Credentialz<\/strong><\/a><\/td>\n<td>SSH Credential Rotation<\/td>\n<td>Replace SSH Host Keys or user Authorized Keys without a reboot<\/td>\n<\/tr>\n<tr>\n<td><strong style=\"color: rgb(26, 26, 26)\">Authorization<\/strong><\/td>\n<td><a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/grpc-authorization-with-authz\" style=\"color: rgb(0, 102, 204)\"><strong style=\"color: rgb(26, 26, 26)\">Authz<\/strong><\/a><\/td>\n<td>gRPC Service-level Authorization<\/td>\n<td>Let a Controller call gNMI Set but block gNOI RPCs<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/securing-gnmi-with-pathz\" style=\"color: rgb(0, 102, 204)\"><strong style=\"color: rgb(26, 26, 26)\">Pathz<\/strong><\/a><\/td>\n<td>gNMI Path-level Authorization<\/td>\n<td>Allow Subscribe on <code>\/interfaces\/<\/code> but deny Set on <code>\/system\/<\/code><\/td>\n<\/tr>\n<tr>\n<td><strong style=\"color: rgb(26, 26, 26)\">Accounting<\/strong><\/td>\n<td><a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/gnsi-acctz-management-plane-accounting-on-cisco-ios-xr\" style=\"color: rgb(0, 102, 204)\"><strong style=\"color: rgb(26, 26, 26)\">Acctz<\/strong><\/a><\/td>\n<td>Accounting and Audit Streaming<\/td>\n<td>Stream a record of every gRPC, CLI, and NETCONF action to a Collector<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 style=\"color: rgb(26, 26, 26); font-weight: 700\">How the five services fit together<\/h2>\n<p>gNSI is a gRPC-native AAA framework. The five services map to <strong style=\"color: rgb(26, 26, 26)\">Authentication<\/strong>, <strong style=\"color: rgb(26, 26, 26)\">Authorization<\/strong>, and <strong style=\"color: rgb(26, 26, 26)\">Accounting<\/strong> \u2014 and that order matters. A request must first prove its identity, then pass access-control checks, and finally get recorded. The diagram below reflects that flow from left to right.<\/p>\n<pre><code><span> \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n<\/span><span> \u2502 gRPC Management Plane \u2502\n<\/span><span> \u2502 \u2502\n<\/span><span> \u2502 AUTHENTICATION AUTHORIZATION ACCOUNTING \u2502\n<\/span><span> \u2502 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2502\n<\/span><span> \u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502\n<\/span><span> \u2502 \u2502 Certz \u2502 \u2502 Authz \u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502\n<\/span><span> \u2502 \u2502 (TLS certs \u2502 \u2500\u2500\u2500\u2500\u2500\u2500\u25b6 \u2502 (who can \u2502 \u2500\u2500\u2500\u2500\u2500\u2500\u25b6 \u2502 Acctz \u2502 \u2502\n<\/span><span> \u2502 \u2502 + trust) \u2502 \u2502 call \u2502 \u2502 (audit \u2502 \u2502\n<\/span><span> \u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2502 what) \u2502 \u2502 trail) \u2502 \u2502\n<\/span><span> \u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2502\n<\/span><span> \u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502\n<\/span><span> \u2502 \u2502 Credentialz \u2502 \u2502 Pathz \u2502 \u2502\n<\/span><span> \u2502 \u2502 (SSH keys + \u2502 \u2502 (which \u2502 \u2502\n<\/span><span> \u2502 \u2502 passwords) \u2502 \u2502 gNMI \u2502 \u2502\n<\/span><span> \u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2502 paths) \u2502 \u2502\n<\/span><span> \u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2502\n<\/span><span> \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n<\/span><\/code><\/pre>\n<p>The AAA flow on the wire:<\/p>\n<ol>\n<li><strong style=\"color: rgb(26, 26, 26)\">Authentication \u2014 establish identity first.<\/strong><br \/>\n<a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/gnsi-certz-tls-certificate-lifecycle-on-cisco-ios-xr\" style=\"color: rgb(0, 102, 204)\"><strong style=\"color: rgb(26, 26, 26)\">Certz<\/strong><\/a> manages TLS Certificates and Trust Bundles \u2014 every gRPC connection starts here. <a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/gnsi-credentialz-ssh-credential-rotation-on-cisco-ios-xr\" style=\"color: rgb(0, 102, 204)\"><strong style=\"color: rgb(26, 26, 26)\">Credentialz<\/strong><\/a> does the same for SSH Host Keys and user Credentials.<\/li>\n<li><strong style=\"color: rgb(26, 26, 26)\">Authorization \u2014 decide what the authenticated identity can do.<\/strong><br \/>\n<a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/grpc-authorization-with-authz\" style=\"color: rgb(0, 102, 204)\"><strong style=\"color: rgb(26, 26, 26)\">Authz<\/strong><\/a> controls which gRPC Services each client is allowed to call. <a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/securing-gnmi-with-pathz\" style=\"color: rgb(0, 102, 204)\"><strong style=\"color: rgb(26, 26, 26)\">Pathz<\/strong><\/a> goes one level deeper, controlling which gNMI Paths can be read or written.<\/li>\n<li><strong style=\"color: rgb(26, 26, 26)\">Accounting \u2014 record what happened.<\/strong><br \/>\n<a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/gnsi-acctz-management-plane-accounting-on-cisco-ios-xr\" style=\"color: rgb(0, 102, 204)\"><strong style=\"color: rgb(26, 26, 26)\">Acctz<\/strong><\/a> streams Accounting Records for every gRPC, CLI, and NETCONF action, completing the Audit Trail.<\/li>\n<\/ol>\n<h2 style=\"color: rgb(26, 26, 26); font-weight: 700\">IOS XR Release Support<\/h2>\n<table class=\"english-numbers\">\n<thead>\n<tr>\n<th>Service<\/th>\n<th>First IOS XR support<\/th>\n<th>Key later enhancements<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong style=\"color: rgb(26, 26, 26)\">Authentication<\/strong><\/td>\n<td><a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/gnsi-certz-tls-certificate-lifecycle-on-cisco-ios-xr\" style=\"color: rgb(0, 102, 204)\"><strong style=\"color: rgb(26, 26, 26)\">Certz<\/strong><\/a><\/td>\n<td><strong style=\"color: rgb(26, 26, 26)\">24.1.1<\/strong> \u2014 Rotate RPC, SSL Profiles, <code>grpc gnsi service certz ssl-profile-id<\/code><\/td>\n<td><strong style=\"color: rgb(26, 26, 26)\">24.1.1<\/strong> \u2014 configurable CN for dial-in; <strong style=\"color: rgb(26, 26, 26)\">24.4.1<\/strong> \u2014 TLS 1.3; <strong style=\"color: rgb(26, 26, 26)\">25.4.1<\/strong> \u2014 legacy <code>\/misc\/config\/grpc<\/code> paths deprecated, SSL Profiles are the path forward<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/gnsi-credentialz-ssh-credential-rotation-on-cisco-ios-xr\" style=\"color: rgb(0, 102, 204)\"><strong style=\"color: rgb(26, 26, 26)\">Credentialz<\/strong><\/a><\/td>\n<td><strong style=\"color: rgb(26, 26, 26)\">24.2.1<\/strong> \u2014 Rotate RPCs for SSH Credential Rotation<\/td>\n<td><strong style=\"color: rgb(26, 26, 26)\">24.2.11<\/strong> \u2014 Account-level and Host-level Credential scope documented<\/td>\n<\/tr>\n<tr>\n<td><strong style=\"color: rgb(26, 26, 26)\">Authorization<\/strong><\/td>\n<td><a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/grpc-authorization-with-authz\" style=\"color: rgb(0, 102, 204)\"><strong style=\"color: rgb(26, 26, 26)\">Authz<\/strong><\/a><\/td>\n<td><strong style=\"color: rgb(26, 26, 26)\">7.11.1<\/strong> \u2014 Rotate \/ Probe \/ Get RPCs, <code>gnsi load service authorization policy<\/code> CLI<\/td>\n<td><strong style=\"color: rgb(26, 26, 26)\">24.4.1<\/strong> \u2014 broader 8000 coverage (8200, 8700, 8800\/P100); SPIFFE-ID to username mapping<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/securing-gnmi-with-pathz\" style=\"color: rgb(0, 102, 204)\"><strong style=\"color: rgb(26, 26, 26)\">Pathz<\/strong><\/a><\/td>\n<td><strong style=\"color: rgb(26, 26, 26)\">24.2.1<\/strong> \u2014 gNMI Set only, OpenConfig models only<\/td>\n<td>Later trains may add more RPCs and model families; default is <strong style=\"color: rgb(26, 26, 26)\">ACCEPT_ALL<\/strong> until a Policy is loaded<\/td>\n<\/tr>\n<tr>\n<td><strong style=\"color: rgb(26, 26, 26)\">Accounting<\/strong><\/td>\n<td><a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/gnsi-acctz-management-plane-accounting-on-cisco-ios-xr\" style=\"color: rgb(0, 102, 204)\"><strong style=\"color: rgb(26, 26, 26)\">Acctz<\/strong><\/a><\/td>\n<td><strong style=\"color: rgb(26, 26, 26)\">24.3.1<\/strong> \u2014 gRPC Accounting Stream (8000 \/ NCS 5500)<\/td>\n<td><strong style=\"color: rgb(26, 26, 26)\">24.4.x<\/strong> \u2014 platform-specific extensions; check the target Release Notes<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 style=\"color: rgb(26, 26, 26); font-weight: 700\">XRdocs deep dives<\/h2>\n<p>These articles walk through hands-on workflows on IOS XR, ordered by the AAA flow. Start with <strong style=\"color: rgb(26, 26, 26)\">Certz<\/strong> to establish TLS authentication, then layer on Authorization with <strong style=\"color: rgb(26, 26, 26)\">Authz<\/strong> and <strong style=\"color: rgb(26, 26, 26)\">Pathz<\/strong>, and finish with <strong style=\"color: rgb(26, 26, 26)\">Acctz<\/strong> for accounting.<\/p>\n<table class=\"english-numbers\">\n<thead>\n<tr>\n<th>Service<\/th>\n<th>XRdocs article<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong style=\"color: rgb(26, 26, 26)\">Authentication<\/strong><\/td>\n<td><strong style=\"color: rgb(26, 26, 26)\">Certz<\/strong><\/td>\n<td><a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/gnsi-certz-tls-certificate-lifecycle-on-cisco-ios-xr\" style=\"color: rgb(0, 102, 204)\">gNSI Certz \u2014 TLS Certificate Lifecycle on Cisco IOS XR<\/a><\/td>\n<\/tr>\n<tr>\n<td><strong style=\"color: rgb(26, 26, 26)\">Credentialz<\/strong><\/td>\n<td><a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/gnsi-credentialz-ssh-credential-rotation-on-cisco-ios-xr\" style=\"color: rgb(0, 102, 204)\">gNSI Credentialz \u2014 SSH Credential Rotation on Cisco IOS XR<\/a><\/td>\n<\/tr>\n<tr>\n<td><strong style=\"color: rgb(26, 26, 26)\">Authorization<\/strong><\/td>\n<td><strong style=\"color: rgb(26, 26, 26)\">Authz<\/strong><\/td>\n<td><a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/grpc-authorization-with-authz\" style=\"color: rgb(0, 102, 204)\">gRPC Authorization with Authz<\/a><\/td>\n<\/tr>\n<tr>\n<td><strong style=\"color: rgb(26, 26, 26)\">Pathz<\/strong><\/td>\n<td><a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/securing-gnmi-with-pathz\" style=\"color: rgb(0, 102, 204)\">Securing gNMI with Pathz<\/a><\/td>\n<\/tr>\n<tr>\n<td><strong style=\"color: rgb(26, 26, 26)\">Accounting<\/strong><\/td>\n<td><strong style=\"color: rgb(26, 26, 26)\">Acctz<\/strong><\/td>\n<td><a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/gnsi-acctz-management-plane-accounting-on-cisco-ios-xr\" style=\"color: rgb(0, 102, 204)\">gNSI Acctz \u2014 Management Plane Accounting on Cisco IOS XR<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 style=\"color: rgb(26, 26, 26); font-weight: 700\">Prerequisites and setup<\/h2>\n<h3 style=\"color: rgb(26, 26, 26); font-weight: 700\">What the setup looks like<\/h3>\n<pre><code><span> \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 port 57400 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n<\/span><span> \u2502 Workstation \u2502 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 gRPC \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u25b6 \u2502 IOS XR \u2502\n<\/span><span> \u2502 \u2502 (plaintext in lab, \u2502 Router \u2502\n<\/span><span> \u2502 grpcurl \u2502 TLS in production) \u2502 \u2502\n<\/span><span> \u2502 gnmic \u2502 \u2502 EMSd runs \u2502\n<\/span><span> \u2502 openssl \u2502 \u2502 gNSI RPCs \u2502\n<\/span><span> \u2502 jq \u2502 \u2502 \u2502\n<\/span><span> \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n<\/span><span> \u25b2\n<\/span><span> \u2502 The.proto files from the cloned\n<\/span><span> \u2502 openconfig\/gnsi repo tell grpcurl\n<\/span><span> \u2502 how to encode\/decode gRPC messages.\n<\/span><\/code><\/pre>\n<h3 style=\"color: rgb(26, 26, 26); font-weight: 700\">Tools<\/h3>\n<table class=\"english-numbers\">\n<thead>\n<tr>\n<th>Tool<\/th>\n<th>What it does<\/th>\n<th>Install<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong style=\"color: rgb(26, 26, 26)\"><a href=\"https:\/\/github.com\/fullstorydev\/grpcurl\" style=\"color: rgb(0, 102, 204)\">grpcurl<\/a><\/strong><\/td>\n<td>Command-line gRPC client \u2014 like <code>curl<\/code> but for gRPC<\/td>\n<td><code>go install github.com\/fullstorydev\/grpcurl\/cmd\/grpcurl@latest<\/code> or download binary<\/td>\n<\/tr>\n<tr>\n<td><strong style=\"color: rgb(26, 26, 26)\"><a href=\"https:\/\/gnmic.openconfig.net\/\" style=\"color: rgb(0, 102, 204)\">gnmic<\/a><\/strong><\/td>\n<td>gNMI CLI client (for YANG Telemetry examples)<\/td>\n<td><code>bash -c \"$(curl -sL https:\/\/get.gnmic.openconfig.net)\"<\/code><\/td>\n<\/tr>\n<tr>\n<td><strong style=\"color: rgb(26, 26, 26)\"><a href=\"https:\/\/jqlang.github.io\/jq\/\" style=\"color: rgb(0, 102, 204)\">jq<\/a><\/strong><\/td>\n<td>JSON processor (for Authz Policy formatting)<\/td>\n<td><code>brew install jq<\/code> \/ <code>apt install jq<\/code><\/td>\n<\/tr>\n<tr>\n<td><strong style=\"color: rgb(26, 26, 26)\"><a href=\"https:\/\/www.openssl.org\/\" style=\"color: rgb(0, 102, 204)\">OpenSSL<\/a><\/strong><\/td>\n<td>TLS PKI operations (Certz)<\/td>\n<td>Pre-installed on most systems<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 style=\"color: rgb(26, 26, 26); font-weight: 700\">Proto files<\/h3>\n<p>grpcurl needs the <code>.proto<\/code> files to know how to encode and decode gRPC messages. Clone them once:<\/p>\n<pre><code><span><span>git<\/span> clone <span>--depth<\/span> <span>1<\/span> https:\/\/github.com\/openconfig\/gnsi.git openconfig-gnsi\n<\/span><span><span>cd<\/span> openconfig-gnsi\n<\/span><span><span>export<\/span> <span>GNSI_IMPORT<\/span><span>=<\/span><span>\"<span>$PWD<\/span>\"<\/span>\n<\/span><\/code><\/pre>\n<h3 style=\"color: rgb(26, 26, 26); font-weight: 700\">What the grpcurl flags mean<\/h3>\n<p>Every hands-on command in this series uses these flags:<\/p>\n<table class=\"english-numbers\">\n<thead>\n<tr>\n<th>Flag<\/th>\n<th>What it does<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>-plaintext<\/code><\/td>\n<td>Connect without TLS. <strong style=\"color: rgb(26, 26, 26)\">Lab only<\/strong> \u2014 see caveat below.<\/td>\n<\/tr>\n<tr>\n<td><code>-import-path \"$GNSI_IMPORT\"<\/code><\/td>\n<td>Where grpcurl looks for <code>.proto<\/code> files (the cloned repo root)<\/td>\n<\/tr>\n<tr>\n<td><code>-proto \"authz\/authz.proto\"<\/code><\/td>\n<td>Which <code>.proto<\/code> file defines the service being called<\/td>\n<\/tr>\n<tr>\n<td><code>-H \"username:...\"<\/code> \/ <code>-H \"password:...\"<\/code><\/td>\n<td>IOS XR metadata-based authentication (passed as gRPC headers)<\/td>\n<\/tr>\n<tr>\n<td><code>-d '{...}'<\/code><\/td>\n<td>The request payload as JSON (grpcurl converts it to protobuf)<\/td>\n<\/tr>\n<tr>\n<td><code>-d '@'<\/code><\/td>\n<td>Read the request payload from stdin (used for streaming RPCs)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<blockquote>\n<p><strong style=\"color: rgb(26, 26, 26)\">Lab only:<\/strong> All hands-on examples in this series use <code>-plaintext<\/code> to skip TLS \u2014 this makes lab setup simpler but <strong style=\"color: rgb(26, 26, 26)\">disables encryption and server authentication<\/strong>. In production, replace <code>-plaintext<\/code> with <code>-cacert<\/code>, <code>-cert<\/code>, and <code>-key<\/code> flags pointing to real TLS material. The <a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/gnsi-certz-tls-certificate-lifecycle-on-cisco-ios-xr\" style=\"color: rgb(0, 102, 204)\">Certz article<\/a> covers how to set up that material.<\/p>\n<\/blockquote>\n<h3 style=\"color: rgb(26, 26, 26); font-weight: 700\">Router requirements<\/h3>\n<ul>\n<li><strong style=\"color: rgb(26, 26, 26)\">IOS XR router<\/strong> with gRPC enabled \u2014 see the <a href=\"https:\/\/www.cisco.com\/c\/en\/us\/td\/docs\/iosxr\/cisco8000\/programmability\/b-programmability-configuration-guide-cisco8000\/m-grpc-fundamentals-and-authentication.html\" style=\"color: rgb(0, 102, 204)\">Programmability Configuration Guide<\/a><\/li>\n<li>Minimum IOS XR version depends on the service (see <a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/introducing-gnsi-grpc-native-aaa-for-cisco-ios-xr#ios-xr-release-support\" style=\"color: rgb(0, 102, 204)\">Release Support<\/a>)<\/li>\n<\/ul>\n<p>Each service article includes its own environment setup block.<\/p>\n<h2 style=\"color: rgb(26, 26, 26); font-weight: 700\">Quick start: verify gNSI on the router<\/h2>\n<h3 style=\"color: rgb(26, 26, 26); font-weight: 700\">Prerequisites<\/h3>\n<ul>\n<li>IOS XR router with gRPC enabled (7.11.1 or later for Authz \u2014 see <a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/introducing-gnsi-grpc-native-aaa-for-cisco-ios-xr#ios-xr-release-support\" style=\"color: rgb(0, 102, 204)\">Release Support<\/a>)<\/li>\n<li><a href=\"https:\/\/github.com\/fullstorydev\/grpcurl\" style=\"color: rgb(0, 102, 204)\">grpcurl<\/a> installed<\/li>\n<li>OpenConfig gNSI protos cloned (see <a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/introducing-gnsi-grpc-native-aaa-for-cisco-ios-xr#proto-files\" style=\"color: rgb(0, 102, 204)\">Proto files<\/a> above)<\/li>\n<\/ul>\n<h3 style=\"color: rgb(26, 26, 26); font-weight: 700\">Run the check<\/h3>\n<p>After installing grpcurl and cloning the protos, run this to confirm the router exposes Authz RPCs.<\/p>\n<blockquote>\n<p><strong style=\"color: rgb(26, 26, 26)\">Important:<\/strong> Replace <code>198.51.100.1:57400<\/code> with the actual router IP and gRPC port. Replace the password with the router password.<\/p>\n<\/blockquote>\n<pre><code><span><span>export<\/span> <span>GNSI_IMPORT<\/span><span>=<\/span><span>\"<span>${GNSI_IMPORT<span>:-<\/span>$PWD}<\/span>\"<\/span>\n<\/span><span><span>export<\/span> <span>XR<\/span><span>=<\/span><span>\"<span>${XR<span>:-<\/span>198.51.100.1<span>:<\/span>57400}<\/span>\"<\/span> <span># \u2190 replace with router IP:port<\/span>\n<\/span><span><span>export<\/span> <span>XR_USER<\/span><span>=<\/span><span>\"<span>${XR_USER<span>:-<\/span>cisco}<\/span>\"<\/span>\n<\/span><span><span>export<\/span> <span>XR_PASS<\/span><span>=<\/span><span>\"<span>${XR_PASS<span>:-<\/span>}<\/span>\"<\/span> <span># \u2190 replace with password<\/span>\n<\/span><span><span>GRPC_MD<\/span><span>=<\/span><span>(<\/span>-H <span>\"username:<span>${XR_USER}<\/span>\"<\/span> <span>-H<\/span> <span>\"password:<span>${XR_PASS}<\/span>\"<\/span><span>)<\/span>\n<\/span><span>grpcurl <span>-plaintext<\/span> <span>\\<\/span>\n<\/span><span> -import-path <span>\"<span>$GNSI_IMPORT<\/span>\"<\/span> <span>\\<\/span>\n<\/span><span> <span>-proto<\/span> <span>\"authz\/authz.proto\"<\/span> <span>\\<\/span>\n<\/span><span> <span>\"<span>${GRPC_MD<span>[<\/span>@<span>]<\/span>}<\/span>\"<\/span> <span>\\<\/span>\n<\/span><span> <span>\"<span>${XR}<\/span>\"<\/span> <span>\\<\/span>\n<\/span><span> list gnsi.authz.v1.Authz\n<\/span><\/code><\/pre>\n<p>Expected output:<\/p>\n<pre><code><span>gnsi.authz.v1.Authz.Get\n<\/span><span>gnsi.authz.v1.Authz.Probe\n<\/span><span>gnsi.authz.v1.Authz.Rotate\n<\/span><\/code><\/pre>\n<p>If this works, the router is ready. Head to the <a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/gnsi-certz-tls-certificate-lifecycle-on-cisco-ios-xr\" style=\"color: rgb(0, 102, 204)\">Certz article<\/a> to set up TLS authentication first, or jump to the <a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/grpc-authorization-with-authz\" style=\"color: rgb(0, 102, 204)\">Authz article<\/a> to upload an authorization policy.<\/p>\n<h2 style=\"color: rgb(26, 26, 26); font-weight: 700\">OpenConfig references<\/h2>\n<ul>\n<li><strong style=\"color: rgb(26, 26, 26)\">Protos and per-service docs:<\/strong> <a href=\"https:\/\/github.com\/openconfig\/gnsi\" style=\"color: rgb(0, 102, 204)\">github.com\/openconfig\/gnsi<\/a><\/li>\n<li><strong style=\"color: rgb(26, 26, 26)\">YANG \/ Telemetry Models:<\/strong> <a href=\"https:\/\/github.com\/openconfig\/public\/tree\/master\/release\/models\/gnsi\" style=\"color: rgb(0, 102, 204)\">github.com\/openconfig\/public \u2014 release\/models\/gnsi<\/a><\/li>\n<\/ul>\n<hr>\n<blockquote>\n<p><strong style=\"color: rgb(26, 26, 26)\">gNSI on IOS XR series:<\/strong> <strong style=\"color: rgb(26, 26, 26)\">Overview<\/strong> \u00b7 <a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/gnsi-certz-tls-certificate-lifecycle-on-cisco-ios-xr\" style=\"color: rgb(0, 102, 204)\">Certz<\/a> \u00b7 <a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/gnsi-credentialz-ssh-credential-rotation-on-cisco-ios-xr\" style=\"color: rgb(0, 102, 204)\">Credentialz<\/a> \u00b7 <a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/grpc-authorization-with-authz\" style=\"color: rgb(0, 102, 204)\">Authz<\/a> \u00b7 <a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/securing-gnmi-with-pathz\" style=\"color: rgb(0, 102, 204)\">Pathz<\/a> \u00b7 <a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/gnsi-acctz-management-plane-accounting-on-cisco-ios-xr\" style=\"color: rgb(0, 102, 204)\">Acctz<\/a><\/p>\n<\/blockquote>\n<p><strong style=\"color: rgb(26, 26, 26)\">Start reading \u2192<\/strong> <a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/gnsi-certz-tls-certificate-lifecycle-on-cisco-ios-xr\" style=\"color: rgb(0, 102, 204)\">Certz \u2014 TLS Certificate Lifecycle<\/a> (authentication comes first)\u00b7 Then <a href=\"https:\/\/xrdocs.io\/programmability\/blogs\/gnsi-credentialz-ssh-credential-rotation-on-cisco-ios-xr\" style=\"color: rgb(0, 102, 204)\"><strong style=\"color: rgb(26, 26, 26)\">Credentialz<\/strong><\/a> for SSH operations.<\/p>\n<div title=\"\u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0644 \u0627\u06cc\u0646 \u0628\u062e\u0634\" style=\"display: flex\"><svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\"><\/svg><\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The Problem For CLI, NETCONF, and SNMP, security is a solved problem. AAA (Authentication, Authorization, and Accounting) with TACACS+ and Syslog takes care of\u2026<\/p>\n","protected":false},"author":1,"featured_media":240,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[111,238,240,69,243,37],"tags":[],"class_list":["post-237","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-automation-en","category-gnsi-en","category-grpc-en","category-iosxr-en-en","category-programmability-en","category-security-en"],"_links":{"self":[{"href":"https:\/\/www.anynet.ir\/blog\/wp-json\/wp\/v2\/posts\/237","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.anynet.ir\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.anynet.ir\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.anynet.ir\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.anynet.ir\/blog\/wp-json\/wp\/v2\/comments?post=237"}],"version-history":[{"count":1,"href":"https:\/\/www.anynet.ir\/blog\/wp-json\/wp\/v2\/posts\/237\/revisions"}],"predecessor-version":[{"id":241,"href":"https:\/\/www.anynet.ir\/blog\/wp-json\/wp\/v2\/posts\/237\/revisions\/241"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.anynet.ir\/blog\/wp-json\/wp\/v2\/media\/240"}],"wp:attachment":[{"href":"https:\/\/www.anynet.ir\/blog\/wp-json\/wp\/v2\/media?parent=237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.anynet.ir\/blog\/wp-json\/wp\/v2\/categories?post=237"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.anynet.ir\/blog\/wp-json\/wp\/v2\/tags?post=237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}