You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
admin@sonic:~$ show version
SONiC Software Version: SONiC.master.376100-0299ab8de
SONiC OS Version: 11
Distribution: Debian 11.7
Kernel: 5.10.0-23-2-amd64
Build commit: 0299ab8de
Build date: Sun Oct 1 11:58:10 UTC 2023
Built by: AzDevOps@vmss-soni0024LO
Platform: x86_64-kvm_x86_64-r0
HwSKU: Force10-S6000
ASIC: vs
ASIC Count: 1
Serial Number: N/A
Model Number: N/A
Hardware Revision: N/A
Uptime: 07:38:35 up 0 min, 1 user, load average: 1.93, 0.48, 0.16
Date: Mon 02 Oct 2023 07:38:35
```
A new table "REST_SERVER" is introduced in ConfigDB for maintaining REST server configurations.
key = REST_SERVER|default ; REST server configurations.
;field = value
port = 15DIGIT ; server port - defaults to 443
client_auth = "none" / "password" / "jwt" / "cert"
; Client authentication mode.
; none: No authentication, all clients
; are allowed. Should be used only
; for debugging.
; password: HTTP Basic authentication.
; jwt : HTTP Bearer Token authentication with
; JSON Web Token format.
; cert: Certificate based authentication.
; Requires ca_crt configuration.
; Any combination of "password", "jwt" and "cert" modes can be
; enabled by specifying a comma separated values.
; Eg: "password,jwt" enables both password and jwt modes.
log_level = DIGIT ; Verbosity for glog.V logs
server_crt = 1VCHAR ; Path to TLS certificate file
server_key = 1VCHAR ; Path to TLS private key file
ca_crt = 1VCHAR ; Path to the CA certificate to be used for
; client certificate validation.
yxieca
transferred this issue from sonic-net/sonic-buildimage
Oct 11, 2023
Description
Steps to reproduce the issue:
Change
from:
REST_SERVER_ARGS="-ui /rest_ui -logtostderr"
to
REST_SERVER_ARGS="-ui /rest_ui -logtostderr -client_auth user"
admin@sonic:~$ sonic-cli
sonic# configure terminal
sonic(config)# vlan 4
sonic(config-vlan-4)# admin-state enable
Exception when calling ->put_ale_vlan_ale_vlan_vlan_vlan_list_admin_status : (401)
Reason: Unauthorized
HTTP response headers: HTTPHeaderDict({'Access-Control-Allow-Credentials': 'true', 'Access-Control-Allow-Headers': 'Accept, Content-Type, Content-Length, Accept-Encod)
HTTP response body: {"ietf-restconf:errors":{"error":[{"error-type":"protocol","error-tag":"access-denied"}]}}
Describe the results you received:
admin@sonic:~$ sonic-cli
sonic# configure terminal
sonic(config)# vlan 4
sonic(config-vlan-4)# admin-state enable
Exception when calling ->put_ale_vlan_ale_vlan_vlan_vlan_list_admin_status : (401)
Reason: Unauthorized
HTTP response headers: HTTPHeaderDict({'Access-Control-Allow-Credentials': 'true', 'Access-Control-Allow-Headers': 'Accept, Content-Type, Content-Length, Accept-Encod)
HTTP response body: {"ietf-restconf:errors":{"error":[{"error-type":"protocol","error-tag":"access-denied"}]}}
Describe the results you expected:
admin@sonic:~$ sonic-cli
sonic# configure terminal
sonic(config)# vlan 4
sonic(config-vlan-4)# admin-state enable
sonic(config-vlan-4)#
admin@sonic:~$ show version
SONiC Software Version: SONiC.master.376100-0299ab8de
SONiC OS Version: 11
Distribution: Debian 11.7
Kernel: 5.10.0-23-2-amd64
Build commit: 0299ab8de
Build date: Sun Oct 1 11:58:10 UTC 2023
Built by: AzDevOps@vmss-soni0024LO
Platform: x86_64-kvm_x86_64-r0
HwSKU: Force10-S6000
ASIC: vs
ASIC Count: 1
Serial Number: N/A
Model Number: N/A
Hardware Revision: N/A
Uptime: 07:38:35 up 0 min, 1 user, load average: 1.93, 0.48, 0.16
Date: Mon 02 Oct 2023 07:38:35
```
The text was updated successfully, but these errors were encountered: