java - 加强有关 LDAP 条目中毒的投诉
问题描述
在我的项目中,我使用下面的代码使用 LDAP 进行身份验证,在我的 WebSecurityContext
authenticationMngrBuilder.ldapAuthentication().userDetailsContextMapper(getLdapUser())
.contextSource(ldapContext())
.userSearchFilter("(&(objectClass=user)))");
这里“authenticationMngrBuilder”的类型是 org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder
“LDAP 条目中毒 执行返回对象的 LDAP 搜索的应用程序将允许攻击者控制 LDAP 响应以在服务器上运行任意代码。”
Fortify 扫描抱怨这是易受攻击的,因为它将 LDAP 响应作为 Java 对象返回。
还有其他选择吗?
解决方案
推荐阅读
- ruby-on-rails - aws-sdk-rails 配置错误:Aws::Errors::MissingRegionError
- java - ViewModel 问题显示 MV VM 架构中的数据库更改
- python - 为什么 fit_transform 不断抛出错误?
- xslt - 使用 xsl 添加 SOAP 标头
- asp.net - IIS Express 未启动选定项目
- mysql - 如何在 Laravel 的查询构建器的连接子句中使用子查询?
- json - Puppeteer:如何在评估函数中使用 XPath 和外部变量?
- php - PHP time() 显示不正确的时间,一小时后
- python - python vs nodejs的https实现有什么不同?
- android - ADB devices 命令显示我的 Galaxy S10 5G 的空列表