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

installation into LWC 3.6.(4-pre) #9

Open
josemvm opened this issue May 26, 2023 · 10 comments
Open

installation into LWC 3.6.(4-pre) #9

josemvm opened this issue May 26, 2023 · 10 comments
Assignees

Comments

@josemvm
Copy link
Contributor

josemvm commented May 26, 2023

hi @laurentj

i'm trying to install the module on LWC 3.6.4-pre

i'm following the https://github.com/jelix/multiauth-module/blob/master/INSTALL_INTO_LIZMAP.md#manual-installation-without-composer-into-lizmap-36-or-higher and everything is ok until here

next step here https://github.com/jelix/multiauth-module/blob/master/LDAP.md#configuration-of-the-ldap-plugin

[multiauth]
providers[]=ldap:multiauth_ldap

[multiauth_ldap]
; profile to use for ldap
ldapprofile = "myldap"

how should i adapt the original file (auth_multi.coord.ini.php) with these parameters!?
PS: i've "myldap" profile into profiles.ini.php file as usual

many many unsuccessful attempts...

thanks

@josemvm
Copy link
Contributor Author

josemvm commented May 27, 2023

it seems to me that the auth.coord.ini.php file is not being read by lwc...

is the localconfig.ini.php file supposed to be changed after installing the multiauth module or not?
the localconfig.ini.php file has not changes after the installation of the multiauth module...

@josemvm
Copy link
Contributor Author

josemvm commented Jun 1, 2023

these are my steps:

php lizmap/install/configurator.php multiauth
Configuration migration is starting
Configuration migration is finished
Configuration is starting
All modules dependencies are ok
Configuration starts
Modules are configured
Configuration is finished

php lizmap/install/installer.php -v
Installation is starting
All modules dependencies are ok
Installation starts
All modules are installed or upgraded
Installation is finished

./lizmap/install/clean_vartmp.sh
./lizmap/install/set_rights.sh


auth.coord.ini.php file:

[multiauth]

; name of the dao to get user data
dao = "jauthdb~jelixuser"

; profile to use for jDb
profile = "jauth"

; list of authentication providers
providers[]=ldap:multiauth_ldap

[multiauth_ldap] <== my changes ==
; profile to use for ldap <== my changes ==
ldapprofile = "myldap" <== my changes ==

providers[]=dbaccounts


profiles.ini.php file:

; ldap configuration. See documentation
[ldap:lizmapldap]
hostname=xxx.xxx.xxx.xxx5
port=389
adminUserDn="cn=manager,dc=xxxxx,dc=pt"
adminPassword="xxxxxxxxxxxxx"
searchUserBaseDN="ou=users,dc=xxxxx,dc=pt"
searchUserFilter="(&(objectClass=)(cn=%%LOGIN%%))"
searchUserFilter="(&(objectClass=
)(uid=%%LOGIN%%))"
bindUserDN[]="cn=%?%,ou=users,dc=xxxxx,dc=pt"
bindUserDN[]="uid=%?%,ou=users,dc=xxxxx,dc=pt"
searchAttributes="uid:login,cn,givenName:firstname,sn:lastname,mail:email,o:organization,telephoneNumber:phonenumber"
searchGroupFilter="(&(objectClass=)(cn=)(memberUid=%%LOGIN%%))"
searchGroupProperty="cn"
searchGroupBaseDN="ou=Groups,dc=xxxxx,dc=pt"


./lizmap/install/clean_vartmp.sh
./lizmap/install/set_rights.sh
.service apache2 restart


i can't authenticate against my openldap server as usual

@laurentj can you help me please?

thanks in advance

@laurentj laurentj self-assigned this Jun 2, 2023
@laurentj
Copy link
Member

laurentj commented Jun 3, 2023

Hi,

The module is pre-configured into Lizmap. So you must not change auth.coord.ini.php (and in fact, all files into lizmap/app/system must not be changed). The ldap profile into profiles.ini.php should be named lizmapldap, so you must have a section [ldap:lizmapldap] into profiles.ini.php

You just have to change the content of the section [ldap:lizmapldap] into profiles.ini.php, with your ldap parameters. See https://docs.lizmap.com/current/en/install/ldap.html#ldap-settings

@laurentj
Copy link
Member

laurentj commented Jun 3, 2023

I updated the ldap documentation c967a2f . I also tested the multiauth module into lizmap, by following the documentation and it works.

If you still have some issues, you probably have incorrect ldap parameters. Enable the debugging mode to see if there are errors. It could help you to fix your parameters

@josemvm
Copy link
Contributor Author

josemvm commented Jun 4, 2023

hi @laurentj
thanks for your helps

unfortunately it doesn't work... and i have no logs!

i have no problems with my openldap server and all parameters are correct as before


so alternatively i enabled the ldapdao module:

php lizmap/install/configurator.php ldapdao
Configuration is starting
All modules dependencies are ok
Configuration starts
Configuration of the module ldapdao
Modules are configured
Configuration is finished

php lizmap/install/installer.php -v
Installation is starting
All modules dependencies are ok
Installation starts
Module jelix installed
Module jacl2 installed
Module jacl2db installed
Module ldapdao installed <== module installation confirmed ==
Module jcommunity installed
Module jauthdb_admin installed
Module master_admin installed
Module jacl2db_admin installed
Module proj4php installed
Module admin installed
Module lizmap installed
Module view installed
Module dynamicLayers installed
Module dataviz installed
Module filter installed
Module action installed
All modules are installed or upgraded
Installation is finished

this installation adds the following information to the localconfig.ini.php file:

[modules]
ldapdao.enabled=on
ldapdao.localconf=1

[coordplugin_auth]
driver=ldapdao

under the [ldap:lizmapldap] section i add all my openldap parameters to profiles.ini.php file as in the previous comment

