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 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 matlab有关常微分方程的问题求解决
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?
  • ¥100 求三轴之间相互配合画圆以及直线的算法
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考