Compare commits
11 Commits
initramfs-
...
luks_refr
Author | SHA1 | Date | |
---|---|---|---|
2bc0e2d64a
|
|||
5cb3982d65
|
|||
e28828cc2b
|
|||
95fb630a0b
|
|||
85e4a30420
|
|||
36dc36d454
|
|||
eed2dad08f
|
|||
e3bd32c985
|
|||
ce43cf857d
|
|||
6c2f5fc7ec
|
|||
8f47f7a556
|
33
.drone.yml
33
.drone.yml
@@ -3,27 +3,32 @@ name: default
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: fmt
|
- name: fmt
|
||||||
image: rust:1.43.0
|
image: rust:1.37.0
|
||||||
commands:
|
commands:
|
||||||
- rustup component add rustfmt
|
- rustup component add rustfmt
|
||||||
- cargo fmt --all -- --check
|
- cargo fmt --all -- --check
|
||||||
- name: test
|
- name: test
|
||||||
image: rust:1.43.0
|
image: rust:1.37.0
|
||||||
commands:
|
commands:
|
||||||
- apt update && apt install -y libkeyutils-dev libclang-dev clang pkg-config
|
- apt update && apt install -y libcryptsetup-dev libkeyutils-dev
|
||||||
- echo 'deb http://http.us.debian.org/debian unstable main non-free contrib' >> /etc/apt/sources.list.d/unstable.list && apt update && apt install -y libcryptsetup-dev
|
|
||||||
- cargo test
|
- cargo test
|
||||||
|
|
||||||
- name: publish
|
- name: build
|
||||||
image: rust:1.43.0
|
image: rust:1.37.0
|
||||||
environment:
|
|
||||||
CARGO_REGISTRY_TOKEN:
|
|
||||||
from_secret: cargo_tkn
|
|
||||||
commands:
|
commands:
|
||||||
- grep -E 'version ?= ?"${DRONE_TAG}"' -i Cargo.toml || (printf "incorrect crate/tag version" && exit 1)
|
- apt update && apt install -y libcryptsetup-dev libkeyutils-dev
|
||||||
- apt update && apt install -y libkeyutils-dev libclang-dev clang pkg-config
|
- cargo install -f --path . --root .
|
||||||
- echo 'deb http://http.us.debian.org/debian unstable main non-free contrib' >> /etc/apt/sources.list.d/unstable.list && apt update && apt install -y libcryptsetup-dev
|
|
||||||
- cargo package --all-features
|
|
||||||
- cargo publish --all-features
|
|
||||||
when:
|
when:
|
||||||
event: tag
|
event: tag
|
||||||
|
- name: publish
|
||||||
|
image: plugins/github-release
|
||||||
|
settings:
|
||||||
|
api_key:
|
||||||
|
from_secret: github_release
|
||||||
|
files:
|
||||||
|
- bin/fido2luks
|
||||||
|
checksum:
|
||||||
|
- md5
|
||||||
|
- sha256
|
||||||
|
when:
|
||||||
|
event: tag
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
This will allow you to unlock your luks encrypted disk with an fido2 compatible key
|
This will allow you to unlock your luks encrypted disk with an fido2 compatible key
|
||||||
|
|
||||||
Note: This has only been tested under Fedora 31, [Ubuntu 20.04](initramfs-tools/), [NixOS](https://nixos.org/nixos/manual/#sec-luks-file-systems-fido2) using a Solo Key, Trezor Model T
|
Note: This has only been tested under Fedora 31 using a Solo Key, Trezor Model T
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
|
@@ -1,23 +0,0 @@
|
|||||||
.PHONY: install clean
|
|
||||||
|
|
||||||
DRACUT_MODULES_D=/usr/lib/dracut/modules.d
|
|
||||||
DRACUT_CONF_D=/etc/dracut.conf.d
|
|
||||||
|
|
||||||
MODULE_CONF_D=dracut.conf.d
|
|
||||||
MODULE_CONF=luks-2fa.conf
|
|
||||||
MODULE_DIR=96luks-2fa
|
|
||||||
|
|
||||||
help:
|
|
||||||
@echo make help to show this help
|
|
||||||
@echo make install to install
|
|
||||||
@echo make clean to remove
|
|
||||||
|
|
||||||
install:
|
|
||||||
chmod +x hook/fido2luks.sh keyscript.sh
|
|
||||||
cp -f hook/fido2luks.sh /etc/initramfs-tools/hooks/
|
|
||||||
mkdir -p /usr/share/fido2luks
|
|
||||||
cp -f keyscript.sh /lib/cryptsetup/scripts/fido2luks
|
|
||||||
update-initramfs -u
|
|
||||||
remove:
|
|
||||||
rm /etc/initramfs-tools/hooks/fido2luks.sh
|
|
||||||
update-initramfs -u
|
|
@@ -1,13 +0,0 @@
|
|||||||
## Initramfs-tools based systems(Ubuntu and derivatives)
|
|
||||||
|
|
||||||
After installation generate your credentials and add keys to your disk as described in the top-level README
|
|
||||||
then add `initramfs,keyscript=fido2luks` to your `/etc/crypttab`
|
|
||||||
|
|
||||||
Example:
|
|
||||||
```
|
|
||||||
sda6_crypt UUID=9793d81a-4cfb-4712-85f3-c7a8d715112c none luks,discard,initramfs,keyscript=fido2luks
|
|
||||||
```
|
|
||||||
|
|
||||||
But don't forget to run `make install` which will install all necessary scripts and regenerate your intrid.
|
|
||||||
|
|
||||||
[Recording showing part of the setup](https://shimun.net/fido2luks/setup.svg)
|
|
@@ -1,3 +0,0 @@
|
|||||||
FIDO2LUKS_SALT=Ask
|
|
||||||
#FIDO2LUKS_PASSWORD_HELPER="/usr/bin/plymouth ask-for-password --promt 'FIDO2 password salt'"
|
|
||||||
FIDO2LUKS_CREDENTIAL_ID=
|
|
@@ -1,14 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
prereqs)
|
|
||||||
echo ""
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
|
|
||||||
esac
|
|
||||||
|
|
||||||
. /usr/share/initramfs-tools/hook-functions
|
|
||||||
copy_file config /etc/fido2luks.conf /etc/fido2luks.conf
|
|
||||||
copy_exec /usr/bin/fido2luks
|
|
||||||
exit 0
|
|
@@ -1,9 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
set -a
|
|
||||||
. /etc/fido2luks.conf
|
|
||||||
|
|
||||||
if [ -z "$FIDO2LUKS_PASSWORD_HELPER" ]; then
|
|
||||||
export FIDO2LUKS_PASSWORD_HELPER="plymouth ask-for-password --promt 'FIDO2 password salt for $CRYPTTAB_NAME'"
|
|
||||||
fi
|
|
||||||
|
|
||||||
fido2luks print-secret --bin
|
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 550 KiB |
Reference in New Issue
Block a user