国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開(kāi)通VIP
Websphere5.1.x JAAS LDAP配置全攻略(1)
Websphere5.1.x+JAAS+LDAP配置全攻略(1)
作者:未知 時(shí)間:2005-07-27 22:20 出處:CSDN 責(zé)編:chinaitpower
摘要:Websphere5.1.x+JAAS+LDAP配置全攻略(1)
Your Ad Here
Advertise on this site
前言:
前些日子寫了一篇關(guān)于JAAS+LDAP在JBOSS上的配置:
http://blog.csdn.net/oicqren/archive/2004/11/27/195803.aspx
現(xiàn)將其移植到Websphere上,這個(gè)過(guò)程比JBOSS復(fù)雜。同樣是整天在網(wǎng)上搜啊、試啊、問(wèn)啊,打電話騷擾IBM工程師??!說(shuō)來(lái)奇怪,就是沒(méi)人能給一準(zhǔn)確答案。也許是老婆來(lái)深圳看我,帶來(lái)很多支持與運(yùn)氣。今天解決了這個(gè)問(wèn)題,貼出來(lái)。
ps.更多安全信息請(qǐng)參考紅皮書:sg246573
目標(biāo):
使用JAAS框架,使用LDAP Server,使用Websphere,做用戶的驗(yàn)證和授權(quán)
(驗(yàn)證的含義是用戶有效,即用戶名、密碼輸入正確;授權(quán)的含義是用戶被授予某種角色)
基礎(chǔ)要求:
精通J2EE框架
熟悉iPlanet Directory Server配置
熟悉Websphere配置
熟悉JAAS框架
準(zhǔn)備:
windows 2k (要加入域)
j2sdk1.4.2 installed
Websphere 5.1.x Or Webphsere installed
iPlanet Directory Server 5.1 Service Pack 2 installed
假設(shè):
應(yīng)用名稱為myApp
應(yīng)用中需要配置的point-list:
web.xml
application.xml
ibm-application-bnd.xmi
iPlanet Directory Server用戶和角色
websphere admin console:安全性>JAAS 配置>應(yīng)用程序登錄
websphere admin console:安全性>用戶注冊(cè)表>LDAP
websphere admin console:安全性>全局安全性
websphere admin console:應(yīng)用程序>企業(yè)應(yīng)用程序>myApp>映射安全性角色到用戶/組
可選配置點(diǎn):
websphere admin console:安全性>認(rèn)證機(jī)制>LTPA
另外:
可以通過(guò)WAS AAT工具、或者WSAD開(kāi)發(fā)工具、文本編輯器來(lái)修改下面的配置。但要做到配置相同。
我用UltraEdit修改的。所以下面的方法沒(méi)有工具的介紹。
[web.xml]
---------------------------------------------------------------------------------------------
是什么我不用說(shuō)了吧!在</web-app></web-app>標(biāo)簽中增加下面一段。
<security-constraint>:安全約束的表述
<url-pattern>:        被限定在安全約束中的資源文件名模式*.jsp代表所有jsp文件,*.do代表struts的所有Action
<http-method>:        被限定在安全約束中的訪問(wèn)方法
<auth-constraint>:    那一種角色可以認(rèn)為有權(quán)限訪問(wèn)資源
<auth-method>:        驗(yàn)證授權(quán)的方式,此處必須是FORM類型
</realm-name>:        安全域名稱
<form-login-page>:    如果還沒(méi)有做驗(yàn)證,將轉(zhuǎn)向到此頁(yè)面
<form-error-page>:    如果驗(yàn)證未通過(guò),將轉(zhuǎn)向到此頁(yè)面
<security-role>:      描述一下上面用到的角色
<security-constraint>
<web-resource-collection>
<web-resource-name>Restricted</web-resource-name>
<description>Declarative security tests</description>
<url-pattern>*.do</url-pattern>
<url-pattern>*.jsp</url-pattern>
<http-method>HEAD</http-method>
<http-method>GET</http-method>
<http-method>POST</http-method>
<http-method>PUT</http-method>
<http-method>DELETE</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>icpuser</role-name>
</auth-constraint>
<user-data-constraint>
<description>no description</description>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<realm-name>icprealm</realm-name>
<form-login-config>
<form-login-page>/login.do</form-login-page>
<form-error-page>/LogError.do</form-error-page>
</form-login-config>
</login-config>
<security-role>
<description>A user allowed to login</description>
<role-name>icpuser</role-name>
</security-role>
---------------------------------------------------------------------------------------------
[application.xml]
---------------------------------------------------------------------------------------------
不說(shuō)了,J2EE開(kāi)發(fā)人員都應(yīng)該認(rèn)識(shí)它。
修改<display-name>myApp</display-name>
在<application></application>標(biāo)簽中增加下面一段。id="......"很重要不能省略。
<security-role id="SecurityRole_1">
<description>role-icpuser</description>
<role-name>icpuser</role-name>
</security-role>
---------------------------------------------------------------------------------------------
[ibm-application-bnd.xmi]
---------------------------------------------------------------------------------------------
在"應(yīng)用程序>安裝新的應(yīng)用程序"功能中將自己的程序成功發(fā)布之后。
檢查$WAS_HOME\config\cells\zkf5011\applications\myApp.ear\deployments\myApp\META-INF\ibm-application-bnd.xmi文件是否存在下面配置,如果沒(méi)有請(qǐng)?zhí)砑?。這里的<role href="META-INF/application.xml#......"/>很重要,必須和application.xml的<security-role id="......">相同,都為"SecurityRole_1"
<authorizationTable>
<authorizations xmi:id="RoleAssignment_1">
<role href="META-INF/application.xml#SecurityRole_1"/>
</authorizations>
<authorizationTable>
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開(kāi)APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
jaas tomcat的實(shí)例
JBOSS的安全配置--『爪洼橙樹(shù)園』
web.xml中<security-constraint>和四種認(rèn)證類型
Java Web基礎(chǔ)知識(shí)之安全
ActiveMQ 5.2的安全性配置
tomcat web.xml配置
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服