and it works!


back to multiauth module with manual installation https://github.com/jelix/multiauth-module/blob/master/INSTALL_INTO_LIZMAP.md#manual-installation-without-composer-into-lizmap-36-or-higher

php lizmap/install/configurator.php multiauth
Configuration migration is starting
Configuration migration is finished
Configuration is starting
All modules dependencies are ok
Configuration starts
Modules are configured
Configuration is finished

php lizmap/install/installer.php -v
Installation is starting
All modules dependencies are ok
Installation starts
Module jelix installed
Module jacl2 installed
Module jacl2db installed
<== there is no reference to installing the multiauth module ==
Module jcommunity installed
Module jauthdb_admin installed
Module master_admin installed
Module jacl2db_admin installed
Module proj4php installed
Module admin installed
Module lizmap installed
Module view installed
Module dynamicLayers installed
Module dataviz installed
Module filter installed
Module action installed
All modules are installed or upgraded
Installation is finished

under the [ldap:lizmapldap] section i add all my openldap parameters to profiles.ini.php file as in the previous comment

and it doesn't work!


are you using manual installation without composer or automatic installation with composer?

i can't use the automatic installation with composer, i'am on ubuntu 20.04.6 LTS and i have a composer version limitation:
Installed: 1.10.1-1
Candidate: 1.10.1-1

cp -n lizmap/my-packages/composer.json.dist lizmap/my-packages/composer.json
composer require --working-dir=lizmap/my-packages "jelix/multiauth-module"

Do not run Composer as root/super user! See https://getcomposer.org/root for details
Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
Info from https://repo.packagist.org: #StandWithUkraine
Using version ^1.2 for jelix/multiauth-module
./composer.json has been updated
Loading composer repositories with package information
Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for jelix/composer-module-setup ^1.1.0 -> satisfiable by jelix/composer-module-setup[1.1.0].
- jelix/composer-module-setup 1.1.0 requires composer-plugin-api ^2.0 -> no matching package found.

Potential causes:

Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

Installation failed, reverting ./composer.json to its original content.


thanks again

@josemvm
Copy link
Contributor Author

josemvm commented Jun 8, 2023

many installations from scratch and nothing happens and no logs too!...
something is wrong... I have been using this module for years!
a frustrated man :-(

@laurentj
Copy link
Member

laurentj commented Jun 9, 2023

Where did you stored the multiauth directory ? Do you have this tree?

- lizmap
   -  lizmap-modules
       - multiauth
          - classes
          - install
          - module.xml
          - etc...

Did you installed Lizmap 3.6 from scratch or did you upgrade from Lizmap 3.5 by overwriting files?

Did you have exactly this application.init.php?

What have you got into lizmap/var/config/localconfig.ini.php?

i can't use the automatic installation with composer, i'am on ubuntu 20.04.6 LTS and i have a composer version limitation

You must not install Composer from Ubuntu packages. Remove the Composer package (sudo apt remove composer). Install the latest version of Composer. Download its latest version and move it as /usr/local/bin/composer (sudo mv composer.phar /usr/local/bin/composer and sudo chmod +x /usr/local/bin/composer.

@josemvm
Copy link
Contributor Author

josemvm commented Jun 10, 2023

Do you have this tree?

- lizmap
   -  lizmap-modules
       - multiauth
          - classes
          - install
          - module.xml
          - etc...

yes

Did you installed Lizmap 3.6 from scratch or did you upgrade from Lizmap 3.5 by overwriting files?

from scratch

Did you have exactly this application.init.php?

yes

What have you got into lizmap/var/config/localconfig.ini.php?

nothing regarding the multiauth module

You must not install Composer from Ubuntu packages. Remove the Composer package (sudo apt remove composer). Install the latest version of Composer. Download its latest version and move it as /usr/local/bin/composer (sudo mv composer.phar /usr/local/bin/composer and sudo chmod +x /usr/local/bin/composer

ok, with automatic installation with composer evething works fine!


now i found the problem:

with manual installation without composer the configurator.php and installer.php don't work well because into lizmap/var/config/localconfig.ini.php there are no references to the multiauth module (instead of the ldapdao module manual installation):

[modules]
multiauth.enabled=on
multiauth.localconf=1

[coordplugin_auth]
driver=multiauth


many many thanks my old chap ;-)

@laurentj
Copy link
Member

laurentj commented Jun 11, 2023

with manual installation without composer the configurator.php and installer.php don't work well because into lizmap/var/config/localconfig.ini.php there are no references to the multiauth module (instead of the ldapdao module manual installation):

If there is nothing into localconfig about the module before the launch of configurator.php, it's normal. However, after executing configurator.php, you should have

multiauth.enabled=on
multiauth.localconf=1

this is one of the goals of the configurator to put these parameters into localconfig.ini..

I tried again to reproduce the issue :

$ php install/configurator.php multiauth
Configuration is starting
All modules dependencies are ok
Configuration starts
Configuration of the module multiauth
Modules are configured
Configuration is finished

And into localconfig (which was empty before the command), I have (comments removed):

[modules]
multiauth.enabled=on
multiauth.localconf=1

[coordplugin_auth]
driver=multiauth

I really don't understand why you have not this result.

@josemvm
Copy link
Contributor Author

josemvm commented Jun 12, 2023

hi @laurentj

even an install from scratch my result is different from yours:

$ php install/configurator.php multiauth
Configuration is starting
All modules dependencies are ok
Configuration starts
Configuration of the module multiauth
Modules are configured
Configuration is finished

Configuration migration is starting
Configuration migration is finished

Configuration is starting
All modules dependencies are ok
Configuration starts
** === Configuration of the module multiauth is missing ===**
Modules are configured
Configuration is finished

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

2 participants