OpenContrail requires API certificate key on compute nodes
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Juniper Openstack | Status tracked in Trunk | |||||
R3.0.3.x |
Fix Committed
|
High
|
Ignatious Johnson Christopher | |||
R3.1 |
Fix Committed
|
High
|
Ignatious Johnson Christopher | |||
R3.1.1.x |
Fix Committed
|
High
|
Ignatious Johnson Christopher | |||
R3.2 |
Fix Committed
|
High
|
Ignatious Johnson Christopher | |||
Trunk |
Fix Committed
|
High
|
Ignatious Johnson Christopher | |||
OpenContrail | Status tracked in Trunk | |||||
Trunk |
Fix Committed
|
High
|
Unassigned |
Bug Description
Contrail uses python's requests module for handling HTTP(S) requests. Nature of this module is to trust only CAs that are located in Mozilla trust "store". This means that using in-house CAs requires usage of 'verify' parameter when calling requests.get or requests.post.
And, Contrail does this. But the problem is that Contrail expect CA, certificate and the key. This is defined by tree variables in vnc_api_lib.init:
- certfile
- keyfile
- cafile
Documentation I found (https:/
Looking at the code:
url = "%s://%s:%s%s" % (self._
new_headers = headers or {}
try:
if self._ksinsecure:
elif not self._ksinsecure and self._use_ks_certs:
else:
If _use_ks_certs is not defined, communication falls back to whatever python requests considers secure. And, again, those are only certificates from Mozilla store - so no in-house CAs are possible. This can be rectifying by adjusting this part of vnc_api_lib.py:
if kscertfile and kskeyfile and kscafile \
and self._authn_
into something like:
if kscafile and self._authn_
if kskeyfile and kscertfile:
This would allow defining only CA in vnc_api_lib.ini and would allow standard application of certificate authority. Same problem exists in contrail_plugin.py.
Could you please explain the use case of the application you are building. Is this application browser based and trying to connect with API server that has SSL enabled?
We have drawn a parallel to the openstack params and defined key, cert and ca and mandated key file in case the server (keystone) has cert_required and assumed that it should be passed always, even if we are providing the same file as the cert/ca in the keyfile parameter.
The cert_required param is deprecated in liberty and mitaka and hence we could also relax the keyfile parameter in the clients connecting to the API server, pretty much like what you have done above.