配置外部身份验证服务器
外部身份验证服务器用于从外部服务器收集用户的凭据进行身份验证。
了解外部身份验证服务器
身份验证、授权和记帐 (AAA) 服务器通过以下方式为用户访问提供额外级别的保护和控制:
身份验证确定防火墙用户。
授权决定了防火墙用户可以执行的操作。
计费确定防火墙用户在网络上执行的操作。
您可以单独使用身份验证,也可以与授权和记帐一起使用。授权始终要求首先对用户进行身份验证。您可以单独使用记帐,也可以与身份验证和授权一起使用。
收集用户凭据后,将使用防火墙用户身份验证对其进行处理,该身份验证支持以下类型的服务器:
本地身份验证和授权
RADIUS 身份验证和授权(与瞻博网络 Steel-Belted Radius 服务器兼容)
仅 LDAP 身份验证(支持 LDAP 版本 3,并与 Windows AD 兼容)
仅 SecurID 身份验证(使用 RSA SecurID 外部身份验证服务器)
Junos OS 还支持使用本地、RADIUS 和 TACACS+ 服务器进行管理身份验证。
本主题包括以下部分:
了解 SecurID 用户身份验证
SecurID 是一种身份验证方法,允许用户输入静态或动态密码作为其凭据。动态密码是用户的 PIN 和随机生成的令牌的组合,该令牌在短时间内有效,大约一分钟。在 SecurID 服务器上为用户设置静态密码。例如,SecurID 服务器管理员可能会为丢失其 SecurID 令牌的用户设置临时静态密码。
当用户尝试访问受策略保护的资源,并且在配置文件 authentication-order
参数中将 SecurID 配置为唯一身份验证模式或要使用的第一个身份验证模式时,设备会将用户的凭据转发到 SecurID 服务器进行身份验证。如果用户输入有效值,则允许用户访问请求的资源。
SecurID 服务器包含一项功能,如果用户反复提供错误的凭据,该功能将向用户提出质询。但是,Junos OS 不支持质询功能。相反,SecurID 服务器管理员必须重新同步用户的 RSA 令牌。
对于 SecurID,您可以在 SecurID 服务器上配置有关瞻博网络设备的信息,并将此信息导出到名为 sdconf.rec 的文件中。
若要在设备上安装 sdconf.rec 文件,必须使用带外方法,如 FTP。将文件安装在文件未定期删除的目录中。不要将其放在临时目录中。例如,您可以将其安装在 /var/db/secureid/server1/sdconf.rec 中。
sdconf.rec 文件包含向瞻博网络设备提供 SecurID 服务器地址的信息。将 SecurID 服务器配置为用作外部认证服务器时,无需显式配置此信息。
示例:配置 RADIUS 和 LDAP 用户身份验证
此示例说明如何配置设备进行外部身份验证。
要求
开始之前,请创建一个身份验证用户组。
概述
您可以将多个用户帐户组合在一起以形成一个用户组,该用户组可以存储在本地数据库或 RADIUS、LDAP 或 SecurID 服务器上。在策略中引用身份验证用户组和外部身份验证服务器时,与策略匹配的流量将引发身份验证检查。
此示例说明如何为外部身份验证配置访问配置文件 Profile-1。在访问配置文件中配置了两个 RADIUS 服务器和一个 LDAP 服务器。但是,身份验证顺序仅指定 RADIUS 服务器,因此,如果 RADIUS 服务器身份验证失败,则防火墙用户将无法进行身份验证。不访问本地数据库。
如果防火墙客户端由 RADIUS 服务器进行身份验证,则 RADIUS 服务器返回的组成员资格 VSA 应包含 RADIUS 服务器配置或访问配置文件 Profile-1 中的 alpha、beta 或 gamma 客户端组。访问配置文件存储用户的用户名和密码,或指向存储此类信息的外部身份验证服务器。
配置
程序
CLI 快速配置
要快速配置此示例,请将以下命令复制到文本文件,删除所有换行符,更改与您的网络配置匹配所需的任何详细信息,将命令复制并粘贴到 [edit] 层次结构级别的 CLI 中,然后从配置模式进入 commit 。
set access profile Profile-1 authentication-order radius set access profile Profile-1 client Client-1 client-group alpha set access profile Profile-1 client Client-1 client-group beta set access profile Profile-1 client Client-1 client-group gamma set access profile Profile-1 client Client-1 firewall-user password pwd set access profile Profile-1 client Client-2 client-group alpha set access profile Profile-1 client Client-2 client-group beta set access profile Profile-1 client Client-2 firewall-user password pwd set access profile Profile-1 client Client-3 firewall-user password pwd set access profile Profile-1 client Client-4 firewall-user password pwd set access profile Profile-1 session-options client-group alpha set access profile Profile-1 session-options client-group beta set access profile Profile-1 session-options client-group gamma set access profile Profile-1 session-options client-idle-timeout 255 set access profile Profile-1 session-options client-session-timeout 4 set access profile Profile-1 ldap-options base-distinguished-name CN=users,DC=junos,DC=juniper,DC=net set access profile Profile-1 ldap-options search search-filter sAMAccountName= set access profile Profile-1 ldap-options search admin-search distinguished-name cn=administrator,cn=users,dc=junos,dc=juniper,dc=net set access profile Profile-1 ldap-options search admin-search password pwd set access profile Profile-1 ldap-server 203.0.113.39/24 set access profile Profile-1 radius-server 203.0.113.62/24 secret example-secret set access profile Profile-1 radius-server 203.0.113.62/24 retry 10 set access profile Profile-1 radius-server 203.0.113.27/24 secret juniper
分步过程
以下示例要求您在配置层次结构中导航各个级别。有关如何执行此操作的说明,请参阅 在配置模式下使用 CLI 编辑器。
要为设备配置外部身份验证:
为外部身份验证顺序指定 RADIUS 服务器。
[edit] user@host# set access profile Profile-1 authentication-order radius
配置 Client1-4 防火墙用户,并将客户端 1 防火墙用户和客户端 2 防火墙用户分配给客户端组。
[edit access profile Profile-1] user@host# set client Client-1 client-group alpha user@host# set client Client-1 client-group beta user@host# set client Client-1 client-group gamma user@host# set client Client-1 firewall-user password pwd user@host# set client Client-2 client-group alpha user@host# set client Client-2 client-group beta user@host# set client Client-2 firewall-user password pwd user@host# set client Client-3 firewall-user password pwd user@host# set client Client-4 firewall-user password pwd
在会话选项中配置客户端组。
[edit access profile Profile-1] user@host# set session-options client-group alpha user@host# set session-options client-group beta user@host# set session-options client-group gamma user@host# set session-options client-idle-timeout 255 user@host# set session-options client-session-timeout 4
配置 LDAP 服务器和服务器选项的 IP 地址。
[edit access profile Profile-1] user@host# set ldap-options base-distinguished-name CN=users,DC=junos,DC=mycompany,DC=net user@host# set ldap-options search search-filter sAMAccountName= user@host# set ldap-options search admin-search password pwd user@host# set ldap-options search admin-search distinguished-name cn=administrator,cn=users,dc=junos,dc=mycompany,dc=net user@host# set ldap-server 203.0.113.39/24
配置两台 RADIUS 服务器的 IP 地址。
[edit access profile Profile-1] user@host# set radius-server 203.0.113.62/24 secret pwd user@host# set radius-server 203.0.113.62/24 retry 10 user@host# set radius-server 203.0.113.27/24 secret pwd
结果
在配置模式下,输入 show access profile Profile-1
命令确认您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明以进行更正。
user@host# show access profile Profile-1 authentication-order radius; client Client-1 { client-group [ alpha beta gamma ]; firewall-user { password "$ABC123"; ## SECRET-DATA } } client Client-2 { client-group [ alpha beta ]; firewall-user { password "$ABC123"; ## SECRET-DATA } } client Client-3 { firewall-user { password "$ABC123"; ## SECRET-DATA } } client Client-4 { firewall-user { password "$ABC123"; ## SECRET-DATA } } session-options { client-group [ alpha beta gamma ]; client-idle-timeout 255; client-session-timeout 4; } ldap-options { base-distinguished-name CN=users,DC=junos,DC=juniper,DC=net; search { search-filter sAMAccountName=; admin-search { distinguished-name cn=administrator,cn=users,dc=junos, dc=mycompany,dc=net; password "$ABC123"; ## SECRET-DATA } } } ldap-server { 203.0.113.39/24 ; } radius-server { 203.0.113.62/24 { secret "$ABC123"; ## SECRET-DATA retry 10; } 203.0.113.27/24 { secret "$ABC123"; ## SECRET-DATA } }
如果完成设备配置,请从配置模式输入 commit
。
使用 TLS/SSL 启用 LDAP 身份验证以实现安全连接
从 Junos OS 15.1X49-D70 版开始,SRX 系列防火墙支持 LDAP 的传输层安全性 (TLS) StartTLS 扩展(用于防火墙用户身份验证)和集成用户防火墙身份验证(用于通过防火墙身份验证获取用户名和角色信息)。StartTTLS 允许在对等方之间成功协商后,LDAP 服务器和客户端之间通过 TLS 层在 LDAP 服务器和客户端之间传输协议数据。StartTLS 将现有的不安全 LDAP 连接升级为安全的 TLS/SSL 连接。
SRX 系列防火墙支持 TLSv1.1 和 TLS v1.2,以便将 LDAP 身份验证与 TLS/SSL 配合使用。
使用 StartTLS for LDAP,可以使用以下密码集提供安全通信,从而提供越来越强大的安全性:
高加密密码:AES256-SHA,DES-CBC3-SHA
中等加密密码:高加密密码 + RC4-SHA:RC4-MD5:AES128-SHA
中等加密密码:中等加密密码 + DES-CBC-SHA:EXP1024-DES-CBC-SHA:EXP1024-RC4-SHA:EXP1024-RC4-MD5:EXP-DES-CBC-SHA:EXP-RC4-MD5
在LDAP上实现StartTLS可与以下标准LDAP服务器互操作:
Windows Active Directory
Novell电子目录
Sun LDAP
OpenLDAP
默认情况下,LDAP 流量不会安全传输。您可以使用安全套接字层/传输层安全性 (SSL/TLS) 技术将 LDAP 流量设置为机密和安全。
要将 TLS 参数配置为 LDAP 服务器配置的一部分,请执行以下操作:
默认情况下,SRX 系列防火墙支持在 TLS 握手期间对 LDAP 服务器的证书进行额外检查,以进行 LDAP 身份验证。如果不需要验证服务器证书,则可以使用以下配置忽略服务器证书的验证,接受证书而不进行检查:
[edit] user@host# set access profile profile-name ldap-server ip-address no-tls-certificate-check
默认情况下,保持 no-tls-certificate-check
禁用状态。
示例:配置 SecurID 用户身份验证
此示例说明如何将 SecurID 配置为外部身份验证服务器。
要求
开始之前,请创建一个身份验证用户组。
概述
SecurID 是一种身份验证方法,允许用户输入静态或动态密码作为其凭据。动态密码是用户的 PIN 和随机生成的令牌的组合,该令牌在短时间内有效,大约一分钟。在 SecurID 服务器上为用户设置静态密码。例如,SecurID 服务器管理员可能会为丢失其 SecurID 令牌的用户设置临时静态密码。
当用户尝试访问受策略保护的资源,并且在配置文件 authentication-order
参数中将 SecurID 配置为唯一身份验证模式或要使用的第一个身份验证模式时,设备会将用户的凭据转发到 SecurID 服务器进行身份验证。如果用户输入有效值,则允许用户访问请求的资源。
指定 Server-1 将用作 SecurID 服务器,并且其配置文件驻留在文件中的 /var/db/securid/Server-1/sdconf.rec
设备上。在配置模式下,输入以下命令:
user@host# set access securid-server Server-1 configuration-file “/var/db/securid/Server-1/sdconf.rec”
配置
程序
CLI 快速配置
要快速配置此示例,请将以下命令复制到文本文件,删除所有换行符,更改与您的网络配置匹配所需的任何详细信息,将命令复制并粘贴到 [edit] 层次结构级别的 CLI 中,然后从配置模式进入 commit 。
set access profile Profile-2 authentication-order securid
set access profile Profile-2 client Client-1 client-group alpha
set access profile Profile-2 client Client-1 client-group beta
set access profile Profile-2 client Client-1 client-group gamma
set access profile Profile-2 client Client-1 firewall-user password pwd
set access profile Profile-2 client Client-2 client-group alpha
set access profile Profile-2 client Client-2 client-group beta
set access profile Profile-2 client Client-2 firewall-user password pwd
set access profile Profile-2 client Client-3 firewall-user password pwd
set access profile Profile-2 client Client-4 firewall-user password pwd
set access profile Profile-2 session-options client-group alpha
set access profile Profile-2 session-options client-group beta
set access profile Profile-2 session-options client-group gamma
set access profile Profile-2 session-options client-idle-timeout 255
set access profile Profile-2 session-options client-session-timeout 4
分步过程
以下示例要求您在配置层次结构中导航各个级别。有关如何执行此操作的说明,请参阅 在配置模式下使用 CLI 编辑器。
要将 SecurID 配置为外部身份验证服务器,请执行以下操作:
对于配置文件 2 配置文件,请将 SecurID 配置为要用于外部身份验证的服务器。
[edit] user@host# set access profile Profile-2 authentication-order securid
要在多个配置文件之间共享单个 SecurID 服务器,请为每个配置文件设置
authentication-order
要包含securid
的参数作为身份验证模式。将客户端 1 到 4 配置为防火墙用户,并将客户端 1 和客户端 2 分配给客户端组。
[edit access profile Profile-2] user@host# set client Client-1 client-group alpha user@host# set client Client-1 client-group beta user@host# set client Client-1 client-group gamma user@host# set client Client-1 firewall-user password pwd user@host# set client Client-2 client-group alpha user@host# set client Client-2 client-group beta user@host# set client Client-2 firewall-user password pwd user@host# set client Client-3 firewall-user password pwd user@host# set client Client-4 firewall-user password pwd
在会话选项中配置客户端组。
[edit access profile Profile-2] user@host# set session-options client-group alpha user@host# set session-options client-group beta user@host# set session-options client-group gamma user@host# set session-options client-idle-timeout 255 user@host# set session-options client-session-timeout 4
结果
在配置模式下,输入 show access profile Profile-2
命令确认您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明以进行更正。
[edit] user@host# show access profile Profile-2 authentication-order securid; client Client-1 { client-group [ alpha beta gamma ]; firewall-user { password "$ABC123"; ## SECRET-DATA } } client Client-2 { client-group [ alpha beta ]; firewall-user { password "$ABC123"; ## SECRET-DATA } } client Client-3 { firewall-user { password "$ABC123"; ## SECRET-DATA } } client Client-4 { firewall-user { password "$ABC123"; ## SECRET-DATA } } session-options { client-group [alpha beta gamma]; client-idle-timeout 255; client-session-timeout 4; }
如果完成设备配置,请从配置模式输入 commit
。
验证
示例:删除 SecurID 节点机密文件
此示例演示如何删除节点机密文件。
要求
在开始之前,请确认有必要删除 SecurID 节点机密文件。
概述
当瞻博网络设备最初与 SecurID 服务器成功通信时,系统会自动为其创建一个节点密钥文件。该文件是在软件成功验证第一个用户身份后瞻博网络设备和 SecurID 服务器握手的结果。瞻博网络设备和 SecurID 服务器之间的所有后续通信都依赖此密钥作为两个节点之间信任的表示形式,而不是在每次身份验证请求时重复握手。
一般情况下,不应删除节点机密文件。在极少数情况下,例如,为了调试严重问题,您可以使用 clear
命令删除该文件。
如果删除该文件,则必须取消选中 SecurID 服务器上的一个框,以指示瞻博网络设备和 SecurID 服务器的节点密钥文件不再存在。否则,身份验证尝试将失败。
配置
程序
分步过程
要删除节点密钥文件,请执行以下操作:
使用
clear
命令删除节点机密文件。在后续用户身份验证期间,设备将与 SecurID 服务器重新建立共享密钥,并重新创建节点密钥文件。在操作模式下,输入命令以clear network-access
清除瞻博网络设备的 。securid-node-secret-file
user@host> clear network-access securid-node-secret-file
在操作模式下,输入
show network-access securid-node-secret-file
命令确认删除。如果未显示输出,请重复此示例中的说明以进行更正。user@host> show network-access securid-node-secret-file
验证
通过输入 show network-access securid-node-secret-file
命令验证删除。