Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

236
Visualizações
Symfony Login with LDAP

I want to use LDAP in my Symfony (v3.0) Project to login my users. But it seems to me, that a search_password can be either "hardcoded" in security.yml or null.

I have a simple login form with username and password. I want the password, that was entered here to be the search_password to search through the ldap.

Is this possible or do I break any conceptions here?

Thanks in advance Max

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

I got it done with the following security.yml

providers:
    dashboard_users:
        ldap:
            service: myldapservice
            base_dn: OU=User,OU=Company,DC=domain,DC=local
            search_dn: mydesignatedsearchuser
            search_password: designatedsearchuserpassword
            default_roles: ROLE_USER

firewalls:
    dev:
        pattern: ^/(_(profiler|wdt)|css|images|js)/
        security: false

    main:
        anonymous: ~
        form_login_ldap:
            login_path: myloginroute
            check_path: myloginroute
            service: myldapservice
            dn_string: 'OurCompaniesDomainPrefix\{username}'

        logout:
            path: mylogoutroute
            target: /

Not i can login with a sAMAccountName like john.wayne Hope this helps others.

over 4 years ago · Santiago Trujillo Relatório

0

Symfony uses a map-and-bind approach for LDAP authentication. Users are asked to provide the sAMAccountName (your choice) along with their password to login. Active Directory doesn't allow anonymous search - and you don't want to change that. So, you need a service account to retrieve the user's distinguished name that is needed for a subsequent bind operation which completes the authentication.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda