Commit Graph
1143 Commits
Author SHA1 Message Date
Jacques Le Roux 0e33487170 Documented: Document the automated authentification from a domain to another
(OFBIZ-10562)

Renames the file using "SSO" instead of "auto-auth-navigation"
Completes the documentation

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1844235 13f79535-47bb-0310-9956-ffa450edef68
2018-10-18 12:43:49 +00:00
Jacques Le Roux eb4e142a7e Improved: Refactor ICalendar support
(OFBIZ-10602)

Adds missing imports after errors in Buildbot Javadoc creation

https://ci.apache.org/builders/ofbizTrunkFrameworkPlugins/builds/454/steps/shell_2/logs/stdio

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1843921 13f79535-47bb-0310-9956-ffa450edef68
2018-10-15 16:01:08 +00:00
Jacques Le Roux 6dab6dd2e9 Improved: Refactor ICalendar support
(OFBIZ-10602)

Rewrites documentation to remove Javadoc warnings and improves implementation 
by avoiding classes with only one method.

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1843916 13f79535-47bb-0310-9956-ffa450edef68
2018-10-15 14:52:32 +00:00
Jacques Le Roux 260c38590d Documented: Wrong handling of response type "cross-redirect"
(OFBIZ-10569)

The documentation was wrong, this fixes it

Thanks: Dennis Balkir for the report and discussion

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1843225 13f79535-47bb-0310-9956-ffa450edef68
2018-10-09 08:16:01 +00:00
Gil Portenseigne a61c98775f Implemented : Impersonation of userLogin feature
(OFBIZ-10515)

Introduce a new feature that allow the impersonation of a login by an authorized user.
Add the documentation with all the details in security-impersonation.adoc.
Big thanks to Leila, Nicolas and Jacques for your contribution to this implementation.
Big thanks to Mathieu, Jacques, Pierre and Taher for your remarks and reviews that
improved this contribution quality. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1842110 13f79535-47bb-0310-9956-ffa450edef68
2018-09-27 16:01:35 +00:00
Jacques Le Roux 217a8719cb Documented: Document the automated authentification from a domain to another
(OFBIZ-10562)

Renames the file using "cross" instead of "inter"

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1841480 13f79535-47bb-0310-9956-ffa450edef68
2018-09-20 15:19:48 +00:00
Jacques Le Roux 72fbfdda3c Documented: Document the automated authentification from a domain to another
(OFBIZ-10562)

Renames the file using "cross" instead of "inter"

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1841479 13f79535-47bb-0310-9956-ffa450edef68
2018-09-20 15:00:23 +00:00
Jacques Le Roux 5cf707e55a Documented: Document the automated authentification from a domain to another
(OFBIZ-10562)

Commits WIP before changing the file name (cross fits more than inter)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1841478 13f79535-47bb-0310-9956-ffa450edef68
2018-09-20 14:59:18 +00:00
Jacques Le Roux 52ed40f643 No functional change. Sets the svn:props after having set them on OFBiz
svn repo root

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1840888 13f79535-47bb-0310-9956-ffa450edef68
2018-09-14 07:19:06 +00:00
Jacques Le Roux ad793ccf4e Documented: Document the automated authentification from a domain to another
(OFBIZ-10562)

This is a WIP to inly define the structure, no real content yet...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1840811 13f79535-47bb-0310-9956-ffa450edef68
2018-09-13 13:07:05 +00:00
Jacques Le Roux d9fcb5f8f3 Documented: Create an empty document templates for webapp socumentation
(OFBIZ-10564)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1840810 13f79535-47bb-0310-9956-ffa450edef68
2018-09-13 13:03:50 +00:00
Nicolas Malin 86ddaf83da Fixed: Display in log the file location who failed when the ConfigXMLReader throw an exception during the xml parsing
Currently only the Exception is visible that can't help to spot quickly the origin component.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1840258 13f79535-47bb-0310-9956-ffa450edef68
2018-09-06 18:50:01 +00:00
Deepak Dixit f1ba3ae6a8 Improved: Removed comment from ServerHitBin.java related to mysql Fractional Seconds related issue, this issue fixed under OFBIZ-9337
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1839655 13f79535-47bb-0310-9956-ffa450edef68
2018-08-30 09:35:25 +00:00
Jacques Le Roux 7f4dec9441 Fixed: Add method attribute to request-map to controll a uri can be called GET
or POST only
(OFBIZ-10438)

The problem was r1838081 prevented to serialise requests.

