-
1. Re: Issue with RolesAllowed annotation in JBoss 7.1 CR1
snelders Jan 6, 2012 4:00 AM (in response to lszymik)You should use org.jboss.ejb3.annotation.SecurityDomain
Let me know if you get the remote login working since this is something I'm strugling with.
-
2. Re: Issue with RolesAllowed annotation in JBoss 7.1 CR1
lszymik Jan 7, 2012 6:38 AM (in response to snelders)I have added a additional JAR file: jboss-ejb3-ext-api-2.0.0-beta-2.jar and I was able to add org.jboss.ejb3.annotation.SecurityDomain annotation. After that changes my session beans are secured and I am getting Invalid User exception.
Thank you for good tip.
Now I am not able to perform login in my remote client application. I am trying to check that code:
CallbackHandler callbackHandler = new AppCallbackHandler("user", "userpass".toCharArray());
loginContext = new LoginContext("logincontextname", callbackHandler);
loginContext.login();
The credentials are somehow not passed to the application container.
Is something changed in JBoss7.1? Maybe I should use another login code?
Thanks
LUkasz
-
3. Re: Issue with RolesAllowed annotation in JBoss 7.1 CR1
snelders Jan 7, 2012 7:55 AM (in response to lszymik)So far I also didn't get further as the Invalid User Exception (http://community.jboss.org/thread/176963?tstart=0).
Can you try enable trace logging for JBoss security modules by editing the standalone.xml to something like this to see what's going on on the server side:
<subsystem xmlns="urn:jboss:domain:logging:1.1"> <console-handler name="CONSOLE"> <level name="TRACE"/> <formatter> <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/> </formatter> </console-handler> <periodic-rotating-file-handler name="FILE"> <formatter> <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/> </formatter> <file relative-to="jboss.server.log.dir" path="server.log"/> <suffix value=".yyyy-MM-dd"/> <append value="true"/> </periodic-rotating-file-handler> <logger category="com.arjuna"> <level name="WARN"/> </logger> <logger category="org.apache.tomcat.util.modeler"> <level name="WARN"/> </logger> <logger category="sun.rmi"> <level name="WARN"/> </logger> <logger category="jacorb"> <level name="WARN"/> </logger> <logger category="jacorb.config"> <level name="ERROR"/> </logger> <logger category="org.jboss.security"> <level name="TRACE"/> </logger> <root-logger> <level name="INFO"/> <handlers> <handler name="CONSOLE"/> <handler name="FILE"/> </handlers> </root-logger> </subsystem>
In my case I found out that the username and password end up somehow hashed/encoded or encrypted when they reach my server login-module.
They look like "db80497a-0e75-4d7b-8261-4bb6faf7c9b4" (username) & "d89e062f-4740-4529-a3c9-beb84d73589" (password) but also change every time I login (maybe there is a challenge involved?).
I didn't manage to get this issue fixed or answered so far, I hope you get better results.