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

Commit

Permalink
(#557) export connector and protocol security via choria_util
Browse files Browse the repository at this point in the history
  • Loading branch information
ripienaar committed Dec 19, 2018
1 parent 9f94035 commit 1fb3dc3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
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
reply[:connector_tls] = !$choria_unsafe_disable_nats_tls

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

0 comments on commit 1fb3dc3

Please sign in to comment.