Actually I'm unsure of how to present multiple expressions for autocloseables
in try blocks (here automatically done by my Eclipse formatter). This should be
discussed with the community so we agreed on formatting rules to create an
official Eclipse formatter as being discussed at https://s.apache.org/0ptF
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813854 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9833)
This works the same way than externalLoginKey but between 2 servers,
not 2 webapps on the same server.
The Single Sign On (SSO) is ensured by a JWT token, then all is handled as
normal by a session on the reached server. The servers may or may not share a
database but the loginUserIds on the 2 servers must be the same.
OOTB the JWT masterSecretKey is not properly initialised and can not be OOTB.
As we sign on on several servers, so have different sessions, we can't use the
externalLoginKey way to create the JWT masterSecretKey.
The best way to create the JWT masterSecretKey is to use a temporary way to load
in a static final key when compiling. This is simple and most secure.
One of the proposed way is to use sed and uuidgen to modify the masterSecretKey
value. The magic words here are TEMPORARY and FINAL!
I have not tested this between 2 servers yet, only locally where it works well.
I'll do after this commit between my local instance and the trunk demo.
Thanks: Nicolas for the sed ans uuidgen suggestion
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813679 13f79535-47bb-0310-9956-ffa450edef68
While reviewing r1813634, I found that we could use a multi-catch, and while
doing so found that we were missing a CertificateException according to Eclipse
Confirmed by Java:
:compileJava
ofbiz\framework\service\src\main\java\org\apache\ofbiz\service\rmi\socket\ssl\
SSLServerSocketFactory.java:75: error:
unreported exception CertificateException; must be caught or declared to be
thrown
ks.load(fis, passphrase);
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813671 13f79535-47bb-0310-9956-ffa450edef68
org.apache.ofbiz.datafile.
(OFBIZ-9715)
I modified the patch slightly and did some additional code cleanup by
removing commented out code and some formatting.
Thanks Julian Leichert for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813637 13f79535-47bb-0310-9956-ffa450edef68
org.apache.ofbiz.service.rmi.socket.ssl.
(OFBIZ-9714)
I modified the patch to keep the previous logic to get the SSL server
socket. The cast should be safe because of the SSLServerSocketFactory
being used to get the socket.
Thanks Dennis Balkir for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813634 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9891)
This fixes a bug where the configuration attribute in the view-map
differs from what is read in the configuration handler.
Aditionally,
a new option "none" is introduced. If it is set, no X-Frame-Options
header will be set.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813276 13f79535-47bb-0310-9956-ffa450edef68
rendering error
(OFBIZ-9889)
A bug was introduced in OFBIZ-9710, that created a catch block for a
RuntimeException that would be thrown again. Unfortunately the code block relied
on catching a NumberFormatException in case VIEW_INDEX was not set, which in the
original code was not intuitively recognisable, because only Exception was caught.
In the provided patch I removed the catch block for the RTE und changed Exception
to NumberFormatException, since it is the only Exception that is expected.
Thanks: Tobias Laufkötter
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813067 13f79535-47bb-0310-9956-ffa450edef68
org.apache.ofbiz.widget.renderer.
(OFBIZ-9704)
Applied a modified version of the patch, the null check for menuWarapper
in MenuWrapTransfor is needed.
Thanks Julian Leichert for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812908 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-6766)
Adds a Content Security Policy
To not block anything for the moment I have committed a simple most restrictive
Content-Security-Policy-Report-Only header
Then we can look at the issues using browsers tools (there are so much)
The next step is to report the errors (when there will not be too much) in the
log using a report-uri
And ultimately to use OOTB the most simple and constraining policy, with
exceptions of course (as ever).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812720 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9839)
Use try with resources for SQL objects like ResultSet and other objects.
SQL classes have AutoCloseable interface.
Thanks: Pradhan Yash Sharma
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812466 13f79535-47bb-0310-9956-ffa450edef68
We have enabled flag in ServiceEcaRule class, if its set false then seca rule will not be executed.
But there is not way to disable seca.
We can add enabled flag in SECA definition to disable the existing seca rule.
Here is the proposal:
- Add new attribute on seca tag named enabled
- Default value will be true for this.
- If user want to disable existing OOTB seca rule, then user can define same rule in custom component and set the enabled=false
Need to do some changes in code to honor the enabled attribute while loading seca rule.
Also as per current flow if same seca rule is define more then once, system will execute all the rule, ideally it should not execute same rule (same rule, condition and action) if its defined more than one.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812394 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9841)
Added AutoCloseable interface to SQLProcessor class and overridden Close method
Added closing of ResultSet, PreparedStatement and Connection Objects.
While calling SQLProcessor object in GenericDAO used Try-with-Resources and
removed unnecessary calls of the same object before actual use, also removed
finally blocks for method invocation.
Thanks: Pradhan Yash Sharma
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812144 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9839)
Use try with resources for SQL objects like ResultSet and other objects.
SQL classes have AutoCloseable interface.
Thanks: Pradhan Yash Sharma
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812104 13f79535-47bb-0310-9956-ffa450edef68