Like in ordermgr/control/updateCheckoutOptions/quickcheckout where 
updateCheckoutOptions and quickcheckout are serialised to update the check out 
after updateCheckoutOptions is done and then get back to the screen with 
quickcheckout. 

CheckoutOptions.ftl is a good example of this usage.

Thanks: Deepak Nigam for initial report and Mathieu for fixing it

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1839451 13f79535-47bb-0310-9956-ffa450edef68
2018-08-28 16:06:23 +00:00
Jacques Le Roux e073f7d29e Improved: no functional change
Previous commit 
    "Fixes the API doc, removes a return when there is not"
was wrong, the return missed a description rather


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1838419 13f79535-47bb-0310-9956-ffa450edef68
2018-08-20 09:55:32 +00:00
Jacques Le Roux a7dd9efb2b Improved: no functional change
Fixes the API doc, removes a return when there is not

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1838418 13f79535-47bb-0310-9956-ffa450edef68
2018-08-20 09:53:50 +00:00
Aditya Sharma 24f846174c Improved: Remove checks to store only 250 characters of URL in VisitHandler.getVisit() & ServerHitBin.saveHit()
(OFBIZ-10508)
When the code was committed the 'URL' field type had a size of 255 characters only which was later changed to 2000 characters. So, the above code logic to restrict no of characters can be removed now. 
Removed null pointer check for initialRequest and initialReferrer as it is already handled while setting the values in UtilHttp.setInitialRequestInfo() method.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1838256 13f79535-47bb-0310-9956-ffa450edef68
2018-08-17 12:46:59 +00:00
Shi Jinghai ddf3540817 Implemented: Add method attribute to request-map to controll a uri can be called GET or POST only
OFBIZ-10438

Thanks: Mathieu Lirzin for the contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1838081 13f79535-47bb-0310-9956-ffa450edef68
2018-08-15 11:45:45 +00:00
Taher A. Alkhateeb 6c28c16c58 Improved: disable DTDs for XML-RPC requests
(OFBIZ-10509)

Disable any doctype declarations in XML-RPC requests to OFBiz to enhance
performance and security.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1837697 13f79535-47bb-0310-9956-ffa450edef68
2018-08-09 08:27:57 +00:00
Gil Portenseigne ceea6ce791 Improved : Remove all unnecessary boxing and unboxing in Java classes
(OFBIZ-10504)

Thanks Taher, Jacques, Mathieu and Rishi for the review

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1837577 13f79535-47bb-0310-9956-ffa450edef68
2018-08-07 07:30:43 +00:00
Taher A. Alkhateeb e534c3b3b7 Improved: refactored the MapContext object with multiple improvements
(OFBIZ-10485)

- Removed the constructor and factory method "getMapContext" as it was
  redundant and does not add any value
- Replaced manual for-loop for collection walking in multiple methods with
  simple stream calls applied declaratively with less noise in the code.
- Fully removed the ListSet custom data structure with as that data structure
  did not serve any meaningful purpose and it is always better to rely on
  the java builtin data structures where possible. Construction was replaced
  with a HashSet instead.

Thanks: Mathieu Lirzin for your time, discussions and patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1837409 13f79535-47bb-0310-9956-ffa450edef68
2018-08-04 08:39:16 +00:00
Taher A. Alkhateeb a93c963f54 Improved: sanitized the output of XML-RPC when errors are reported.
(OFBIZ-10484)

This is implemented by overriding the parent "execute" method with a more
sanitized output for clarity and enhanced security.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1836141 13f79535-47bb-0310-9956-ffa450edef68
2018-07-18 06:30:15 +00:00
Deepak Dixit fcdfc47d0a Fixed: Framework webapp freemarkerTransform.properties has dependency on proudct component
(OFBIZ-10463)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835235 13f79535-47bb-0310-9956-ffa450edef68
2018-07-06 11:46:52 +00:00
Shi Jinghai 65905bd8d3 Reverted: Add method attribute to request-map to controll a uri can be called GET or POST only
OFBIZ-10438

Forgot to revert site-conf.xsd.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835043 13f79535-47bb-0310-9956-ffa450edef68
2018-07-04 05:32:10 +00:00
Shi Jinghai 17d9904b83 Reverted: Add method attribute to request-map to controll a uri can be called GET or POST only
OFBIZ-10438


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1834917 13f79535-47bb-0310-9956-ffa450edef68
2018-07-03 06:21:02 +00:00
Jacques Le Roux 39582de221 Improved: Factorize code logic from ‘ConfigXMLReader’
(OFBIZ-10453)

