Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ldap auth settings #75

Open
nevlkv opened this issue Dec 2, 2021 · 7 comments
Open

Ldap auth settings #75

nevlkv opened this issue Dec 2, 2021 · 7 comments

Comments

@nevlkv
Copy link

nevlkv commented Dec 2, 2021

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

@wiltonsr
Copy link
Contributor

wiltonsr commented May 10, 2022

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
Copy link
Contributor

wiltonsr commented Jun 6, 2022

ping @gillesdubois

@Cloud-Kid
Copy link

Cloud-Kid commented Aug 3, 2023

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
Copy link

@gillesdubois Ping

@gillesdubois
Copy link
Member

Hi,

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

Regards,
Gilles DUBOIS.

@Cloud-Kid
Copy link

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

@gillesdubois
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants