Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions release/models/system/openconfig-aaa.yang
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,23 @@ module openconfig-aaa {
description
"Operational state data for local users";
}

grouping authorized-ssh-key-config {
description
"Configuration data for user SSH keys";

leaf key-name {

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.

Suggested change
leaf key-name {
leaf name {

We already know these are keys and I think the normal index here for uniqueness would correspond to the "comment" of a public key

type string;
description
"The name with which to reference the authorized SSH public key";
}

leaf authorized-ssh-key {
type string;
description
"Authorized SSH public key for the user (RSA or ECDSA)";

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.

Not sure I see a reason to limit the key type in the comment but this does weigh the question if the type should be it's own separate leaf essentially decomposing the distinct fields of a public key representation - if so this could likely be an identityref to well known algorithms. This field that holds the key data could be specified that this should be B64 encoded

}
}

grouping aaa-authentication-user-top {
description
Expand Down Expand Up @@ -458,6 +475,38 @@ module openconfig-aaa {
uses aaa-authentication-user-config;
uses aaa-authentication-user-state;
}

container authorized-ssh-keys {
description
"Top-level container for authorized SSH keys";

list authorized-ssh-key {
key "key-name";
description
"Authorized SSH public keys for the user (RSA or ECDSA)";

leaf key-name {
type leafref {
path "../config/key-name";
}
description
"References the key name in the configuration block";
}

container config {
description
"Configuration data for the authorized SSH key";
uses authorized-ssh-key-config;
}

container state {
config false;
description
"Operational state data for the authorized SSH key";
uses authorized-ssh-key-config;
}
}
}
}

}
Expand Down