Openstack allows VMs to access metadata by sending a HTTP request to the link local address 169.254.169.254. This request from a VM is proxied to to Nova API, with additional HTTP header fields added. Nova uses these to identify the source instance and responds with appropriate metadata.
Contrail vRouter acts as the proxy, trapping the metadata requests, adding the necessary header fields and sending the requests to the Nova API server.
The requests from vRouter to Nova API are not encrypted and can pose a security request.
Use SSL to encrypt the HTTP interactions between Contrail vRouter and Nova API.
On the Nova side, the following configuration has to be added in default section of nova.conf file to enable this support.
enabled_ssl_apis = metadata
nova_metadata_protocol = https
nova_metadata_insecure = False
ssl_cert_file = cert.pem
ssl_key_file = privkey.pem
ssl_ca_file = cacert.pem
The following configuration has to be added in the METADATA section of contrail-vrouter-agent.conf to enable this support on Contrail vrouter agent.
metadata_use_ssl = True
metadata_client_cert = client_cert.pem
metadata_client_key = client_key.pem
metadata_ca_cert = cacert.pem
Contrail provisioning will be updated to populate these in the respective configuration files as well as copying the certificate files to the appropriate paths.
None
Not Applicable
Please see above for the required configuration to be done.
None
None
- Http client code to accept SSL certificates
- vRouter Agent to use the certificates during metadata proxy, if configured.
- Provisioning changes to update the SSL options.
Considering that metadata is typically accessed during VM boot up, using SSL for the metadata communication should not cause performance impact.
None
None
None
None
None
- Check that relevant configuration options are parsed
- Check http requests with SSL options are invoked
- Check provisioning updates the configuration files
- Check metadata communication works with and without SSL being enabled.
- Check multiple metadata communication in parallel, with SSL enabled.
Update metadata section with configuration information to achieve this.
https://github.com/Juniper/contrail-controller/wiki/Metadata-service