-
fgudin
hi, i sort of cross-post from the smartos matrix room:
-
fgudin
i'm wondering whether encrypting a remote standalone smartos server is feasible, given that i can't have kvm access.
-
fgudin
i'm thinking about enabling encryption at zones' pool creation, pointing at a keyfile (so keyformat=raw) hosted on a small unencrypted partition that would contain garbage most of the time (during normal runtime) and that i would rewrite with correct material just before planned reboots.
-
fgudin
does the loader support booting in such a scheme ? have anybody done something similar, or with the same intent found a practical solution ?
-
jbk
fgudin: no.. loader does not currently know how to read encrypted zfs datasets
-
jbk
the lack of KVM access does make things rather challenging... it might be good to understand the threat model you're trying to deal with..
-
jbk
e.g. what is there for triton is concerned around someone walkign away with the disks from a server (or an individual compute note itself)
-
tsoome_
I have code to read with passphrase, adding keyfile there is not a big deal. securing keyfile (or password prompt) is quite a different matter though.
-
fgudin
jbk: the threat model is basic: this is a personal server where i'll put my (and my family's) data
-
fgudin
i want the drives to be ciphered in case some hw replacement has to be done
-
fgudin
tsoome_: is this code you hook in somehow, or patch against sthg ? i'd be interested to see
-
tsoome_
I need to see if I have collected it to separate branch...
-
tsoome_
checking with nightly + basic test;)
-
fgudin
nice, thank you :)
-
wiedi
What already works is creating an encrypted fs in the global zone and passing it into a zone via lofs. After booting you'll have to ssh into the system, shutdown the zone, zfs load-key+zfs mount and restart the zone. It's not the best but if you only care about some data (not the whole system) and don't mind the manual work on reboot its fine
-
fgudin
i thought encryption was a pool-level property: wouldn't it require a distinct pool ?
-
wiedi
nope, you can do something like "zfs create -o encryption=aes-256-gcm -o keyformat=passphrase -o keylocation=prompt zones/encrypted"
-
wiedi
and then add "filesystems": [{"source": "/zones/encrypted/", "target": "/srv", "type": "lofs" }] to your vm json
-
fgudin
ah, nice
-
jbk
it's per dataset, however any clones of that dataset must use the same key
-
jbk
which is why there's just one pool level key in triton since everything is based on reference images that are cloned for an instance
-
jbk
but if you're creating brand new datasets for data for an instance, those could have their own keys... just there's nothing plumbed up to manage it
-
fgudin
i've got to go AFK, but will read the backlog if any
-
fgudin
thanks anyway for all your input
-
tsoome_
It took a bit to fix issue with endian check in this variant of the code (I have 2 alternates, but I sort of like this one more:D)
-
nikolam
Huh, network card stopped update on some past SmartOS upgrade.. and I thought card died and replaced it with new same-chip LAN card and.. new card still is not working. I think there is something wrong with the driver in newer SmartOS/illumos that stoppd detecting the LAN card...
-
nikolam
I will try to determine on what PI update it started to happen and card stopped working. (dladm show-phys shows nothing)
-
jbk
what sort of card?
-
jbk
and do you see something in prtconf -d (needs root)?
-
jbk
you should see every PCI device visible on the system there.. if there's not a driver for it, or something happened w/ the driver, you'd see '(driver not attached)'
-
danmcd
Also `/usr/lib/pcie/pcieadm show-devs` might be helpful.
-
danmcd
And that `dladm show-phys` shows nothing is... interesting.
-
nikolam
thanks, will see prtconf -d 1Gbit LAN card, it is Tp-link TG-3468
-
nikolam
ver 4.0
-
nikolam
I have read RTL8168H from the chip
-
nikolam
danmcd, I mean dladm show-phys displays only integrated intel admin interface card, not the RTL card anymore
-
danmcd
Realtek... interesting indeed. I wonder what the PCIe ID is? Did it get nuked by accident?!
-
nikolam
Aha, maybe I am stupid and didn't change MAC address in /usbkey/config ...
-
danmcd
That might do it?!
-
nikolam
but yeah, could not without fnding MAC with dladm..
-
nikolam
usually it is there in dladm show-phys..
-
nikolam
I see it in prtconf -v as : pci10ec,8168 (pciex10ec,8161) [Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller] (driver not attached)
-
nikolam
Will find out if bringing back older PI helps determine if it is about that.
-
tsoome_