[Restapi Yang] Fix issue with multiple certs (#12495)
*[Restapi Yang] Fix issue with multiple certs (#12495)
This commit is contained in:
parent
89f76829fc
commit
538e4c0a97
@ -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."
|
||||
}
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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.";
|
||||
}
|
||||
|
Reference in New Issue
Block a user