safedb 0.5.1001 → 0.5.1002
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cli.rb +3 -2
- data/lib/controller/admin/login.rb +2 -2
- data/lib/controller/api/terraform/terraform.rb +12 -0
- data/lib/controller/controller.rb +0 -5
- data/lib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34b23980c41abb1e67618bd929f7ad6f5cfcb94e9ba4e544f1705de0cc6a373f
|
4
|
+
data.tar.gz: f18424a4b24e4b2e3567636965808ca50dac2f9d67162881bc10e91d6b97d368
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0e55ef10dbddd910a847133be163013318af044298b7caf430004c1da74df858e8891d4a1b578711cd0f628d91ed532d5febdf376369af535e3cb3e57424a1f
|
7
|
+
data.tar.gz: ab6db9f7ad3dbb068adb99afd533117770bb695cf1fd16a8f9030c08446679ae45004a91517e92288eef7173415617513a71427cb3410772a7aea4920adc5e09
|
data/lib/cli.rb
CHANGED
@@ -112,7 +112,7 @@ class CLI < Thor
|
|
112
112
|
# The <tt>--clip</tt> option says the password is to be read from the
|
113
113
|
# clipboard. Usually one needs to just highlight the text without
|
114
114
|
# actually copying it with the mouse or Ctrl-c
|
115
|
-
|
115
|
+
method_option :clip, :type => :boolean, :aliases => "-c"
|
116
116
|
|
117
117
|
# Login in order to securely interact with your safe credentials.
|
118
118
|
# @param book_name [String] the name of the credentials book to login to
|
@@ -121,7 +121,8 @@ class CLI < Thor
|
|
121
121
|
login_uc = SafeDb::Login.new
|
122
122
|
login_uc.book_name = book_name unless book_name.nil?
|
123
123
|
login_uc.password = options[ :password ] if options[ :password ]
|
124
|
-
|
124
|
+
login_uc.clip = true if options[ :clip ]
|
125
|
+
login_uc.clip = false unless options[ :clip ]
|
125
126
|
login_uc.flow()
|
126
127
|
end
|
127
128
|
|
@@ -49,8 +49,8 @@ module SafeDb
|
|
49
49
|
|
50
50
|
# @todo => search for password in environment variable
|
51
51
|
|
52
|
-
|
53
|
-
book_password = KeyPass.password_from_shell( false ) if( @password.nil?() &&
|
52
|
+
book_password = Clipboard.read_password() if @clip
|
53
|
+
book_password = KeyPass.password_from_shell( false ) if( @password.nil?() && !@clip )
|
54
54
|
book_password = @password unless @password.nil?()
|
55
55
|
|
56
56
|
# @todo => if password is correct - if not print out an error.
|
@@ -22,6 +22,18 @@ module SafeDb
|
|
22
22
|
# and convert for consumption into module input variables.
|
23
23
|
TERRAFORM_EVAR_PREFIX = "TF_VAR_"
|
24
24
|
|
25
|
+
# Prefix for environment variable key (line). Before safe runs the
|
26
|
+
# <tt>terraform apply</tt> command, it examines the lines at the opened
|
27
|
+
# chapter and verse and any that start with this prefix will be substringed
|
28
|
+
# to create an environment variable with the substringed name and key value.
|
29
|
+
ENV_VAR_PREFIX_A = "env-var."
|
30
|
+
|
31
|
+
# Secure var prefix for environment variable key (line). Before safe runs the
|
32
|
+
# <tt>terraform apply</tt> command, it examines the lines at the opened
|
33
|
+
# chapter and verse and any that start with this prefix will be substringed
|
34
|
+
# to create an environment variable with the substringed name and key value.
|
35
|
+
ENV_VAR_PREFIX_B = "@env-var."
|
36
|
+
|
25
37
|
def query_verse()
|
26
38
|
|
27
39
|
# ############## | ############################################################
|
@@ -176,13 +176,8 @@ module SafeDb
|
|
176
176
|
private
|
177
177
|
|
178
178
|
|
179
|
-
ENV_VAR_PREFIX_A = "evar."
|
180
|
-
ENV_VAR_PREFIX_B = "@evar."
|
181
179
|
COMMANDMENT = "safe"
|
182
180
|
ENV_VAR_KEY_NAME = "SAFE_TTY_TOKEN"
|
183
|
-
ENV_PATH = "env.path"
|
184
|
-
KEY_PATH = "key.path"
|
185
|
-
ENVELOPE_KEY_PREFIX = "envelope@"
|
186
181
|
|
187
182
|
|
188
183
|
# --> def add_secret_facts fact_db
|
data/lib/version.rb
CHANGED