Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 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
2 changes: 2 additions & 0 deletions dockers/docker-sonic-gnmi/gnmi-native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ if [ -n "$CERTS" ]; then
if [ ! -z $CA_CRT ]; then
TELEMETRY_ARGS+=" --ca_crt $CA_CRT"
fi

TELEMETRY_ARGS+=" --config_table_name GNMI_CLIENT_CERT"
elif [ -n "$X509" ]; then
SERVER_CRT=$(echo $X509 | jq -r '.server_crt')
SERVER_KEY=$(echo $X509 | jq -r '.server_key')
Expand Down
2 changes: 2 additions & 0 deletions dockers/docker-sonic-telemetry/telemetry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ if [ -n "$CERTS" ]; then
if [ ! -z $CA_CRT ]; then
TELEMETRY_ARGS+=" --ca_crt $CA_CRT"
fi

TELEMETRY_ARGS+=" --config_table_name TELEMETRY_CLIENT_CERT"
elif [ -n "$X509" ]; then
SERVER_CRT=$(echo $X509 | jq -r '.server_crt')
SERVER_KEY=$(echo $X509 | jq -r '.server_key')
Expand Down
20 changes: 20 additions & 0 deletions src/sonic-yang-models/yang-models/sonic-gnmi.yang
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,27 @@ module sonic-gnmi {
}

}
}

container GNMI_CLIENT_CERT {
description "GNMI client cert list";

list GNMI_CLIENT_CERT_LIST {
max-elements 8;
key "cert_cname";

leaf cert_cname {
type string;
description
"client cert common name";
}

leaf role {
type string;
description
"role of client cert common name";
}
}
}
}
}
21 changes: 21 additions & 0 deletions src/sonic-yang-models/yang-models/sonic-telemetry.yang
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,26 @@ module sonic-telemetry {
}

}

container TELEMETRY_CLIENT_CERT {
description "TELEMETRY client cert list";

list TELEMETRY_CLIENT_CERT_LIST {
max-elements 8;
key "cert_cname";

leaf cert_cname {
type string;
description
"client cert common name";
}

leaf role {
type string;
description
"role of client cert common name";
}
}
}
}
}