vaultkit 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/vkit/cli/commands/request_command.rb +17 -3
- data/lib/vkit/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: c1d59f182a1b48be74a0e73fd35c23c7e32c8d453acc810c359c9d20ebe1570e
|
|
4
|
+
data.tar.gz: 466d3f664c8eb9104db19536d4c2c372fb456c2b01e9e080c9120f50087bdc7e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 32dbb26e53c3b110b15ea4d92e75a7fc871b39647fb4c5f7b8d6c7e2832647b34dce8c1f1a0e2156ce73d9bd7af625150ddd48db588665e81e7e11bcb8afeb96
|
|
7
|
+
data.tar.gz: 7c30f17e8e4af03dd89464dff02c1aa861006a870883c026fac492be82f3728b41d682dbce33e0764fa70e0cb5a1bbbd4747f147406c68094a8dabde415f2243
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
require "json"
|
|
4
4
|
require "time"
|
|
5
5
|
require_relative "../../core/table_formatter"
|
|
6
|
+
require_relative "approval_roles"
|
|
6
7
|
|
|
7
8
|
module Vkit
|
|
8
9
|
module CLI
|
|
@@ -42,6 +43,18 @@ module Vkit
|
|
|
42
43
|
|
|
43
44
|
private
|
|
44
45
|
|
|
46
|
+
def print_queued(result)
|
|
47
|
+
puts "⏳ QUEUED for approval"
|
|
48
|
+
puts "Request ID: #{result["request_id"]}"
|
|
49
|
+
|
|
50
|
+
roles = ApprovalRoles.required_roles(result)
|
|
51
|
+
puts "Approver roles: #{roles.join(', ')}" if roles.any?
|
|
52
|
+
puts "Reason: #{result["reason"]}" if result["reason"].to_s.strip != ""
|
|
53
|
+
|
|
54
|
+
puts
|
|
55
|
+
puts "Once it's approved, run the same request again to get the data."
|
|
56
|
+
end
|
|
57
|
+
|
|
45
58
|
def handle_result(result, options)
|
|
46
59
|
status = result["status"]
|
|
47
60
|
|
|
@@ -56,9 +69,10 @@ module Vkit
|
|
|
56
69
|
puts "Reason: #{result["reason"]}"
|
|
57
70
|
exit 2
|
|
58
71
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
72
|
+
# The control plane answers "pending_approval"; "queued" is what
|
|
73
|
+
# older control planes sent.
|
|
74
|
+
when "pending_approval", "queued"
|
|
75
|
+
print_queued(result)
|
|
62
76
|
exit 0
|
|
63
77
|
|
|
64
78
|
when "granted"
|
data/lib/vkit/version.rb
CHANGED