Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3796573
D1332.id3417.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.id3417.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
+ yubi_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 'yubi_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['yubi_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
Fri, Nov 29, 06:46 (19 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2270882
Default Alt Text
D1332.id3417.diff (2 KB)
Attached To
Mode
D1332: Provision ~/.yubico/authorized_yubikeys files
Attached
Detach File
Event Timeline
Log In to Comment