Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3769401
D1332.id3419.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D1332.id3419.diff
View Options
diff --git a/pillar/core/users.sls b/pillar/core/users.sls
--- a/pillar/core/users.sls
+++ b/pillar/core/users.sls
@@ -80,6 +80,8 @@
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBYKQdGZ2ZWZ6IvSDlre8rRBGep/9YY8l8Z2Rdb62exK dereckson@tigraki.dereckson.drake
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHN4kIcBjQuVqwaTjH9/Y2g9zghh/zjzQH2QipMdzhRQ dereckson@xyrogh.dereckson.drake
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEVY2Oeppn//0Jm4W3ejLDe+D/+4FMFZR9rzeVrnFkPE dereckson@yakin.dereckson.drake
+ yubico_keys:
+ - ccccccbjncrt
uid: 5001
erol:
fullname: Erol Unutmaz
diff --git a/roles/bastion/init.sls b/roles/bastion/init.sls
new file mode 100644
--- /dev/null
+++ b/roles/bastion/init.sls
@@ -0,0 +1,12 @@
+# -------------------------------------------------------------
+# Salt — Bastion
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Description: This role allows to login through alternative
+# ways, like traditional keys or with an OTP.
+# Created: 2018-02-18
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+include:
+ - .yubico
diff --git a/roles/bastion/yubico/authorized_yubikeys.sls b/roles/bastion/yubico/authorized_yubikeys.sls
new file mode 100644
--- /dev/null
+++ b/roles/bastion/yubico/authorized_yubikeys.sls
@@ -0,0 +1,24 @@
+# -------------------------------------------------------------
+# Salt — Bastion - Yubikeys
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2018-02-18
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% for username, user in salt['forest.get_users']().iteritems() %}
+
+{% 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 %}
diff --git a/roles/bastion/yubico/init.sls b/roles/bastion/yubico/init.sls
new file mode 100644
--- /dev/null
+++ b/roles/bastion/yubico/init.sls
@@ -0,0 +1,12 @@
+# -------------------------------------------------------------
+# Salt — Bastion
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Description: This role allows to login through alternative
+# ways, like traditional keys or with an OTP.
+# Created: 2018-02-18
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+include:
+ - .authorized_yubikeys
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 14:30 (5 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2260376
Default Alt Text
D1332.id3419.diff (2 KB)
Attached To
Mode
D1332: Provision ~/.yubico/authorized_yubikeys files
Attached
Detach File
Event Timeline
Log In to Comment