EJB3和JAAS主题/原理如何从servlet容器传播到EJB层? [英] EJB3 & How JAAS subject/principal is propagated to EJB Tier from servlet container?
本文介绍了EJB3和JAAS主题/原理如何从servlet容器传播到EJB层?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图了解JAAS主体如何从Web层传播到Business/EJB层.
I'm trying to understand how the JAAS principal propagates to the Business/EJB tier from web tier.
我了解到,如果在 login-config &中配置了角色/领域, web.xml 的 security-context ,然后servlet容器也将透明地将经过身份验证的主体传递给EJB层.
I've read that the if the roles/realm is configured in login-config & security-context of web.xml then the servlet container will also transparently pass the authenticated principal to the EJB Tier.
两个问题
1.)首先&更重要的是,这是真的吗?没有开发人员的任何干预!
2)其次,任何想法都是在后台进行的.
Two questions
1.) First & more importantly is that true ? Without any intervention from the developer !
2.) And secondly any idea how that works under the hood.
推荐答案
- 是的,这是真的.通常,ejb的目的是从开发人员手中清除难"的东西(例如安全性,事务,健壮性,多线程等).
- 取决于实现.我知道在jboss(至少4.x和更低版本)中,远程方法调用使用了自定义序列化协议,该协议具有可随请求发送的任意信息的附加Map.这是身份验证信息以及其他支持集群的内容.对于本地方法调用,我相信他们使用诸如ThreadLocals之类的东西.
这篇关于EJB3和JAAS主题/原理如何从servlet容器传播到EJB层?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文