Please pay attention to a few assumptions this guide makes:
- You have access to a target host's shell.
- You have access to a user with root-level permissions on a target host.
- Your target host has a system volume /opt with at least 16 GB of disk capacity dedicated to it.
1. DockerTo run the application, you will need to have Docker installed. Docker allows for isolating the application environment and simplifying the installation process.
Please refer to the
official documentation to get help installing Docker for your platform
2. User and permissionsTo use Docker mounted volumes to read/write host system files and directories, you would need a user with a matching GID/UID on a host system.
Docker containers leverage user
inspace with UID/GID=2021 to run applications. Therefore, you should create a user with the same UID/GID on your host system and then make this user the owner of files and directories used by the application.
If, for some reason, you have to use a different UID/GID, please contact the
inspace support team to request a customized Docker image.
Create user:$ adduser --uid 2021 inspace3. Files and directories- Create the following directories on your host system:
$ mkdir -p /opt/ldap && \ mkdir -p /opt/logs/ldap2. Copy files from your LDAP Deployment Kit into host's /opt/ldap:
- nectr.com.au__inspace-ldap__1.0.0.tar.gz -> /opt/ldap/nectr.com.au__inspace-ldap__1.0.0.tar.gz
- .env.example -> /opt/ldap/.env
3. Make an
inspace user the owner of these directories and files within it:
$ chown -R inspace:inspace /opt/ldap && \ chown -R inspace:inspace /opt/logs/ldap4. Edit Configuration FileEdit /opt/ldap/.env file with values that make sense for your system.
Please refer to the
Configuration File Reference section at the end of this guide for help and finding a description of individual settings.
5. Load and Start Application Docker Image- Load the Docker image from a file:
$ docker load -i `/opt/ldap/nectr.com.au__inspace-ldap__1.0.0.tar.gz`To confirm that the image was successfully loaded, run:
$ docker image lsYou should see nectr.com.au/inspace-ldap image on the image list:
REPOSITORY nectr.com.au/inspace-ldap
TAG 1.0.0
IMAGE ID 5c4e943ba0a1
CREATED 1 minute ago
SIZE 127MB
After this, the image file can be safely deleted from the host system.2. Create and run a Docker container using this image:
$ docker run -v /opt/ldap/.env:/home/inspace/app/.env:z \-v /opt/logs/ldap:/home/inspace/app/logs:z \--network="host" \--name inspace-ldap -d nectr.com.au/inspace-ldap:1.0.03. Verify that the application is executing successfully:
$ docker logs inspace-ldapIf you see any errors, please save this log and contact the
inspace support team for troubleshooting.
6. Install CRON jobsCopy CRON scripts from your
inspace LDAP Deployment Kit to your host system:
- scripts/cron.hourly/ldapsync.sh -> /etc/cron.hourly/ldapsync.sh
- scripts/cron.daily/clean_logs.sh -> /etc/cron.daily/clean_logs.sh
- scripts/cron.daily/gzip_logs.sh -> /etc/cron.daily/gzip_logs.sh
Configuration File ReferenceExample
### Active Directory #### Loginad.login=admin# ↑ Password for loginad.password=XwjJGN$Yb%8JEh65# ActiveDirectory access gateway -- ldap:// or ldaps://ad.uri=ldap://ldap.company.org# Base domain to authenticate against and search users inad.baseDN=DC=ldap,DC=company,DC=org# Specify in which DNs to search for users. Multiple DNs can be delimited by a semicolon (`;`).# If empty, `ad.baseDN` will be used instead.ad.scanDN=# Specify algorithm for first and last name extraction:# * `default` - name is read from `ad.attr.firstName`, last name is read from `ad.attr.lastName`.# * `algo1` - both name and last name are read from `add.attr.firstName`, which must be a string that looks like: "Name [Surname] LastName"ad.attr.nameExtractAlgo=default# LDAP attribute to extract the first name fromad.attr.firstName=givenName# LDAP attribute to extract the last name fromad.attr.lastName=sn# LDAP attribute to extract user's department fromad.attr.department=department# LDAP attribute to extract user's position fromad.attr.position=title# LDAP attribute to extract user's email fromad.attr.email=mail# LDAP attribute to extract user's phone number fromad.attr.phone=telephoneNumber# LDAP attribute to extract user's thumbnail photo fromad.attr.thumbnail=thumbnailPhoto# LDAP attribute to extract UserAccountControl property flags (used to flag banned users)ad.attr.userAccountControl=userAccountControl### Inspace #### Inspace API URLinspace.uri=https://api.inspace.app# Headless admin token to authorize requests withinspace.headlessAdminToken= insert AdminToken# Email domain used by the company. Any user with an email on a different domain is ignoredinspace.emailDomain=company.org### Logging #### Logging level:# * `info` - output only error and short informational messages# * `debug` - output messages about every action taken# * `trace` - output debug messages and queries to ADlog.level=info# Logging output destination:# * `console` - stdout# * `file` - outputs to the file with name formatted as log-YYYY-MM-DD--HH:mm:ss UTC.log# * `string` - outputs to the file with a given namelog.destination=file# Directory to store logs. By default application directory is usedlog.dir=./logsReferencead.login
Active Directory login.
Example:
ad.login=adminad.password
Active Directory password.
Example:
ad.password=XwjJGN$Yb%8JEh65ad.uri
ActiveDirectory access gateway ldap:// or ldaps://.
Example:
ad.uri=ldap://ldap.company.orgad.baseDN
Base domain to authenticate against and search users in.
Example:
ad.baseDN=DC=ldap,DC=company,DC=orgad.scanDN
Specify in which DNs to search for users. Multiple DNs can be delimited by a semicolon (;).
If empty, ad.baseDN will be used instead.
Example:
ad.scanDN=OU=UNIT1,OU=Users,DC=org,DC=inspace,DC=app;OU=UNIT3,OU=Users,DC=org,DC=inspace,DC=app;OU=UNIT3,OU=Users,DC=org,DC=inspace,DC=appad.attr.nameExtractAlgo
Specify the algorithm for first and last names extraction:
- default - name is read from ad.attr.firstName, last name is read from ad.attr.lastName.
- algo1 - both name and last name are read from add.attr.firstName, which must be a string that looks like: "Name [Surname] LastName"
Example:
ad.attr.nameExtractAlgo=defaultad.attr.firstName
LDAP attribute to extract the first name from.
Example:
ad.attr.firstName=givenNamead.attr.lastName
LDAP attribute to extract the last name from.
Example:
ad.attr.lastName=snad.attr.department
LDAP attribute to extract the user's department from.
Example:
ad.attr.department=departmentad.attr.position
LDAP attribute to extract the user's position from.
Example:
ad.attr.position=titlead.attr.email
LDAP attribute to extract the user's email from.
Example:
ad.attr.email=mailad.attr.phone
LDAP attribute to extract the user's phone number from.
Example:
ad.attr.phone=telephoneNumberad.attr.thumbnail
LDAP attribute to extract the user's thumbnail photo from.
Example:
ad.attr.thumbnail=thumbnailPhotoad.attr.userAccountControl
LDAP attribute to extract UserAccountControl property flags (used to flag banned users).
Example:
ad.attr.userAccountControl=userAccountControlinspace.uri
Inspace API URL.
Example:
inspace.uri=https://api.inspace.appinspace.headlessAdminToken
Headless admin token to authorize requests with. You must use your authorization token received with the LDAP Deployment Kit.
Example:
inspace.headlessAdminToken=12345qazinspace.emailDomain
Email domain used by a company. Users with emails on a different domain are ignored.
Example:
inspace.emailDomain=company.orglog.level
Logging level:
- info - output only error and short informational messages
- debug - output messages about every action taken
- trace - output debug messages and queries to AD
Example:log.level=infolog.destination
Logging output destination:
- console - stdout
- file - outputs to the file with name formatted as log-YYYY-MM-DD--HH:mm:ss UTC.log
- string - outputs to the file with the given name
Example:
log.destination=file
log.dir
Directory to store logs. By default application directory is used
Example:
log.dir=./logs