Skip to content

Commit

Permalink
Merge pull request #4 from SachinKSingh28/master
Browse files Browse the repository at this point in the history
Updated wrapper script to enable xml autorization with ldap authentication
  • Loading branch information
nickdgriffin authored Sep 20, 2016
2 parents 39585cc + 9956781 commit 194ff83
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions resources/nexus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ if [ "${LDAP_ENABLED}" = true ]
echo "$(date) - Disabling default XMLauth..."
# Delete default authentication realms (XMLauth..) from Nexus if LDAP auth is enabled
# If you get locked out of nexus, restart nexus with LDAP_ENABLED=false.
sed -i "/[a-zA-Z]*Xml*[a-zA-Z]/d" ${NEXUS_HOME}/conf/security-configuration.xml
# - To allow user role mapping need to allow xml authorization
sed -i "/XmlAuthenticatingRealm/d" ${NEXUS_HOME}/conf/security-configuration.xml

# Define the correct LDAP user and group mapping configurations
LDAP_TYPE=${LDAP_TYPE:-openldap}
Expand Down Expand Up @@ -145,7 +146,7 @@ EOM

else
# Delete LDAP realm
sed -i "/[a-zA-Z]*Ldap*[a-zA-Z]/d" ${NEXUS_HOME}/conf/security-configuration.xml
sed -i "/LdapAuthenticatingRealm/d" ${NEXUS_HOME}/conf/security-configuration.xml
fi

# chown the nexus home directory
Expand Down

0 comments on commit 194ff83

Please sign in to comment.