Skip to content

Adds configuration helper to setup yubikey for ssh and gpg#71

Merged
rolandboon merged 2 commits intomainfrom
feature/yubikey-ssh-gpg
Feb 26, 2026
Merged

Adds configuration helper to setup yubikey for ssh and gpg#71
rolandboon merged 2 commits intomainfrom
feature/yubikey-ssh-gpg

Conversation

@rolandboon
Copy link
Member

@rolandboon rolandboon commented Feb 16, 2026

Vrijwel volledig gebaseerd op dit werk: https://drduh.github.io/YubiKey-Guide/

Alleen voor "unattended" overdracht van de keys naar device moest ik een beetje creatief aan de slag. De default pinentry opties kreeg ik op geen enkele manier non-interactive werkend. Daarom stellen we dan tijdelijk tijdens de configuratie een eigen pinentry script in (https://github.com/10KB/manjikaze/blob/feature/yubikey-ssh-gpg/app/security/yubikey/yubikey-setup-gpg.sh#L281). Die werkt heel betrouwbaar non-interactive 😄

Documentatie van wat hier allemaal gebeurd heb ik ook toegevoegd: https://github.com/10KB/manjikaze/blob/feature/yubikey-ssh-gpg/docs/security/yubikey-gpg-ssh.md

Ben benieuwd of die GUI pinentry ook redelijk werkt op Hyprland. Heb me laten vertellen dat pinentry-gtk visueel iets beter zou moeten passen dan pinentry-gnome3 (wat ook een gtk gui is), dus daar default ik alle niet-gnome desktop envs naar.

@rolandboon rolandboon requested a review from olafsl February 16, 2026 13:36
@rolandboon rolandboon force-pushed the feature/yubikey-ssh-gpg branch 2 times, most recently from 5d86dcd to 6256d7a Compare February 16, 2026 14:07
@rolandboon rolandboon force-pushed the feature/yubikey-ssh-gpg branch from 6256d7a to 4d13b5b Compare February 16, 2026 14:22
@rolandboon
Copy link
Member Author

Heb het script uitgebreid met het signen van de developer key met een 10KB root CA. Dan kunnen we in de toekomst deze root CA ook gebruiken als ultimate trust voor het verifieren van manjikaze commits voor updates.

Copy link
Contributor

@olafsl olafsl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ik vind het erg lastig om te reviewen, want het is echt te veel bash om goed overzicht te krijgen en alles te checken op wat er gebeurt.

Zoals eerder al besproken: Ik zou aanpassen zodat de pin ergens op de computer van de gebruiker in een bestand moet staan. Ik denk dat de daadwerkelijke pincode moeten invullen bijzonder onpraktisch is en weinig toevoegt. Als het niet een technische requirement was geweest zou ik nooit hebben gedacht "wat dit nodig heeft is pin-verificatie", dus lijkt me de pin random genereren en ergens opslaan op je computer het meest handig.

Comment on lines +125 to +126
if [[ "$t_sig" == "On" && "$t_aut" == "On" && "$t_dec" == "On" ]]; then
check_pass "Touch: sig=on aut=on dec=on"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was de policy niet cached ipv on?

Comment on lines +18 to +21
⚠ For maximum security, keys should be generated on an
air-gapped system. This script trades some security for
convenience by generating on your daily machine." \
--affirmative "Yes" --negative "No" --default=false && echo "true" || echo "false")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is dit echt nodig? :p

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


# Download the CA key via Bitwarden Send
status "Downloading CA key from Bitwarden Send..."
local receive_cmd="bw send receive \"$send_url\" --output \"$ca_private_key\""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ik geloof niet dat je helemaal op het begin hebt gecheckt of iemand zn bitwarden op de goeie manier opgezet heeft. Werkt dit altijd? Moet je hiervoor ingelogd zijn, of werkt dit voor iemand anders ook? Als het account-gebonden is maar wel de bitwarden CLI vereist moet misschien vooraf gevraagd worden of dat goed ingesteld staat.

Copy link
Member Author

@rolandboon rolandboon Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

De CLI is als het goed is geinstalleerd: https://github.com/10KB/manjikaze/blob/main/app/installations/essential/bitwarden-cli.sh

Om een send-link te ontvangen is verder geen configuratie nodig. Voor het backuppen van je keys wel, maar daar wordt dus gecheckt of je authenticated bent en zo niet dan gaat ie dat dan doen. Die auth-flow doorloopt gewoon een interactive username+password+totp flow.

@rolandboon rolandboon merged commit f551fd6 into main Feb 26, 2026
@rolandboon rolandboon deleted the feature/yubikey-ssh-gpg branch February 26, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants