> I added two beans to test the run-as identity propagation and
> deployed a sample ear to the j2ee1.3_01 reference implementation and
> setup the CallerBean to invoke the CalleeBean with the ejb-jar.xml
> descriptor shown below. The ri behavior differs in 2 ways from our
> current implementation
>
> 1. the caller as see by the CalleeBean via getCallerPrincipal is the
> run-as principle identity. 2. a query to
> isCallerInRole('InternalRole') by the CalleeBean where InternalRole
> is the run-as role of CallerBean returns true.
>
> Another behavior the ri displays is that if the principal used for
> the run-as identity is assigned other roles, these are visible in the
> CalleeBean via isCallerInRole in addition to the run-as role. The
> run-as role augments the existing run-as principal roles with the
> run-as role. I'm fine with supporting behaviors 1 & 2 but I don't to
> support this latter behavior as it would require providing
> authentication crenditials for the run-as principal.
There are two options for the return value of
isCallerInRole(other-role), where other-role is a role that the
principal has in the security domain, but is not the run-as role:
a. True:
The test should succeed because the spec implies that the
principal must be a real principal in the security domain.
Therefore, isCallerInRole() should succeed for all of the
roles that the principal is configured to have.
b. False:
If <run-as> is used, we are signalling that we are only
really interested in testing for membership of that
particular role.
I have no particular strong feeling either way, however option a.
seems to maintain some consistency: given a user principal the
effect of isCallerInRole() is always consistent.
Would you necessarily need to have the credential of the run-as
principal to provide option a. behaviour? The J2EE
tutorial (hardly definitive I know) says:
"When an enterprise bean is designed so that either the original caller
identity or a designated identity is used to call a target bean, the
target bean will receive the propagated identity only; it will *not*
receive any authentication data.
There is no way for the target container to authenticate the propagated
security identity. However, since the security identity is used in
authorization checks (for example, method permissions or with the
isCallerInRole() method), it is vitally important that the security
identity be authentic. Since there is no authentication data available
to authenticate the propagated identity, the target must trust that the
calling container has propagated an authenticated security identity."
??
Jan
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development