I am still not sure what do you see as a big of a problem, maybe I am
missing something. There could be a maven multi-module project, with the
parent with pom packaging, two modules for now, the esapi-java-legacy and the esapi-c14,
esapi-c14n. c14n as in i18n. But whatever.
or some other name as you mentioned above. The esapi-java-legacy module with jar packaging type could have the esapi-c14
module as a compile dependency. Both modules could inherit the version
from the parent, so the releasing should not be too complicated and
users wouldn't need to add the new dependency manually either.
Fair enough. That would at least solve the complexity from the user because if they included the esapi jar, they would get the esapi-c14n jar pulled down from Maven Central as a dependency. Which means devs using ESAPI wouldn't have to revise their build configurations (at least not for build tools that automatically fetch dependencies).
That still leaves some problems to be addressed, like revising the instructions for the ESAPI-release-steps.odt document. That also doesn't address the separation of the JUnit tests and the Javadoc. Neither of those are insurmountable problems, but they are headaches that the ESAPI core team doesn't particularly want to address either. However, if the proposed PR addressed those potential pitfalls, then I think the 3 of us would be much more inclined to answer.
As for my motivation to get rid of ESAPI:
question like Should I use ESAPI? I'd prefer keeping the operational risk of my projects low and legacy for me means that at some point it will be deprecated.
"The second question you should ask, if I’m using it, why am I not contributing to it in some manner?"
You can't say I haven't tried ;-)
it also seems that the 3.x version is DOA. Last commits around 7 years old. Maybe the investment should rather go there...
I need to get rid of LGPL 2.1 licenses (com.io7m.xom:xom)
my OSS scanning tool reported that there were vulnerable transitive dependencies (I believe that has been solved with v2.2.2.0)
I appreciate your effort of wanting to be backwards compatible, but since this is blocking you moving further it will only drive people away. E.g. the EOL date for Java 7 was ~5 years ago. The market dictates if you decide not to upgrade, you'll have to pay for the support...in case of FOS, that could mean that you'll have to backport the changes to a legacy version that you are using.
With that being said, I do not intend to spend time on a PR, if you are not convinced,
I am skeptical, but I believe myself and my 2 ESAPI developer colleagues are fair and I think we would give you a fair shake. But one reason why I moved the discussion here is that I hope that others will pipe in with their thoughts on this. Separating things out the way you propose will be a somewhat bigger maintenance effort for us so I'd like to see if others would actually think this is a useful split. I'm not convinced that it is, based on my observation of how I've seen ESAPI used by F100 businesses, but I am also open minded.
but it's funny that:
private static void initESAPI() { final Properties esapiProperties = new Properties(); esapiProperties.setProperty(DefaultSecurityConfiguration.ENCODER_IMPLEMENTATION, CustomEncoder.class.getName()); esapiProperties.setProperty(DefaultSecurityConfiguration.ALLOW_MULTIPLE_ENCODING, String.valueOf(false)); esapiProperties.setProperty(DefaultSecurityConfiguration.ALLOW_MIXED_ENCODING, String.valueOf(false)); esapiProperties.setProperty(DefaultSecurityConfiguration.CIPHER_TRANSFORMATION_IMPLEMENTATION, "AES/CBC/PKCS5Padding"); ESAPI.override(new DefaultSecurityConfiguration(esapiProperties)); }
Danger Will Robinson! From the ESAPI.override() Javadoc:
Overrides the current security configuration with a new implementation. This is meant to be used as a temporary means to alter the behavior of the ESAPI and should *NEVER* be used in a production environment as it will affect the behavior and configuration of the ESAPI *GLOBALLY*.
I seriously thought that we had deprecated that. Maybe Matt or Jeremiah remember why we didn't. But it was
put in as a test, mostly for running JUnit tests because some stuff was difficult, if not impossible to test because
of the abuse of the Singleton pattern in ESAPI.
To clear an overridden Configuration, simple call this method with null for the config parameter. public static class CustomEncoder extends DefaultEncoder { private static volatile Encoder singletonInstance; public CustomEncoder(final List<String> codecNames) { super(codecNames); } public static Encoder getInstance() { if (singletonInstance == null) { synchronized (DefaultEncoder.class) { if (singletonInstance == null) { singletonInstance = new DefaultEncoder(Arrays.asList(HTMLEntityCodec.class.getSimpleName(), PercentCodec.class.getSimpleName())); } } } return singletonInstance; } }
I'm not sure what your compilation error was, but if you want to email me with it (or better post it to either the
ESAPI-Pro...@owasp.org Google group or post on Stack Overflow we can try to help. Or if it is a bug (very possible), then
create a new GitHub issue. Certainly it wasn't our intent to break backwards compatibility.
-Xdoclint:-html).