租户系统的防火墙身份验证
在 瞻博网络 SRX 系列防火墙的 18.3R1 版中,Junos OS租户系统引入了防火墙身份验证功能,使您能够单独或组中限制或允许用户。身份验证请求是根据策略中定义的目标地址启动的。
了解租户系统防火墙身份验证
防火墙用户是指网络用户,在跨防火墙发起连接时,必须提供用户名和密码进行身份验证。
防火墙身份验证是一种基于策略的身份验证方法,要求用户通过 HTTP、FTP 或 Telnet 流量发起身份验证请求。
Junos OS 使管理员能够限制和允许防火墙用户根据其源 IP 地址和其他凭据访问防火墙后面的受保护资源。
主管理员配置以下内容:
租户系统中的防火墙身份验证会话的最大和保留数。
使用层次结构中的
[edit access]profile configuration 命令访问配置文件,该命令可供所有租户系统使用。
访问配置文件允许:
存储用户的用户名和密码或指向存储此类信息的外部身份验证服务器。
包括身份验证方法、LDAP 或 RADIUS 服务器选项以及会话选项的顺序。
与租户系统中的安全策略相关联。
定义防火墙用户后,创建一个策略,要求用户通过 表 1 中定义的身份验证模式之一进行身份验证。
身份验证选项 |
描述 |
支持的协议 |
支持的后端 |
|---|---|---|---|
Web 认证 |
用户使用 HTTP 连接到设备上启用了 Web 身份验证的 IP 地址,系统会提示您输入用户名和密码。根据此身份验证的结果,允许或拒绝从用户或主机到受保护资源的后续流量。 |
HTTP HTTPS |
本地 LDAP RADIUS SecurId |
直通 |
一个区域中的主机或用户的内联身份验证会尝试访问另一个区域上的资源。设备使用支持的协议来收集用户名和密码信息,并根据此身份验证的结果允许或拒绝来自用户或主机的后续流量。 |
HTTP HTTPS TELNET FTP |
本地 LDAP RADIUS SecurId |
Web 重定向 |
自动将客户端重定向到 WebAuth 页面进行身份验证(http 或 https) |
HTTP HTTPS |
本地 LDAP RADIUS SecurId |
集成用户防火墙 |
SRX 系列设备使用 WMI 客户端 (WMIC) 对 AD 的请求,以在安全性事件日志中获取 IP 地址到用户的映射信息。 |
无 |
活动目录 |
用户防火墙 |
与直通相同,但用户信息被传递到 USERID 进程以进入身份验证表 |
HTTP HTTPS |
本地 LDAP RADIUS SecurId |
租户系统管理员在租户系统中为防火墙身份验证配置以下属性:
为匹配流量指定防火墙身份验证的安全性策略。防火墙身份验证通过层次结构级别的
[edit security policies from-zone zone-name to-zone zone-name policy policy-name then permit]firewall-身份验证 配置语句指定。在访问配置文件中,可通过策略允许用户或用户组进行访问,也可以选择使用 client-match 配置语句进行指定。如果未指定用户或用户组,则允许成功通过身份验证的任何用户访问。FTP、Telnet 或 HTTP 会话的身份验证类型(直通或 Web 身份验证)、默认访问配置文件和成功横幅。这些属性通过层次结构上的
[edit access]firewall-身份验证 配置语句进行配置。托管入站流量。允许协议和/或服务或/或访问租户系统。流量类型通过层次结构中的
[edit security zones security-zone zone-name]或[edit security zones security-zone zone-name interfaces interface-name]配置语句进行host-inbound-traffic配置。
为租户系统配置防火墙身份验证
此示例说明如何使用三种身份验证模式(直通、带 Web 重定向的直通模式和 Web 身份验证)跨一个租户系统将不同的防火墙身份验证流量从客户端发送到服务器。
要求
此示例使用以下硬件和软件组件:
-
一台 SRX4100 设备
-
Junos OS 18.3R1 及更高版本
-
Telnet 或 HTTP
-
外部身份验证服务器包括 RADIUS、LDAP 和 SecurID
确保配置以下内容以将防火墙身份验证流量从客户端发送到服务器:
-
为租户系统配置安全区域
-
配置由主管理员创建的接口
概述
当防火墙用户尝试启动 Telnet、HTTP 或 HTTPS 会话以访问其他区域中的资源时,SRX 系列防火墙会充当代理,在允许用户访问防火墙后面的 Telnet、HTTP 或 HTTPS 服务器之前对防火墙用户进行身份验证。
在此示例中,您可以配置租户系统并将安全策略绑定到该系统。如 图 1 中所示,当来自客户端的流量从客户端发送到服务器时,将根据安全策略中定义的身份验证过程对用户进行身份验证。
主管理员负责创建租户并将系统资源(如路由实例、路由实例中的接口和安全配置文件)分配给租户系统。
| 功能 |
姓名 |
描述 |
|---|---|---|
| 安全配置文件 |
tn1_pf |
安全配置文件的名称。此配置文件指定要分配给绑定安全配置文件的租户系统的资源。 |
| 接口 |
xe-0/0/1 xe-0/0/2 |
接口的名称。接口提供流量连接。 |
| 访问配置文件 |
local_pf radius_pf securid_pf |
访问配置文件的名称。这些配置文件用于定义用户和密码,并获取有关用户访问权限的授权信息。 |
| SSL 终止配置文件 |
FWauthhttpspf |
配置文件的名称。此配置文件用于 SSL 终止服务。 |
| 路由实例 |
VR1 |
实例类型为虚拟路由实例。 |
| 安全策略 |
第 7 页 |
策略的名称。此策略用于使用 fwauthhttpspf SSL 终止配置文件配置直通防火墙身份验证。 |
| 第 1 页 |
策略的名称。此策略用于使用local_pf访问配置文件配置直通防火墙身份验证。 |
|
| 第 4 页 |
策略的名称。此策略用于使用 radius_pf 配置直通 Web 重定向防火墙身份验证。 |
|
| 第 3 页 |
策略的名称。此策略用于配置 Web 身份验证 firewall-身份验证。 |
拓扑结构
图 1 显示了此配置示例中使用的拓扑。此拓扑中显示的租户是分区为多个租户的 SRX 系列防火墙。支持的外部服务器有 RADIUS、LDAP 和 SecurID。客户端到租户的通信通过 xe-0/0/1 接口进行,从租户到服务器的通信通过 xe-0/0/2 接口进行。
拓扑结构
配置
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到层次结构级别的 [edit] CLI 中,然后从配置模式进入 commit。
set system security-profile tn1_pf policy maximum 500 set system security-profile tn1_pf policy reserved 100 set system security-profile tn1_pf zone maximum 50 set system security-profile tn1_pf zone reserved 10 set tenants tn1 security-profile tn1_pf set services ssl termination profile fwauthhttpspf server-certificate device set interfaces xe-0/0/1 unit 0 family inet address 192.0.2.0/24 set interfaces xe-0/0/1 unit 0 family inet address 192.0.2.254/16 web-authentication http set interfaces xe-0/0/2 unit 0 family inet address 198.51.100.0/24 web-authentication http set access profile local_pf client test firewall-user password "$ABC123" set access profile local_pf client test1 client-group local-group1 set access profile local_pf client test1 client-group local-group2 set access profile local_pf client test1 firewall-user password "$BCD678" set access profile local_pf client test2 client-group local-group2 set access profile local_pf client test2 firewall-user password "$DEF234" set access profile local_pf client test3 client-group local-group3 set access profile local_pf client test3 firewall-user password "$DBC123" set access profile local_pf client test4 client-group local-group4 set access profile local_pf client test4 firewall-user password "$FAB123" set access profile radius_pf authentication-order radius set access profile radius_pf radius-server 203.0.113.1 secret "$AFD123" set access profile securid_pf authentication-order securid set tenants tn1 routing-instances vr1 instance-type virtual-router set tenants tn1 routing-instances vr1 interface xe-0/0/1.0 set tenants tn1 routing-instances vr1 interface xe-0/0/2.0 set tenants tn1 security policies from-zone tn1_trust to-zone tn1_untrust policy p1 match source-address any set tenants tn1 security policies from-zone tn1_trust to-zone tn1_untrust policy p1 match destination-address any set tenants tn1 security policies from-zone tn1_trust to-zone tn1_untrust policy p1 match application junos-telnet set tenants tn1 security policies from-zone tn1_trust to-zone tn1_untrust policy p1 then permit firewall-authentication pass-through access-profile local_pf set tenants tn1 security policies from-zone tn1_trust to-zone tn1_untrust policy p7 match source-address any set tenants tn1 security policies from-zone tn1_trust to-zone tn1_untrust policy p7 match destination-address any set tenants tn1 security policies from-zone tn1_trust to-zone tn1_untrust policy p7 match application any set tenants tn1 security policies from-zone tn1_trust to-zone tn1_untrust policy p7 then permit firewall-authentication pass-through access-profile local_pf set tenants tn1 security policies from-zone tn1_trust to-zone tn1_untrust policy p7 then permit firewall-authentication pass-through ssl-termination-profile fwauthhttpspf set tenants tn1 security policies from-zone tn1_trust to-zone tn1_untrust policy p4 match source-address any set tenants tn1 security policies from-zone tn1_trust to-zone tn1_untrust policy p4 match destination-address any set tenants tn1 security policies from-zone tn1_trust to-zone tn1_untrust policy p4 match application junos-http set tenants tn1 security policies from-zone tn1_trust to-zone tn1_untrust policy p4 then permit firewall-authentication pass-through access-profile radius_pf set tenants tn1 security policies from-zone tn1_trust to-zone tn1_untrust policy p4 then permit firewall-authentication pass-through web-redirect set tenants tn1 security policies from-zone tn1_trust to-zone tn1_untrust policy p3 match source-address any set tenants tn1 security policies from-zone tn1_trust to-zone tn1_untrust policy p3 match destination-address any set tenants tn1 security policies from-zone tn1_trust to-zone tn1_untrust policy p3 match application junos-http set tenants tn1 security policies from-zone tn1_trust to-zone tn1_untrust policy p3 then permit firewall-authentication web-authentication set tenants tn1 security policies policy-rematch set tenants tn1 security zones security-zone tn1_trust interfaces xe-0/0/1.0 host-inbound-traffic system-services all set tenants tn1 security zones security-zone tn1_trust interfaces xe-0/0/1.0 host-inbound-traffic protocols all set tenants tn1 security zones security-zone tn1_untrust interfaces xe-0/0/2.0 host-inbound-traffic system-services all set tenants tn1 security zones security-zone tn1_untrust interfaces xe-0/0/2.0 host-inbound-traffic protocols all set tenants tn1 access firewall-authentication pass-through default-profile local_pf set tenants tn1 access firewall-authentication pass-through telnet banner login ****tenant1_telnet_login_banner set tenants tn1 access firewall-authentication pass-through telnet banner success ****tenant1_telnet_success_banner set tenants tn1 access firewall-authentication pass-through telnet banner fail ****tenant1_telnet_fail_banner set tenants tn1 access firewall-authentication web-authentication default-profile securid_pf set tenants tn1 access firewall-authentication web-authentication banner success ****tenant1_webauth_success_banner
配置访问配置文件和防火墙身份验证
分步程序
下面的示例要求您在各个配置层级中进行导航。有关作说明,请参阅在配置模式下使用 CLI 编辑器。
-
配置安全配置文件tn1_pf并将其绑定到租户系统。
[edit system security-profile] user@host# set tn1_pf policy maximum 500 user@host# set tn1_pf policy reserved 100 user@host# set tn1_pf zone maximum 50 user@host# set tn1_pf zone reserved 10
-
创建租户系统 tn1 并将安全配置文件tn1_pf绑定到租户系统。
[edit tenants] user@host# set tn1 security-profile tn1_pf
-
定义用于 HTTPS 流量的 SSL 终止服务以触发直通身份验证的访问配置文件。
[edit services] user@host# set ssl termination profile fwauthhttpspf server-certificate device
-
配置接口并分配 IP 地址。在 xe-0/0/1 接口启用 Web 身份验证。
[edit interfaces] user@host# set interfaces xe-0/0/1 unit 0 family inet address 192.0.2.0/24 user@host# set interfaces xe-0/0/1 unit 0 family inet address 192.0.2.254/24 web-authentication http user@host# set interfaces xe-0/0/2 unit 0 family inet address 198.51.100.0/24 web-authentication http
-
配置路由实例并向其添加接口。
[edit tenants tn1 routing-instances] user@host# set vr1 instance-type virtual-router user@host# set vr1 interface xe-0/0/1.0 user@host# set vr1 interface xe-0/0/2.0
分步程序
主管理员负责在租户系统中配置访问配置文件。要配置访问配置文件:
-
创建要用于防火墙身份验证的访问配置文件。访问配置文件将客户端定义为防火墙用户,并将客户端定义为为防火墙身份验证提供访问权限的密码。当防火墙身份验证允许未经过身份验证的流量时,将根据此命令中配置的访问配置文件对用户进行身份验证。
[edit access profile] user@host# set local_pf client test firewall-user password "$ABC123" user@host# set local_pf client test1 client-group local-group1 user@host# set local_pf client test1 client-group local-group2 user@host# set local_pf client test1 firewall-user password "$BCD678" user@host# set local_pf client test2 client-group local-group2 user@host# set local_pf client test2 firewall-user password "$DEF234" user@host# set local_pf client test3 client-group local-group3 user@host# set local_pf client test3 firewall-user password "$DBC123" user@host# set local_pf client test4 client-group local-group4 user@host# set local_pf client test4 firewall-user password "$FAB123"
-
创建访问配置文件以配置 RADIUS 服务器。
[edit access profile] user@host# set radius_pf authentication-order radius user@host# set radius_pf radius-server 203.0.113.1 secret "$AFD123"
-
创建访问配置文件以将 SecurID 配置为要用于外部身份验证的服务器。
[edit access profile] user@host# set securid_pf authentication-order securid
分步程序
配置不同的安全策略,这些策略允许在租户系统中使用直通(直接和 Web 重定向)和 Web 身份验证模式在区域之间传输 HTTP、HTTPS 和 Telnet 流量。
-
为 Telnet 流量的直通身份验证配置策略 p1。
[edit tenants tn1 security policies] user@host# set from-zone tn1_trust to-zone tn1_untrust policy p1 match source-address any user@host# set from-zone tn1_trust to-zone tn1_untrust policy p1 match destination-address any user@host# set from-zone tn1_trust to-zone tn1_untrust policy p1 match application junos-telnet user@host# set from-zone tn1_trust to-zone tn1_untrust policy p1 then permit firewall-authentication pass-through access-profile local_pf
-
为 HTTPS 流量的直通身份验证配置策略 p7。
[edit tenants tn1 security policies] user@host# set from-zone tn1_trust to-zone tn1_untrust policy p7 match source-address any user@host# set from-zone tn1_trust to-zone tn1_untrust policy p7 match destination-address any user@host# set from-zone tn1_trust to-zone tn1_untrust policy p7 match application junos-https user@host# set from-zone tn1_trust to-zone tn1_untrust policy p7 then permit firewall-authentication pass-through access-profile local_pf user@host# set from-zone tn1_trust to-zone tn1_untrust policy p7 then permit firewall-authentication pass-through ssl-termination-profile fwauthhttpspf
-
配置策略 p4 以使用 Web 重定向对 HTTP 流量进行直通身份验证。
[edit tenants tn1 security policies] user@host# set from-zone tn1_trust to-zone tn1_untrust policy p4 match source-address ipv6_addr1 user@host# set from-zone tn1_trust to-zone tn1_untrust policy p4 match destination-address any user@host# set from-zone tn1_trust to-zone tn1_untrust policy p4 match application junos-http user@host# set from-zone tn1_trust to-zone tn1_untrust policy p4 then permit firewall-authentication pass-through access-profile radius_pf user@host# set from-zone tn1_trust to-zone tn1_untrust policy p4 then permit firewall-authentication pass-through web-redirect
-
为 HTTP 流量的 Web 身份验证配置策略 p3。
[edit tenants tn1 security policies] user@host# set from-zone tn1_trust to-zone tn1_untrust policy p3 match source-address any user@host# set from-zone tn1_trust to-zone tn1_untrust policy p3 match destination-address any user@host# set from-zone tn1_trust to-zone tn1_untrust policy p3 match application junos-http user@host# set from-zone tn1_trust to-zone tn1_untrust policy p3 then permit firewall-authentication web-authentication user@host# set policy-rematch
-
为租户系统中的每个区域配置区域和接口。
[edit tenants tn1 security zones] user@host# set security-zone tn1_trust interfaces xe-0/0/1.0 host-inbound-traffic system-services all user@host# set security-zone tn1_trust interfaces xe-0/0/1.0 host-inbound-traffic protocols all user@host# set security-zone tn1_untrust interfaces xe-0/0/2.0 host-inbound-traffic system-services all user@host# set security-zone tn1_untrust interfaces xe-0/0/2.0 host-inbound-traffic protocols all
-
为 Telnet 会话定义成功横幅。为租户系统中的应用程序配置防火墙身份验证直通和 Web 身份验证横幅。
[edit tenants tn1 access firewall-authentication] user@host# set pass-through default-profile local_pf user@host# set pass-through telnet banner login ****tenant1_telnet_login_banner user@host# set pass-through telnet banner success ****tenant1_telnet_success_banner user@host# set pass-through telnet banner fail ****tenant1_telnet_fail_banner user@host# set web-authentication default-profile securid_pf user@host# set web-authentication banner success ****tenant1_webauth_success_banner
结果
在配置模式下,输入 show system security-profile、 show interfaces、 show tenantsshow access和show services ssl termination命令以确认您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明进行更正。
user@host# show interfaces
xe-0/0/1 {
unit 0 {
family inet {
address 192.0.2.0/24;
address 192.0.2.254/24 {
web-authentication {
http;
https;
}
}
}
}
}
xe-0/0/2 {
unit 0 {
family inet {
address 198.51.100.0/24;
}
}
}
user@host#show services ssl termination
profile fwauthhttpspf {
server-certificate device;
}
user@host#show access
profile local_pf {
client test {
firewall-user {
password "$ABC123"; ## SECRET-DATA
}
}
client test1 {
client-group [ local-group1 local-group2 ];
firewall-user {
password "$BCD678"; ## SECRET-DATA
}
}
client test2 {
client-group local-group2;
firewall-user {
password "$DEF234"; ## SECRET-DATA
}
}
client test3 {
client-group local-group3;
firewall-user {
password "$DBC123"; ## SECRET-DATA
}
}
client test4 {
client-group local-group4;
firewall-user {
password "$FAB123"; ## SECRET-DATA
}
}
session-options {
client-session-timeout 3;
}
}
profile radius_pf {
authentication-order radius;
session-options {
client-session-timeout 3;
}
radius-server {
203.0.113.1 secret "$AFD123"; ## SECRET-DATA
}
}
user@host# show system security-profile
tn1_pf {
policy {
maximum 500;
reserved 100;
}
zone {
maximum 50;
reserved 10;
}
}
user@host# show tenants
tn1 {
routing-instances {
vr1 {
instance-type virtual-router;
interface xe-0/0/1.0;
interface xe-0/0/2.0;
}
}
security-profile {
tn1_pf;
}
security {
policies {
from-zone tn1_trust to-zone tn1_untrust {
policy p2 {
match {
source-address any;
destination-address any;
application any;
}
then {
permit {
firewall-authentication {
pass-through {
access-profile ldap_pf;
}
}
}
}
}
}
}
zones {
security-zone tn1_trust {
interfaces {
xe-0/0/1.0 {
host-inbound-traffic {
system-services {
all;
}
protocols {
all;
}
}
}
}
}
security-zone tn1_untrust {
interfaces {
xe-0/0/2.0 {
host-inbound-traffic {
system-services {
all;
}
protocols {
all;
}
}
}
}
}
}
}
access {
firewall-authentication {
pass-through {
default-profile local_pf;
telnet {
banner {
login ****tenant1_telnet_login_banner;
success ****tenant1_telnet_success_banner;
fail ****tenant1_telnet_fail_banner;
}
}
}
web-authentication {
default-profile radius_pf;
banner {
success ****tenant1_webauth_success_banner;
}
}
}
}
}
如果完成设备配置,请从配置模式进入。commit
验证
验证防火墙用户身份验证并监控身份验证表中的用户和 IP 地址
目的
租户系统的管理员可以使用或查看show security firewall-authentication usersshow security firewall-authentication history commands有关租户系统的防火墙用户和历史记录的信息。租户系统的管理员可以使用相同的命令查看所有租户系统的信息。
行动
在作模式下,输入以下 show 命令:
user@host> show security firewall-authentication history tenant tn1 identifier 10
Username: test
Source IP: 10.12.12.10Authentication state: Success
Authentication method: Pass-through using HTTP
Access start date: 2018-05-31
Access start time: 17:07:38
Duration of user access: 0:10:01
Lsys: root-logical-system
Tenant: tn1
Source zone: trust-tn1
Destination zone: untrust-tn1
Access profile: test
Bytes sent by this user: 380
Bytes received by this user: 0
user@host> show security firewall-authentication history tenant tn1
History of firewall authentication data:
Authentications: 2
Id Source Ip Date Time Duration Status User
1 203.0.113.10 2018-05-27 09:33:05 0:01:44 Success test
2 203.0.113.10 2018-05-27 10:01:09 0:10:02 Success test
user@host> show security firewall-authentication users tenant tn1
Firewall authentication data:
Total users in table: 1
Id Source Ip Src zone Dst zone Profile Age Status User
2 203.0.113.10 N/A N/A test 1 Success test
意义
输出显示租户系统经过身份验证的防火墙用户和用户的防火墙身份验证历史记录
了解租户系统中的集成用户防火墙支持
租户系统支持共享和活动模式下的用户防火墙身份验证。
从 Junos OS 19.1R1 版开始,租户系统支持使用共享模型的用户防火墙身份验证。在此模型中,主逻辑系统与租户系统共享用户防火墙配置和身份验证条目。主逻辑系统与租户系统共享从本地身份验证、Active Directory (AD) 身份验证、防火墙身份验证FT、瞻博网络身份管理服务 (JIMS) 和 ClearPass 身份验证收集的身份验证数据。
在共享模型中,用户防火墙相关的配置是在主逻辑系统下配置的,如身份验证源、身份验证源优先级、身份验证条目超时、IP查询或单查询等。用户防火墙可为 SRX 系列防火墙上的应用提供用户信息服务,如策略和日志记录等。来自租户系统的流量从主逻辑系统查询身份验证表。
身份验证表由主逻辑系统管理。租户系统共享身份验证表。来自主逻辑系统和租户系统的流量查询同一个身份验证表。租户系统允许在安全策略中使用源身份。
例如,如果主逻辑系统配置了 employee ,租户系统配置了源身份 管理器,则此身份验证条目的参考组将包括 employee 和 manager。此参考组包含来自主逻辑系统和租户系统的相同身份验证条目。
从 Junos OS 19.3R1 版开始,通过具有活动模式的集成 JIMS 使用自定义模型,增强了对用户防火墙身份验证的支持。在此模型中,租户系统从根级别提取身份验证条目。主逻辑系统根据逻辑系统和租户系统名称配置到 JIMS 服务器。在活动模式下,SRX 系列防火墙会主动查询通过 HTTPs 协议从 JIMS 服务器接收的身份验证条目。为了减少数据交换,应用了防火墙过滤器。
用户防火墙使用租户系统名称作为区分符,并且在 JIMS 服务器和 SRX 系列防火墙之间保持一致。JIMS 服务器发送身份验证条目中包含的微分器。当区分器设置为主逻辑系统的默认值时,身份验证条目将分布到根逻辑系统中。
用户防火墙支持租户系统的不中断服务的软件升级 (ISSU),因为用户防火墙会更改从 Junos OS 19.2R1 版开始更改内部数据库表格式。在 Junos OS 19.2R1 之前,租户系统不支持 ISSU。
从 Junos OS 20.2R1 版开始,逻辑系统和租户系统支持使用统一访问控制 (UAC) 进行用户防火墙身份验证。
在租户系统中使用用户防火墙身份验证的限制
在租户系统上使用用户防火墙身份验证具有以下限制:
不同租户系统下的 IP 地址不得重叠。如果地址重叠,则当不同的用户在不同的租户系统下登录时,身份验证条目将发生变化。
在租户系统的自定义模型中使用用户防火墙身份验证的限制
在租户系统的自定义模型中使用用户防火墙身份验证具有以下限制:
要在根逻辑系统下配置的 JIMS 服务器配置。
JIMS 服务器和 SRX 系列防火墙之间的租户系统名称应一致且唯一。
也可以看看
示例:为租户系统配置集成用户防火墙识别管理
此示例说明如何配置 SRX 系列防火墙的高级查询功能,以便从瞻博网络身份管理服务 (JIMS) 获取用户身份信息,以及如何配置安全策略以匹配租户系统的源身份。在主逻辑系统中,用户防火墙配置了 JIMS,然后主逻辑系统管理来自 JIMS 的所有身份验证条目。在此示例中,主逻辑系统与租户系统共享身份验证条目。
要求
此示例使用以下硬件和软件组件:
在机箱群集中运行的 SRX1500 设备
JIMS 服务器
Junos OS 19.1 R1 版
概述
在此示例中,您可以在端口 443 上配置带有 HTTPs 连接的 JIMS,在主逻辑系统上配置具有 IPv4 地址的主服务器,在租户系统 TN1 上配置带有 dc0 域的源身份“group1”的策略 p1,在租户系统 TN2 上配置带有 dc0 域的源身份“group1”的策略 p1,以及从租户系统 TN1 到租户系统 TN2 发送流量。即使在重新启动主节点后,您也可以查看主逻辑系统和租户系统(TN1 和 TN2)上的身份验证条目。
配置
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到层次结构级别的 [edit] CLI 中,然后从配置模式进入。commit
set tenants TN1 security policies from-zone TN1_trust to-zone TN1_trust policy TN1_policy1 match source-address any set tenants TN1 security policies from-zone TN1_trust to-zone TN1_trust policy TN1_policy1 match destination-address any set tenants TN1 security policies from-zone TN1_trust to-zone TN1_trust policy TN1_policy1 match application any set tenants TN1 security policies from-zone TN1_trust to-zone TN1_trust policy TN1_policy1 match source-identity "example.com\group1" set tenants TN1 security policies from-zone TN1_trust to-zone TN1_trust policy TN1_policy1 then permit set tenants TN1 security policies from-zone TN1_trust to-zone TN1_untrust policy TN1_policy2 match source-address any set tenants TN1 security policies from-zone TN1_trust to-zone TN1_untrust policy TN1_policy2 match destination-address any set tenants TN1 security policies from-zone TN1_trust to-zone TN1_untrust policy TN1_policy2 match application any set tenants TN1 security policies from-zone TN1_trust to-zone TN1_untrust policy TN1_policy2 then permit set tenants TN1 security policies from-zone TN1_untrust to-zone TN1_trust policy TN1_policy3 match source-address any set tenants TN1 security policies from-zone TN1_untrust to-zone TN1_trust policy TN1_policy3 match destination-address any set tenants TN1 security policies from-zone TN1_untrust to-zone TN1_trust policy TN1_policy3 match application any set tenants TN1 security policies from-zone TN1_untrust to-zone TN1_trust policy TN1_policy3 then permit set tenants TN1 security policies policy-rematch set tenants TN2 security policies from-zone TN2_untrust to-zone TN2_untrust policy TN2_policy1 match source-address any set tenants TN2 security policies from-zone TN2_untrust to-zone TN2_untrust policy TN2_policy1 match destination-address any set tenants TN2 security policies from-zone TN2_untrust to-zone TN2_untrust policy TN2_policy1 match application any set tenants TN2 security policies from-zone TN2_untrust to-zone TN2_untrust policy TN2_policy1 match source-identity "example.com\group2" set tenants TN2 security policies from-zone TN2_untrust to-zone TN2_untrust policy TN2_policy1 then permit set tenants TN2 security policies policy-rematch set services user-identification identity-management connection connect-method https set services user-identification identity-management connection port 443 set services user-identification identity-management connection primary address 192.0.2.5 set services user-identification identity-management connection primary client-id otest set services user-identification identity-management connection primary client-secret "$ABC123" set security policies from-zone root_trust to-zone root_trust policy root_policy1 match source-address any set security policies from-zone root_trust to-zone root_trust policy root_policy1 match destination-address any set security policies from-zone root_trust to-zone root_trust policy root_policy1 match application any set security policies from-zone root_trust to-zone root_trust policy root_policy1 then permit set security policies policy-rematch set security zones security-zone root_trust interfaces reth1.0 host-inbound-traffic system-services all set security zones security-zone root_trust interfaces reth1.0 host-inbound-traffic protocols all set security zones security-zone root_trust interfaces lt-0/0/0.1 host-inbound-traffic system-services all set security zones security-zone root_trust interfaces lt-0/0/0.1 host-inbound-traffic protocols all set firewall family inet filter impair-ldap term allow_all then accept
配置用户防火墙标识管理
分步程序
下面的示例要求您在各个配置层级中进行导航。有关作说明,请参阅《Junos OS CLI 用户指南》中的在 配置模式下使用CLI编辑器 。
要配置用户防火墙识别管理:
以主管理员身份登录到主逻辑系统并进入配置模式。
user@host> configure user@host#
创建租户系统。
[edit tenants] user@host#set TN1 user@host#set TN2
在租户系统 TN1 上使用源身份组 1 配置安全策略TN1_policy1,允许从 TN1_trust 到 TN1_trust 的流量。
[edit security policies] user@host#set from-zone TN1_trust to-zone TN1_trust policy TN1_policy1 match source-address any user@host#set from-zone TN1_trust to-zone TN1_trust policy TN1_policy1 match destination-address any user@host#set from-zone TN1_trust to-zone TN1_trust policy TN1_policy1 match application any user@host#set from-zone TN1_trust to-zone TN1_trust policy TN1_policy1 match source-identity "example.com\group1" user@host#set from-zone TN1_trust to-zone TN1_trust policy TN1_policy1 then permit
配置允许从 TN1_trust 到 TN1_untrust 的流量的安全策略TN1_policy2。
[edit security policies] user@host#set from-zone TN1_trust to-zone TN1_untrust policy TN1_policy2 match source-address any user@host#set from-zone TN1_trust to-zone TN1_untrust policy TN1_policy2 match destination-address any user@host#set from-zone TN1_trust to-zone TN1_untrust policy TN1_policy2 match application any user@host#set from-zone TN1_trust to-zone TN1_untrust policy TN1_policy2 then permit
配置允许从 TN1_untrust 到 TN1_trust 的流量的安全策略TN1_policy3。
[edit security policies] user@host#set from-zone TN1_untrust to-zone TN1_trust policy TN1_policy3 match source-address any user@host#set from-zone TN1_untrust to-zone TN1_trust policy TN1_policy3 match destination-address any user@host#set from-zone TN1_untrust to-zone TN1_trust policy TN1_policy3 match application any user@host#set from-zone TN1_untrust to-zone TN1_trust policy TN1_policy3 then permit user@host#set policy-rematch
配置安全区域并为每个区域分配接口。
[edit security zones] user@host#set security-zone TN1_trust interfaces reth2.0 host-inbound-traffic system-services all user@host#set security-zone TN1_trust interfaces reth2.0 host-inbound-traffic protocols all user@host#set security-zone TN1_trust interfaces lt-0/0/0.11 host-inbound-traffic system-services all user@host#set security-zone TN1_trust interfaces lt-0/0/0.11 host-inbound-traffic protocols all user@host#set security-zone TN1_untrust interfaces reth3.0 host-inbound-traffic system-services all user@host#set security-zone TN1_untrust interfaces reth3.0 host-inbound-traffic protocols all
使用源身份组 1 配置安全策略TN2_policy1,以允许从 TN2 上的 TN2_untrust 到 TN2_untrust 的流量。
[edit security policies] user@host#set from-zone TN2_untrust to-zone TN2_untrust policy TN2_policy1 match source-address any user@host#set from-zone TN2_untrust to-zone TN2_untrust policy TN2_policy1 match destination-address any user@host#set from-zone TN2_untrust to-zone TN2_untrust policy TN2_policy1 match application any user@host#set from-zone TN2_untrust to-zone TN2_untrust policy TN2_policy1 match source-identity "example.com\group2" user@host#set from-zone TN2_untrust to-zone TN2_untrust policy TN2_policy1 then permit user@host#set policy-rematch
配置安全区域并为 TN2 上的每个区域分配接口。
[edit security zones] user@host#set security-zone TN2_untrust interfaces reth4.0 host-inbound-traffic system-services all user@host#set security-zone TN2_untrust interfaces reth4.0 host-inbound-traffic protocols all user@host#set security-zone TN2_untrust interfaces lt-0/0/0.21 host-inbound-traffic system-services all user@host#set security-zone TN2_untrust interfaces lt-0/0/0.21 host-inbound-traffic protocols all
-
将 JIMS 配置为具有主地址的高级查询请求的身份验证源。SRX 系列防火墙需要提供此信息才能与服务器联系。
[edit services user-identification identity-management] user@host#set connection port 443 user@host#set connection connect-method https user@host#set connection primary address 192.0.2.5 user@host#set connection primary client-id otest user@host#set connection primary client-secret test user@host#set authentication-entry-timeout 0
在主逻辑系统上配置安全策略和区域。
[edit security policies] user@host#set from-zone root_trust to-zone root_trust policy root_policy1 match source-address any user@host#set from-zone root_trust to-zone root_trust policy root_policy1 match destination-address any user@host#set from-zone root_trust to-zone root_trust policy root_policy1 match application any user@host#set from-zone root_trust to-zone root_trust policy root_policy1 then permit user@host#set policy-rematch
配置安全区域,并为主逻辑系统上的每个区域分配接口。
[edit security zones] user@host#set security-zone root_trust interfaces reth1.0 host-inbound-traffic system-services all user@host#set security-zone root_trust interfaces reth1.0 host-inbound-traffic protocols all user@host#set security-zone root_trust interfaces lt-0/0/0.1 host-inbound-traffic system-services all user@host#set security-zone root_trust interfaces lt-0/0/0.1 host-inbound-traffic protocols all user@host#set firewall family inet filter impair-ldap term allow_all then accept
结果
在配置模式下,输入show services user-identification identity-managementshow chassis cluster命令以确认您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明进行更正。
user@host# show services user-identification identity-management
connection {
connect-method https;
port 443;
primary {
address 192.0.2.5;
client-id otest;
client-secret "$ABC123"; ## SECRET-DATA
}
}
user@host# show chassis cluster
reth-count 5;
control-ports {
fpc 3 port 0;
fpc 9 port 0;
}
redundancy-group 0 {
node 0 priority 200;
node 1 priority 1;
}
redundancy-group 1 {
node 0 priority 100;
node 1 priority 1;
}
redundancy-group 2 {
node 0 priority 100;
node 1 priority 1;
}
redundancy-group 3 {
node 0 priority 100;
node 1 priority 1;
}
redundancy-group 4 {
node 0 priority 100;
node 1 priority 1;
}
如果完成设备配置,请从配置模式进入。commit
验证
要确认配置工作正常,请执行以下任务:
验证机箱群集状态和身份验证条目
目的
验证租户系统中的身份验证条目。
行动
要验证配置是否工作正常,请输入 show services user-identification authentication-table authentication-source identity-management tenant TN1 命令。
user@host> show services user-identification authentication-table authentication-source identity-management tenant TN1
node0:
--------------------------------------------------------------------------
Logical System: root-logical-system
Domain: ad2012.jims.com
Total entries: 3
Source IP Username groups(Ref by policy) state
2001:db8:aaaa: N/A Valid
2001:db8:aaaa: administrator Valid
203.0.113.50 administrator Valid
node1:
--------------------------------------------------------------------------
Logical System: root-logical-system
Domain: ad2012.jims.com
Total entries: 3
Source IP Username groups(Ref by policy) state
2001:db8:aaaa: N/A Valid
2001:db8:aaaa: administrator Valid
203.0.113.50 administrator Valid
意义
输出显示从主逻辑系统到租户系统共享的身份验证条目。
验证机箱群集状态
目的
重新启动主节点后,验证机箱群集状态。
行动
要验证配置是否工作正常,请输入 show chassis cluster status 命令。
user@host> show chassis cluster status
Monitor Failure codes:
CS Cold Sync monitoring FL Fabric Connection monitoring
GR GRES monitoring HW Hardware monitoring
IF Interface monitoring IP IP monitoring
LB Loopback monitoring MB Mbuf monitoring
NH Nexthop monitoring NP NPC monitoring
SP SPU monitoring SM Schedule monitoring
CF Config Sync monitoring RE Relinquish monitoring
Cluster ID: 6
Node Priority Status Preempt Manual Monitor-failures
Redundancy group: 0 , Failover count: 0
node0 200 hold no no None
node1 1 secondary no no None
Redundancy group: 1 , Failover count: 0
node0 0 hold no no CS
node1 1 secondary no no None
Redundancy group: 2 , Failover count: 0
node0 0 hold no no CS
node1 1 secondary no no None
Redundancy group: 3 , Failover count: 0
node0 0 hold no no CS
node1 1 secondary no no None
Redundancy group: 4 , Failover count: 0
node0 0 hold no no CS
node1 1 secondary no no None
意义
重新启动主节点后,输出显示 TN1 和 TN2 上存在的用户识别管理会话。
示例:在租户系统的自定义模型中配置集成用户防火墙
此示例说明如何通过租户系统具有活动模式的瞻博网络身份管理服务 (JIMS) 服务器使用自定义模型来配置集成用户防火墙。主逻辑系统不会与租户系统共享身份验证条目。在活动模式下,SRX 系列防火墙通过 HTTPs 协议查询从 JIMS 服务器接收的身份验证条目。
在此示例中,将执行以下配置:
-
活动 JIMS 服务器配置
-
租户系统 IP 查询配置
-
租户系统身份验证条目配置
-
租户系统安全性策略配置
要求
此示例使用以下硬件和软件组件:
-
JIMS 服务器版本 2.0
-
Junos OS 19.3R1 版
开始之前,请确保您了解以下信息:
-
JIMS 服务器的 IP 地址。
-
JIMS 服务器上用于接收 HTTP 请求的端口号。
-
来自活动查询服务器的 JIMS 服务器的客户端 ID。
-
来自活动查询服务器的 JIMS 服务器的客户端密钥。
概述
在此示例中,您可以在端口 443 上配置带有 HTTPs 连接的 JIMS,在主逻辑系统上配置具有 IPv4 地址的主服务器,在租户系统TSYS1上配置带有源身份group1的策略 p2。
配置
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到层次结构级别的 [edit] CLI 中,然后从配置模式进入 commit。
set services user-identification logical-domain-identity-management active query-server jims1 connection connect-method https set services user-identification logical-domain-identity-management active query-server jims1 connection port 443 set services user-identification logical-domain-identity-management active query-server jims1 connection primary address 192.0.2.5 set services user-identification logical-domain-identity-management active query-server jims1 connection primary client-id otest set services user-identification logical-domain-identity-management active query-server jims1 connection primary client-secret "$ABC123" set tenants TSYS1 services user-identification logical-domain-identity-management active ip-query query-delay-time 30 set tenants TSYS1 services user-identification logical-domain-identity-management active invalid-authentication-entry-timeout 1 set tenants TSYS1 security policies from-zone untrust to-zone trust policy p2 match source-address any set tenants TSYS1 security policies from-zone untrust to-zone trust policy p2 match destination-address any set tenants TSYS1 security policies from-zone untrust to-zone trust policy p2 match application any set tenants TSYS1 security policies from-zone untrust to-zone trust policy p2 match source-identity "example.com\group1" set tenants TSYS1 security policies from-zone untrust to-zone trust policy p2 then permit
在自定义模型中配置集成用户防火墙:
分步程序
下面的示例要求您在各个配置层级中进行导航。有关作说明,请参阅《Junos OS CLI 用户指南》中的在 配置模式下使用CLI编辑器 。
要在自定义模型中配置集成用户防火墙,请执行以下作:
-
将 JIMS 配置为具有主地址的高级查询请求的身份验证源。SRX 系列防火墙需要提供此信息才能与服务器联系。
user@host# set services user-identification logical-domain-identity-management active query-server jims1 connection connect-method https user@host# set services user-identification logical-domain-identity-management active query-server jims1 connection port 443 user@host# set services user-identification logical-domain-identity-management active query-server jims1 connection primary address 192.0.2.5 user@host# set services user-identification logical-domain-identity-management active query-server jims1 connection primary client-id otest user@host# set services user-identification logical-domain-identity-management active query-server jims1 connection primary client-secret "$ABC123"
-
配置 TSYS1 的 IP 查询延迟时间。
user@host# set tenants TSYS1 services user-identification logical-domain-identity-management active ip-query query-delay-time 30
-
配置 TSYS1 的身份验证条目属性。
user@host# set tenants TSYS1 services user-identification logical-domain-identity-management active invalid-authentication-entry-timeout 1
-
配置安全策略 p2,以允许从 TSYS1 的不信任区域到信任区域的流量。
user@host# set tenants TSYS1 security policies from-zone untrust to-zone trust policy p2 match source-address any user@host# set tenants TSYS1 security policies from-zone untrust to-zone trust policy p2 match destination-address any user@host# set tenants TSYS1 security policies from-zone untrust to-zone trust policy p2 match application any user@host# set tenants TSYS1 security policies from-zone untrust to-zone trust policy p2 match source-identity "example.com\group1" user@host#set tenants TSYS1 security policies from-zone untrust to-zone trust policy p2 then permit
结果
在配置模式下,输入和show services user-identification logical-domain-identity-managementshow tenants TSYS1命令以确认您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明进行更正。
user@host# show services user-identification logical-domain-identity-management
active {
query-server jims1 {
connection {
connect-method https;
port 443;
primary {
address 10.1.1.1;
client-id otest;
client-secret "$ABC123"; ## SECRET-DATA
}
}
}
}
user@host# show tenants TSYS1
security {
policies {
from-zone untrust to-zone trust {
policy p2 {
match {
source-address any;
destination-address any;
application any;
source-identity "example.com\group1";
}
then {
permit;
}
}
}
}
}
services {
user-identification {
logical-domain-identity-management {
active {
invalid-authentication-entry-timeout 1;
ip-query {
query-delay-time 30;
}
}
}
}
}
如果完成设备配置,请从配置模式进入。commit
验证
要确认配置工作正常,请执行以下任务:
验证用户标识身份管理状态
目的
验证身份管理作为身份验证源的用户标识状态。
行动
要验证配置是否工作正常,请输入 show services user-identification logical-domain-identity-management status 命令。
user@host>show services user-identification logical-domain-identity-management status
node0:
--------------------------------------------------------------------------
Query server name :jims1
Primary server :
Address : 10.1.1.1
Port : 443
Connection method : HTTPS
Connection status : Online
Last received status message : OK (200)
Access token : isdHIbl8BXwxFftMRubGVsELRukYXtW3rtKmHiL
Token expire time : 2017-11-27 23:45:22
Secondary server :
Address : Not configured
意义
输出显示有关高级用户查询功能批处理查询和 IP 查询的统计数据,或显示瞻博网络身份管理服务服务器上的状态。
验证用户标识身份管理状态计数器
目的
验证身份管理作为身份验证源的用户标识计数器。
行动
要验证配置是否工作正常,请输入 show services user-identification logical-domain-identity-management counters 命令。
user@host>show services user-identification logical-domain-identity-management counters
node0:
--------------------------------------------------------------------------
Query server name :jims1
Primary server :
Address : 10.208.137.208
Batch query sent number : 65381
Batch query total response number : 64930
Batch query error response number : 38
Batch query last response time : 2018-08-14 15:10:52
IP query sent number : 10
IP query total response number : 10
IP query error response number : 0
IP query last response time : 2018-08-13 12:41:56
Secondary server :
Address : Not configured
意义
输出显示有关高级用户查询函数批处理查询和 IP 查询的统计数据,或在瞻博网络身份管理服务服务器上显示计数器。
验证用户身份认证表
目的
验证指定身份验证源的用户身份信息身份验证表条目。
行动
要验证配置是否工作正常,请输入 show services user-identification authentication-table authentication-source all tenant TSYS1 命令。
user@host>show services user-identification authentication-table authentication-source all tenant TSYS1
node0:
--------------------------------------------------------------------------
Tenant System: TSYS1
Domain: ad03.net
Total entries: 4
Source IP Username groups(Ref by policy) state
10.12.0.2 administrator posture-healthy Valid
10.12.0.15 administrator posture-healthy Valid
2001:db8:3000::5 N/A posture-healthy Valid
fe80::342c:302b N/A posture-healthy Valid
意义
输出显示指定身份验证源的身份验证表的全部内容,或基于用户名的特定域、组或用户。根据用户设备的 IP 地址显示用户的身份信息。
变更历史表
是否支持某项功能取决于您使用的平台和版本。使用 功能资源管理器 确定您的平台是否支持某个功能。