There is a lot of repetitive code in ConfigXMLReader. 
Using a functional interface as a parameter of a generic algorithm avoids those
repetitions.

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1834662 13f79535-47bb-0310-9956-ffa450edef68
2018-06-29 10:03:22 +00:00
Shi Jinghai b6a53caa21 Implemented: Add method attribute to request-map to controll a uri can be called GET or POST only
OFBIZ-10438

Add apache license to MethodNotAllowedException.java.

Thanks: Mathieu Lirzin for the contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1834570 13f79535-47bb-0310-9956-ffa450edef68
2018-06-28 03:00:23 +00:00
Shi Jinghai 4abebaea5a Implemented: Add method attribute to request-map to controll a uri can be called GET or POST only
OFBIZ-10438

ControlServlet.java returned to the previous doGet/doPost structure.

Thanks: Mathieu Lirzin for the contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1834465 13f79535-47bb-0310-9956-ffa450edef68
2018-06-27 05:48:59 +00:00
Shi Jinghai 68003b9526 Implemented: Add method attribute to request-map to controll a uri can be called GET or POST only
OFBIZ-10438

The request-map element has a new method attribute to control a uri be called by GET or POST or all.

Thanks: Mathieu Lirzin for the contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1834389 13f79535-47bb-0310-9956-ffa450edef68
2018-06-26 02:00:33 +00:00
Jacques Le Roux ca9b1bbd41 Reverted: Navigate from a domain to another with automated signed in
authentication
(OFBIZ-10307)

This reverts the work done previously for OFBIZ-9833 and OFBIZ-10206
Most parts of it will actually be reused later in a patch. By reverting it will 
allow to provide a patch for others to review


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1833510 13f79535-47bb-0310-9956-ffa450edef68
2018-06-14 14:37:24 +00:00
Jacques Le Roux 3304dec663 Fixed: The first visit event are not executed in case of CMS
(OFBIZ-10389)

Execution of the first visit events depends on the trackVisit function

In RequestHandler.java file

if (this.trackVisit(request) && session.getAttribute("_FIRST_VISIT_EVENTS_") == null) {
    // execute first visit event
}

trackVisit function does not honor the default controller request 
(in this case, cms) So, we should improve the code of trackVisit to honor 
default controller request.


Thanks: Swapnil M Mane

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832944 13f79535-47bb-0310-9956-ffa450edef68
2018-06-05 13:56:29 +00:00
Jacques Le Roux c704689c3a Improved: no functional change, removes trailing blanks
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832762 13f79535-47bb-0310-9956-ffa450edef68
2018-06-03 08:55:51 +00:00
Jacques Le Roux 25f853db70 Fixed: Session fixation issue
(OFBIZ-10420)

Prevents the session fixation by making Tomcat generate a new jsessionId 
(ultimately put in cookie). Only do when really signing in to avoid unnecessary 
calls

This improves the way it's done by using request.changeSessionId() instead of 
creating a brand new session. So there is no possible side effects on client and
no need to set initial request info (using setInitialRequestInfo)

Thanks: Taher for asking about it










git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832756 13f79535-47bb-0310-9956-ffa450edef68
2018-06-03 08:33:09 +00:00
Jacques Le Roux 598eee0d93 Fixed: Session fixation issue
(OFBIZ-10420)

Fixes a session fixation security issue discovered by a client with the security
 audit tool "IBM Security AppScan Enterprise , Version : 9.0.3.7"

Prevents the session fixation by making Tomcat generate a new jsessionId 
(ultimately put in cookie). 

Only do when really signing in to avoid unnecessary calls
Though if the client has disabled the use of cookies, then a session will be 
new on each request, not a good choice on client side!




git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832662 13f79535-47bb-0310-9956-ffa450edef68
2018-06-01 07:37:27 +00:00
Wei Zhang 6da8a7fc29 Fixed: Incorrect data type conversion of variable serviceEndTime in CoreEvents.java
(OFBIZ-10419)

A minor fix for serviceEndTime conversion

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832577 13f79535-47bb-0310-9956-ffa450edef68
2018-05-31 01:20:54 +00:00
Rishi Solanki bc4a0cbfc3 Improved: Remove Entity suffix from title of all entities. In all EntityModel.xml files, title should not contain Entity as suffix.
(OFBIZ-10408)
Thanks to Suraj Khurana for reporting the improvement and providing fix for that.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832235 13f79535-47bb-0310-9956-ffa450edef68
2018-05-25 12:19:07 +00:00
Jacques Le Roux fc8348f410 Improved: Refactor JavaEventHandler class
(OFBIZ-10410)

Instead of relying on manual synchronisation, use a concurrent map for caching 
loaded classes.  
Inline private `invoke` delegate which intent was fuzzy.  
Spread arguments when calling `Method::invoke` and `Class::getMethod`.

jleroux: interesting, it's the 1st use in OFBiz of the "::" syntax for calling
methods
(cf. https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.13-500)
I note that the string "::" is used in many places as a separator, notably
in caches, as  cache key separator but this should not be confusing.

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832199 13f79535-47bb-0310-9956-ffa450edef68
2018-05-24 20:42:19 +00:00
Jacques Le Roux 257dd146a4 Improved: XML schemas should use predefined boolean type
(OFBIZ-10411)

To define boolean values, some ad-hoc enumeration of "true" and "false" are 
repeatedly used.  Since XML Schema defines a standard boolean datatype 
better to use it. 

For now only `site-conf.xsd` is fixed 

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1831930 13f79535-47bb-0310-9956-ffa450edef68
2018-05-20 10:19:29 +00:00
Nicolas Malin 8e2d65f4d6 Fixed: ConfigXMLReader - Events are not executed in the order defined
(OFBIZ-10369)
The events contained in the controller configuration for first-visit, pre-post processor and before-after login are executed in arbitrary order rather than the defined order.
If we define an event configuration as follow:

    <after-login>
        <event name=keepCartUpdated type=java path=org.apache.ofbiz.order.shoppingcart.ShoppingCartEvents invoke=keepCartUpdated/>
        <event name=restoreAutoSaveList type=java path=org.apache.ofbiz.order.shoppinglist.ShoppingListEvents invoke=restoreAutoSaveList/>
        <event name=saveCartToAutoSaveList type=java path=org.apache.ofbiz.order.shoppinglist.ShoppingListEvents invoke=saveCartToAutoSaveList/>
    </after-login>

We wait that OFBIz run keepCartUpdated, restoreAutoSaveList and after saveCartToAutoSaveList event but the HashMap who organise them return arbitrary order and can return saveCartToAutoSaveList, keepCartUpdated and restoreAutoSaveList. Convert the HashMap to LinkedHashMap help to keep the loaded order.

Thanks to Vikas Mayur for solve this issue

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1830303 13f79535-47bb-0310-9956-ffa450edef68
2018-04-27 07:26:58 +00:00
Nicolas Malin b48d0cadc5 revert revision 1830301 that contains mix improvement, i will recommit them correclty
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1830302 13f79535-47bb-0310-9956-ffa450edef68
2018-04-27 07:26:33 +00:00
Nicolas Malin 2695743cae Fixed: ConfigXMLReader - Events are not executed in the order defined
(OFBIZ-10369)
The events contained in the controller configuration for first-visit, pre-post processor and before-after login are executed in arbitrary order rather than the defined order.
If we define an event configuration as follow:

    <after-login>
        <event name=keepCartUpdated type=java path=org.apache.ofbiz.order.shoppingcart.ShoppingCartEvents invoke=keepCartUpdated/>
        <event name=restoreAutoSaveList type=java path=org.apache.ofbiz.order.shoppinglist.ShoppingListEvents invoke=restoreAutoSaveList/>
        <event name=saveCartToAutoSaveList type=java path=org.apache.ofbiz.order.shoppinglist.ShoppingListEvents invoke=saveCartToAutoSaveList/>
    </after-login>

We wait that OFBIz run keepCartUpdated, restoreAutoSaveList and after saveCartToAutoSaveList event but the HashMap who organise them return arbitrary order and can return saveCartToAutoSaveList, keepCartUpdated and restoreAutoSaveList. Convert the HashMap to LinkedHashMap help to keep the loaded order.

Thanks to Vikas Mayur for solve this issue

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1830301 13f79535-47bb-0310-9956-ffa450edef68
2018-04-27 07:21:47 +00:00
Jacques Le Roux 0d919a3774 Fixed: Token Based Authentication
(OFBIZ-9833)

Reverts change in ContextFilter.java committed with 1813679, was wrong

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1827441 13f79535-47bb-0310-9956-ffa450edef68
2018-03-21 20:59:49 +00:00
Jacques Le Roux 7ff43dd657 Improved: no functional change, fixes a format issue in LoginWorker
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1827407 13f79535-47bb-0310-9956-ffa450edef68
2018-03-21 12:30:21 +00:00
Jacques Le Roux 1592f169af Improved: Token Based Authentication
(OFBIZ-9833)

