[Design of EJB 3.0] - default-activation-config?
by adrian@jboss.org
What's the purpose of this?
The schema defines it as a different type, but the new metadata classes
just use the spec type. This fails, the child is a plain activation-config-property.
| Caused by: org.jboss.xb.binding.JBossXBRuntimeException: {http://www.jboss.com/xml/ns/javaee}default-activation-config-property not found as a child of {http://www.jboss.com/xml/ns/javaee}default-activation-config
| at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:396)
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:407)
|
Also, from what I can tell, it isn't a "default" at all. The default properties override
the normal properties. e.g. org.jboss.ejb3.mdb.MDB
|
| public Map getActivationConfigProperties()
| {
| HashMap result = new HashMap();
| MessageDriven mdAnnotation = (MessageDriven) resolveAnnotation(MessageDriven.class);
| for (ActivationConfigProperty property : mdAnnotation.activationConfig())
| {
| addActivationSpecProperty(result, property);
| }
|
| DefaultActivationSpecs defaultSpecsAnnotation = (DefaultActivationSpecs)resolveAnnotation(DefaultActivationSpecs.class);
| if (defaultSpecsAnnotation != null)
| {
| for (ActivationConfigProperty property : defaultSpecsAnnotation.value())
| {
| addActivationSpecProperty(result, property);
| }
| }
|
| return result;
| }
|
Where addActivationSpecProperty() does a map.put() which replaces things with
the same key.
I don't see any reason why an annotation (class level) should
override the xml (instance level)?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104340#4104340
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104340
18 years, 4 months
[Design of Security on JBoss] - Re: Problem with custom login modules
by anil.saldhana@jboss.com
| (3:59:29 PM) Marcus: stefan and I were discussing our options in the kerberos case and we came up with 3 options... do you have time now to talk about it?
| (3:59:35 PM) anil_msn: k
| (4:00:10 PM) Marcus: option 1 is to remove the debug message (undo the jira issue)
| (4:01:20 PM) Marcus: option 2 is to assume only jboss login modules will have that option, so we filter the login modules by the class name and only add the option to the map if the package is org.jboss.security
| (4:03:13 PM) Marcus: option 3 we modify the security_config.xsd to add an attribute to the <login-module> element to specify if the login module accepts the debug option. this attribute will not be required and defaults to true. in a rare case like this, the costumer can set this attribute to false so that the option will not be added to the map
| (4:05:15 PM) anil_msn: I was thinking about option 2 in the afternoon
| (4:05:38 PM) anil_msn: but I think we need option 3 because customers who have written their own login module can get the sec domain
| (4:08:18 PM) Marcus: option 3 is probably the best in our opinion. everything keeps working as it is and only in the rare occasion where a custom login module has this problem we have a workaround
| (4:09:45 PM) Marcus: with option 2, custom login modules that extend one of our own will print null for the config name, because the option will not be in the map
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104338#4104338
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104338
18 years, 4 months
[Design of Security on JBoss] - Problem with custom login modules
by mmoyses
On a recent support case the costumer is using IBM's Kerberos login module which was working fine in JBoss AS 4.0.4. Now he migrated to JBoss AS 4.2.0 and the login module fails with this stack trace:
javax.security.auth.login.LoginException: Bad JAAS configuration: unrecognized option: jboss.security.security_domain
at com.ibm.security.jgss.i18n.I18NException.throwLoginException(I18NException.java:7)
at com.ibm.security.auth.module.Krb5LoginModule.b(Krb5LoginModule.java:622)
at com.ibm.security.auth.module.Krb5LoginModule.a(Krb5LoginModule.java:416)
at com.ibm.security.auth.module.Krb5LoginModule.login(Krb5LoginModule.java:238)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:795)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:209)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:709)
at java.security.AccessController.doPrivileged(AccessController.java:242)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:706)
at javax.security.auth.login.LoginContext.login(LoginContext.java:603)
at org.epoline.security.sso.spnego.Configuration.login(Configuration.java:305)
... 101 more
This option is related to this jira issue: http://jira.jboss.com/jira/browse/JBAS-1477
To resolve this issue AuthenticationInfo now puts an extra entry in all login modules options map to set the security-domain name.
This extra entry is not recognized as a valid option in this specific login module thus the exception. The problem is specific to this particular login module but could lead to problems in others as well.
A proposed solution could be modify the security-config schema so that an extra attribute is included in the <login-module> element. This attribute should be a boolean indicating if the login module accepts the security-domain name entry in the options map. The attribute should not be required and defaults to true, this way everything keeps working as they are. Whenever this problem occurs, the costumer has the option to set this attribute to false so that AuthenticationInfo doesn't put the entry in the map.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104337#4104337
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104337
18 years, 4 months