Skip to content

Instantly share code, notes, and snippets.

View andreaso's full-sized avatar

Andreas Olsson andreaso

View GitHub Profile
data "vault_policy_document" "gha_test" {
rule {
path = "${vault_mount.secrets.path}/data/test/oidc"
capabilities = ["read"]
}
}
resource "vault_policy" "gha_test" {
name = "gha-test-read"
policy = data.vault_policy_document.gha_test.hcl
@andreaso
andreaso / listen-on-totp-range.network
Created May 22, 2021 06:45
Not-entirely-serious SSH TOTP implementation, inspired by https://twitter.com/kistel/status/1395375108315824130.
# /etc/systemd/network/listen-on-totp-range.network
[Match]
Name = lo
[Route]
Destination = 2001:db8:67c1:22::/64
Type = local
[Unit]
Description=Proper folding at home service unit
After=network.target
[Service]
Type=simple
User=fahclient
WorkingDirectory=/var/lib/fahclient
ExecStart=/usr/bin/FAHClient /etc/fahclient/config.xml
NoNewPrivileges=yes