[openstack-dev] [Fuel] SSL keys saving

Adam Heczko aheczko at mirantis.com
Fri Aug 21 09:59:05 UTC 2015


Hi Stanislav,
agree that unification is very useful and it is right direction.
While designing implementation changes please remember that we should serve
cases:
1). There could be multiple environments served by one Fuel node. IMO we
should prepare a way to have different private key per environment.
In some cases private key will be common / shared for all environments, in
some cases no.
2). We should remember that there are various X.509 use cases for various
OpenStack services. Usually, X.509 is used only for TLS traffic encryption.
But in some cases we want to make authentication decision based on X.509
certificate.
This is useful for example with libvirt authentication, soon we'll have
mechanism for X.509 Keystone authentication.
In other words:
- we should remember to have consistent naming policy for X.509
certificates storage, and there should be implemented kind of 'per service'
certificate directory
- X.509 role will vary, depending on service. Sometimes only encryption,
sometimes also authentication.
3). Elliptic Curve Cryptography (ECC) support even adds more complexity, as
I could imagine a situation where we rely on RSA private keys for some
services, and we rely on ECC private keys for others.
In fact, IMO we should always create RSA and ECC private key pair per Fuel
environment, and then, in Fuel UI provide user an option which type of
cryptography (RSA or ECC) use for which service.
Or take simplified approach, and during cluster provisioning 'hard code'
which type of cryptography (which private key) use globally for all
services.

Of course scope of implementation to be discussed, the whole X.509 topic is
not easy one, and doing thing 'right' could be really time consuming.

Just my 2 cents :)


On Fri, Aug 21, 2015 at 11:10 AM, Stanislaw Bogatkin <sbogatkin at mirantis.com
> wrote:

> Hi folks.
>
> Today I want to discuss the way we save SSL keys for Fuel environments. As
> you maybe know we have 2 ways to get a key:
> a. Generate it by Fuel (self-signed certificate will be created in this
> case). In this case we will generate private key, csr and crt in a
> pre-deployment hook on master node and then copy keypair to the nodes which
> needed it.
>
> b. Get a pre-generated keypair from user. In this case user should create
> keypair by himself and then upload it through Fuel UI settings tab. In this
> case keypair will be saved in nailgun database and then will serialized
> into astute.yaml on cluster nodes, pulled from it by puppet and saved into
> a file.
>
> Second way has some flaws:
> 1. We already have some keys for nodes and we store them on master node.
> Store keys in different places is bad, cause:
> 1.1. User experience - user should remember that in some cases keys will
> be store in FS and in some other cases - in DB.
> 1.2. It brings problems for implementation in other different places - for
> example, we need to get certificate for properly run OSTF tests and now we
> should implement two different ways to deliver that certificate to OSTF
> container. The same for fuel-cli - we should somehow get certificate from
> DB and place it in FS to use it.
> 2. astute.yaml is similar for all nodes. Not all of nodes needs to have
> private key, but now we cannot control this.
> 3. If keypair data serializes into astute.yaml it means than that data
> automatically will be fetched when diagnostic snapshot will created. So in
> some cases in can lead to security vulnerability, or we will must to write
> another crutch to cut it out of diagnostic snapshot.
>
>
> So I propose to get rid of saving keypair in nailgun database and
> implement a way to always saving it to local FS on master node. We need to
> implement next items:
>
> - Change UI logic that saving keypair into DB to logic that will save it
> to local FS
> - Implement according fixes in fuel-library
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>


-- 
Adam Heczko
Security Engineer @ Mirantis Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150821/4882383f/attachment.html>


More information about the OpenStack-dev mailing list