Skip to content

Commit

Permalink
Allow to use LDAP authentication type for Cerebro
Browse files Browse the repository at this point in the history
Fixes #102
  • Loading branch information
Infra-Red committed May 6, 2018
1 parent b955758 commit 9150dae
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
8 changes: 8 additions & 0 deletions jobs/cerebro/spec
Expand Up @@ -32,3 +32,11 @@ properties:
default: cerebro
cerebro.password:
description: "Password for HTTP basic auth."
cerebro.ldap.enabled:
description: "Set to true to enable LDAP authentication."
default: false
cerebro.ldap.options:
description: "Config options for LDAP authentication type."
example: |
method: simple
url: ldap://host:port
11 changes: 11 additions & 0 deletions jobs/cerebro/templates/config/application.conf.erb
Expand Up @@ -38,3 +38,14 @@ auth = {
}
}
<% end %>
<% if p('cerebro.ldap.enabled') %>
auth = {
type: ldap
settings: {
<% p('cerebro.ldap.options').to_a.each do | k, v | %>
<%= k %> = "<%= v %>"
<% end %>
}
}
<% end %>

0 comments on commit 9150dae

Please sign in to comment.