Dirk Franssen created WFLY-3206:
-----------------------------------
Summary: @DeclareRoles throws exception when accessing EJB methods
Key: WFLY-3206
URL:
https://issues.jboss.org/browse/WFLY-3206
Project: WildFly
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: EJB, Security
Affects Versions: 8.0.0.Final
Environment: Mac OSX, jdk1.8, jee7
Reporter: Dirk Franssen
Assignee: David Lloyd
When calling the getWisdom() method from the EJB below from a rest resource (principal =
anonymous), it throws an exception. If I add @PermitAll it does not throw an exception.
According to jsr-250: "the @DeclareRoles would be used to define roles that could be
tested. It could also be used to declare roles that are not implicitly declared as the
result of their use in a RolesAllowed annotation on the class or a method of the
class."
@Singleton
@DeclareRoles("dukes")
public class Greetings {
private String wisdom;
@PostConstruct
public void initialize(){
wisdom = "Java Programming Language Rocks!!!";
}
public void setWisdom(String wisdom){
this.wisdom = wisdom;
}
public String getWisdom(){
return userid + " said " + wisdom;
}
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira