duanqian2368 2012-08-21 18:47
浏览 40
已采纳

Symfony / LDAP查询返回一个空数组

I am using the bhLDAP plugin with the symfony framework.

I am making an LDAP query on user login which will return specific results, then using those results to assign user privileges to sfGuargAuth.

I can pull a query from one specific group, but none of the others. All other queries return an empty query.

Are there security permissions that need to be addressed on the LDAP side?

This is the function I am using to call the query:

  //grab LDAP info to store into new user table
  public static function user_values($username) {

      $entries = self::getLDAP()->user_values($username);
      return $entries;  
  } 

I can provide further code if needed. I am not really sure what to provide as I am out of my wheelhouse on LDAP.

  • 写回答

1条回答 默认 最新

  • dqwnxdhb88531 2012-09-03 01:12
    关注

    While it depends which LDAP backend you are using, in terms of the mechanics of assigning the rights, all of them have a similar basic notion of permissions.

    The bind DN, the user you connect with to LDAP, must have sufficient rights to see the objects you are querying about.

    Usually the account will need READ permissions to the various objects, and depending on how inheritance works in your backend LDAP server you may need to grant it more often than you would like.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 安装svn网络有问题怎么办
  • ¥15 Python爬取指定微博话题下的内容,保存为txt
  • ¥15 vue2登录调用后端接口如何实现
  • ¥65 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥15 latex怎么处理论文引理引用参考文献