Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

[Centreon 22.10.1][API] Unable to connect using accounts where authentication source is LDAP #12065

Open
3 tasks
qladriere opened this issue Nov 15, 2022 · 0 comments
Labels
status/new New tickets

Comments

@qladriere
Copy link

qladriere commented Nov 15, 2022

BUG REPORT INFORMATION

Prerequisites

The opened issue, must be code related. GitHub is not meant for support. Feel free to check the CONTRIBUTING section for more details.

Versions

For the RPM based systems

-- Copy/Paste the result of the following command --

centreon-22.10.1-4.el7.centos.noarch
centreon-agent-client-ACC-22.04.05-0.el7.x86_64
centreon-auto-discovery-server-22.10.0-14.el7.centos.noarch
centreon-broker-22.10.0-16.el7.x86_64
centreon-broker-cbd-22.10.0-16.el7.x86_64
centreon-broker-cbmod-22.10.0-16.el7.x86_64
centreon-broker-core-22.10.0-16.el7.x86_64
centreon-broker-storage-22.10.0-16.el7.x86_64
centreon-central-22.10.1-4.el7.centos.noarch
centreon-clib-22.10.0-16.el7.x86_64
centreon-common-22.10.1-4.el7.centos.noarch
centreon-connector-22.10.0-16.el7.x86_64
centreon-connector-perl-22.10.0-16.el7.x86_64
centreon-connector-ssh-22.10.0-16.el7.x86_64
centreon-database-22.10.1-4.el7.centos.noarch
centreon-engine-22.10.0-16.el7.x86_64
centreon-engine-daemon-22.10.0-16.el7.x86_64
centreon-engine-extcommands-22.10.0-16.el7.x86_64
centreon-gorgone-22.10.0-13.el7.centos.noarch
centreon-gorgone-centreon-config-22.10.0-13.el7.centos.noarch
centreon-license-manager-22.10.0-5.el7.centos.noarch
centreon-license-manager-common-22.10.0-5.el7.centos.noarch
centreon-perl-libs-22.10.1-4.el7.centos.noarch
centreon-poller-22.10.1-4.el7.centos.noarch
centreon-pp-manager-22.10.0-6.el7.centos.noarch
centreon-trap-22.10.1-4.el7.centos.noarch
centreon-web-22.10.1-4.el7.centos.noarch
centreon-widget-engine-status-22.10.0-9.el7.centos.noarch
centreon-widget-global-health-22.10.0-9.el7.centos.noarch
centreon-widget-graph-monitoring-22.10.0-9.el7.centos.noarch
centreon-widget-grid-map-22.10.0-10.el7.centos.noarch
centreon-widget-hostgroup-monitoring-22.10.0-9.el7.centos.noarch
centreon-widget-host-monitoring-22.10.0-10.el7.centos.noarch
centreon-widget-httploader-22.10.0-9.el7.centos.noarch
centreon-widget-live-top10-cpu-usage-22.10.0-10.el7.centos.noarch
centreon-widget-live-top10-memory-usage-22.10.0-11.el7.centos.noarch
centreon-widget-servicegroup-monitoring-22.10.0-10.el7.centos.noarch
centreon-widget-service-monitoring-22.10.0-11.el7.centos.noarch
centreon-widget-single-metric-22.10.0-10.el7.centos.noarch
centreon-widget-tactical-overview-22.10.0-9.el7.centos.noarch

Operating System

RHEL7

Browser used

  • [x ] Google Chrome
  • Firefox
  • Internet Explorer IE11
  • Safari

Version: 22.10.1

Additional environment details (AWS, VirtualBox, physical, etc.):

Description

When using the API (I tried with the command line API), I can't connect using an account which is not a local account. Indeed, by using an account retrieved via LDAP, it returns the following message :
Unable to login, your password has expired.

Steps to Reproduce

  1. Make sure you have an account defined in Centreon and which is using LDAP to connect
  2. This account has proper rights (admin, access to API)
  3. Execute a command in the aim to query the API.
    For ex : /usr/share/centreon/bin/centreon -u <ACCOUNT_USING_LDAP> -p <PASS_ACCOUNT_USING_LDAP> -a POLLERLIST
    Result : it returns an error message : "Unable to login, your password has expired."
  4. Now change the "authentication source" to "Centreon" and add the same password linked to this user (if not stored already using LDAP)
  5. Execute a command in the aim to query the API.
    For ex : /usr/share/centreon/bin/centreon -u <ACCOUNT_USING_LDAP> -p <PASS_ACCOUNT_USING_LDAP> -a POLLERLIST
    Result : it works and returns the result of this command.

Next to that, before changing the "authentication source", you can try to connect in web interface with the same account in the aim to confirm it works and password is not expired.

Describe the received result

Unable to login, your password has expired.

Describe the expected result

Should be able to connect and return the command result.

Logs

PHP error logs

For version using PHP 7.2 or 7.3 on centOs 8 or PHP 8

tail -f /var/log/php-fpm/centreon-error.log
No entries in this log when executing the cmd

centreon-engine logs (if needed)

tail -f /var/log/centreon-engine/centengine.log
No entries in this log when executing the cmd

centreon-broker logs (if needed)

tail -f /var/log/centreon-broker/central-broker-master.log
No entries in this log when executing the cmd
@qladriere qladriere added the status/new New tickets label Nov 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/new New tickets
Projects
None yet
Development

No branches or pull requests

1 participant