从高速缓存中撤销 JAAS 的用户

在 WebSphere® Application Server V5.0.2 及更高版本中,支持使用 MBean 接口从安全性高速缓存撤销用户。

关于此任务

当从认证高速缓存移除某个用户时,该用户仍然可以在任何时间登录 WebSphere Application Server。移除高速缓存仅会从运行时高速缓存移除该用户。它不会从注册表中移除该用户,也不会锁定该用户。

过程

在 JACL 脚本中使用以下过程。

在给定领域和用户标识的情况下,以下 Java™ 命令语言 (JACL) 将撤销用户,并且在从 wsadmin 命令运行时,将对返回的所有安全管理 MBean 实例循环执行。该命令还在每个进程期间将用户从高速缓存清除。

注意: 在以下某些代码行中,为了便于说明,已经将一行代码分割成两行或两行以上。
proc revokeUser {realm userid} { 	    global AdminControl AdminConfig
if {[catch {$AdminControl queryNames WebSphere:type=SecurityAdmin,*}
result]} { 		puts stdout "\$AdminControl queryNames WebSphere:type=SecurityAdmin,*
caught an exception $result\n" 		return  	} else { 		if {$result != {}} {
foreach secBean $result { 	                        if {$secBean != {} || $secBean != "null"} {
if {[catch {$AdminControl invoke $secBean                      purgeUserFromAuthCache "$realm $userid"} result]} {
puts stdout "\$AdminControl invoke $secBean                         purgeUserFromAuthCache $realm $userid caught an
exception $result\n" 			                        return  		                       } else {
puts stdout "\nUser $userid has been purged from the                        cache of process $secBean\n"                 		        } 	                        } else { 		                        puts stdout "unable to get securityAdmin Mbean, user
$userid not revoked"                       }                       }	 	} else { 		puts stdout "Security Mbean was 
not found\n" 		return 	}         }         return true } 

指示主题类型的图标 任务主题



时间戳记图标 最近一次更新时间: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-base-dist&topic=tsec_cachepurge
文件名:tsec_cachepurge.html