X509 Certs

Nova has an x509 cert store that it uses for the ec2 bundling image process and the cloudpipe vpn system. Currently the code runs inside the API server - which leads to issues if you want to want to run the api server on multiple boxes.

Nova creates a chain per project (tenants in the keystone world). Users can request certificates for projects (tenants) they are members of.

STATUS: DRAFT

QUESTIONS:

Overview:

[ OS API ] <=> [ x509-manager ] <=> [ crypto logic ]

Cleanup

Manager

Create a nova-x509 bin that is a nova-manager. A manager in nova is a process that: has flags, has an RPC and DB connection. (example managers are nova-scheduler)

OS API Extension

The following are users of the extension:

CALLS

REST OBJECT:

    {"cert": {"x509": "text",
              "tenant_id": tenant_id,
              "created": "12/12/12",
              "enabled": True}}

Openstack Admin API Extension

Ability to decrypt a small blob of text using the chain for a given tenant:

367         iv, err = utils.execute('openssl',
368                                 'rsautl',
369                                 '-decrypt',
370                                 '-inkey', '%s' % tenant_chain_key,
371                                 process_input=encrypted_iv,
372                                 check_exit_code=False)

vishy: Cloudpipe could just request the crl on a regular basis without needing to grab all of the other files.

Old EC2 Extension

    def generate_x509_for_user(self, context, name, project=None, **kwargs):
        """Generates and returns an x509 certificate for a single user.
           Is usually called from a client that will wrap this with
           access and secret key info, and return a zip file.
        """
        if project is None:
            project = name
        project = manager.AuthManager().get_project(project)
        user = manager.AuthManager().get_user(name)
        msg = _("Getting x509 for user: %(name)s"
                " on project: %(project)s") % locals()
        LOG.audit(msg, context=context)
        return user_dict(user, base64.b64encode(project.get_credentials(user)))

Wiki: x509-proposal (last edited 2012-01-18 00:25:21 by VishvanandaIshaya)