OCSInventory-Docker-Image icon indicating copy to clipboard operation
OCSInventory-Docker-Image copied to clipboard

Ldap auth settings

Open nevlkv opened this issue 3 years ago • 7 comments

Settings file with AUTH_TYPE is static, and LDAP auth is not availible

nevlkv avatar Dec 02 '21 20:12 nevlkv

Hi, @nevlkv

I made PR #87 that refactors all startup's script logic. Once this PR is accepted, you could solve this problem with a simple script called 21-ajust-ldap.sh, like that:

#!/bin/bash

VAR_FILE=${OCS_WEBCONSOLE_DIR}/ocsreports/var.php

if [ -f $VAR_FILE ]; then
  sed -ri \
    -e "/AUTH_TYPE/c\define('AUTH_TYPE', 2);" \
    $VAR_FILE
fi

And just mount it as a volume:

...
services:
  ocsapplication:
    image: ocsinventory/ocsinventory-docker-image:2.9.2
...
    volumes:
      - "./21-ajust-ldap.sh:/docker-entrypoint.d/21-ajust-ldap.sh"
...

From docs, you could use this values for AUTH_TYPE:

/**
 * Define the auth type :
 * - 1 : Local Only
 * - 2 : Local and LDAP
 * - 3 : LDAP Only
 * - 4 : LDAP with SSO
 * - 5 : Always OK, won't ask for user and password
 * - 6 : CAS authentication
 * 
 * If LDAP / SSO Basic auth is configured, please configure the LDAP Authentication
 */

Regards.

wiltonsr avatar May 10 '22 15:05 wiltonsr

ping @gillesdubois

wiltonsr avatar Jun 06 '22 12:06 wiltonsr

Hi all, First thanks for your work, it's awesome :) This feature needs to be implemented ! OCS being mainly used in companies, LDAP support needs to be enabled by default or, at least, can be easely activated, with an environment variable for example. Thanks again for your update @wiltonsr

Cloud-Kid avatar Aug 03 '23 15:08 Cloud-Kid

@gillesdubois Ping

Cloud-Kid avatar Feb 19 '24 14:02 Cloud-Kid

Hi,

Sorry for the delay. We plan to implement this feature in the next release of the docker image :)

Regards, Gilles DUBOIS.

gillesdubois avatar Feb 19 '24 15:02 gillesdubois

Hey, thanks for your answer ! Any insight for the next release progress ? Thanks for your work BTW

Cloud-Kid avatar Feb 19 '24 15:02 Cloud-Kid

Hi,

2.12.2 will most likely comes in mid-April, so you can expect a new docker image on the same week as of the source release.

Regards, Gilles DUBOIS.

gillesdubois avatar Mar 05 '24 16:03 gillesdubois