qradar_改善IBM QRadar LDAP认证

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 LDAP认证架构解决方案
qradar_改善IBM QRadar LDAP认证_第1张图片

如图1所示,当QRadar用户尝试向QRadar Web控制台进行认证时,匿名LDAP请求被发送到Tivoli Directory Integrator解决方案。 可以建议通过安全连接配置这些请求。 收到匿名请求后,Tivoli Directory Integrator解决方案使用定制JavaScript代码将相应的已认证请求发送到LDAP认证服务器。 这些操作的结果将返回到QRadar。

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绑定请求。

图2. QRadar认证时间表
qradar_改善IBM QRadar LDAP认证_第2张图片

Tivoli Directory Integrator组装线

本节描述Tivoli Directory Integrator装配线(dWorks_QRadarAuthentication_AL)以及它如何利用以下Tivoli Directory Integrator组件。

属性文件

组装线使用Tivoli Directory Integrator属性来定义此解决方案的输入参数。 属性文件(dWorks-QRadarAuthentication.properties)可在dWorks-QRadarAuthentication \ Runtime-dWorks-QRadarAuthentication目录中找到。 它定义了以下输入参数:

  • Anonymous_LDAP_Port :此属性定义LDAP服务器连接器的LDAP端口。 确保未使用定义的端口。
  • Anonymous_LDAP_SSL :此属性是一个布尔参数,用于指定连接类型。 将此属性设置为True ,以在QRadar和Tivoli Directory Integrator解决方案之间建立安全连接。 否则,将其设置为False
  • Non_anonymous_LDAP_Service_Account :此属性定义LDAP服务帐户专有名称(DN)。 Tivoli Directory Integrator解决方案使用此DN对LDAP认证服务器执行已认证的操作。 此参数标记为保护 ; 也就是说,当装配线第一次启动时,它将对纯文本进行加密。 确保此服务帐户具有对LDAP身份验证服务器的搜索权限。
  • Non_anonymous_LDAP_Service_Account_PW :此属性定义LDAP服务帐户DN的密码。 此参数标记为保护 ; 也就是说,当装配线第一次启动时,它将对纯文本进行加密。
  • Non_anonymous_LDAP_URL :此属性定义LDAP身份验证服务器的详细信息,例如主机名,端口等。
    对于SSL,请使用ldaps://: 对于非SSL,请使用ldap://:

LDAP服务器连接器

Tivoli Directory Integrator使LDAP服务器连接器可以在配置中设置的已知端口(Anonymous_LDAP_Port)上接受来自LDAP客户机的LDAP连接请求。 LDAP服务器连接器仅在服务器模式下运行,并产生其副本以处理任何可接受的连接,直到该连接被LDAP客户端关闭为止。

图3描述了名为“ LDAPServer”的LDAP服务器连接器。 它显示了如何使用不同的钩子。

图3. LDAP服务器连接器
qradar_改善IBM QRadar LDAP认证_第3张图片

绑定操作

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连接器。

图4.处于迭代器模式的LDAP连接器,以执行已验证的操作
qradar_改善IBM QRadar LDAP认证_第4张图片

组态

执行以下步骤来创建您自己的定制Tivoli Directory Integrator解决方案。

  1. 确保Tivoli Directory Integrator服务器和LDAP认证服务器的时间与QRadar服务器的时间同步。
  2. 确保所有用户都具有适当的用户帐户和角色,以允许使用LDAP身份验证服务器进行身份验证。
  3. (可选,但建议使用)要建立与QRadar服务器的SSL连接,请将QRadar服务器证书导入Tivoli Directory Integrator客户机上的Java密钥库中。
    1. 在Tivoli Directory Integrator机器上下载QRadar服务器证书。 最简单的方法是访问QRadar URL并使用Web浏览器下载服务器证书。
    2. 将证书导入到solution.properties文件的javax.net.ssl.trustStore和javax.net.ssl.keyStore参数中定义的密钥库中。 使用以下命令:
      $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>
    3. 将Tivoli Directory Integrator证书复制到QRadar / opt / qradar / conf / trusted_certificates /目录。
  1. 要建立与LDAP认证服务器的SSL连接,请在Tivoli Directory Integrator客户机上的Java密钥库中导入LDAP服务器证书:
    1. 向LDAP管理员请求LDAP服务器证书,该管理员应该能够从LDAP身份验证服务器提供证书。
    2. 按照solution.properties文件的javax.net.ssl.trustStore和javax.net.ssl.keyStore参数中的定义将证书导入Keystore。 使用以下命令:
      $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>
    3. 将Tivoli Directory Integrator证书添加到LDAP服务器的受信任权威源。
  2. 从可下载资源中下载Tivoli Directory Integrator定制解决方案。
  3. 打开Tivoli Directory Integrator配置编辑器和dWorks-QRadarAuthentication项目。
  4. 修改Tivoli Directory Integrator属性文件以指定LDAP认证服务器详细信息。 Tivoli Directory Integrator属性文件应该位于dWorks-QRadarAuthentication \ Runtime-dWorks-QRadarAuthentication \ dWorks-QRadarAuthentication.properties。
    # 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
  5. 启动Tivoli Directory Integrator组装线:
    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服务器连接器侦听属性文件中指定的端口,所以预期组装流水线执行不会返回到命令提示符。

  6. 使用本地管理员帐户登录QRadar控制台,然后单击“ 管理员”选项卡。
  7. 在导航菜单上,单击系统配置 > 用户管理
  8. 单击身份验证图标。
  9. 在“ 身份验证模块”列表框中,选择LDAP 配置以下参数:
    1. 服务器URL :输入用于连接到Tivoli Directory Integrator LDAP服务器连接器的URL,例如ldap:///portldaps://:port
    2. SSL连接 :选择True可以使用安全套接字层(SSL)加密连接到Tivoli Directory Integrator服务器。
    3. TLS认证False
    4. 搜索整个库 :选择以下选项之一:
      • True :选择以搜索指定DN的所有子目录。
      • False :选择以搜索基本DN的立即内容。 不搜索子目录。
    5. LDAP用户字段 :输入要搜索的用户字段标识符,例如cn
    6. 基本DN :输入所需搜索的基本DN,例如o = sample
  10. 单击“ 保存部署更改” 图5显示了一个示例QRadar LDAP身份验证配置。

    图5.示例LDAP认证配置
    qradar_改善IBM QRadar LDAP认证_第5张图片

现在,在QRadar中定义的用户应该可以使用LDAP服务器凭据登录QRadar Web控制台。

结论

本文介绍了一种解决方案,该解决方案将Tivoli Directory Integrator用作“中间人”,以从QRadar接收安全的匿名请求,并将经过身份验证的请求发送到LDAP认证服务器。


翻译自: https://www.ibm.com/developerworks/security/library/se-improve-ldap/index.html

qradar

你可能感兴趣的:(qradar_改善IBM QRadar LDAP认证)