Page MenuHomeDevCentral

authorized_yubikeys.sls
No OneTemporary

authorized_yubikeys.sls

# -------------------------------------------------------------
# Salt — Bastion - Yubikeys
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
{% for username, user in salt["forest.get_users"]().items() %}
{% if "yubico_keys" in user %}
/home/{{ username }}/.yubico:
file.directory:
- user: {{ username }}
- mode: 700
/home/{{ username }}/.yubico/authorized_yubikeys:
file.managed:
- user: {{ username }}
- mode: 600
- contents: {{ username + ":" + ":".join(user["yubico_keys"]) }}
{% endif %}
{% endfor %}

File Metadata

Mime Type
text/plain
Expires
Tue, Oct 6, 02:34 (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3996485
Default Alt Text
authorized_yubikeys.sls (712 B)

Event Timeline