JIRA Associated
CBS HTTPS support - DCAEGEN2-1515Getting issue details... STATUS
- CBS expose both secure/insecure + AAF cert - DCAEGEN2-1549Getting issue details... STATUS
- Deployment update - DCAEGEN2-1550Getting issue details... STATUS
- SDK impact (java - - DCAEGEN2-1552Getting issue details... STATUS / python - - DCAEGEN2-1551Getting issue details... STATUS )
Problem Statement :
CBS Api’s are used by all Service components to retrieve the configuration from consul during startup (and for periodic polling after). To support ONAP S3P security needs, Configbinding Service apis should be switched to HTTPS. As this has impact across all DCAE services, this has to be introduced in phased manner. El-Alto focus will on getting CBS HTTPS deployed and corresponding libraries updated.
Assumptions
- Not all service will switch to TLS interface for El-Alto
- CBS deployments must support both HTTPS and HTTP in-parallel
- SDK library (python and java) have separate api/version to let application choose migration
- *Can* deploy two instances in the same pod (CBS http and CBS HTTPS) under the same K8S service
Migration Plan
Following are impacts to components to be done in specified order
CBS Enhancement (DCAEGEN2-1549)
- Support HTTPS enablement via environment variable
- USE_HTTPS: set to “1” to use HTTPS, anything else is HTTP
- HTTPS_KEY_PATH: path to the TLS private key
- HTTPS_CERT_PATH: path to the TLS certificate
- Use port 10443 if USE_HTTPS is set to “1”, otherwise port 10000
Deployment Enhancement (Helm chart updates) DCAEGEN2-1550
- Modify existing dcae-config-binding-service charts to support the new environment and new CBS container version.
- Modify values.yaml service property to include two services: secure and insecure. Each service has the following properties:
- enabled - boolean flag to allow enabling and disabling the service. Allows running HTTP only, HTTPS only, or both. The default setting for El Alto is that both are enabled.
- internalPort - the container port (10000 for HTTP, 10443 for https)
- externalPort - the port used by other components inside the cluster to reach the service (10000 for HTTP, 10443 for https)
- nodePort – the last two digits of the node port number (15 for HTTP, 14 for HTTPS)
- Modify deployment.yaml to deploy:
- if the secure service enable flag is set to true:
- the tls-init initContainer that sets stores certs in a volume in the pod
- a container with an instance of the config-binding-service image, with the USE_HTTPS, HTTPS_KEY_PATH, and HTTPS_CERT_PATH environment variables set to enable TLS
- a container with an instance of the filebeat logging forwarder, configured to read logs generated by the TLS-enabled instance of the config-binding-service
- if the insecure service enable flag is set to true:
- a container with an instance of the config binding service image, with the USE_HTTPS environment variable set to 0, to enable non-TLS (HTTP) operation
- a container with an instance of the filebeat logging forwarder, configured to read logs generated by the non-TLS instance of the config-binding-service (this prevents problems that would be caused if both containers tried to write into the same logging volume)
- if the secure service enable flag is set to true:
- Modify service.yaml to deploy a Service named config-binding-service with port definitions based on the service property in the values.yaml. The default service configuration will create a NodePort service with two ports, one for HTTP (inside the cluster on port 10000, outside the cluster on port 30415) and one for HTTPS (inside the cluster on port 10443, outside the cluster on port 30414).
- Modify values.yaml service property to include two services: secure and insecure. Each service has the following properties:
K8s plugin updates (DCAEGEN2-1550)
- Cloudify deployments of service components should include following environments
- CONFIG_BINDING_SERVICE=<cbs_k8s_service_name>
- CONFIG_BINDING_SERVICE_CLIENTCERT=<path>
- Enable AAF cert distribution by default on path identified by CONFIG_BINDING_SERVICE_CLIENTCERT.
- This step to be done regardless of tls_info setting in blueprint (tls_info to be used for components supporting HTTPS as server; in this case certificate are required to be mounted also application specific path specified – this can be created as softlink to path specified by CONFIG_BINDING_SERVICE_CLIENTCERT).
Bootstrap pod (DCAEGEN2-1550)
- Add new k8s plugin version including R4 version (1.4.13) in CM deployments
- To keep existing components from breaking, continue to register “config-binding-service” and “config_binding_service” as services in Consul, with port 10000 as the service port.
Note: Service registration on Consul will not be done for CBS TLS service. As components change to use TLS, they should just use the Kubernetes DNS name for the service along with port 10443.
Library Enhancement (CBS java sdk - DCAEGEN2-1552, CBS python util - DCAEGEN2-1551)
(Below to be confirmed based on K8s Plugin updates)
- Verify if the new environment setting for TLS (below) added by K8s plugin is visible within POD.
- CONFIG_BINDING_SERVICE_TLS=<https_cbs_service_name>
- CONFIG_BINDING_SERVICE_CLIENTCERT=<path>
- If defined, use the secure end-point to interface with CBS (port 10443)
- If TLS envs are undefined, use R4 service name and port (10000) to interface with CBS
Note: Libraries should stop using Consul service discovery to find CBS.
ServiceComponents (Optional for E release)
- Switch to newer version of libraries (CBS SDK for java and python CBS utils)
- Update blueprint to use newer version of k8s plugin in blueprints