[
https://issues.jboss.org/browse/WFLY-11168?page=com.atlassian.jira.plugin...
]
Bartosz Baranowski commented on WFLY-11168:
-------------------------------------------
[~jamezp] I dont think there is any public API that allows this to happen(I might be wrong
though):
{noformat}
✔ ~/redhat/git/wildfly [master|⚑ 1]
10:01 $ grep -R getIncomingRunAsIdentity *
ejb3/src/main/java/org/jboss/as/ejb3/security/RunAsPrincipalInterceptor.java: final
SecurityIdentity oldIncomingRunAsIdentity = ejbComponent.getIncomingRunAsIdentity();
ejb3/src/main/java/org/jboss/as/ejb3/component/EJBComponent.java: public
SecurityIdentity getIncomingRunAsIdentity() {
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/security/runas/UncheckedStatelessBean.java:
final Roles roles = ((SessionContextImpl)
ctx).getComponent().getIncomingRunAsIdentity().getRoles("ejb");
✔ ~/redhat/git/wildfly [master|⚑ 1]
{noformat}
[~bdecoste] ^^ What this test is supposed to do? Refs I could find just use offending code
to:
{noformat}
UncheckedStatelessBean tester = (UncheckedStatelessBean) new
InitialContext().lookup("java:module/"
+ UncheckedStatelessBean.class.getSimpleName());
calleeCallerPrincipal = tester.unchecked();
log.trace("callee: " + calleeCallerPrincipal);
{noformat}
UncheckedStatelessBean uses EJB extension components
----------------------------------------------------
Key: WFLY-11168
URL:
https://issues.jboss.org/browse/WFLY-11168
Project: WildFly
Issue Type: Bug
Components: EJB, Test Suite
Reporter: James Perkins
Assignee: Farah Juma
Priority: Major
The {{UncheckedStatelessBean}} test uses the
{{org.jboss.as.ejb3.context.SessionContextImpl}} from the EJB extension to get the roles.
If possible this should be refactored to use a public API as that's how users would
get the values. If this can be fixed the {{org.wildfly:wildfly-ejb3}} dependency should be
removed from the basic integration tests.
[~fjuma] I only assigned this to you as it looks like you updated the test. If someone
else should look at this please feel free to reassign.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)