danb35
Hall of Famer
- Joined
- Aug 16, 2011
- Messages
- 15,504
I don't recall who it was here who initially posted the link, but someone, a while back (edit: it was @rvassar, here: https://www.truenas.com/community/threads/handling-self-signed-certs-in-lan.90823/post-630195), linked to a post on the smallstep.com blog about building your own local CA:
smallstep.com
It's pretty convenient--it will issue certs for your local network, and your devices only need to trust its root CA cert. It acts as an ACME server, so pretty much any software that can get a cert from Let's Encrypt can also get a cert from the local server. Rather than using DNS validation to obtain Let's Encrypt certs for my LAN devices (including my TrueNAS server), I'm now getting them from the local CA. I know @Constantin is also using one of these.
That's neat enough, but while browsing around their site, I saw quite a bit of discussion of SSH certificates--which I, in my hitherto sheltered life, wasn't aware of, but it sounds like they address lots of issues--and I won't deny that the idea of getting a SSH cert using SSO sounded pretty intriguing. The latter idea sent me down the rabbit trail of setting up LemonLDAP::NG to act as an identity provider on my network, and while I don't quite have that part working as I'd like to, I've managed to get SSH host certs working on many of my LAN systems, and have user certs working in theory. Because I thought the whole process was a little less than intuitive, I wrote up some notes on the process in hopes they'll be helpful to others:
Edit to update the link:
wiki.familybrown.org

Build a Tiny Certificate Authority For Your Homelab
Let's make a tiny, standalone CA! We'll use a Raspberry Pi 4, YubiKey 5 NFC, and Infinite Noise TRNG.
It's pretty convenient--it will issue certs for your local network, and your devices only need to trust its root CA cert. It acts as an ACME server, so pretty much any software that can get a cert from Let's Encrypt can also get a cert from the local server. Rather than using DNS validation to obtain Let's Encrypt certs for my LAN devices (including my TrueNAS server), I'm now getting them from the local CA. I know @Constantin is also using one of these.
That's neat enough, but while browsing around their site, I saw quite a bit of discussion of SSH certificates--which I, in my hitherto sheltered life, wasn't aware of, but it sounds like they address lots of issues--and I won't deny that the idea of getting a SSH cert using SSO sounded pretty intriguing. The latter idea sent me down the rabbit trail of setting up LemonLDAP::NG to act as an identity provider on my network, and while I don't quite have that part working as I'd like to, I've managed to get SSH host certs working on many of my LAN systems, and have user certs working in theory. Because I thought the whole process was a little less than intuitive, I wrote up some notes on the process in hopes they'll be helpful to others:
Edit to update the link:
SSH Certificate Configuration
Configuration to use SSH host and client certificates
Last edited: