我正在嘗試爲JBoss 5.1.0.GA
上託管的基於Web的應用程序使用自定義JAAS
身份驗證模塊。所以一切似乎都運行良好,直到用戶數量增加,會話(因此它認爲)開始混合。JBoss JAAS自定義登錄模塊
我使用自定義JAAS的原因是由於自定義身份驗證後端和需要傳遞密碼以進一步在應用程序中使用。
當我在servlet中調用request.getUserPrincipal時,我得到了一個類型爲SimplePrincipal的對象,而不是我的自定義主體。爲了讓用戶使用SecurityAssociation.getSubject().getPrincipals()
並懷疑此時我收到了不正確的委託人。
什麼是實現自定義登錄模塊並在JBoss上檢索web層(Serlets)上的已登錄Principal的正確方法?
編輯: EJB層上存在的問題,https://issues.jboss.org/browse/EJBTHREE-1756
價:
- http://stuffthathappens.com/blog/2008/05/16/writing-a-custom-jaas-loginmodule/
- http://community.jboss.org/wiki/SecurityJAASLoginModule
- http://community.jboss.org/message/531986#531986
- http://download.oracle.com/javase/1.4.2/docs/guide/security/jaas/JAASLMDevGuide.html
- http://community.jboss.org/thread/44388
- http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/5/pdf/Security_Guide/JBoss_Enterprise_Application_Platform-5-Security_Guide-en-US.pdf