[Design of JBoss Web Services] - Re: What do we need in terms of x509 cert processing for ws
by scott.stark@jboss.org
"jason.greene(a)jboss.com" wrote :
| 1. Ability to generate a v3 cert, bouncy castle does support this. Right now I tell people to use openssl.
|
We should just look at whether bouncy castle/ejbca can be leveraged to get a sufficient cert generation capability into our codebase.
"jason.greene(a)jboss.com" wrote :
| 2. Support for subject key identifier code follows (Although, ideally all v3 attributes would be supported)
|
|
| | public static byte[] getSubjectKeyIdentifier(X509Certificate cert)
| | {
| | // Maybee we should make one ourselves if it isn't there?
| | byte[] encoded = cert.getExtensionValue("2.5.29.14");
| | if (encoded == null)
| | return null;
| |
| | // We need to skip 4 bytes [(OCTET STRING) (LENGTH)[(OCTET STRING) (LENGTH) (Actual data)]]
| | int trunc = encoded.length - 4;
| |
| | byte[] identifier = new byte[trunc];
| | System.arraycopy(encoded, 4, identifier, 0, trunc);
| |
| | return identifier;
| | }
| |
|
Access to any raw attribute seems to exist. What is not generally available is a mechanism to control how to decode a given attribute. I would assume this is going to require ASN/DER classes (should exist in bc or even opends), along with a OID to format handler registry. The latter is core to ldap and so maybe we can leverage the opends schema handling pieces as a way to externalize the cert attribute handling as well.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980154#3980154
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980154
19 years, 5 months
[Design of Security on JBoss] - Re: SecurityContext
by anil.saldhana@jboss.com
An issue that I have noticed with Security Context with reference to RoleMapping is:
If we have multiple deployments (A.war,b-ejb.jar,C.war etc) all driven by the same security domain and since the SecurityContext works at the domain level, we can have an issue if the user configures a custom role mapping module for a particular deployment (say, A.war).
So the user may want a subset of roles applicable to deployment A whereas for the other deployments, a superset (or a different set of roles can apply).
Unless we do a fresh creation of security context roles for each lookup of roles, there can be issues(cached roles in the context)
Workaround:
a) Provide a system property that is jbosssx specific that configures whether the Authorization Manager does a fresh set of security context roles (read the subject roles if any and apply mapping) on each look up OR
b) Provide options on the Authorization Manager Service to be provided to each of the Authorization Managers possible.
I like b)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980152#3980152
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980152
19 years, 5 months
[Design of JBossCache] - Re: POJOization of config elements
by scott.stark@jboss.org
"bstansberry(a)jboss.com" wrote : As mentioned on the dev list, a lot has been checked in on this. There are some bits of ugliness. Manik, you pointed out the problem with the use of inner classes; I should be able to fix that today.
|
| Other ugliness:
|
| 1) MC doesn't like overloading the setter on a property, which is an issue for the properties that are enum types. E.g.:
|
|
| | public CacheMode getCacheMode()
| | public void setCacheMode(CacheMode mode)
| | public void setCacheMode(String mode)
| |
|
| doesn't work; the MC wants to pass String "REPL_ASYNC" to the overloaded method that takes CacheMode, and thus blows up.
|
| To fix, I had to do this for CacheMode, IsolationLevel and NodeLockingScheme:
|
|
| | public CacheMode getCacheMode()
| | public void setCacheMode(CacheMode mode)
| | public void setCacheMode(String mode) // maybe redundant??
| | public String getCacheModeString()
| | public void setCacheModeString(String mode)
| |
|
| I don't know if it's practical to add a PropertyEditor to MC to handle enum conversions; for now the above is ugly but works.
|
It should not require a PropertyEditor as there already is the Enum.valueOf(Class enumType, String name) method. Its just a question of xml configuration parsing layer recognizing the overloaded method and using valueOf on the string accessor. I'll create a jira issue for this.
"bstansberry(a)jboss.com" wrote :
| 2) Names of properties in Configuration. Configuration can take 2 different types for each of the 3 complex sub-configurations (BR, cache loading, eviction). These are an Element, for legacy support, and a pojo for configuration via the MC. So, 2 properties for each sub-configuration. Problem is naming these properties; the Element properties already have names, but the naming conventions are inconsistent. Changing the Element properties will break existing config files, so I worked around that when naming the pojo properties. Ugly, completely inconsistent result is:
|
|
| | // BR
| | public Element getBuddyReplicationConfig()
| | public void setBuddyReplicationConfig(Element config)
| |
| | public BuddyReplicationConfig getBuddyReplicationConfiguration()
| | public void setBuddyReplicationConfiguration(BuddyReplicationConfig config)
| |
| | // Cache Loader
| | public Element getCacheLoaderConfiguration()
| | public void setCacheLoaderConfiguration(Element config)
| |
| | public CacheLoaderConfig getCacheLoaderConfig()
| | public void setCacheLoaderConfig(CacheLoaderConfig config)
| |
| | // Eviction
| | public Element getEvictionPolicyConfig()
| | public void setEvictionPolicyConfig(Element config)
| |
| | public EvictionConfig getEvictionConfig()
| | public void setEvictionConfig(EvictionConfig config)
| |
|
| One temptation is to break compatibility with existing config files for BR by swapping the property names. There aren't likely to be many existing configs that have BR. E.g.
|
|
| | public Element getBuddyReplicationConfiguration()
| | public void setBuddyReplicationConfiguration(Element config)
| |
| | public BuddyReplicationConfig getBuddyReplicationConfig()
| | public void setBuddyReplicationConfig(BuddyReplicationConfig config)
| |
|
We should not be exposing any dom objects via the configuration objects. That should only be done via legacy configuration wrapper classes that turn around and write to the pure object based configuration instance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980149#3980149
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980149
19 years, 5 months