Skip to content

Allow Cacti to use multiple possible LDAP servers #4299

Description

@bmfmancini

Hey Guys,

In the current cacti LDAP settings you are only able to provide a single LDAP server
It would be good to be able to add a secondary server
Thanks !

Activity

  1. netniV commented on Jun 11, 2021

    @netniV
    Member

    Actually, if you use LDAP domains section, you can have multiple LDAP authentication. One of the updates to 1.3 will be to remove the older single LDAP configuration.

  2. netniV commented on Jun 11, 2021

    @netniV
    Member

    Oh, do you mean a backup LDAP server?

  3. bmfmancini commented on Jun 11, 2021

    @bmfmancini
    MemberAuthor
  4. added this to the v1.3.0 milestone on Jun 11, 2021
  5. self-assigned this
    on Jun 11, 2021
  6. changed the title [-][Feature request] - Add option to specify an alternate LDAP server[/-] [+][Feature request] - Add option to specify a backup LDAP server[/+] on Jun 11, 2021
  7. netniV commented on Jun 12, 2021

    @netniV
    Member

    OK, so first thing to define, which of these known errors should failover to the backup:

         const None                  = 0;
         const Success               = 0;
         const Failure               = 1;
         const UndefinedUsername     = 2;
         const ProtocolErrorVersion  = 3;
         const ProtocolErrorReferral = 4;
         const ProtocolErrorTls      = 5;
         const MissingLdapObject     = 6;
         const ProtocolErrorGeneral  = 7;
         const InsufficientAccess    = 8;
         const ConnectionUnavailable = 9;
         const ConnectionTimeout     = 10;
         const ProtocolErrorBind     = 11;
         const SearchFoundNoGroup    = 12;
         const SearchFoundMultiUser  = 13;
         const SearchFoundNoUser     = 14;
         const SearchFoundNoUserDN   = 15;
         const UndefinedDnOrPassword = 16;
         const Disabled              = 99;
  8. netniV commented on Jun 12, 2021

    @netniV
    Member

    Work is underway to simplify LDAP setitngs by removing from global and just using the user domains.

    develop...ldap

    Feel free to run in a test lab, but the upgrade process isn't right yet if you were already using LDAP (not multiple ldap), I just wanted to commit it so you can see what has been going on.

  9. TheWitness commented on Jun 25, 2021

    @TheWitness
    Member

    Not using a VIP or RRDNS with VIPs?

  10. bmfmancini commented on Jun 25, 2021

    @bmfmancini
    MemberAuthor
  11. netniV commented on Jun 28, 2021

    @netniV
    Member

    So, we are still at the point of deciding which of the above errors can cause a failover to the secondary server. And I presume the secondary must have all the same settings aside from hostname?

  12. bmfmancini commented on Jun 28, 2021

    @bmfmancini
    MemberAuthor
  13. arno-st commented on Oct 18, 2021

    @arno-st
    Contributor

    If I may add some input, I'm using multiple LDAP config, and for me this 2 should s handled:
    const ConnectionUnavailable = 9;
    const ConnectionTimeout = 10;
    const ProtocolErrorBind = 11;

    The other are LDAP data error, not kind of protocol releated error. So if you have a replication of the 2 LDAP servers, the other errors are most likelly to be the same.
    Event the error about the version, should give you other error on your domain, and is not suppose to be different on master and backup server.

    Just my point to the reflection!

  14. bmfmancini commented on Oct 18, 2021

    @bmfmancini
    MemberAuthor
  15. TheWitness commented on Oct 18, 2021

    @TheWitness
    Member

    The way that I would implement this is to explode the hostname based upon a space or other character and then based upon the response use the second hosts to test. Of course, it might be better served by a VIP, but we can implement two settings for those that lack the IT skills to deploy LDAP using a Linux Cluster or a cluster of Linux Clusters.

  16. arno-st commented on Oct 18, 2021

    @arno-st
    Contributor

    Don't you think if you have a VIP, you dont really have a 'second' host.
    Since both will be behind the VIP config !
    So testing the second server with part of the hostname/domain extracted from the query, then you also should check the main server with this same query.
    In my understanding your not looking about a backup server, but more like a load sharing issue.
    Maybee I misinterpret you vision?

    And sometime it's not a question of lack of knowledge of Linux clustering, but Datacenter design. (using windows AD, or not in cluster config, but different server with synchronisation)

  17. changed the title [-][Feature request] - Add option to specify a backup LDAP server[/-] [+]Allow Cacti to use multiple possible LDAP servers[/+] on Oct 19, 2021
  18. modified the milestones: v1.3.0, v1.2.19 on Oct 19, 2021
  19. TheWitness commented on Oct 19, 2021

    @TheWitness
    Member

    The fix is really simple.

  20. added a commit that references this issue on Oct 19, 2021
  21. TheWitness commented on Oct 19, 2021

    @TheWitness
    Member

    Moved this to 1.2.19 as it's such a simple fix. Please test.

  22. added a commit that references this issue on Oct 22, 2021
  23. TheWitness commented on Oct 22, 2021

    @TheWitness
    Member

    After testing, it was not as simple as I thought. However, I've worked through the various in's and out's of the library, and though I don't completely like the solution, it's workable for this release.

  24. TheWitness commented on Oct 22, 2021

    @TheWitness
    Member

    @bmfmancini test in the morning. No need for a zoom. If it's workable for you, just close this.

  25. TheWitness commented on Oct 26, 2021

    @TheWitness
    Member

    Found that our LDAP setup uses default timeouts. Addressing that today.

  26. locked and limited conversation to collaborators on Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementGeneral tag for an enhancementresolvedA fixed issue

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions