(OFBIZ-10167)
As reported by Deepak on dev ML the returned name should be a parameter and not
enforced to "Authorisation"
This removes a wrong comment (no functional change)
Thanks: Deepak for bug report
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1821230 13f79535-47bb-0310-9956-ffa450edef68
Improve RequestHandler.makeLink code to manage url generation with surcharge the webapp path.
When a websiteId is present and it have a webappPatch define, use it on the link generation.
Example of use :
You have a httpd serveur that listen on *.mydomaine.com and define virtualHost myEcommerce.mydomaine.com and myCatalog.mydomaine.com
myEcommerce.mydomaine.com is a reverse proxy to myEcommerce.mydomaine.com/ecommerce
myCatalog.mydomaine.com is a reverse proxy to myEcommerce.mydomaine.com/catalog
Natively, all works fine with some parameters on web.xml and controller.xml but each link return are setted like that myEcommerce.mydomaine.com/ecommerce, called by apache httpd to ofbiz by myEcommerce.mydomaine.com/ecommerce/ecommerce and translate by ofbiz by ERROR ecommerce request-map not found
To solve the situation, I extended WebSite entity with attribute webappPath, init to / for websiteId ecommerce ofbiz instance and /ecommerce for other websiteId liked to other ofbiz instance (dev, back) without apache httpd with limited reverse-proxy.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818494 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10052)
This completes the work done so far by removing double check in cases not using
brackets, like
if (Debug.verboseOn())
if (Debug.verboseOn()) Debug.logVerbose()
Thanks: Michael for reporting this case I missed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818445 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10052)
This completes r1818075, there were still few cases, a last regexp search is
never too much :)
Found 4 other loops with Strings concatenation, but who cares, it's only
verbose logging...
There should not be anymore...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818077 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9833)
Comment about production server
I thought it was obvious that you should not keep this file on a production
server after having changed the default value of
ExternalServerJwtMasterSecretKey
Moreover we recommend to have the value of ExternalServerJwtMasterSecretKey
dynamically generated during each build to increase security
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1814402 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9833)
I have tested the Token Based Authentication between my local machine and the
trunk demo. It works as expected.
This completes the previous commit by:
adding a new externalServerLoginCheck pre processor
Documenting how to set the ExternalServerJwtMasterSecretKey in production
using sed and uuidgen
Adding documenting properties in security.properties, not set to be used OOTB
but ready to be set in production
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1814363 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
(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
(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-6655)
Programmatically replaces the web.xml <session-config> declarations and uses
the @WebListener annotation to start the process. This avoid to duplicates
things everywhere in web.xml files. Since the web.xml files have precedence
on annotations, the setting can be easily overridden when necessary.
Now that we also use HTTPS in ecommerce the ecommerce session cookie is
also secured.
I also noted that we had 8 weird <session-timeout> declarations:
in solr component: <session-timeout>2</session-timeout>
in themes: <session-timeout>1</session-timeout>
Also in Rainbowstone we lacked the <cookie-config> and <tracking-mode>
declarations. I think it's not good.
I resolve these points by simply removing the <session-config> in web.xml files
of themes and Solr.
Thanks: Pradhan Yash Sharma for review
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1811041 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-6655)
This is somehow related with OFBIZ-6655 because it's there that Deepak reverted
r1719762 (actually r1719939). It was right to do so at r1722379 for
RequesHandler but not for the other files. Because it now does not handle
security for cookies which are not session cookies. It's minor but still a risk,
notably for autoLoginCookie
This reapplies r1719762 for the other files to make other than session cookies
secure. I will not backport
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1809687 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9240)
ecomseo trunk and stable (R16)
Get to https://demo-trunk.ofbiz.apache.org/ecomseo/
or https://demo-stable.ofbiz.apache.org/ecomseo/
login => main page logged in
logout => main page, not logged in
login => main page logged in
Use the "Not you" link => 404
Refresh (F5 key) get you to the main page, not logged in
So it works almost correctly but you need a refresh (F5 key) for the "Not you"
link, not sure why yet.
It"s the same locally with OFBIZ-9206 fixed*, w/ or w/o portoffset ecommerce
trunk and stable (R16)
Get to https://ofbiz-vm2.apache.org:8443/ecommerce
or https://ofbiz-vm2.apache.org:18443/ecommerce
login => blank page (no 404 in access log)
Refresh (F5 key) get you to the main page, logged in
logout => blank page (no 404 in access log)
Refresh (F5 key) get you to the main page, not logged in
login => blank page (no 404 in access log)
Refresh (F5 key) get you to the main page, logged in
use the "Not you" link => blank page (no 404 in access log)
Refresh (F5 key) get you to the main page, not logged in
So it works almost correctly but you need a refresh (F5 key) between in the
3 cases, not sure why yet.
It's the same locally with OFBIZ-9206 fixed, w/ or w/o portoffset
Rohit:
The sequencing order of ControlFilter and ContextFilter is causing this problem.
I tried to swap the order in case ecommerce but changing the sequence will not
work because other filters(like ContentUrlFilter, CatalogUrlFilter) depends on
the context prepared by ContextFilter.
The issue is like when we are doing chaining of request using request-redirect
than one request attribute(FORWARDED_FROM_SERVLET) set to TRUE from
ControlServlet. In case of ecommerce ContextFilter run before ControlFilter
which copies all the attribute from parent request to redirect request and
when execution reaches the ControlFilter for the redirect request than request
will fail to hit the servlet due to the code present
at line 126(ControlFilter.java).
To fix this problem I removed the code which copies all the attribute from
parent request to redirect request because this thing is already taken care in
the RequestHandler.
Thanks: Rohit and Jacopo for the analysis and the fix
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805677 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9571)
No functional change.
We read at http://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html :
<<Using the integer fields in this class (such as ROUND_HALF_UP) to represent
rounding mode is largely obsolete; the enumeration values of the RoundingMode
enum, (such as RoundingMode.HALF_UP) should be used instead.>>
That's an easy global replacement. But it also needs to import the RoundingMode
class. It was 26 files so I decided to rather clean all the imports in all files
with the help of Eclipse.
This is a 1st step. I will need to closely look at 2 special class: UtilNumber
and Calculate.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804953 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9449)
While working on an issue reported by Pierre Gaudin on user ML
https://s.apache.org/gDo3, here quoted:
I found another issue while testing: the port 8443 is missing in the URL used
underneath by the form reported by Pierre.
It was broken by OFBIZ-9206 where I removed the value of port.https in
url.properties.
It's not an issue if you set the value of port.https, or let it empty when
using a SSL certificate on a production server. But if you try locally
(localhost) then the URL misses the 8443 port.
Solution append 8443 as default secure port when using localhost
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1801094 13f79535-47bb-0310-9956-ffa450edef68