configpolicy/group_vars
Dustin 4b8b5fa90b pyrocufflink: Enable pam_ssh_agent_auth for sudo
By default, `sudo` requires users to authenticate with their passwords
before granting them elevated privileges.  It can be configured to
allow (some) users access to (some) privileged commands without
prompting for a password (i.e. `NOPASSWD`), however this has a real
security implication.  Disabling the password requirement would
effectively grant *any* program root privileges.  Prompting for a
password prevents malicious software from running privileged commands
without the user knowing.

Unfortunately, handling `sudo` authentication for Ansible is quite
cumbersome.  For interactive use, the `--ask-become-pass`/`-K` argument
is useful, though entering the password for each invocation of
`ansible-playbook` while iterating on configuration policy development
is a bit tedious.  For non-interactive use, though, the password of
course needs to be stored somewhere.  Encrypting it with Ansible Vault
is one way to protect it, but it still ends up stored on disk somewhere
and needs to be handled carefully.

*pam_ssh_agent_auth* provides an acceptable solution to both issues.  It
is better than disabling `sudo` authentication entirely, but a lot more
convenient than dealing with passwords.  It uses the calling user's SSH
agent to assert that the user has access to a private key corresponding
to one of the authorized public keys.  Using SSH agent forwarding, that
private key can even exist on a remote machine.  If the user does not
have a corresponding private key, `sudo` will fall back to normal
password-based authentication.

The security of this solution is highly dependent on the client to store
keys appropriately.  FIDO2 keys are supported, though when used with
Ansible, it is quite annoying to have to touch the token for _every
task_ on _every machine_.  Thus, I have created new FIDO2 keys for both
my laptop and my desktop that have the `no-touch-required` option
enabled.  This means that in order to use `sudo` remotely, I still need
to have my token plugged in to my computer, but I do not have to tap it
every time it's used.

For Jenkins, a hardware token is obviously impossible, but using a
dedicated key stored as a Jenkins credential is probably sufficient.
2024-01-28 12:16:35 -06:00
..
dch-gw Move dch_networks definition to all group 2018-10-13 12:43:35 -05:00
frigate frigate: Configure journal2ntfy for MD RAID 2023-06-08 10:05:36 -05:00
grafana grafana: Update LDAP server host name 2023-04-12 14:07:51 -05:00
metricspi metricspi: alerts: Increase Frigate disk threshold 2023-10-15 09:52:12 -05:00
nut nut: Add playbook for NUT 2021-10-31 14:28:27 -05:00
public-web r/web/hlc: Add formsubmit config for summer signup 2024-01-23 22:04:29 -06:00
pxe r/netboot/jenkins-agent: Configure NBD exports 2022-08-15 17:14:06 -05:00
pyrocufflink pyrocufflink: Enable pam_ssh_agent_auth for sudo 2024-01-28 12:16:35 -06:00
pyrocufflink-dns pyrocufflink-dns: Remove dc0 forwarder 2021-12-18 16:44:48 -06:00
synapse synapse: Back up data using BURP 2023-05-23 09:52:50 -05:00
unifi unifi: Deploy unifi_exporter 2024-01-21 16:12:29 -06:00
Fedora37.yml Fedora37: Set collectd SELinux domain permissive 2022-12-19 10:22:00 -06:00
all.yml r/ssh-host-certs: Manage SSH host certificates 2023-11-07 21:27:02 -06:00
aria2.yml aria2: Deploy aria2 download manager 2018-08-19 14:17:48 -05:00
bitwarden_rs.yml vaultwarden: Change Domain URL 2023-03-03 11:17:07 -06:00
burp-client.yml hosts: Add burp1.p.b 2020-01-25 13:57:04 -06:00
burp-server.yml burp-server: Keep more backups 2023-07-17 16:36:37 -05:00
collectd.yml Switch Prometheus/collectd to pull 2021-10-30 16:41:17 -05:00
dch-vpn.yml dch-vpn: Avoid configuring firewalld 2018-10-13 12:19:25 -05:00
file-servers.yml file-servers: Set Apache ServerName 2023-12-29 10:46:13 -06:00
gitea.yml gitea: Back up with BURP 2023-04-12 14:07:51 -05:00
home-assistant.yml home-assistant: Back up Zigbee/ZWave/Mosquitto 2022-12-23 06:56:52 -06:00
jenkins-slave.yml jenkins-slave: Allow Jenkins to connect to Docker 2019-09-19 19:50:35 -05:00
k8s-controller.yml hosts: Add Kubernetes machines 2022-08-03 20:52:01 -05:00
k8s-node.yml hosts: Add Kubernetes machines 2022-08-03 20:52:01 -05:00
koji-hub.yml hosts: Add koji0.pyrocufflink.blue 2018-08-12 10:27:20 -05:00
koji.yml hosts: Add koji0.pyrocufflink.blue 2018-08-12 10:27:20 -05:00
kubelet.yml r/collectd: Ignore filesystems by path 2022-08-05 18:56:48 -05:00
nextcloud.yml nextcloud: Trust headers from public rev proxy 2021-12-20 22:20:09 -06:00
nut-monitor.yml nut-monitor: Require both UPS to be online 2024-01-25 21:22:04 -06:00
prometheus.yml Switch Prometheus/collectd to pull 2021-10-30 16:41:17 -05:00
pyrocufflink-dhcp.yml pyrocufflink-dhcp: DHCP reservations for VM hosts 2021-02-17 20:33:41 -06:00
radius.yml Move APs to Management network 2018-07-15 09:19:39 -05:00
repohost.yml r/repohost: Configure Yum package repo host 2023-11-07 20:51:10 -06:00
samba-dc.yml samba-dc: Omit tls cafile setting 2023-05-10 08:28:49 -05:00
smtp-relay.yml smtp-relay: Switch to Fastmail 2023-10-24 17:27:21 -05:00
taiga.yml taiga: Add playbook for Taiga 2019-09-19 19:51:45 -05:00
vm-hosts.yml vm-hosts: Increase VM start delay after K8s 2024-01-22 08:35:40 -06:00
zabbix-server.yml zabbix-server: Allow SMTP relay from any loopback 2019-04-15 10:05:04 -05:00
zabbix.yml hosts: Add hosts to zabbix group 2018-04-14 15:47:49 -05:00