Skip to content

Adding list leaf for SSH public keys#1498

Open
syaghi-c wants to merge 4 commits into
openconfig:masterfrom
syaghi-c:ssh-keys-list
Open

Adding list leaf for SSH public keys#1498
syaghi-c wants to merge 4 commits into
openconfig:masterfrom
syaghi-c:ssh-keys-list

Conversation

@syaghi-c

@syaghi-c syaghi-c commented May 21, 2026

Copy link
Copy Markdown

Change Scope

  • Adding a leaf list for user ssh keys to add the ability to add more than one SSH key per user.
  • This change is backwards compatible. We are proposing a new list leaf rather than changing the existing single leaf for ssh-key as to not break backwards compatibility.

Platform Implementations

Tree View

 module: openconfig-aaa
           +--rw aaa
        |  +--rw config
        |  +--ro state
        |  +--rw authentication
        |  |  +--rw glome
        |  |  |  +--ro state
        |  |  +--rw config
        |  |  |  +--rw authentication-method*   union
        |  |  +--ro state
        |  |  |  +--ro authentication-method*   union
        |  |  +--rw admin-user
        |  |  |  +--rw config
        |  |  |  |  +--rw admin-password?          string
        |  |  |  |  +--rw admin-password-hashed?   oc-aaa-types:crypt-password-type
        |  |  |  +--ro state
        |  |  |     +--ro admin-password?          string
        |  |  |     +--ro admin-password-hashed?   oc-aaa-types:crypt-password-type
        |  |  |     +--ro admin-username?          string
        |  |  +--rw users
        |  |     +--rw user* [username]
        |  |        +--rw username    -> ../config/username
        |  |        +--rw config
        |  |        |  +--rw username?          string
        |  |        |  +--rw password?          string
        |  |        |  +--rw password-hashed?   oc-aaa-types:crypt-password-type
        |  |        |  +--rw ssh-key?           string
        |  |        |  +--rw role               union
        |  |        +--ro state
        |  |           +--ro username?          string
        |  |           +--ro password?          string
        |  |           +--ro password-hashed?   oc-aaa-types:crypt-password-type
        |  |           +--ro ssh-key?           string
        |  |           +--ro role               union
+       |  |        +---- authorized-ssh-keys
+       |  |           +---- authorized-ssh-key* [key-name]
+       |  |              +---- key-name?   -> ../config/key-name
+       |  |              +---- config
+       |  |              |  +---- key-name?             string
+       |  |              |  +---- authorized-ssh-key?   string
+       |  |              +--ro state
+       |  |                 +--ro key-name?             string
+       |  |                 +--ro authorized-ssh-key?   string

@syaghi-c syaghi-c requested a review from a team as a code owner May 21, 2026 19:57
@google-cla

google-cla Bot commented May 21, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces an authorized-ssh-keys list to the OpenConfig AAA model to allow users to have multiple SSH public keys. Feedback indicates that the current placement of the list within a grouping violates OpenConfig structural standards, where lists should be siblings to config and state containers rather than nested within them. Additionally, the max-elements 10 constraint is viewed as overly restrictive, and the description for the authorized-ssh-key leaf should be updated to specify supported key formats like RSA or DSA.

Comment thread release/models/system/openconfig-aaa.yang Outdated
Comment thread release/models/system/openconfig-aaa.yang Outdated
Comment on lines 398 to 402
leaf ssh-key {
type string;
description
"SSH public key for the user (RSA or DSA)";
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this single ssh-key leaf be deprecated?

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

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants