Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for configuring sensu-enterprise-dashboard audit logging #482

Merged
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
14 changes: 14 additions & 0 deletions lib/puppet/provider/sensu_enterprise_dashboard_config/json.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,20 @@ def ssl
conf['dashboard']['ssl']
end

# Public: Set the audit config
#
# Returns nothing.
def audit=(value)
conf['dashboard']['audit'] = value
end

# Public: Get the Dashboard audit config
#
# Returns the audit config
def audit
conf['dashboard']['audit']
end

# Public: Retrieve the Github config
#
# Returns the Github auth config
Expand Down
10 changes: 10 additions & 0 deletions lib/puppet/type/sensu_enterprise_dashboard_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ def initialize(*args)
end
end

newproperty(:audit) do
desc "A hash of audit attributes to enable audit logging"

validate do |value|
unless value.respond_to?(:to_hash)
raise ArgumentError, "Sensu Enterprise Dashboard audit config must be a Hash"
end
end
end

newproperty(:github) do
desc "A hash of GitHub authentication attributes to enable GitHub authentication via OAuth. Overrides simple authentication."

Expand Down
1 change: 1 addition & 0 deletions manifests/enterprise/dashboard/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
user => $::sensu::enterprise_dashboard_user,
pass => $::sensu::enterprise_dashboard_pass,
ssl => $::sensu::enterprise_dashboard_ssl,
audit => $::sensu::enterprise_dashboard_audit,
github => $::sensu::enterprise_dashboard_github,
ldap => $::sensu::enterprise_dashboard_ldap,
}
Expand Down
1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@
$enterprise_dashboard_user = undef,
$enterprise_dashboard_pass = undef,
$enterprise_dashboard_ssl = undef,
$enterprise_dashboard_audit = undef,
$enterprise_dashboard_github = undef,
$enterprise_dashboard_ldap = undef,
$path = undef,
Expand Down