Pluggable credential storage

Registered by Lucas Alvares Gomes

Right now Ironic is being responsable for storing the credentials of the IPMI and SSH drivers (and potentially other drivers in the future), this task should be delegated to Keystone (and/or Barbican in the future) since that's the OpenStack service responsable for this sort of things.

This blueprint is proposing is to teach Ironic about how to store the credentials in another services like Keystone's v3/credentials API and Barbican.

https://github.com/openstack/identity-api/blob/master/openstack-identity-api/v3/src/markdown/identity-api-v3.md#create-credential-post-credentials

https://github.com/stackforge/barbican

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Lucas Alvares Gomes
Direction:
Needs approval
Assignee:
Lucas Alvares Gomes
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

With this approach Nodes will only store a reference to the credential in Keystones, and in the case where someone needs to update a credential that is shared across many nodes it only needs to be updated once in one place.

Also, using Keystone to store the credentials will also affect the blueprint: https://blueprints.launchpad.net/ironic/+spec/send-data-to-ceilometer. Since the reason why we agreed to collect and send data back to Ceilometer was because Ironic was the service responsable for storing/accessing the IPMI credentials.

Lucas

Have you considered using Barbican for key storage instead?
https://github.com/stackforge/barbican
-Doug Mendizabal

I think Barbican is good for this task.

Some points:
1) Ironic creates "generic" type container and stores ref in DB for a node.
2) Container creation and content looks like [1]
3) Container should contain uuid of the node for prevent refs manipulating in Ironic DB.
4) Top level of container should contains list of refs.

[1] EŃ…ample:

POST v1/containers

Header: content-type=application/json

{
  "type": "generic",
  "node": "<uuid_of_node>"
  "secret_refs": [
    {
       "name": "driver_credentials",
       "secret_ref":"http://localhost:9311/v1/secrets/05a47308-d045-43d6-bfe3-1dbcd0c3a97b"
    },
    {
       "name": "some_key",
       "secret_ref":"http://localhost:9311/v1/secrets/05a47308-d045-43d6-bfe3-1dbcd0c3a97b"
    },
    {
       "name": "passphrase",
       "secret_ref":"http://localhost:9311/v1/secrets/05a47308-d045-43d6-bfe3-1dbcd0c3a97b"
    }
  ]
}

TODO: make it pluggable?

Gerrit topic: https://review.openstack.org/#q,topic:bp/pluggable-credential-storage,n,z

Addressed by: https://review.openstack.org/185074
    Add pluggable credentials storage

Addressed by: https://review.openstack.org/186056
    Add pluggable credentials storage

Addressed by: https://review.openstack.org/193218
    Add credentials migration script.

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.