choria-mcorpc-support 2.25.1 → 2.26.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mcollective/agent/aaa_signer.ddl +41 -0
- data/lib/mcollective/agent/aaa_signer.json +46 -0
- data/lib/mcollective/agent/choria_provision.ddl +15 -1
- data/lib/mcollective/agent/choria_provision.json +15 -1
- data/lib/mcollective/agent/choria_registry.ddl +1 -1
- data/lib/mcollective/agent/choria_registry.json +1 -1
- data/lib/mcollective/agent/choria_util.ddl +1 -1
- data/lib/mcollective/agent/choria_util.json +1 -1
- data/lib/mcollective/agent/rpcutil.ddl +1 -1
- data/lib/mcollective/agent/rpcutil.json +1 -1
- data/lib/mcollective/agent/scout.ddl +4 -4
- data/lib/mcollective/agent/scout.json +1 -1
- data/lib/mcollective/discovery/delegate.rb +3 -1
- data/lib/mcollective/rpc/client.rb +1 -0
- data/lib/mcollective/util/bolt_support/task_result.rb +7 -0
- data/lib/mcollective/validator/typecheck_validator.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4edceb07e1b046286da6d475f5bea4391a6851b8e49e82af7373a151b476755a
|
4
|
+
data.tar.gz: 37e7c6e320f2742a9dd2722ad2531dd710745880ad09926f15d554ebe3fefb88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11c2d30b7266823e70ed2d865d453c4f43ce5f0dc326bd7a963774240ccda4151d863f22ae327ec2f5e073df92cdf50af1b888c7a799e1967000ce497ff00bfc
|
7
|
+
data.tar.gz: 5ca64410539e9f6b984c084b20e13f1d049e23e2677c533fa2a1b0c7c7966c2df340d6918a35a8b45013785a32ef66cc777c5237adfb382213232c2c1c20c02e
|
@@ -0,0 +1,41 @@
|
|
1
|
+
metadata :name => "aaa_signer",
|
2
|
+
:description => "Request Signer for Choria AAA Service",
|
3
|
+
:author => "R.I.Pienaar <rip@devco.net>",
|
4
|
+
:license => "Apache-2.0",
|
5
|
+
:version => "0.24.0",
|
6
|
+
:url => "https://github.com/choria-io/aaasvc",
|
7
|
+
:provider => "golang",
|
8
|
+
:service => true,
|
9
|
+
:timeout => 10
|
10
|
+
|
11
|
+
|
12
|
+
action "sign", :description => "Signs a RPC Request on behalf of a user" do
|
13
|
+
display :always
|
14
|
+
|
15
|
+
input :request,
|
16
|
+
:prompt => "RPC Request",
|
17
|
+
:description => "The request to sign",
|
18
|
+
:type => :string,
|
19
|
+
:validation => :shellsafe,
|
20
|
+
:maxlength => 100240,
|
21
|
+
:optional => false
|
22
|
+
|
23
|
+
|
24
|
+
input :token,
|
25
|
+
:prompt => "JWT Token",
|
26
|
+
:description => "The JWT token authenticating the user",
|
27
|
+
:type => :string,
|
28
|
+
:validation => '.',
|
29
|
+
:maxlength => 10024,
|
30
|
+
:optional => false
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
output :secure_request,
|
36
|
+
:description => "The signed Secure Request",
|
37
|
+
:type => "string",
|
38
|
+
:display_as => "Secure Request"
|
39
|
+
|
40
|
+
end
|
41
|
+
|
@@ -0,0 +1,46 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "https://choria.io/schemas/mcorpc/ddl/v1/agent.json",
|
3
|
+
"metadata": {
|
4
|
+
"license": "Apache-2.0",
|
5
|
+
"author": "R.I.Pienaar \u003crip@devco.net\u003e",
|
6
|
+
"timeout": 10,
|
7
|
+
"name": "aaa_signer",
|
8
|
+
"version": "0.24.0",
|
9
|
+
"url": "https://github.com/choria-io/aaasvc",
|
10
|
+
"description": "Request Signer for Choria AAA Service",
|
11
|
+
"provider": "golang",
|
12
|
+
"service": true
|
13
|
+
},
|
14
|
+
"actions": [
|
15
|
+
{
|
16
|
+
"action": "sign",
|
17
|
+
"input": {
|
18
|
+
"request": {
|
19
|
+
"prompt": "RPC Request",
|
20
|
+
"description": "The request to sign",
|
21
|
+
"type": "string",
|
22
|
+
"optional": false,
|
23
|
+
"validation": "shellsafe",
|
24
|
+
"maxlength": 100240
|
25
|
+
},
|
26
|
+
"token": {
|
27
|
+
"prompt": "JWT Token",
|
28
|
+
"description": "The JWT token authenticating the user",
|
29
|
+
"type": "string",
|
30
|
+
"optional": false,
|
31
|
+
"validation": ".",
|
32
|
+
"maxlength": 10024
|
33
|
+
}
|
34
|
+
},
|
35
|
+
"output": {
|
36
|
+
"secure_request": {
|
37
|
+
"description": "The signed Secure Request",
|
38
|
+
"display_as": "Secure Request",
|
39
|
+
"type": "string"
|
40
|
+
}
|
41
|
+
},
|
42
|
+
"display": "always",
|
43
|
+
"description": "Signs a RPC Request on behalf of a user"
|
44
|
+
}
|
45
|
+
]
|
46
|
+
}
|
@@ -2,7 +2,7 @@ metadata :name => "choria_provision",
|
|
2
2
|
:description => "Choria Provisioner",
|
3
3
|
:author => "R.I.Pienaar <rip@devco.net>",
|
4
4
|
:license => "Apache-2.0",
|
5
|
-
:version => "0.
|
5
|
+
:version => "0.24.0",
|
6
6
|
:url => "https://choria.io",
|
7
7
|
:timeout => 20
|
8
8
|
|
@@ -10,6 +10,13 @@ metadata :name => "choria_provision",
|
|
10
10
|
action "configure", :description => "Configure the Choria Server" do
|
11
11
|
display :failed
|
12
12
|
|
13
|
+
input :action_policies,
|
14
|
+
:prompt => "Action Policy Documents",
|
15
|
+
:description => "Map of Action Policy documents indexed by file name",
|
16
|
+
:type => :hash,
|
17
|
+
:optional => true
|
18
|
+
|
19
|
+
|
13
20
|
input :ca,
|
14
21
|
:prompt => "CA Bundle",
|
15
22
|
:description => "PEM text block for the CA",
|
@@ -55,6 +62,13 @@ action "configure", :description => "Configure the Choria Server" do
|
|
55
62
|
:optional => true
|
56
63
|
|
57
64
|
|
65
|
+
input :opa_policies,
|
66
|
+
:prompt => "Open Policy Agent Policy Documents",
|
67
|
+
:description => "Map of Open Policy Agent Policy documents indexed by file name",
|
68
|
+
:type => :hash,
|
69
|
+
:optional => true
|
70
|
+
|
71
|
+
|
58
72
|
input :ssldir,
|
59
73
|
:prompt => "SSL Dir",
|
60
74
|
:description => "Directory for storing the certificate in",
|
@@ -5,7 +5,7 @@
|
|
5
5
|
"description": "Choria Provisioner",
|
6
6
|
"author": "R.I.Pienaar <rip@devco.net>",
|
7
7
|
"license": "Apache-2.0",
|
8
|
-
"version": "0.
|
8
|
+
"version": "0.24.0",
|
9
9
|
"url": "https://choria.io",
|
10
10
|
"timeout": 20
|
11
11
|
},
|
@@ -74,6 +74,20 @@
|
|
74
74
|
"optional": true,
|
75
75
|
"maxlength": 64,
|
76
76
|
"validation": "."
|
77
|
+
},
|
78
|
+
"action_policies": {
|
79
|
+
"prompt": "Action Policy Documents",
|
80
|
+
"description": "Map of Action Policy documents indexed by file name",
|
81
|
+
"type": "hash",
|
82
|
+
"default": {},
|
83
|
+
"optional": true
|
84
|
+
},
|
85
|
+
"opa_policies": {
|
86
|
+
"prompt": "Open Policy Agent Policy Documents",
|
87
|
+
"description": "Map of Open Policy Agent Policy documents indexed by file name",
|
88
|
+
"type": "hash",
|
89
|
+
"default": {},
|
90
|
+
"optional": true
|
77
91
|
}
|
78
92
|
|
79
93
|
},
|
@@ -2,7 +2,7 @@ metadata :name => "choria_registry",
|
|
2
2
|
:description => "Choria Registry Service",
|
3
3
|
:author => "rip@devco.net <rip@devco.net>",
|
4
4
|
:license => "Apache-2.0",
|
5
|
-
:version => "0.
|
5
|
+
:version => "0.24.0",
|
6
6
|
:url => "https://choria.io",
|
7
7
|
:provider => "golang",
|
8
8
|
:service => true,
|
@@ -2,7 +2,7 @@ metadata :name => "rpcutil",
|
|
2
2
|
:description => "Utility actions that expose information about the state of the running Server",
|
3
3
|
:author => "R.I.Pienaar <rip@devco.net>",
|
4
4
|
:license => "Apache-2.0",
|
5
|
-
:version => "0.
|
5
|
+
:version => "0.24.0",
|
6
6
|
:url => "https://choria.io/",
|
7
7
|
:timeout => 2
|
8
8
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
"description": "Utility actions that expose information about the state of the running Server",
|
6
6
|
"author": "R.I.Pienaar <rip@devco.net>",
|
7
7
|
"license": "Apache-2.0",
|
8
|
-
"version": "0.
|
8
|
+
"version": "0.24.0",
|
9
9
|
"url": "https://choria.io/",
|
10
10
|
"timeout": 2
|
11
11
|
},
|
@@ -2,7 +2,7 @@ metadata :name => "scout",
|
|
2
2
|
:description => "Choria Scout Agent Management API",
|
3
3
|
:author => "R.I.Pienaar <rip@devco.net>",
|
4
4
|
:license => "Apache-2.0",
|
5
|
-
:version => "0.
|
5
|
+
:version => "0.24.0",
|
6
6
|
:url => "https://choria.io",
|
7
7
|
:provider => "golang",
|
8
8
|
:timeout => 5
|
@@ -132,9 +132,9 @@ action "goss_validate", :description => "Performs a Goss validation using a spec
|
|
132
132
|
:display_as => "Tests"
|
133
133
|
|
134
134
|
summarize do
|
135
|
-
aggregate summary(:tests, :format => "%s
|
136
|
-
aggregate summary(:failures, :format => "%s Failed
|
137
|
-
aggregate summary(:success, :format => "%s Passed
|
135
|
+
aggregate summary(:tests, :format => "%s Tests on %d node(s)")
|
136
|
+
aggregate summary(:failures, :format => "%s Failed test on %d node(s)")
|
137
|
+
aggregate summary(:success, :format => "%s Passed tests on %d node(s)")
|
138
138
|
end
|
139
139
|
end
|
140
140
|
|
@@ -56,10 +56,12 @@ module MCollective
|
|
56
56
|
|
57
57
|
begin
|
58
58
|
Timeout.timeout(timeout + 0.5) do
|
59
|
-
|
59
|
+
out = stdout.read
|
60
60
|
status = wait_thr.value
|
61
61
|
|
62
62
|
raise("Choria discovery failed: %s" % stderr.read) unless status.exitstatus == 0
|
63
|
+
|
64
|
+
nodes.concat(JSON.parse(out))
|
63
65
|
end
|
64
66
|
rescue Timeout::Error
|
65
67
|
Log.warn("Timeout waiting for Choria to perform discovery")
|
@@ -81,6 +81,13 @@ module MCollective
|
|
81
81
|
@result["value"]
|
82
82
|
end
|
83
83
|
|
84
|
+
# Access the value returned by a Bolt task
|
85
|
+
#
|
86
|
+
# @return [Object] The value returned by the bolt task
|
87
|
+
def bolt_task_result
|
88
|
+
@bolt_task_result ||= JSON.parse(@result["value"]["data"]["stdout"])
|
89
|
+
end
|
90
|
+
|
84
91
|
def to_s
|
85
92
|
if Object.const_defined?(:Puppet)
|
86
93
|
Puppet::Pops::Types::StringConverter.convert(self, "%p")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: choria-mcorpc-support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.26.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- R.I.Pienaar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: systemu
|
@@ -60,6 +60,8 @@ files:
|
|
60
60
|
- bin/mco
|
61
61
|
- lib/mcollective.rb
|
62
62
|
- lib/mcollective/agent.rb
|
63
|
+
- lib/mcollective/agent/aaa_signer.ddl
|
64
|
+
- lib/mcollective/agent/aaa_signer.json
|
63
65
|
- lib/mcollective/agent/bolt_tasks.ddl
|
64
66
|
- lib/mcollective/agent/bolt_tasks.json
|
65
67
|
- lib/mcollective/agent/bolt_tasks.rb
|