Skip to content

Commit

Permalink
[Restapi Yang] Fix issue with multiple certs (sonic-net#12495)
Browse files Browse the repository at this point in the history
*[Restapi Yang] Fix issue with multiple certs (sonic-net#12495)
  • Loading branch information
prsunny authored Oct 27, 2022
1 parent 89f7682 commit 538e4c0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@
},
"RESTAPI_TABLE_WITH_VALID_CONFIG": {
"desc": "RESTAPI TABLE WITH VALID CONFIG."
},
"RESTAPI_TABLE_WITH_MULTIPLE_CERTS": {
"desc": "RESTAPI TABLE WITH MULTIPLE CERTS."
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,17 @@
}
}
}
},
"RESTAPI_TABLE_WITH_MULTIPLE_CERTS": {
"sonic-restapi:sonic-restapi": {
"sonic-restapi:RESTAPI": {
"certs": {
"ca_crt": "/etc/sonic/credentials/ame_root.pem",
"server_crt": "/etc/sonic/credentials/restapiserver.crt",
"server_key": "/etc/sonic/credentials/restapiserver.key",
"client_crt_cname": "client.sonic.net,clientds.prod.net"
}
}
}
}
}
2 changes: 1 addition & 1 deletion src/sonic-yang-models/yang-models/sonic-restapi.yang
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module sonic-restapi {

leaf client_crt_cname {
type string {
pattern '([a-zA-Z0-9_\-\.]+)';
pattern '([a-zA-Z0-9_\-\.]+,)*([a-zA-Z0-9_\-\.]+)';
}
description "Client cert name.";
}
Expand Down

0 comments on commit 538e4c0

Please sign in to comment.