Giter VIP home page Giter VIP logo

ironic-secureboot-driver's Introduction

ARCHIVED

ironic-secureboot-driver

An Ironic plugin to provide a boot driver and hardware type for secureboot deployments.

Background

Oath needs to securely boot hardware in locations all around the world. To do this we use GRUB with iPXE that is verified via registers in the TPM; this has access to a secure key that's accessible only when the system configuration and boot components match the sealed values. iPXE will fetch an encrypted key and certificate; if the proper registers are set, the key can be unencrypted with the secure key. The key and certificate are then used for mutual TLS authentication to a trusted server that provides a bootable image. This image can be booted as a ramdisk, and iPXE will chainload to this image.

This driver provides a boot interface that works in tandem with the 'ramdisk' deploy interface to skip the agent ramdisk process and boot directly to the instance. It does this by booting to disk and laying down files for the image server to provide to the baremetal nodes.

Install

Install with pip into the virtualenv or system where ironic is installed:

$ git clone [email protected]:yahoo/ironic-secureboot-driver
$ pip install ironic-secureboot-driver

This driver also requires a web server on the same host as the conductor. The host should serve from $httpboot/insecure without mutual TLS auth, and from $httpboot/secure with mutual TLS auth, where $httpboot is configured in ironic at [deploy]/http_root.

Images should be placed in /images, and are reference in the nodes' instance_info field relative to that location.

Usage

Enable the hardware type and interfaces in ironic.conf:

enabled_boot_interfaces = pxe,secureboot
enabled_hardware_types = ipmi,secureboot_ipmi
enabled_deploy_interfaces = direct,ramdisk

Restart ironic to pick up the config changes.

Register a node using the right interfaces and hardware type:

$ openstack baremetal node create \
    --driver secureboot_ipmi \
    --boot-interface secureboot \
    --deploy-interface ramdisk

Set the certificate and key data on the node:

$ openstack baremetal node set \
    --driver-info secureboot_key=$(cat $uuid.key) \
    --driver-info secureboot_key_dat=$(base64 -w 0 $uuid.key.dat) \
    --driver-info secureboot_certificate=$(cat $uuid.cert) \
    $uuid

Note that generating the keys and certificates is up to the user, as the encryption and boot process may be different between deployments. In general:

  • $uuid.key is a PEM-wrapped encrypted private key for the node
  • $uuid.key.dat is an encrypted blob of the private key for the node
  • $uuid.cert is the client certificate for the node

Set the image info for the deployment:

$ openstack baremetal node set \
    --instance-info kernel=vmlinuz-ramdisk-ssh \
    --instance-info ramdisk=initrd-ramdisk-ssh.img \
    --instance-info squash=squashfs-ramdisk-ssh.img \
    $uuid

And finally, deploy the node:

$ openstack baremetal node deploy $uuid

Contribute

Please refer to the contributing.md file for information about how to get involved. We welcome issues, questions, and pull requests. Please be sure to follow our code of conduct.

License

Copyright 2018 Oath Inc.

This project is licensed under the terms of the Apache 2.0 open source license. Please refer to LICENSE for the full terms.

ironic-secureboot-driver's People

Contributors

jimrollenhagen avatar r-andrew-dev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.