[Security & JAAS/JBoss] - unauthorized-principal not applied
by Goodbyte
Hi...
I'm quite new to JBoss and JEE and tried to realize a very simple webshop to become familiar with both topics. The application is an EAR, containing a WAR and an EJB-part.
When I try to add security by adding the security-domain "java:jaas/webshop" to the WAR's jboss-web.xml and "webshop" to EJB's jboss.xml[1] after defining the application-policy "webshop" in conf/login-config.xml, I can't call any (unprotected! no method-permission in ejb-jar.xml) EJBs anymore. If I try, I get an SecurityException, because the principal is null.
I expected the principal for unauthenticated users to be equal to unauthenticated-principal in conf/standardjboss.xml, but it seems, this is never applied.
Can anybody explain me, how I can use this unauthenticated-principal or how to access my (unprotected) EJB's without discarding the security-domain?
Stefan (after hours of googling)
[1]: Using "java:jaas/webshop" in jboss.xml causes a ClassCastException because "JaasSecurityManager cannot be cast to SecurityDomainContext". In https://jira.jboss.org/jira/browse/JBAS-4022 Erica Kane suggested to leave the prefix out.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4233602#4233602
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4233602
16 years, 11 months
[JBoss jBPM] - Delegate config map of lists
by kevhender
Hi,
I'm trying to use a map of lists inside of an ActionHandler, but I am not able to correctly configure the list; I get an error saying that it cannot convert a String to a List. Here is the config:
| ...
| <action name="my-action" class="com.sample.action.MyActionHandler">
| <fields>
| <entry>
| <key>one</key>
| <value>
| <list>
| <element>one-1</element>
| <element>one-2</element>
| </list>
| </value>
| </entry>
| <entry>
| <key>two</key>
| <value>
| <list>
| <element>two-1</element>
| <element>two-2</element>
| </list>
| </value>
| </entry>
| </fields>
| </action>
| ...
|
|
| public class MyActionHandler implements ActionHandler {
|
| private Map<String, List<String>> fields;
|
| @Override
| public void execute(ExecutionContext context) throws Exception {
| ...
| }
|
| public Map<String, List<String>> getFields() {
| return fields;
| }
|
| public void setFields(Map<String, List<String>> fields) {
| this.fields = fields;
| }
|
| }
|
|
Here is the stack trace:
| 16:52:38,732 [main] ERROR GraphElement : action threw exception: java.lang.String cannot be cast to java.util.List
| java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List
| at com.sample.action.MysActionHandler.execute(CheckRequiredFieldsActionHandler.java:17)
| at org.jbpm.graph.def.Action.execute(Action.java:122)
| at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:259)
| at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:215)
| at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:185)
| at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:169)
| at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:452)
| at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:393)
| at com.sample.SimpleProcessTest.executeTask(SimpleProcessTest.java:103)
|
|
Does anyone know why this won't work? Thanks...
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4233599#4233599
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4233599
16 years, 11 months