Coder Social home page Coder Social logo

ingress-yubikey's Introduction

ingress-yubikey

This is a proof-of-concept highly experimental! Kubernetes Ingress Controller that terminates TLS using a certificate and key from the PIV smartcard applet on a YubiKey. This addresses a common complaint that Kubernetes Ingress controllers have cluster-wide access to secrets in order to retrieve TLS private keys. With a hardware-backed key, the private key never exists in application memory.

Usage

Check you have a working yubikey before deploying:

./ingress-yubikey validate

If not, you can set up the PIV applet like so:

ykman piv reset
ykman piv generate-key -m 010203040506070801020304050607080102030405060708 -P 123456 -a ECCP256 --pin-policy NEVER --touch-policy NEVER 9c 9c.pub
ykman piv generate-csr -s your-hostname.com 9c 9c.pub 9c.csr
# Sign the CSR, even with a publicly trusted CA!
ykman piv import-certificate 9c 9c.pem

ingress-yubikey watches for networking.k8s.io/v1 Ingress objects with their Ingress Class set to ingress-yubikey As the only goal is to terminate TLS, path rules are ignored, but TLS hosts are matched by parsing SNI.

For now, ingress-yubikey always uses the Digital Signature certificate in slot 9c. Insert an appropriately prepared YubiKey and run the ingress controller using the manifest in ./deploy as a guide. Volume mount the smartcard device appropriately.

PIN - protected keys

Again for now, the PIN for accessing the signing key can be provided with the flag --smartcard-pin or environment variable INGRESS_YUBIKEY_SMARTCARD_PIN.

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.