Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REST server cert configurations (fixes #4291) #4799

Merged
merged 1 commit into from
Jun 19, 2020

Conversation

sachinholla
Copy link
Contributor

- Why I did it
Mgmt-framework REST and telemetry servers were using DEVICE_METADATA|x509 table for
server certificate configurations. This table has been deprecated now and telemetry service has already moved its certificate configurations to TELEMETRY table. Doing the same for REST service too.
Discussed in bug #4291

- How I did it
Enhanced REST server startup script to read server certificate file path configurations from the existing REST_SERVER table. Three more attributes - server_crt, server_key and ca_crt are introduced as described in sonic-net/SONiC#550.

For backard compatibility, certificate configurations are read from old DEVICE_METADATA|x509 table if they (server_crt, server_key and ca_crt) are not present in REST_SERVER table.

- How to verify it
Verified mgmt-framework service startup with following configurations:

  1. Mgmt-framework startup without cert configs
  2. Mgmt-framework startup with cert configs in REST_SERVER table
  3. Mgmt-framework startup with cert configs in x509 table
  4. Mgmt-framework startup with cert configs in both REST_SERVER and x509 table. Service should use the configs from REST_SERVER

- Description for the changelog
Load certificate configurations for mgmt-framework service from REST_SERVER table.

REST and telemetry servers were using "DEVICE_METADATA|x509" table for
server certificate configurations. This table has been deprecated now.
Enhanced REST server startup script to read server certificate file
path configurations from REST_SERVER table. Three more attributes -
server_crt, server_key and ca_crt are introduced as described in
sonic-net/SONiC#550.

For backard compatibility, certificate configurations are read from
old "DEVICE_METADATA|x509" table if they (server_crt, server_key and
ca_crt) are not present in REST_SERVER table.

Fixes bug sonic-net#4291

Signed-off-by: Sachin Holla <sachin.holla@broadcom.com>
@lguohan lguohan linked an issue Jun 19, 2020 that may be closed by this pull request
@lguohan lguohan merged commit 3dc7992 into sonic-net:master Jun 19, 2020
@sachinholla sachinholla deleted the rest_cert_config branch October 12, 2020 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[mgmt-framework]: service fails to start on 201911
2 participants