From 59fe80990913d220926c847d234b7066ca0f6ada Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Fri, 3 Nov 2017 08:45:19 -0700 Subject: Adding ldap Makefile tool to add local LDAP configuration (#7764) --- Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4b0dad504..e4cd6e3ed 100644 --- a/Makefile +++ b/Makefile @@ -418,6 +418,25 @@ run-job-server: @echo Running job server for development $(GO) run $(GOFLAGS) $(GO_LINKER_FLAGS) $(PLATFORM_FILES) jobserver --disableconfigwatch & +config-ldap: + @echo Setting up configuration for local LDAP + + @sed -i'' -e 's|"LdapServer": ".*"|"LdapServer": "dockerhost"|g' config/config.json + @sed -i'' -e 's|"BaseDN": ".*"|"BaseDN": "ou=testusers,dc=mm,dc=test,dc=com"|g' config/config.json + @sed -i'' -e 's|"BindUsername": ".*"|"BindUsername": "cn=admin,dc=mm,dc=test,dc=com"|g' config/config.json + @sed -i'' -e 's|"BindPassword": ".*"|"BindPassword": "mostest"|g' config/config.json + @sed -i'' -e 's|"FirstNameAttribute": ".*"|"FirstNameAttribute": "cn"|g' config/config.json + @sed -i'' -e 's|"LastNameAttribute": ".*"|"LastNameAttribute": "sn"|g' config/config.json + @sed -i'' -e 's|"NicknameAttribute": ".*"|"NicknameAttribute": "cn"|g' config/config.json + @sed -i'' -e 's|"EmailAttribute": ".*"|"EmailAttribute": "mail"|g' config/config.json + @sed -i'' -e 's|"UsernameAttribute": ".*"|"UsernameAttribute": "uid"|g' config/config.json + @sed -i'' -e 's|"IdAttribute": ".*"|"IdAttribute": "uid"|g' config/config.json + +config-reset: + @echo Resetting configuration to default + rm -f config/config.json + cp config/default.json config/config.json + clean: stop-docker @echo Cleaning -- cgit v1.2.3-1-g7c22