Code Monkey home page Code Monkey logo

ansible-keylime-tpm-emulator's Introduction

Ansible Keylime

Build Status Gitter chat

Ansible role to deploy Keylime and a TPM Emulator, alongside the Keylime rust cloud node on Fedora release 31.

For details on using Keylime, please consult the project documentation

Please note that the rust cloud node is still under early stages of Development. Those wishing to test drive Keylimes functionality should use the existing python based cloud node keylime_node until later notice.

Security Warning

This role deploys with a software TPM Emulator.

Do not use a software TPM emulator in a production environment.

SELinux is set to permissive for this role.

This role is solely for the use of development or demonstration purposes.

Usage

Run the example playbook against your target remote node(s).

ansible-playbook -i your_hosts playbook.yml

TPM Version Control

Either TPM version 1.2 or TPM 2.0 support can be configured by simply changing the role in the playbook.yml file here.

For TPM 2.0 use:

  - ansible-keylime-tpm20

For TPM 1.20 use:

  - ansible-keylime-tpm12

Both roles will deploy the relevant TPM 1.2 Emulator (tpm4720) or 2.0 Emulator (IBM software TPM).

Vagrant

A Vagrantfile is available for provisioning.

Clone the repository and then simply run with the following additional args added to the vagrant command:

  • --instances: The number of Keylime Virtual Machines to create. If not provided, it defaults to 1
  • --repo: This mounts your local Keylime git repository into the virtual machine (allowing you to test your code within the VM). This is optional.
  • --cpus: The amount of CPU's. If not provided, it defaults to 2
  • --memory: The amount of memory to assign. If not provided, it defaults to 2048

For example, using libvirt:

vagrant --instances=2 --repo=/home/jdoe/keylime --cpus=4 --memory=4096  up --provider libvirt --provision

For example, using VirtualBox:

vagrant --instances=2 --repo=/home/jdoe/keylime --cpus=4 --memory=4096  up --provider virtualbox --provision
NOTE: Customized args (--instances, --repos etc), come before the mainvagrant args (such as up, --provider)

Once the VM is started, vagrant ssh into the VM and run sudo su - to become root.

The TPM emulator will be running.

You can then start the various components using commands:

keylime_verifier

keylime_registrar

keylime_node

WebApp

The web application can be started with the command keylime_webapp. If using Vagrant, port 443 will be forwarded from the guest to port 8443 on the host.

This will result in the web application being available on url:

https://localhost:8443/webapp/

IMA Policy

This role deploys a basic ima-policy into /etc/ima/ima-policy so that IMA runtime integrity can be used. For this to activate, you must reboot the machine first.

Should you rboot the machine, you will need to start the emulator again:

/usr/local/bin/tpm_serverd

systemctl restart tpm2-abrmd

License

Apache 2.0

Contribute

Please do! Pull requests are welcome.

Please ensure CI tests pass!

Contributors

ansible-keylime-tpm-emulator's People

Contributors

lukehinds avatar leonjia0112 avatar amylily1011 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.