Giter Club home page Giter Club logo

keymanagement's Introduction

How I manage my keys

Use a spare raspberry pi3b+ I had spare

Preparation

  1. Download raspbian SHA512:271f319347999d203265cb56625bfa3646e9497f6d030e182ea20ada7152fe66cfb6f65d80a1cb7d8e269c315aa9f0a1845ecc160745a5ae3953eb686aaa4b3f and write to a SD card

  2. touch /boot/ssh so that it boots headless with ssh enabled, optionally add a wpa_supplicant.conf for the next step to run

  3. docker run --rm -ti --net=host -v $PWD:/app quay.io/openshift/origin-ansible:v4.8.0@sha256:c6eac2186cb5aa34f56941001f62b834973d3bbc60a0940ebe7d143755c37fb4 -- ansible-playbook -i raspberrypi.local, /app/playbook.yaml -u pi -f 1 --ask-pass (mdns .local resolution will work if its the only pi and your network allows it)

Usage

  1. plug the pi into a screen and keyboard with NO NETWORK (though the ansible should have disabled that)

  2. set the time on the pi

  3. /home/pi/scripts/create_masterkey.exp it will ask for name and email address

  4. /home/pi/scripts/create_subkeys.exp to create the subkeys

  5. /home/pi/scripts/create_identity.exp [email protected] to add email addresses to the key

  6. /home/pi/scripts/export_keys.exp to export the keys and make QR code copies

  7. /home/pi/scripts/copykeys_to_yubikey.exp

  8. /home/pi/scripts/configure_yubikey.exp to set the pins on tke key

  9. /home/pi/scripts/copy_to_usb.sh to copy the material to usb sticks

Renewal

Renewal of keys is pretty simple, if my yubikey is plugged in on boot, it will add 12 months to the expiry and then shut down, you'll know its done when the lights go out.

This means if I loose my yubikey it only has a maximum of 12 months life before it wouldn't be useful if a revocation either doesn't work or isn't respected for example with ssh authentication.

I would like to reduce that to something shorter, but I'm going to see how annoying it is with 12 months to start with.

Revocation

If I loose a key, revocation and adding a new key is possible by booting the offline raspberry pi without a yubikey thus avoiding it attempting the renewal process.

Disaster recovery

If the master and/or sub keys are irrecoverable from the SD card or USB Stick, a paper backup exists and has been securely distributed and stored at a few different locations to aid in the recovery.

To recover the paperkey, a new raspberry pi image will need to be created following the steps in this repo and and use the raspicam to capture the key for restoration to the keychain.

References

keymanagement's People

Contributors

chrisns avatar dependabot[bot] avatar renovate-bot avatar the-repository-manager[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

keymanagement's Issues

Dependency Dashboard

This issue provides visibility into Renovate updates and their statuses. Learn more

This repository currently has no open or pending branches.


  • Check this box to trigger a request for Renovate to run again on this repository

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.