drno94939847 2012-04-25 15:20 采纳率: 0%
浏览 81
已采纳

PHP用户身份验证和安全方法:LDAP-AD和SQL Server

I've come across a few questions regarding integrating user authentication via LDAP Active Directory server to a company website. The website is mainly used internally to give secure access to files/PDFs. The site is accessible outside our network, as certain customers also need to be able to view/upload files for their orders and verification. We do have an SSL cert in place for secure access to the site, for internal and external.

At this time, the site uses PHPass for password handling, while storing user information in an MS SQL Server database. Users who need access to the site are added to this database, with account level registered and phpass handling the password aspect. This method is pretty secure, and works fine for current usage (internal employees, segregated data for outside customers). However it also introduces more points of failure for the entire system. IE: Additional passwords for users to remember (or forget) and additional account management overhead for the admin.

In planning to streamline the authentication for the site, I've been tasked with integrating Active directory user information to be be utilized for login. This will work fine for the employees of our company, because they already have an AD account. However, this will not work for outside vendors or customers, because they do NOT have an AD account (and should not) to authenticate against.

This leads me to believe the easiest solution is to have a 'main' form of authentication (against AD) and a fallback against the already created SQL user DB. Users who come back as in AD, use those credentials, else search the SQL DB for the user (which would contain any non AD accounts we needed).

Questions:

  • Is the above outlined method of verification a logical and secure plan?? If not, what should I be doing instead?
  • How does one secure against LDAP attack/brute force?
    • In PHP/SQL, utilizing parameterized/typecast queries, account lockouts/timeouts, generic error messages, proper password hashing methods, etc - add up for securing the database and forced login attempts
    • For ldap_bind, username and password are sent across network to LDAP server in the clear??
  • As this login is for the entire network, how can I ensure my login/site is NOT the weakest link of security, or causing undue ease of access to password information?

Note: This was posted on StackOverflow and not ServerFault, because my issue is with programming the PHP website for security. My question relates foremost to the website access, restriction, and permission issues of user login WHILE authenticating to AD or backup database.

  • 写回答

2条回答 默认 最新

  • dph6308 2012-04-26 15:49
    关注

    That they don't have LDAP acounts currently is not a reason for making a two-tier application. This is not just twice as vulnerable - since by implementing your own authentication back end you also need to implement all the user admin that goes along with that. Just add accounts for external users but don't allow them access to any of your workstations.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog