逻辑系统的用户身份验证
通过逻辑系统用户身份验证,您可以定义防火墙用户并创建策略,要求用户通过以下两种身份验证方案之一进行身份验证:直通身份验证或 Web 身份验证。有关更多信息,请参阅以下主题:
示例:配置访问配置文件(仅限主管理员)
主管理员负责在主逻辑系统中配置访问配置文件。此示例说明如何配置访问配置文件。
要求
开始之前:
以主管理员身份登录到主逻辑系统。请参阅 了解主逻辑系统和主管理员角色。
阅读 防火墙用户身份验证概述。
概述
此示例为逻辑系统用户的 LDAP 身份验证配置访问配置文件。此示例创建 表 1 中所述的访问配置文件。
主管理员创建访问配置文件。
姓名 |
配置参数 |
|---|---|
LDAP1 |
|
配置
过程
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到层次结构级别的 [edit] CLI 中,然后从配置模式进入。commit
您必须以主管理员身份登录。
set access profile ldap1 authentication-order ldap set access profile ldap1 ldap-options base-distinguished-name ou=people,dc=example,dc=com set access profile ldap1 ldap-options assemble common-name uid set access profile ldap1 ldap-server 10.155.26.104 port 389
分步程序
下面的示例要求您在各个配置层级中进行导航。有关如何执行此作的说明,请参阅《CLI 用户指南》中的在配置模式下使用 CLI 编辑器。
要在主逻辑系统中配置访问配置文件,请执行以下作:
以主管理员身份登录到主逻辑系统并进入配置模式。
admin@host> configure admin@host#
配置访问配置文件并设置身份验证顺序。
[edit access profile ldap1] admin@host# set authentication-order ldap
配置 LDAP 选项。
[edit access profile ldap1] admin@host# set ldap-options base-distinguished-name ou=people,dc=example,dc=com admin@host# set ldap-options assemble common-name uid
配置 LDAP 服务器。
[edit access profile ldap1] admin@host# set ldap-server 10.155.26.104 port 389
结果
在配置模式下,输入 show access profile profile-name 命令以确认您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明进行更正。
admin@host# show access profile ldap1
authentication-order ldap;
ldap-options {
base-distinguished-name ou=people,dc=example,dc=com;
assemble {
common-name uid;
}
}
ldap-server {
10.155.26.104 port 389;
}
如果完成设备配置,请从配置模式进入。commit
示例:为主逻辑系统配置安全性功能
此示例说明如何为主逻辑系统配置安全功能,例如区域、策略和防火墙身份验证。
要求
开始之前:
-
以主管理员身份登录到主逻辑系统。请参阅 示例:为逻辑系统配置 root 密码。
-
使用此
show system security-profile命令查看分配给主逻辑系统的资源。 -
为主逻辑系统配置逻辑接口。请参阅示例:为主逻辑系统和互连逻辑系统配置接口、路由实例和静态路由,为用户逻辑系统配置逻辑隧道接口(仅限主管理员)。
-
在主逻辑系统中配置访问配置文件 ldap1。ldap1 访问配置文件用于防火墙用户的 Web 身份验证。
概述
在此示例中,您将为名为 root-logical-system 的主逻辑系统配置安全功能,如 示例所示:创建用户逻辑系统、其管理员、其用户和互连逻辑系统。此示例配置了 表 2 中所述的安全功能。
| 功能 |
姓名 |
配置参数 |
|---|---|---|
| 区域 |
ls-root-trust |
绑定到接口 ge-0/0/4.0。 |
| ls-root-untrust |
绑定到接口 lt-0/0/0.1 |
|
| 地址簿 |
根内部 |
|
| 根外部 |
|
|
| 安全性策略 |
允许用户允许 |
允许以量:
|
| 允许授权用户 |
允许以量:
|
|
| 防火墙身份验证 |
|
|
| HTTP 守护程序 |
在接口 ge-0/0/4.0 上激活 |
配置
过程
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到层次结构级别的 [edit] CLI 中,然后从配置模式进入。commit
set security address-book root-internal address masters 10.12.12.0/24 set security address-book root-internal attach zone ls-root-trust set security address-book root-external address design 10.12.1.0/24 set security address-book root-external address accounting 10.14.1.0/24 set security address-book root-external address marketing 10.13.1.0/24 set security address-book root-external address-set userlsys address design set security address-book root-external address-set userlsys address accounting set security address-book root-external address-set userlsys address marketing set security address-book root-external attach zone ls-root-untrust set security policies from-zone ls-root-trust to-zone ls-root-untrust policy permit-to-userlsys match source-address masters set security policies from-zone ls-root-trust to-zone ls-root-untrust policy permit-to-userlsys match destination-address userlsys set security policies from-zone ls-root-trust to-zone ls-root-untrust policy permit-to-userlsys match application any set security policies from-zone ls-root-trust to-zone ls-root-untrust policy permit-to-userlsys then permit set security policies from-zone ls-root-untrust to-zone ls-root-trust policy permit-authorized-users match source-address userlsys set security policies from-zone ls-root-untrust to-zone ls-root-trust policy permit-authorized-users match destination-address masters set security policies from-zone ls-root-untrust to-zone ls-root-trust policy permit-authorized-users match application junos-http set security policies from-zone ls-root-untrust to-zone ls-root-trust policy permit-authorized-users match application junos-https set security policies from-zone ls-root-untrust to-zone ls-root-trust policy permit-authorized-users then permit firewall-authentication web-authentication set security zones security-zone ls-root-trust interfaces ge-0/0/4.0 set security zones security-zone ls-root-untrust interfaces lt-0/0/0.1 set system services web-management http interface ge-0/0/4.0 set access firewall-authentication web-authentication default-profile ldap1 set access firewall-authentication web-authentication banner success "WEB AUTH LOGIN SUCCESS"
分步程序
下面的示例要求您在各个配置层级中进行导航。有关作说明,请参阅《Junos OS CLI 用户指南》中的在 配置模式下使用CLI编辑器 。
要为主逻辑系统配置区域和策略:
-
以主管理员身份登录到主逻辑系统并进入配置模式。
admin@host> configure admin@host#
-
创建安全区域并为每个区域分配接口。
[edit security zones] admin@host# set security-zone ls-root-trust interfaces ge-0/0/4.0 admin@host# set security-zone ls-root-untrust interfaces lt-0/0/0.1
-
创建通讯簿条目。
[edit security] admin@host# set address-book root-internal address masters 10.12.12.0/24 admin@host# set address-book root-external address design 10.12.1.0/24 admin@host# set address-book root-external address accounting 10.14.1.0/24 admin@host# set address-book root-external address marketing 10.13.1.0/24 admin@host# set address-book root-external address-set userlsys address design admin@host# set address-book root-external address-set userlsys address accounting admin@host# set address-book root-external address-set userlsys address marketing
-
将地址簿附加到区域。
[edit security] admin@host# set address-book root-internal attach zone ls-root-trust admin@host# set address-book root-external attach zone ls-root-untrust
-
配置安全策略,以允许从 ls-root-trust 区域到 ls-root-untrust 区域的流量。
[edit security policies from-zone ls-root-trust to-zone ls-root-untrust] admin@host# set policy permit-to-userlsys match source-address masters admin@host# set policy permit-to-userlsys match destination-address userlsys admin@host# set policy permit-to-userlsys match application any admin@host# set policy permit-to-userlsys then permit
-
配置一个安全策略,用于对从 ls-root-untrust 区域到 ls-root-trust 区域的流量进行身份验证。
[edit security policies from-zone ls-root-untrust to-zone ls-root-trust] admin@host# set policy permit-authorized-users match source-address userlsys admin@host# set policy permit-authorized-users match destination-address masters admin@host# set policy permit-authorized-users match application junos-http admin@host# set policy permit-authorized-users match application junos-https admin@host# set policy permit-authorized-users then permit firewall-authentication web-authentication
-
配置 Web 身份验证访问配置文件并定义成功横幅。
[edit access] admin@host# set firewall-authentication web-authentication default-profile ldap1 admin@host# set firewall-authentication web-authentication banner success “WEB AUTH LOGIN SUCCESS”
-
激活设备上的 HTTP 守护程序。
[edit system] admin@host# set services web-management http interface ge-0/0/4.0
结果
在配置模式下,输入 show security、 show access和 show system services 命令以确认您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明进行更正。
为简洁起见,此 show 命令输出仅包含与此示例相关的配置。系统上的任何其他配置都已替换为省略号 (...)。
[edit]
admin@host# show security
...
address-book {
root-internal {
address masters 10.12.12.0/24;
attach {
zone ls-root-trust;
}
}
root-external {
address design 10.12.1.0/24;
address accounting 10.14.1.0/24;
address marketing 10.13.1.0/24;
address-set userlsys {
address design;
address accounting;
address marketing;
}
attach {
zone ls-root-untrust;
}
}
}
policies {
from-zone ls-root-trust to-zone ls-root-untrust {
policy permit-to-userlsys {
match {
source-address masters;
destination-address userlsys;
application any;
}
then {
permit;
}
}
}
from-zone ls-root-untrust to-zone ls-root-trust {
policy permit-authorized-users {
match {
source-address userlsys;
destination-address masters;
application [ junos-http junos-https ];
}
then {
permit {
firewall-authentication {
web-authentication;
}
}
}
}
}
}
zones {
security-zone ls-root-trust {
interfaces {
ge-0/0/4.0;
}
}
security-zone ls-root-untrust {
interfaces {
lt-0/0/0.1;
}
}
}
[edit]
admin@host# show access
...
firewall-authentication {
web-authentication {
default-profile ldap1;
banner {
success "WEB AUTH LOGIN SUCCESS";
}
}
}
[edit]
admin@host# show system services
web-management {
http {
interface ge-0/0/4.0;
}
}
如果完成设备配置,请从配置模式进入。commit
了解逻辑系统防火墙身份验证
防火墙用户是指网络用户,在跨防火墙发起连接时,必须提供用户名和密码进行身份验证。Junos OS 使管理员能够根据防火墙用户的源 IP 地址和其他凭据限制和允许其访问防火墙后面的受保护资源(不同区域)。
主管理员负责在主逻辑系统中配置访问配置文件。访问配置文件存储用户的用户名和密码,或指向存储此类信息的外部身份验证服务器。在主逻辑系统上配置的访问配置文件可供所有用户逻辑系统使用。
主管理员可以为每个用户逻辑系统配置防火墙身份验证的最大数量和保留数量。然后,用户逻辑系统管理员可以在用户逻辑系统中创建防火墙身份验证。在用户逻辑系统中,用户逻辑系统管理员可以使用该 show system security-profile auth-entry 命令查看分配给用户逻辑系统的身份验证资源数量。
要配置访问配置文件,主管理员在主逻辑系统的 [edit access] 层次结构级别使用profile配置语句。访问配置文件还可以包括身份验证方法、LDAP 或 RADIUS 服务器选项以及会话选项的顺序。
然后,用户逻辑系统管理员可以将访问配置文件与用户逻辑系统中的安全策略相关联。用户逻辑系统管理员还可以指定身份验证类型:
使用直通身份验证时,来自一个区域的主机或用户尝试使用 FTP、telnet 或 HTTP 客户端访问另一个区域上的资源。设备使用 FTP、Telnet 或 HTTP 收集用户名和密码信息,并根据此身份验证的结果允许或拒绝来自用户或主机的后续流量。
使用 Web 身份验证时,用户使用 HTTP 连接到设备上启用了 Web 身份验证的 IP 地址,并提示您输入用户名和密码。根据此身份验证的结果,允许或拒绝从用户或主机到受保护资源的后续流量。
用户逻辑系统管理员在用户逻辑系统中为防火墙身份验证配置以下属性:
为匹配流量指定防火墙身份验证的安全性策略。防火墙身份验证通过 [
edit security policies from-zone zone-name to-zone zone-name policy policy-name then permit] 层级的配置语句指定firewall-authentication。可以选择使用 client-match 配置语句指定访问配置文件中策略允许访问的用户或用户组。(如果未指定用户或用户组,则允许任何成功通过身份验证的用户进行访问。
对于直通身份验证,可以选择指定访问配置文件,并启用 Web 重定向(将客户端系统重定向到网页进行身份验证)。
FTP、Telnet 或 HTTP 会话的身份验证类型(直通或 Web 身份验证)、默认访问配置文件和成功横幅。这些属性通过 [
edit access] 层次结构级别的配置语句进行firewall-authentication配置。托管入站流量。允许协议和/或服务或两者访问逻辑系统。流量类型通过 [
edit security zones security-zone zone-name] 或 [edit security zones security-zone zone-name interfaces interface-name] 层级的配置语句进行host-inbound-traffic配置。
在用户逻辑系统中,用户逻辑系统管理员可以使用或命令查看show security firewall-authentication users show security firewall-authentication history有关防火墙用户的信息以及用户逻辑系统的历史记录。在主逻辑系统中,主管理员可以使用相同的命令查看主逻辑系统、特定用户逻辑系统或所有逻辑系统的信息。
也可以看看
示例:为用户逻辑系统配置防火墙身份验证
此示例说明如何为用户逻辑系统配置防火墙身份验证。
要求
开始之前:
以逻辑系统管理员身份登录到用户逻辑系统。请参阅 用户逻辑系统配置概述。
使用此
show system security-profiles auth-entry命令查看分配给逻辑系统的防火墙身份验证条目。访问配置文件必须由主管理员在主逻辑系统中配置。
概述
此示例配置 ls-product-design 用户逻辑系统,如示例所示: 创建用户逻辑系统、其管理员、其用户和互连逻辑系统。
在此示例中,在启动与产品设计人员子网的某些连接时,需要对 ls-marketing-dept 和 ls-accounting-dept 逻辑系统中的用户进行身份验证。此示例配置了 表 3 中所述的防火墙身份验证。
此示例使用 在示例:为用户逻辑系统配置安全性区域中配置的访问配置文件和配置的地址簿条目。
功能 |
姓名 |
配置参数 |
|---|---|---|
安全性策略 |
允许授权用户
注意:
策略查找将按照配置策略的顺序执行。将使用与流量匹配的第一个策略。如果之前配置了一个策略,该策略允许同一来自区域、到区域、源地址和目标地址的流量,但使用应用程序 |
允许对以量进行防火墙身份验证:
ldap1 访问配置文件用于直通身份验证。 |
防火墙身份验证 |
|
配置
过程
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到层次结构级别的 [edit] CLI 中,然后从配置模式进入。commit
set security policies from-zone ls-product-design-untrust to-zone ls-product-design-trust policy permit-authorized-users match source-address otherlsys set security policies from-zone ls-product-design-untrust to-zone ls-product-design-trust policy permit-authorized-users match destination-address product-designers set security policies from-zone ls-product-design-untrust to-zone ls-product-design-trust policy permit-authorized-users match application junos-h323 set security policies from-zone ls-product-design-untrust to-zone ls-product-design-trust policy permit-authorized-users then permit firewall-authentication pass-through access-profile ldap1 set access firewall-authentication pass-through default-profile ldap1 set access firewall-authentication pass-through http banner login “welcome”
分步程序
下面的示例要求您在各个配置层级中进行导航。有关作说明,请参阅《Junos OS CLI 用户指南》中的在 配置模式下使用CLI编辑器 。
要在用户逻辑系统中配置防火墙身份验证,请执行以下作:
以逻辑系统管理员身份登录到用户逻辑系统,进入配置模式。
lsdesignadmin1@host:ls-product-design> configure lsdesignadmin1@host:ls-product-design#
配置允许防火墙身份验证的安全策略。
[edit security policies from-zone ls-product-design-untrust to-zone ls-product-design-trust] lsdesignadmin1@host:ls-product-design# set policy permit-authorized-users match source-address otherlsys lsdesignadmin1@host:ls-product-design# set policy permit-authorized-users match destination -address product-designers lsdesignadmin1@host:ls-product-design# set policy permit-authorized-users match application junos-h323 lsdesignadmin1@host:ls-product-design# set policy permit-authorized-users then permit firewall-authentication pass-through access-profile ldap1
重新排序安全策略。
[edit] lsdesignadmin1@host:ls-product-design# insert security policies from-zone ls-product-design-untrust to-zone ls-product-design-trust policy permit-authorized-users before policy permit-all-from-otherlsys
配置防火墙身份验证。
[edit access firewall-authentication] lsdesignadmin1@host:ls-product-design# set pass-through http banner login "welcome" lsdesignadmin1@host:ls-product-design# set pass-through default-profile ldap1
结果
在配置模式下,输入和show security policiesshow access firewall-authentication命令以确认您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明进行更正。
lsdesignadmin1@host:ls-product-design# show security policies
from-zone ls-product-design-trust to-zone ls-product-design-untrust {
policy permit-all-to-otherlsys {
match {
source-address product-designers;
destination-address otherlsys;
application any;
}
then {
permit;
}
}
}
from-zone ls-product-design-untrust to-zone ls-product-design-trust {
policy permit-authorized-users {
match {
source-address otherlsys;
destination-address product-designers;
application junos-h323;
}
then {
permit {
firewall-authentication {
pass-through {
access-profile ldap1;
}
}
}
}
}
policy permit-all-from-otherlsys {
match {
source-address otherlsys;
destination-address product-designers;
application any;
}
then {
permit;
}
}
}
lsdesignadmin1@host:ls-product-design# show access firewall-authentication
pass-through {
default-profile ldap1;
http {
banner {
login welcome;
}
}
}
如果完成设备配置,请从配置模式进入。commit
验证
要确认配置工作正常,请执行以下任务:
验证防火墙用户身份验证并监控用户和 IP 地址
目的
显示防火墙身份验证用户历史记录,并验证身份验证成功的防火墙用户数和登录失败的防火墙用户数。
行动
在作模式下,输入以下 show 命令。
lsdesignadmin1@host:ls-product-design> show security firewall-authentication history lsdesignadmin1@host:ls-product-design> show security firewall-authentication history identifier id lsdesignadmin1@host:ls-product-design> show security firewall-authentication users lsdesignadmin1@host:ls-product-design> show security firewall-authentication users identifier id
了解逻辑系统中的集成用户防火墙支持
从 Junos OS 18.3R1 版开始,除了对 身份管理服务 (JIMS) 和 ClearPass 身份验证 瞻博网络身份验证源的现有支持外,对身份验证源的支持也已扩展到包括本地身份验证、Active Directory (AD) 身份验证和防火墙身份验证。
从 Junos OS 18.2R1 版开始,使用共享模型增强了对用户防火墙身份验证的支持。在此模型中,用户逻辑系统与主逻辑系统共享用户防火墙配置和身份验证条目,并且用户逻辑系统支持集成用户防火墙身份验证。
在共享模型中,用户防火墙相关的配置在主逻辑系统下进行配置,例如身份验证源、身份验证源优先级、身份验证条目超时、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。
使用用户防火墙身份验证的限制
在租户系统上使用用户防火墙身份验证具有以下限制:
JIMS 服务器根据客户网络的 IP 地址收集身份验证条目。如果 IP 地址重叠,则当用户在不同的用户逻辑系统下登录时,身份验证条目会发生变化。
在逻辑系统上的自定义模型中使用用户防火墙身份验证的限制
在逻辑系统上的自定义模型中使用用户防火墙身份验证具有以下限制:
要在根逻辑系统下配置的 JIMS 服务器配置。
JIMS 服务器和 SRX 系列防火墙之间的逻辑系统名称应一致且唯一。
也可以看看
示例:为用户逻辑系统配置集成用户防火墙识别管理
此示例说明如何配置 SRX 系列防火墙的高级查询功能,以便从瞻博网络身份管理服务 (JIMS) 获取用户身份信息,以及如何配置安全策略以匹配用户逻辑系统的源身份。在根逻辑系统中,用户防火墙配置了 JIMS,然后根逻辑系统管理来自 JIMS 的所有身份验证条目。在此示例中,所有用户逻辑系统都与根逻辑系统共享其身份验证条目。
要求
此示例使用以下硬件和软件组件:
在机箱群集中运行的 SRX1500 设备
JIMS 服务器
Junos OS 18.2 R1 版
开始之前:
以逻辑系统管理员身份登录到用户逻辑系统。请参阅 用户逻辑系统概述
配置用户逻辑系统 lsys1 和 lsys2。请参阅 示例:配置用户逻辑系统
在主逻辑系统上配置安全配置文件并将其分配给用户逻辑系统 lsys1 和 lsys2。请参阅 示例:配置逻辑系统安全性配置文件(仅限主管理员)
在逻辑系统、根逻辑系统、用户逻辑系统 lsys1 和 lsys2 上配置接口和路由选项。请参阅 示例:为主逻辑系统和互连逻辑系统配置接口、路由实例和静态路由,为用户逻辑系统配置逻辑隧道接口(仅限主管理员) 和 示例:为用户逻辑系统配置接口和路由实例
为用户逻辑系统配置安全策略。请参阅 示例:在用户逻辑系统中配置安全性策略
为用户逻辑系统配置区域。请参阅 示例:为用户逻辑系统配置安全性区域
在基本的主动/被动机箱群集中配置逻辑系统。请参阅 示例:在主动/被动机箱群集中配置逻辑系统(仅限主管理员)
概述
在此示例中,您可以在主逻辑系统上的端口 443 上配置带有 HTTPs 连接的 JIMS,在主逻辑系统上配置具有 IPv4 地址的主服务器,在逻辑系统 LSYS1 上配置带有 dc0 域的源身份“group1”的策略 p1,在逻辑系统 lsys2 上配置带有 dc0 域的源身份“group1”的策略 p1,以及从逻辑系统 lsys1 到逻辑系统 lsys2 发送流量。即使在重新启动主节点之后,您也可以查看主逻辑系统和用户逻辑系统(lsys1 和 lsys2)上的身份验证条目。
配置
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到层次结构级别的 [edit] CLI 中,然后从配置模式进入。commit
set logical-systems lsys1 security policies from-zone lsys1_trust to-zone lsys1_trust policy lsys1_policy1 match source-address any set logical-systems lsys1 security policies from-zone lsys1_trust to-zone lsys1_trust policy lsys1_policy1 match destination-address any set logical-systems lsys1 security policies from-zone lsys1_trust to-zone lsys1_trust policy lsys1_policy1 match application any set logical-systems lsys1 security policies from-zone lsys1_trust to-zone lsys1_trust policy lsys1_policy1 then permit set logical-systems lsys1 security policies from-zone lsys1_trust to-zone lsys1_trust policy lsys1_policy1 match source-identity "example.com\group1" set logical-systems lsys1 security policies from-zone lsys1_trust to-zone lsys1_trust policy lsys1_policy1 then permit set logical-systems lsys1 security policies from-zone lsys1_trust to-zone lsys1_untrust policy lsys1_policy2 match source-address any set logical-systems lsys1 security policies from-zone lsys1_trust to-zone lsys1_untrust policy lsys1_policy2 match destination-address any set logical-systems lsys1 security policies from-zone lsys1_trust to-zone lsys1_untrust policy lsys1_policy2 match application any set logical-systems lsys1 security policies from-zone lsys1_trust to-zone lsys1_untrust policy lsys1_policy2 then permit set logical-systems lsys1 security policies from-zone lsys1_untrust to-zone lsys1_trust policy lsys1_policy3 match source-address any set logical-systems lsys1 security policies from-zone lsys1_untrust to-zone lsys1_trust policy lsys1_policy3 match destination-address any set logical-systems lsys1 security policies from-zone lsys1_untrust to-zone lsys1_trust policy lsys1_policy3 match application any set logical-systems lsys1 security policies from-zone lsys1_untrust to-zone lsys1_trust policy lsys1_policy3 then permit set logical-systems lsys1 security policies policy-rematch set logical-systems lsys2 security policies from-zone lsys2_untrust to-zone lsys2_untrust policy lsys2_policy1 match source-address any set logical-systems lsys2 security policies from-zone lsys2_untrust to-zone lsys2_untrust policy lsys2_policy1 match destination-address any set logical-systems lsys2 security policies from-zone lsys2_untrust to-zone lsys2_untrust policy lsys2_policy1 match application any set logical-systems lsys2 security policies from-zone lsys2_untrust to-zone lsys2_untrust policy lsys2_policy1 match source-identity "example.com\group2" set logical-systems lsys2 security policies from-zone lsys2_untrust to-zone lsys2_untrust policy lsys2_policy1 then permit set logical-systems lsys2 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 logical-systems] user@host#set LSYS0 user@host#set LSYS1 user@host#set LSYS2
在逻辑系统 lsys1 上配置带有源身份组 1 的安全策略lsys1_policy1,以允许从 lsys1_trust 到 lsys1_trust 的流量。
[edit security policies] user@host#set from-zone lsys1_trust to-zone lsys1_trust policy lsys1_policy1 match source-address any user@host#set from-zone lsys1_trust to-zone lsys1_trust policy lsys1_policy1 match destination-address any user@host#set from-zone lsys1_trust to-zone lsys1_trust policy lsys1_policy1 match application any user@host#set from-zone lsys1_trust to-zone lsys1_trust policy lsys1_policy1 match source-identity "example.com\group1" user@host#set from-zone lsys1_trust to-zone lsys1_trust policy lsys1_policy1 then permit
配置允许从 lsys1_trust 到 lsys1_untrust 的流量的安全策略lsys1_policy2。
[edit security policies] user@host#set from-zone lsys1_trust to-zone lsys1_untrust policy lsys1_policy2 match source-address any user@host#set from-zone lsys1_trust to-zone lsys1_untrust policy lsys1_policy2 match destination-address any user@host#set from-zone lsys1_trust to-zone lsys1_untrust policy lsys1_policy2 match application any user@host#set from-zone lsys1_trust to-zone lsys1_untrust policy lsys1_policy2 then permit
配置允许从 lsys1_untrust 到 lsys1_trust 的流量的安全策略lsys1_policy3。
[edit security policies] user@host#set from-zone lsys1_untrust to-zone lsys1_trust policy lsys1_policy3 match source-address any user@host#set from-zone lsys1_untrust to-zone lsys1_trust policy lsys1_policy3 match destination-address any user@host#set from-zone lsys1_untrust to-zone lsys1_trust policy lsys1_policy3 match application any user@host#set from-zone lsys1_untrust to-zone lsys1_trust policy lsys1_policy3 then permit user@host#set policy-rematch
配置安全区域并为每个区域分配接口。
[edit security zones] user@host#set security-zone lsys1_trust interfaces reth2.0 host-inbound-traffic system-services all user@host#set security-zone lsys1_trust interfaces reth2.0 host-inbound-traffic protocols all user@host#set security-zone lsys1_trust interfaces lt-0/0/0.11 host-inbound-traffic system-services all user@host#set security-zone lsys1_trust interfaces lt-0/0/0.11 host-inbound-traffic protocols all user@host#set security-zone lsys1_untrust interfaces reth3.0 host-inbound-traffic system-services all user@host#set security-zone lsys1_untrust interfaces reth3.0 host-inbound-traffic protocols all
使用源身份组 1 配置安全策略lsys2_policy1,允许从 lsys2 上的 lsys2_untrust 到 lsys2_untrust 的流量。
[edit security policies] user@host#set from-zone lsys2_untrust to-zone lsys2_untrust policy lsys2_policy1 match source-address any user@host#set from-zone lsys2_untrust to-zone lsys2_untrust policy lsys2_policy1 match destination-address any user@host#set from-zone lsys2_untrust to-zone lsys2_untrust policy lsys2_policy1 match application any user@host#set from-zone lsys2_untrust to-zone lsys2_untrust policy lsys2_policy1 match source-identity "example.com\group2" user@host#set from-zone lsys2_untrust to-zone lsys2_untrust policy lsys2_policy1 then permit user@host#set policy-rematch
配置安全区域并为 lsys2 上的每个区域分配接口。
[edit security zones] user@host#set security-zone lsys2_untrust interfaces reth4.0 host-inbound-traffic system-services all user@host#set security-zone lsys2_untrust interfaces reth4.0 host-inbound-traffic protocols all user@host#set security-zone lsys2_untrust interfaces lt-0/0/0.21 host-inbound-traffic system-services all user@host#set security-zone lsys2_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 logical-system all 命令。
user@host> show services user-identification authentication-table authentication-source identity-management logical-system all
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
意义
重新启动主节点后,输出显示 lsys1 和 lsys2 上存在的用户识别管理会话。
示例:在逻辑系统的自定义模型中配置集成用户防火墙
此示例说明如何通过逻辑系统活动模式的瞻博网络身份管理服务 (JIMS) 服务器使用自定义模型来配置集成用户防火墙。主逻辑系统不与逻辑系统共享身份验证条目。在活动模式下,SRX 系列防火墙通过 HTTPs 协议查询从 JIMS 服务器接收的身份验证条目。
在此示例中,将执行以下配置:
-
活动 JIMS 服务器配置
-
逻辑系统 IP 查询配置
-
逻辑系统认证条目配置
-
逻辑系统安全性策略配置
要求
此示例使用以下硬件和软件组件:
-
JIMS 服务器版本 2.0
-
Junos OS 19.3R1 版
开始之前,请确保您了解以下信息:
-
JIMS 服务器的 IP 地址。
-
JIMS 服务器上用于接收 HTTP 请求的端口号。
-
来自活动查询服务器的 JIMS 服务器的客户端 ID。
-
来自活动查询服务器的 JIMS 服务器的客户端密钥。
概述
在此示例中,您可以在端口 443 上配置带有 HTTPs 连接的 JIMS,在主逻辑系统上配置具有 IPv4 地址的主服务器,在逻辑系统LSYS1上配置带有源身份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 logical-systems LSYS1 services user-identification logical-domain-identity-management active ip-query query-delay-time 30 set logical-systems LSYS1 services user-identification logical-domain-identity-management active invalid-authentication-entry-timeout 1 set logical-systems LSYS1 security policies from-zone untrust to-zone trust policy p2 match source-address any set logical-systems LSYS1 security policies from-zone untrust to-zone trust policy p2 match destination-address any set logical-systems LSYS1 security policies from-zone untrust to-zone trust policy p2 match application any set logical-systems LSYS1 security policies from-zone untrust to-zone trust policy p2 match source-identity "example.com\group1" set logical-systems LSYS1 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"
-
配置 LSYS1 的 IP 查询延迟时间。
user@host# set logical-systems LSYS1 services user-identification logical-domain-identity-management active ip-query query-delay-time 30
-
配置 LSYS1 的身份验证条目属性。
user@host# set logical-systems LSYS1 services user-identification logical-domain-identity-management active invalid-authentication-entry-timeout 1
-
配置安全策略 p2,以允许从不信任区域到 LSYS1 信任区域的流量。
user@host# set logical-systems LSYS1 security policies from-zone untrust to-zone trust policy p2 match source-address any user@host# set logical-systems LSYS1 security policies from-zone untrust to-zone trust policy p2 match destination-address any user@host# set logical-systems LSYS1 security policies from-zone untrust to-zone trust policy p2 match application any user@host# set logical-systems LSYS1 security policies from-zone untrust to-zone trust policy p2 match source-identity "example.com\group1" user@host#set logical-systems LSYS1 security policies from-zone untrust to-zone trust policy p2 then permit
结果
在配置模式下,输入和show services user-identification logical-domain-identity-managementshow logical-systems LSYS1命令以确认您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明进行更正。
user@host# show services user-identification logical-domain-identity-management
active {
query-server jims1 {
connection {
connect-method https;
port 443;
primary {
address 192.0.2.5;
client-id otest;
client-secret "$ABC123"; ## SECRET-DATA
}
}
}
}
user@host# show logical-systems LSYS1
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 : 192.0.2.5
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 : 192.0.2.5
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 logical-system LSYS1 命令。
user@host> show services user-identification authentication-table authentication-source all logical-system LSYS1
node0:
--------------------------------------------------------------------------
Logical System: LSYS1
Domain: example.com
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::5 N/A posture-healthy Valid
2001:db8::342c:302b N/A posture-healthy Valid
意义
输出显示指定身份验证源的身份验证表的全部内容,或基于用户名的特定域、组或用户。根据用户设备的 IP 地址显示用户的身份信息。
变更历史表
是否支持某项功能取决于您使用的平台和版本。使用 功能资源管理器 确定您的平台是否支持某个功能。