Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    [Resolu]Authentification Active Directory et filtrage par groupe de sécurité

    Scheduled Pinned Locked Moved Français
    4 Posts 2 Posters 694 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      Dietmar86
      last edited by Dietmar86

      Bonjour à tous/ Hello everyone,
      J'utilise actuellement pfsense plus 24.03 (mais le problème semble être identique sur le 23.09 et le 2.7.2).
      J'ai créé un serveur d'authentification externe avec un Active Directory 2019 avec un schéma 2012 R2 qui sur match parfaitement une "OU" de test avec mes utilisateurs. je test l'authentification et tout est OK.

      I am currently using pfSense Plus 24.03 (but the issue seems to be the same on 23.09 and 2.7.2). I have set up an external authentication server with a 2019 Active Directory using a 2012 R2 schema, which perfectly matches a test "OU" with my users. I test the authentication, and everything is OK.

      Voici la conf de l'authentification :
      e83f64a7-6088-45ce-a932-3c03fda73a60-image.png
      c6003411-2c2e-4eb6-a7a4-f1b05b51bc5f-image.png
      548f1c06-1792-425d-981d-3abf2cdf0e0e-image.png

      Dans un deuxième temps, je souhaite maintenant ajouter une vérification afin de valider le fait que l'utilisateur fait bien partie du groupe "vpn" (par exemple) pour s'authentifier via la section "Extended query" du serveur d'authentification, mes utilisateur sont bien dans ce groupe AD.

      In a second step, I now want to add a verification to ensure that the user is indeed part of the "vpn" group (for example) to authenticate via the "Extended Query" section of the authentication server. My users are indeed in this AD group.

      fdf4f075-20ab-48fa-a4c7-847292727b80-image.png
      37e3f7f5-b75b-4749-96f2-7f971b884af9-image.png

      306b4c77-3908-4edb-b6ff-f82831162a98-image.png

      Et La, c'est le drame! plus rien ne s'authentifie et j'ai des erreurs dans les log :

      And then, disaster strikes! Nothing authenticates anymore, and I see errors in the logs:
      <27>1 2024-10-30T08:56:50.532884+01:00 FIREWALL php-fpm 52185 - - /diag_authentication.php: LDAP Debug: ERROR! LDAP search failed, no user matching test was found.
      <27>1 2024-10-30T08:56:50.532422+01:00 FIREWALL php-fpm 52185 - - /diag_authentication.php: LDAP Debug: Now searching in server domain.local, container OU=USER,OU=...,DC=local with filter (&(samaccountname=test)(memberOf=CN=vpn,OU=...,DC=local)).
      <27>1 2024-10-30T08:56:50.532407+01:00 FIREWALL php-fpm 52185 - - /diag_authentication.php: LDAP Debug: Now Searching for test in directory.
      <27>1 2024-10-30T08:56:50.527215+01:00 FIREWALL php-fpm 52185 - - /diag_authentication.php: LDAP Debug: LDAP connection error flag: false
      <27>1 2024-10-30T08:56:50.525219+01:00 FIREWALL php-fpm 52185 - - /diag_authentication.php: LDAP Debug: Group Filter:
      <27>1 2024-10-30T08:56:50.525214+01:00 FIREWALL php-fpm 52185 - - /diag_authentication.php: LDAP Debug: Filter: (&(samaccountname=test)(memberOf=CN=vpn,OU=...,DC=local))
      <27>1 2024-10-30T08:56:50.525211+01:00 FIREWALL php-fpm 52185 - - /diag_authentication.php: LDAP Debug: Extended Query: memberOf=CN=vpn,OU=...,DC=local
      <27>1 2024-10-30T08:56:50.525207+01:00 FIREWALL php-fpm 52185 - - /diag_authentication.php: LDAP Debug: Attrs: Name: samaccountname / Group: memberOf
      <27>1 2024-10-30T08:56:50.525203+01:00 FIREWALL php-fpm 52185 - - /diag_authentication.php: LDAP Debug: Container: OU=....,DC=local

      Celui qui me dira la solution aura ma reconnaissance éternel cela fait 4 jours
      que j'écume les posts et google...

      Whoever can provide the solution will have my eternal gratitude; I've been scouring posts and Google for four days...

      A bientôt j'espère!

      D 1 Reply Last reply Reply Quote 0
      • D
        Dietmar86 @Dietmar86
        last edited by

        J'ai trouvé.
        Un utilisateur simple ne suffit pas pour verifier les groups il faut un utilisateur avec des droit en lecture sur tout l'AD...
        Avec un compte administrateur du domaine cela fonctionne...
        J'obtiens donc ma gratitude éternel ! merci à moi même

        I found it.
        A simple user account isn't enough to check the groups; you need a user with read rights across the entire AD... With a domain administrator account, it works perfectly.
        So, I’ve earned my own eternal gratitude! Thank you, me!

        A 1 Reply Last reply Reply Quote 0
        • A
          adude42069 @Dietmar86
          last edited by adude42069

          @Dietmar86 said in [Resolu]Authentification Active Directory et filtrage par groupe de sécurité:

          J'ai trouvé.
          Un utilisateur simple ne suffit pas pour verifier les groups il faut un utilisateur avec des droit en lecture sur tout l'AD...
          Avec un compte administrateur du domaine cela fonctionne...

          Fais quand même attention, le compte d' administrateur du domaine ne devrait quasiment jamais être utilisé. Essaie plutôt de créer un compte qui à le droit de lire, mais pas d' administrer, c' est plus propre.

          Pour l' instant ça fonctionne, mais niveau sécurité c' est assez sale.

          D 1 Reply Last reply Reply Quote 1
          • D
            Dietmar86 @adude42069
            last edited by

            @adude42069
            Entièrement d'accord, si tu as le nom des groupe AD permettant de le faire je suis preneur.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.