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 孟德尔随机化结果不一致
  • ¥15 深度学习残差模块模型
  • ¥20 两个不同Subnet的点对点连接
  • ¥50 怎么判断同步时序逻辑电路和异步时序逻辑电路
  • ¥15 差动电流二次谐波的含量Matlab计算
  • ¥15 Can/caned 总线错误问题,错误显示控制器要发1,结果总线检测到0
  • ¥15 C#如何调用串口数据
  • ¥15 MATLAB与单片机串口通信
  • ¥15 L76k模块的GPS的使用
  • ¥15 请帮我看一看数电项目如何设计