qradar
“这篇文章中描述的解决方案使用Tivoli Directory Integrator的作为‘人在中间人’从QRadar接收安全匿名请求和发送验证请求到LDAP认证服务器。 ”
IBM QRadar平台支持各种认证类型,您可以配置不同的认证机制来验证用户和密码。 当今动态基础架构中使用最广泛的认证来源是LDAP(轻型目录访问协议),而IBM QRadar支持LDAP作为认证类型。 但是,受支持的集成需要对LDAP的“匿名”访问,这在当今的高级威胁世界中似乎几乎是不可能的。 您将获得本地身份验证选项,该选项要求您记住并维护唯一的密码。
与IBM QRadar产品系列捆绑在一起的IBM Tivoli Directory Integrator,提供了更大的灵活性来定制QRadar部署,而无需支付Tivoli Directory Integrator许可证的额外费用。 本文介绍了一种使用Tivoli Directory Integrator的解决方案,该解决方案充当“中间人”来接收来自QRadar的安全匿名请求,并将请求发送到LDAP认证服务器以认证QRadar用户。
IBM Tivoli Directory Integrator提供了LDAP服务器连接器,该服务器在Tivoli Directory Integrator装配线的“提要”部分中运行。 组装流水线接受QRadar的LDAP请求。 组装线的后续“流程”部分会将经过身份验证的LDAP请求发送到LDAP身份验证服务器。
如图1所示,当QRadar用户尝试向QRadar Web控制台进行认证时,匿名LDAP请求被发送到Tivoli Directory Integrator解决方案。 可以建议通过安全连接配置这些请求。 收到匿名请求后,Tivoli Directory Integrator解决方案使用定制JavaScript代码将相应的已认证请求发送到LDAP认证服务器。 这些操作的结果将返回到QRadar。
图2描述了使用定制Tivoli Directory Integrator解决方案的QRadar认证时间线。
当用户登录QRadar时,QRadar在内部将匿名LDAP绑定请求发送到Tivoli Directory Integrator解决方案,该解决方案又将LDAP_SUCCESS发送回QRadar。 然后,QRadar执行匿名LDAP搜索以检索用户的BindDN。 BindDN从Tivoli Directory Integrator解决方案到Authentication Server转换为已认证的搜索请求。 收到BindDN后,QRadar使用BindDN和Web控制台中提供的密码执行LDAP绑定请求。
本节描述Tivoli Directory Integrator装配线(dWorks_QRadarAuthentication_AL)以及它如何利用以下Tivoli Directory Integrator组件。
组装线使用Tivoli Directory Integrator属性来定义此解决方案的输入参数。 属性文件(dWorks-QRadarAuthentication.properties)可在dWorks-QRadarAuthentication \ Runtime-dWorks-QRadarAuthentication目录中找到。 它定义了以下输入参数:
ldaps://:
。 对于非SSL,请使用ldap://:
。 Tivoli Directory Integrator使LDAP服务器连接器可以在配置中设置的已知端口(Anonymous_LDAP_Port)上接受来自LDAP客户机的LDAP连接请求。 LDAP服务器连接器仅在服务器模式下运行,并产生其副本以处理任何可接受的连接,直到该连接被LDAP客户端关闭为止。
图3描述了名为“ LDAPServer”的LDAP服务器连接器。 它显示了如何使用不同的钩子。
BindOperation是组装线的Flow部分的脚本组件。 它执行绑定操作,并且仅在ldap.operation
设置为bind时才执行。
/*
* Author : Nilesh Patel
*
* Copyrights 2015 IBM developerWorks
*
*/
BindDN = work.getString("ldap.dn")
BindPW = work.getString("ldap.password");
if (BindDN.toString().length() == 0 ) {
task.logmsg("");
//This is anonymous bind request, simply return LDAP_SUCCESS
work.setAttribute("ldap.status","0");
return ;
}
// This part of the code will execute only if bind request is non-anonymous.
// That is, actual user authentication.
task.logmsg("");
task.logmsg("")
var conn = system.getConnector("Non_Anonymous_LDAP");
var connMode = new Packages.com.ibm.di.server.ConnectorMode("Iterator");
conn.setParam("ldapUrl", "ldap://localhost:389");
conn.setParam("ldapUsername", BindDN );
conn.setParam("ldapPassword", BindPW );
if(work.getObject("ldap.bindmethod")!=null){
conn.setParam("ldapAuthenticationMethod", work.getObject("ldap.bindmethod"));
}else{
task.logmsg("");
conn.setParam("ldapAuthenticationMethod", "simple");
}
conn.setParam("ldapSearchbase", work.getObject("ldap.searchbase"));
conn.setParam("ldapSearchFilter", work.getObject("ldap.searchfilter"));
conn.setParam("ldapSearchScope", work.getObject("ldap.scope"));
conn.setParam("ldapTimeLimit", work.getObject("ldap.timelimit"));
conn.setParam("ldapSizeLimit", work.getObject("ldap.sizelimit"));
try {
conn.initialize ( connMode );
task.logmsg("");
work.setAttribute("ldap.status","0");
return ;
}catch(Ex) {
task.logmsg("" +Ex);
work.setAttribute("ldap.status","49");
return ;
}
UnbindOperation是组装线“流程”部分的脚本组件。 它只需将ldap.status
设置为0即可执行取消绑定操作。 仅当ldap.operation
设置为unbind时才执行。
/*
* Author : Nilesh Patel
*
* Copyrights 2015 IBM developerWorks
*
*/
//This is the unbind operation, return LDAP_SUCCESS
task.logmsg("");
task.logmsg("");
work.setAttribute("ldap.status","0");
task.logmsg("");
在迭代器模式下使用LDAP连接器执行搜索操作。 该连接器名为Anonymous_LDAP_lkup。 图4描绘了具有不同钩子,初始化参数和输入映射的Anonymous_LDAP_lkup LDAP连接器。
执行以下步骤来创建您自己的定制Tivoli Directory Integrator解决方案。
$TDI_HOME\jvm\jre\bin\keytool -import -trustcacerts -alias
-file -keystore -storepass
示例执行:
C:\Users\Administrator\Desktop\certs>"C:\Program Files\IBM\TDI\V7.1.1\jvm\jre\bin\keytool.exe" -import -trustcacerts -file qradar722.localhost.crt -keystore server.jks -storepass secret -alias QRadar722
Owner: [email protected], CN=qradar722.localhost, OU=Security, O
=Prolifics, L=Portland, ST=Oregon, C=US
Issuer: [email protected], CN=qradar722.localhost, OU=Security,
O=Prolifics, L=Portland, ST=Oregon, C=US
Serial number: ecad6ea584f7448d
Valid from: 2/20/15 8:58 AM until: 2/19/18 8:57 AM
Certificate fingerprints:
MD5: 8A:DC:F0:7A:86:77:EE:DE:78:B2:E2:70:2B:5E:0D:FF
SHA1: 20:FB:97:8F:C6:D6:17:14:66:7A:88:AD:69:48:C2:CE:B9:96:52:42
Trust this certificate? [no]: yes
Certificate was added to keystore
C:\Users\Administrator\Desktop\certs>
$TDI_HOME\jvm\jre\bin\keytool -import -trustcacerts -alias
-file -keystore -storepass
示例执行:
C:\Users\Administrator\Desktop\certs>"C:\Program Files\IBM\TDI\V7.1.1\jvm\jre\bin\keytool.exe" -import -trustcacerts -file ldap.localhost.crt -keystore server.jks -storepass secret -alias ldap
Owner: [email protected], CN=ldap.localhost, OU=Security, O
=Prolifics, L=Portland, ST=Oregon, C=US
Issuer: [email protected], CN=ldap.localhost, OU=Security,
O=Prolifics, L=Portland, ST=Oregon, C=US
Serial number: ecad6ea584f7448d
Valid from: 2/20/15 9:35 AM until: 2/19/18 9:34 AM
Certificate fingerprints:
MD5: F1:AF:03:F7:52:72:BA:3B:8F:96:83:63:FE:19:3B:43
SHA1: 76:DC:5F:19:00:FF:88:F8:1A:3D:13:E2:EC:0A:34:42:3F:FD:C0:17
Trust this certificate? [no]: yes
Certificate was added to keystore
C:\Users\Administrator\Desktop\certs>
# Property file name is dWorks-QRadarAuthentication.properties
#
# Parameters
# Anonymous_LDAP_Port → LDAP Port for LDAP Server connector
# Anonymous_LDAP_SSL → Boolean parameter to specify secure connection
# Non_anonymous_LDAP_Service_Account → LDAP Service Account DN, TDI solution will be using
# this DN to perform authenticated operations to the LDAP Authentication Server. This
# parameter is marked as protected, so upon the first start of the assembly line, it will
# encrypt a plain
# text value. Make sure, this service account is having search permission to LDAP
# Authentication Server.
# Non_anonymous_LDAP_Service_Account_PW → Password LDAP Service Account DN. This parameter is
# marked as protected, so upon first of AL, it will encrypt plain text value.
# Non_anonymous_LDAP_URL → LDAP Authentication Server details.
# For SSL, use ldaps://:
# For non-SSL, use ldap://:
#
############################################################################################
Anonymous_LDAP_Port=1389
Anonymous_LDAP_SSL=FALSE
{protect}-Non_anonymous_LDAP_Service_Account={encr}cn=serviceaccount,o=prolifics,c=us
{protect}-Non_anonymous_LDAP_Service_Account_PW={encr}password
Non_anonymous_LDAP_URL=ldap://192.168.179.135:389
C:\>"C:\Program Files\IBM\TDI\V7.1.1\ibmdisrv.bat" -c
"C:\Users\Administrator\Documents\TDI\workspace\dWorks-QRadarAuthentication\Runtime-dWorks-QRadarAuthentication\dWorks-QRadarAuthentication
.xml" -r "dWorks-QRadarAuthentication_AL" -f
"dWorks-QRadarAuthentication=C:\Users\Administrator\Documents\TDI\workspace\dWorks-dWorks-QRadarAuthentication\Runtime-dWorks-QRadarAuthentication\dWorks-QRadarAuthentication
.properties"
注意:因为LDAP服务器连接器侦听属性文件中指定的端口,所以预期组装流水线执行不会返回到命令提示符。
ldap:///port
或ldaps://:port
。 现在,在QRadar中定义的用户应该可以使用LDAP服务器凭据登录QRadar Web控制台。
本文介绍了一种解决方案,该解决方案将Tivoli Directory Integrator用作“中间人”,以从QRadar接收安全的匿名请求,并将经过身份验证的请求发送到LDAP认证服务器。
翻译自: https://www.ibm.com/developerworks/security/library/se-improve-ldap/index.html
qradar