Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #17 from docker/fixsecrets
fix for LDAP binding
pcaskey committed Nov 9, 2017
2 parents fbe6b40 + c4f125a commit 829b882
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions configBuilder.sh
@@ -489,14 +489,19 @@ LDAP_PROP=${SHBCFG}/ldap.properties
if test \! -f ${LDAP_PROP}.dist; then
cp ${LDAP_PROP} ${LDAP_PROP}.dist
fi
sed "s#ldap://localhost:10389#${LDAPURL}#" ${LDAP_PROP}.dist > ${LDAP_PROP}.tmp
sed "s#uid=myservice,ou=system#${LDAPDN}#" ${LDAP_PROP}.tmp > ${LDAP_PROP}.tmp2
sed "s#myServicePassword#${LDAPPWD}#" ${LDAP_PROP}.tmp2 > ${LDAP_PROP}.tmp3
sed "s#ou=people,dc=example,dc=org#${LDAPBASEDN}#" ${LDAP_PROP}.tmp3 > ${LDAP_PROP}

sed "s/#idp.authn.LDAP.authenticator/idp.authn.LDAP.authenticator/" ${LDAP_PROP}.dist > ${LDAP_PROP}.tmp
sed "s/= anonSearchAuthenticator/= bindSearchAuthenticator/" ${LDAP_PROP}.tmp > ${LDAP_PROP}.tmp2
sed "s#ldap://localhost:10389#${LDAPURL}#" ${LDAP_PROP}.tmp2 > ${LDAP_PROP}.tmp3
sed "s#uid=myservice,ou=system#${LDAPDN}#" ${LDAP_PROP}.tmp3 > ${LDAP_PROP}.tmp4
sed "s#myServicePassword#${LDAPPWD}#" ${LDAP_PROP}.tmp4 > ${LDAP_PROP}.tmp5
sed "s#ou=people,dc=example,dc=org#${LDAPBASEDN}#" ${LDAP_PROP}.tmp5 > ${LDAP_PROP}

rm -f ${LDAP_PROP}.tmp
rm -f ${LDAP_PROP}.tmp2
rm -f ${LDAP_PROP}.tmp3
rm -f ${LDAP_PROP}.tmp4
rm -f ${LDAP_PROP}.tmp5

# adjust Dockerfile for java and for a burned-in config, if needed
#

0 comments on commit 829b882

Please sign in to comment.