Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F55092698
D2887.id7363.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D2887.id7363.diff
View Options
diff --git a/roles/devserver/userland-software/dev.sls b/roles/devserver/userland-software/dev.sls
--- a/roles/devserver/userland-software/dev.sls
+++ b/roles/devserver/userland-software/dev.sls
@@ -221,6 +221,15 @@
- pkgs:
- git-review
+# -------------------------------------------------------------
+# Nasqueron development and operations
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{{ dirs.bin }}/create-vault-approle:
+ file.managed:
+ - source: salt://roles/devserver/userland-software/files/create-vault-approle.py
+ - mode: 755
+
# -------------------------------------------------------------
# MediaWiki development
#
diff --git a/roles/devserver/userland-software/files/create-vault-approle.sh b/roles/devserver/userland-software/files/create-vault-approle.sh
new file mode 100755
--- /dev/null
+++ b/roles/devserver/userland-software/files/create-vault-approle.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+VAULT_POLICY=$1
+
+vault write "auth/approle/role/$VAULT_POLICY" token_policies="$VAULT_POLICY" \
+ token_ttl=1h token_max_ttl=4h
+
+vault read "auth/approle/role/$VAULT_POLICY/role-id"
+vault write -force "auth/approle/role/$VAULT_POLICY/secret-id"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Oct 27, 15:53 (21 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4223247
Default Alt Text
D2887.id7363.diff (1 KB)
Attached To
Mode
D2887: Allow to create new approle for Vault
Attached
Detach File
Event Timeline
Log In to Comment