Skip to content
This repository has been archived by the owner on Jan 4, 2021. It is now read-only.

(#557) export connector and protocol security via choria_util #558

Merged
merged 1 commit into from
Dec 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/mcollective/agent/choria_util.ddl
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,18 @@ action "info", :description => "Choria related information from the running Daem
:description => "Security Provider plugin",
:display_as => "Security Provider"

output :secure_protocol,
:description => "If the protocol is running with PKI security enabled",
:display_as => "Protocol Secure"

output :connector,
:description => "Connector plugin",
:display_as => "Connector"

output :connector_tls,
:description => "If the connector is running with TLS security enabled",
:display_as => "Connector TLS"

output :path,
:description => "Active OS PATH",
:display_as => "Path"
Expand Down Expand Up @@ -72,5 +80,7 @@ action "info", :description => "Choria related information from the running Daem
aggregate summary(:connected_server)
aggregate summary(:srv_domain)
aggregate summary(:using_srv)
aggregate summary(:secure_protocol)
aggregate summary(:connector_tls)
end
end
2 changes: 2 additions & 0 deletions lib/mcollective/agent/choria_util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class Choria_util < RPC::Agent
reply[:middleware_servers] = choria.middleware_servers.map {|s| s.join(":")}
reply[:path] = ENV.fetch("PATH", "")
reply[:choria_version] = "mcollective plugin %s" % Util::Choria::VERSION
reply[:secure_protocol] = !$choria_unsafe_disable_protocol_security # rubocop:disable Style/GlobalVars
reply[:connector_tls] = !$choria_unsafe_disable_nats_tls # rubocop:disable Style/GlobalVars

if connector.connected?
reply[:connected_server] = "%s://%s:%s" % [connector.connected_server.scheme, connector.connected_server.host, connector.connected_server.port]
Expand Down