Removes the code I temporarily removed on trunk demo (controversial) to test my 
changes

Also adds the LoginWorker.autoLoginSet()

This is just a commit to go ahead, later I will revert all related and provide 
a patch for discussion at OFBIZ-9833.

I'll also certainly use Deepak's JWTManager.createJwt() instead of mine, it's
more general and I actually only need to pass the userLoginId. We have though
to discuss that anyway, I see some differences...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1826949 13f79535-47bb-0310-9956-ffa450edef68
2018-03-16 10:02:03 +00:00
Jacques Le Roux d354300e69 Fixed: Logout do not remove autoLogin
(OFBIZ-4959)

I used the only available (and I must say confusing) WebappInfo.getName() when
I needed the webAppName not the WebappInfoName. So this put in a new 
WebappInfo.getMountPoint() and use it in getWebappInfo

Also use LoginWorker.autoLoginSet() in different places where I missed it. In 
other words all autoUserLogin coockies are deleted on login and logout, and
an autoUserLogin cookie is created when going locally from a webapp to another,
with checkExternalLoginKey


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1826938 13f79535-47bb-0310-9956-ffa450edef68
2018-03-16 09:35:06 +00:00
Jacques Le Roux 84bc50b994 Fixed: Logout do not remove autoLogin
(OFBIZ-4959)

Logout method do not disable autoLogin functionality. 
Instead of that it just initializes autoLogin in session and request.

jleroux: this was also needed by OFBIZ-10206 "Security issue in Token Based 
Authentication". 
This creates a keep-autologin-cookie boolean attribute in the webapp element of 
the  ofbiz-component.xml, documented in ofbiz-component.xsd
This attribute is used to get the value from the ofbiz-component.xml files in a
new autoLogoutCleanCookies() LoginWorker method. This method is used not only 
when login out but also when login in. This to be sure that in every cases the 
cookies related to the webapps are removed.
For now only the ecommerce, ecomseo et webpos webapps are keeping and using 
their autologin cookies

Thanks: Roberto Benítez Monje for report and Taher for discussion and suggestion

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1824803 13f79535-47bb-0310-9956-ffa450edef68
2018-02-19 19:23:36 +00:00
Jacques Le Roux a4d20dfc52 Improved: Token Based Authentication
(OFBIZ-9833)

No functional change, removes TODOs that I recently 
(1 week ago in r1823324) put to myself to quickly check. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1824260 13f79535-47bb-0310-9956-ffa450edef68
2018-02-14 16:40:19 +00:00
Jacques Le Roux f5ba435024 Completed: Security issue in Token Based Authentication
(OFBIZ-10206)

No functional change, just better syntax

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1823562 13f79535-47bb-0310-9956-ffa450edef68
2018-02-08 15:01:54 +00:00
Jacques Le Roux 97a9b690dd Fixed: Security issue in Token Based Authentication
(OFBIZ-10206)

The version I committed so far in OFBIZ-9833 has a small security issue.
See the Jira description for all details

To test I have attached a OFBIZ-10206-external-server-test-example.patch to 
the Jira

This removes the external-server-query property now useless

In  ContextFilter the getHeader (wrapper) now uses an autoLoginCookie to get 
the userLoginId passed in the JWT instead of externalServerUserLogin parameter.
A sourceServerWebappName parameter must be passed from the client request to
allow reading the autoLoginCookie.

This userLoginId is then retrieved on the target server from the JWT in the 
externalServerLoginCheck which is simplified.

In LoginWorker
  getAutoLoginCookieName() has now 2 versions to allow to pass a webappname

  A new autoLogoutFromAllBackendSessions() method has been added but for now 
  commented out. Decommenting it out will be submitted as a patch in OFBIZ-4959.

Thanks: Leila Mekika for reporting the security issue directly to me

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1823324 13f79535-47bb-0310-9956-ffa450edef68
2018-02-06 13:17:57 +00:00
Jacques Le Roux 714e6e3521 Improved: Token Based Authentication
(OFBIZ-9833)

I just thought that for security it's best to have both the source and 
target server using the use-external-server property.

Also default to N when requesting this property

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1822882 13f79535-47bb-0310-9956-ffa450edef68
2018-02-01 15:27:17 +00:00