Commit Graph
1143 Commits
Author SHA1 Message Date
Mathieu Lirzin a15b7b1996 Reverted: Changes done at r#1857089 and r#1857090 (OFBIZ-10911)(OFBIZ-10912)
The Cleanups introduced by those revisions has introduced some
unexpected regressions making the Gradle ‘loadAll’ task fail.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857091 13f79535-47bb-0310-9956-ffa450edef68
2019-04-07 23:36:29 +00:00
Mathieu Lirzin d639aba7e7 Improved: Remove redundant null checks (OFBIZ-10911)
Redundant null checks detected by Eclipse has been removed.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857089 13f79535-47bb-0310-9956-ffa450edef68
2019-04-07 23:02:39 +00:00
Nicolas Malin 2e1cacb2a8 Improved: Improve error message page to support Theming
(OFBIZ-10753)

When OFBiz raise an error, the framework use a jsp page to display it.
I improved the error page generation to support also ftl template rendering and by this way extend the theme engine to support to overide it

On controler.xml we can now use :
    <errorpage>/error/error.jsp</errorpage>
or 
    <errorpage>component://common/webcommon/error/Error.ftl</errorpage> (default configuration)

On your theme you can add your own error page :
    <template> 
      ...
      <template-file widget=menu location=component://common-theme/template/macro/HtmlMenuMacroLibrary.ftl/>
    + <template-file widget=error location=component://common-theme/template/ErrorPage.ftl/>
    </template>

The component://common/webcommon/error/Error.ftl contains the logic theming connection and to simplify source code, all framework old error page (error.jsp) have been removed to centralize all on this new page.

Thanks to Marine Desmarchelier for the error page design

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856175 13f79535-47bb-0310-9956-ffa450edef68
2019-03-25 09:31:02 +00:00
Mathieu Lirzin d90431a3f5 Fixed: Adapt some javadoc to let the build succeed
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1855674 13f79535-47bb-0310-9956-ffa450edef68
2019-03-16 23:23:09 +00:00
Deepak Dixit d8592b950b Modify the log level from info to verbose if internal sso is disabled.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1854979 13f79535-47bb-0310-9956-ffa450edef68
2019-03-07 13:15:21 +00:00
Deepak Dixit 7b9ea305d7 Preparation for JDK11 update, Updated following code to fix warning with respect to JDK11
- Replaced Class::newInstance occurrences 
- Removed deprecated override method Object::finalize
(OFBIZ-10757)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1854683 13f79535-47bb-0310-9956-ffa450edef68
2019-03-03 10:27:29 +00:00
Mathieu Lirzin a274e0f74c Fixed: Add missing tests for ‘WebAppCache’ (OFBIZ-10606)
This adds a test file which should have been added in revision 1854430
but was forgotten by accident.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1854434 13f79535-47bb-0310-9956-ffa450edef68
2019-02-26 23:09:10 +00:00
Mathieu Lirzin 9b5340fd3a Improved: Use Optional for ‘getWebappInfo’ (OFBIZ-10606)
Adapt ‘LoginWorker#autoLoginSet’ which is its unique caller.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1854433 13f79535-47bb-0310-9956-ffa450edef68
2019-02-26 22:58:53 +00:00
Mathieu Lirzin 9d209d919a Improved: Inline getAppBarWebInfos(String, Comparator, String) private method (OFBIZ-10606)
The comparator argument of this method was always ‘null’.  Use
‘java.util.TreeMap()’ constructor in the inlined function which is
equivalent to passing ‘null’ to ‘java.util.TreeMap(Comparator)’.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1854432 13f79535-47bb-0310-9956-ffa450edef68
2019-02-26 22:57:50 +00:00
Mathieu Lirzin 6be4f5e37f Improved: Refactor ‘WebAppCache’ (OFBIZ-10606)
This makes use of streams and lambdas.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1854431 13f79535-47bb-0310-9956-ffa450edef68
2019-02-26 22:57:00 +00:00
Mathieu Lirzin 4aa65a5b68 Improved: Add ‘WebAppCache’ (OFBIZ-10606)
This improves the cohesion of the ‘ComponentConfig’ class by
extracting the webapps cache related methods into a separate
‘WebAppCache’ class.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1854429 13f79535-47bb-0310-9956-ffa450edef68
2019-02-26 22:47:58 +00:00
Michael Brohl 1a196b977f Fixed: Error parsing JWT
(OFBIZ-10814)

Fixes incorrect retrieval of the Authorization header JWT token. 
Fixes wrong API usage for the key parameter which assumed the key is
provided in BAS64 format.
Refactored the code to use helper methods for key and auth header 
retrieval.
Javadoc corrections and enhancements.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1852882 13f79535-47bb-0310-9956-ffa450edef68
2019-02-04 09:22:19 +00:00
Jacques Le Roux 193bd6b75c Fixed: Impossible secure and autologin cookie names when mountpoint contains a
slash inside its name
(OFBIZ-10766)

Deepak Nigam reported on dev ML:
When there is one web app with the empty mount point (i.e. deployed on root), 
the auto-login cookie will not work for that particular webapp due to the change 
in the path of the cookie from "/" to "/" + applicationName. Because the system 
will try to find the cookie at the "/" but it is actually at "/" + applicationName.

Thanks Deepak for report

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851998 13f79535-47bb-0310-9956-ffa450edef68
2019-01-24 08:17:38 +00:00
Jacques Le Roux 950fb21881 Fixed: Correct behaviour of Autologin cookies
(OFBIZ-10635)

As reported by Deepak Nigam on dev ML there was a risk of NPE with userLogin w/
my last commit at r1851074  

Thanks Deepak for the report and proposed fix

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851350 13f79535-47bb-0310-9956-ffa450edef68
2019-01-15 13:48:33 +00:00
Jacques Le Roux 4da0b75e17 Fixed: User's name is displayed on ecommerce even after user logs out
(OFBIZ-10666)

On further investigation, I found that cookie path and domain are different 
in the methods of creating the auto-login cookie i.e. LoginWorker.autoLoginSet() 
and removing the auto-login cookie i.e. LoginWorker.autoLoginRemove().

After following changes the issue seems to be fixed:
1. Removed getMaxAge() check from the condition used in 
   LoginWorker.getAutoUserLoginId() method.
2. Corrected the path and domain in the method LoginWorker.autoLoginRemove().

Thanks: Deepak Nigam for discussion and fix

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851247 13f79535-47bb-0310-9956-ffa450edef68
2019-01-14 13:53:18 +00:00
Jacques Le Roux dd58f19c94 Reverted: Impossible secure and autologin cookie names when mountpoint contains
a slash inside its name
(OFBIZ-10766)

In my previous commit I reverted the initial change. As I said in the Jira
I had a second look and it's better to fix the problem at the root as I did 
initially. 

I wrote in my previous commit: "This method is used in other places where the 
name should not be changed." I checked there are no issues changing slashes to
underscores in the cookies names anywhere.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851200 13f79535-47bb-0310-9956-ffa450edef68
2019-01-13 13:31:13 +00:00
Jacques Le Roux 199549e08f Fixed: Correct behaviour of Autologin cookies
(OFBIZ-10635)

In the method to set the autoLogin cookie, LoginWorker::autoLoginSet,
system fetches the webAppInfo by using the
method ComponentConfig::getWebappInfo. In this method, serverId and
applicationName are passed as arguments.

*WebappInfo webappInfo = ComponentConfig.getWebappInfo((String)
context.getAttribute("_serverId"), UtilHttp.getApplicationName(request));*

If the mount-point of the web app is set as an empty string, then 'root'
will be used as the application name, due to which the object webAppInfo
will come null. If the webAppInfo is null then the autoLogin cookie will
not be created and added to the response object by the system.

Thanks: Aditya for report and Mathieu Lirzin for discussion

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851074 13f79535-47bb-0310-9956-ffa450edef68
2019-01-11 16:26:13 +00:00
Jacques Le Roux d2485c4069 Fixed: Add session tracking mode and make cookie secure
(OFBIZ-6655)

Following "Session timeout for webapps" discussion on dev ML 
https://markmail.org/message/p6fbiojjrwb2ybxd

We decided to put back the session-timeout value in web.xml files and to remove
the line
    session.setMaxInactiveInterval(60*60); //in seconds
from ControlEventListener.java

Thanks: Deepak Nigam for report and Girish Vasmatkar for discussion

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851068 13f79535-47bb-0310-9956-ffa450edef68
2019-01-11 16:12:01 +00:00
Jacques Le Roux 5f329aa988 Fixed: Correct behaviour of Autologin cookies
(OFBIZ-10635)

Michael spotted that I used "default-server" in r1845558:

Quoting him:

    It only works for webapps using "default-server". This name is configurable 
    in the ofbiz-component.xml and and should not be hard-coded in the code. 

This fixes it

Thanks: Michael Brohl

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850694 13f79535-47bb-0310-9956-ffa450edef68
2019-01-07 21:58:01 +00:00
Jacques Le Roux a37cf7ecd5 Fixed: Impossible secure and autologin cookie names when mountpoint contains a
slash inside its name
(OFBIZ-10766)

My previous commit was wrong this one fixes it.
I made a mistake trying to generalise changing UtilHttp::getApplicationName. 
This method is used in other places where the name should not be changed. 
Only cookies are concerned.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850685 13f79535-47bb-0310-9956-ffa450edef68
2019-01-07 20:37:10 +00:00
Gil Portenseigne 1b02bfa7aa Improved: Extract verification of certificates in ‘RequestHandler’
(OFBIZ-10450)

No functional change. Reducte the size of RequestHandler::doRequest method.
Add somes unit tests.
Thanks Mathieu

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850250 13f79535-47bb-0310-9956-ffa450edef68
2019-01-03 16:28:27 +00:00
Nicolas Malin 95f4d4b6eb Improved: Refactor ControlFilter
(OFBIZ-10449)
various improvements:
* Inheriting from HttpFilter instead of implementing Filter
* Using streams when getting the allowed paths
No functional change

Thanks to Mathieu Lirzin for this refactoring

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850171 13f79535-47bb-0310-9956-ffa450edef68
2019-01-02 15:54:01 +00:00
Jacques Le Roux b43d139e26 Improved: Token Based Authentication
(OFBIZ-9833)

Just few typos and import ordering while reviewing for OFBIZ-4361

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849931 13f79535-47bb-0310-9956-ffa450edef68
2018-12-29 17:22:37 +00:00
Aditya Sharma d6da4c8e17 Improved: Remove all the fk dependencies from stats entities to the business entities
(OFBIZ-10721)
stats related entities foreign key relation has been removed by Jacopo at r#1647271 and new group org.apache.ofbiz.stats introduced for stats related entity. Some remnants were still left in stats entities. 
Removed relations of Party, ContactMech and Content from ServerHit entity.
Removed relations of Content from ServerHitBin entity.
Removed relations of UserLogin from Visitor entity.
Thanks Jacques Le Roux and Deepak Dixit for the review.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849275 13f79535-47bb-0310-9956-ffa450edef68
2018-12-19 08:23:29 +00:00
Jacques Le Roux 8ffbe06fa5 Improved: LoginWorker.autoLoginCheck performance improvement
(OFBIZ-10709)

LoginWorker.autoLoginCheck does not check if the attribute "autoUserLogin" is 
not already filled and executes even if it is not needed. A check on the 
attribute beforehand can improve performance significantly.

Thanks: Benjamin Jugl

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848926 13f79535-47bb-0310-9956-ffa450edef68
2018-12-14 11:08:52 +00:00
Jacques Le Roux bbfc62d47a Improved: Fix or Silence various warnings
(OFBIZ-10701)

In order to detect potential issues early, the linting compiler option should be 
used by default and disabled with {{./gradlew -PXlint:none build}}.

Additionally it is important to reduce the number of warnings otherwise new 
warnings will remain unnoticed.

The warning related to the com.googlecode.concurrentlinkedhashmap dependency 
should resolves itself once we handle upgrade to Caffeine like proposed in 
OFBIZ-6747.

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848673 13f79535-47bb-0310-9956-ffa450edef68
2018-12-11 13:33:49 +00:00
Michael Brohl 4260c161d1 Improved: ControlEventListener - Change Log-Level
(OFBIZ-10330)

The Log-Level of the Message "Could not find visit value object in 
session..." is changed from "warning" to "info".

Thanks Benjamin Jugl for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848467 13f79535-47bb-0310-9956-ffa450edef68
2018-12-08 12:51:27 +00:00
Jacques Le Roux 5f1773068a Fixed: User's name is displayed on ecommerce even after user logs out
(OFBIZ-10666)

Steps to regenerate:
Open URL: https://demo-trunk.ofbiz.apache.org/ecommerce/control/main. 
  Welcome is displayed and user's name is not displayed when URL is opened.
Login at ecommerce, username will be displayed after user logs in.
Logout of ecommerce by clicking on logout. User will be logged out and login 
  link will be displayed in place of logout link, but the name of user is still 
  displayed.

Actual: Username is still displayed after user logs out
Expected: Username should not be displayed after the user logs out

Note: Similar issue also exists when the user clicks on (Not You?) link.

Thanks: Arpit Mor for detailled report, Deepak Dixit for discussion

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848398 13f79535-47bb-0310-9956-ffa450edef68
2018-12-07 13:14:48 +00:00
Jacques Le Roux a5f6489a5f Improved: no functional change, just formatting
Put a couple of brackets to make things clearer


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848315 13f79535-47bb-0310-9956-ffa450edef68
2018-12-06 14:09:45 +00:00
Jacques Le Roux 0d5c18dc22 Improved: no functional change, just order the imports
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1847954 13f79535-47bb-0310-9956-ffa450edef68
2018-12-02 10:35:08 +00:00
Jacques Le Roux b31fd85dc1 Improved: Multi Part Input Parameters not Available in Groovy Event
(OFBIZ-5048)

If a form is of type enctype="multipart/form-data" and we are handling its 
submission through Groovy Event then in the parameters Map Ofbiz does not set 
the multipart input parameters from request parameters.

The same are available when multipart form submission is handled through service.

The reason being the code that sets the multipart parameters in request 
attribute is only available in ServiceEventHandler.java and in 
GroovyEventHandler the multipart are never set.

So I have created a method getMultiPartParameterMap in the class UtilHttp.java 
and put the common logic in that method so that when getCombinedMap method is 
called from the GroovEventHandler the method also call getMultiPartParameterMap 
and in the ServiceEventHandler I have written a call for 
getMultiPartParameterMap method.

Thanks: Vikramjit Singh for report and initial patch, Rohit Koushal for updated
and revised patch with some minor changes.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1847478 13f79535-47bb-0310-9956-ffa450edef68
2018-11-26 16:41:52 +00:00
Jacques Le Roux 558e58b10a Documented: no functional change
Fixes levels, I did not get that AsciiDoctor is handling that automatically


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1847223 13f79535-47bb-0310-9956-ffa450edef68
2018-11-23 08:43:42 +00:00
Jacques Le Roux 78940e209d Documented: no functional changes
Formats too long lines in wa-cross-domains-SSO.adoc 
Fixes references in bt-creating reports.adoc
Fixes text in bt-report master creation.adoc

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1847177 13f79535-47bb-0310-9956-ffa450edef68
2018-11-22 15:07:19 +00:00
Jacques Le Roux 159fb21f80 Documented: no functional change
Renames the security doc dir to docs as requested by documentation guidelines
Includes webapp.adoc in developer-manual.adoc



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1847078 13f79535-47bb-0310-9956-ffa450edef68
2018-11-21 08:15:36 +00:00
Jacques Le Roux d3e8d41da3 Improved: Remove duplicated code when running login/logout events
(OFBIZ-10474)

In an effort of refactoring the RequestHandler class, I have factored the code 
from runAfterLoginEvents and runBeforeLogoutEvents using a FunctionalInterface

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1846899 13f79535-47bb-0310-9956-ffa450edef68
2018-11-19 14:31:21 +00:00
Jacques Le Roux 5d94c98350 Improved: Use ‘String#equalsIgnoreCase’ in ‘RequestHandler#doRequest’
(OFBIZ-10451)

Use String#equalsIgnoreCase instead of combining String#equals and 
String#toUpperCase. Additionally this avoids having to check the emptiness 
of the X-Forwarded-Proto request header.

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1846793 13f79535-47bb-0310-9956-ffa450edef68
2018-11-17 12:32:04 +00:00
Jacques Le Roux 057e8341ce Improved: Remove useless ControlServlet code
(OFBIZ-10447)

It seems better to remove some code and rely on method/contructor dispatch.

jleroux: w/o specific implementations, there is no point indeed

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1846790 13f79535-47bb-0310-9956-ffa450edef68
2018-11-17 09:49:56 +00:00
Jacques Le Roux 6898087988 Improved: Override ‘GenericServlet::init’ instead of ‘Servlet::init’
(OFBIZ-10446)

This is done to remove the manual call to {{super}} which is done in
{{GenericServlet}} instead.

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1846789 13f79535-47bb-0310-9956-ffa450edef68
2018-11-17 09:41:17 +00:00
Jacques Le Roux b82c69b594 Improved: Inline ‘ControlServlet::getRequestHandler’ method
(OFBIZ-10445)

There was only two local callers of this trivial method, so remove it.
Rename requestHandler in doGet local variable to handler.

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1846784 13f79535-47bb-0310-9956-ffa450edef68
2018-11-17 09:22:22 +00:00
Jacques Le Roux 30a514870c Improved: Add the ability to schedule a job to run as a system/service user
(OFBIZ-9557)

When scheduling a job it automatically schedules it to run as the user that 
created the schedule. The issue comes up when that users password changes. 

If your are forced to change your password automatically you have to delete all 
previously scheduled jobs and recreate them. 

This adds a checkbox to run a job as system on Schedule Job screen as system user
Permissions are used to guarantee security.

Thanks: Matthew Mulligan for report and Rohit Koushal for discussion and patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1846137 13f79535-47bb-0310-9956-ffa450edef68
2018-11-08 13:20:32 +00:00
Jacques Le Roux 102dd5d242 Fixed: Correct behaviour of Autologin cookies
(OFBIZ-10635)

Renames "keep-autologin-cookie" to "use-autologin-cookie", and only create 
Autologin cookies when needed. No need to create Autologin cookies in 
applications that don't need it.

Don't pass webAppName to LoginWorker::getSecuredUserLoginId, that can be handled
with improved LoginWorker::getSecuredLoginIdCookieName

Removes LoginWorker::autoLogoutCleanCookies, no longer needed since only those
needed are created and kept (1 year at least after creation).

For both autoLogin and securedLoginId cookies sets the path to the application.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1845558 13f79535-47bb-0310-9956-ffa450edef68
2018-11-02 09:46:42 +00:00
Jacques Le Roux 5d14a3a77f Implemented: Navigate from a domain to another with automated signed in
authentication
(OFBIZ-10307)

While working on OFBIZ-10635 I spotted that I used a root path for 
securedLoginId cookies. It's better to set it to the webapp name like it's done
by Tomcat for the JSESSIONID cookie. This fixes it.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1845502 13f79535-47bb-0310-9956-ffa450edef68
2018-11-01 17:23:46 +00:00
Jacques Le Roux 4553b14814 Implemented: Navigate from a domain to another with automated signed in
authentication
(OFBIZ-10307)

While working on OFBIZ-10635 I spotted that at r1844880 I forgot to put a call
to LoginWorker::createSecuredLoginIdCookie in LoginWorker::checkExternalLoginKey
in the general case (when the user log in for the 1st time). This fixes it.
Also makes the comment makes sense.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1845497 13f79535-47bb-0310-9956-ffa450edef68
2018-11-01 16:29:08 +00:00
Jacques Le Roux 115d59916d Fixed: Missing Security and Cache Headers in CMS Events
Fixed:
(OFBIZ-10597)

While rendering the view through the controller request we set the important 
security headers like x-frame-options, strict-transport-security, 
x-content-type-options, X-XSS-Protection and Referrer-Policy etc. in the 
response object. (Please see the 'rendervView' method of RequestHandler class.) 
 
In the similar line, we set the cache related headers like Expires, 
Last-Modified, Cache-Control, Pragma.
 
But these security headers are missing in the pages rendered through CMS. 
(Please visit the CmsEvents class).
 
These headers are very crucial for the security of the application as they help 
to prevent various security threats like cross-site scripting, 
cross-site request forgery, clickjacking etc. 

Thanks: Deepak Nigam for initial patch and review

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1845418 13f79535-47bb-0310-9956-ffa450edef68
2018-11-01 09:36:35 +00:00
Jacques Le Roux 8d82646206 Improved: Correct behaviour of Autologin cookies
(OFBIZ-10635)

While working on this issue I spotted that securedLoginId has the same duration 
(1 year) than autoUserLoginId. 
I have reduced it to the browser session which is the purpose.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1845341 13f79535-47bb-0310-9956-ffa450edef68
2018-10-31 15:36:11 +00:00
Jacques Le Roux 45ba53e982 Improved: Remove unused ‘RequestHandler::doRequest’ method
(OFBIZ-10452)

The RequestHandler#doRequest is only a wrapper for an overload.  
Since it is not used anywhere in the framework, just remove it.

jleroux: jaz (Andrew Zeneski) added it as a "convenience". I see no problems
removing it

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1845208 13f79535-47bb-0310-9956-ffa450edef68
2018-10-30 09:37:08 +00:00
Jacques Le Roux 16c821cc54 Improved: no functional change, just some formatting I forgot at r1844729
The whole file is in need, but that would mean to blur things in svn history...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1844909 13f79535-47bb-0310-9956-ffa450edef68
2018-10-26 15:53:46 +00:00
Jacques Le Roux fbfa0daa5a Implemented: Navigate from a domain to another with automated signed in
authentication
(OFBIZ-10307)

This uses a JWT Token authentication to get from one domain, where you are 
signed in, to another domain where you get signed in automatically. 
Something like ExternalLoginKey or Tomcat SSO, but not on the same domain.

In the example component, the FormWidgetExamples screen contains 2 new fields 
in the LinksExampleForm which demonstrate the use from a local instance to the
trunk demo instance.

A simple documentation is available in 
  framework\webapp\src\docs\asciidoc\_include\wa-cross-domains-SSO.adoc

Thanks: Taher for review

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1844880 13f79535-47bb-0310-9956-ffa450edef68
2018-10-26 09:32:46 +00:00
Jacques Le Roux a9c4eb3427 Implemented: Token Based Authentication
(OFBIZ-9833)

This uses the JJWT library to implement a lightweight but complete solution 
to provide a web token authentication mechanism for clients performing API 
calls to OFBiz and other possibilities offered by using a JWT (JSON Web Token)

Here is the dev list discussion for token based authentication work:
http://markmail.org/message/vyskeh2wujqpkbwg

Thanks: Deepak Dixit for the patch. Jacopo and Nicolas for the discussion about
how to enforce the storing of the secret key. This will be continued on the 
dev ML

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1844865 13f79535-47bb-0310-9956-ffa450edef68
2018-10-26 07:09:10 +00:00
Jacques Le Roux a6ba3b215c Improved: Create an "url-redirect" response type
(OFBIZ-10599)

As discussed with Dennis in OFBIZ-10569, the idea is to implement an 
"url-redirect" response type where an external URL can be set with redirected 
parameters like it's done with request-redirect which is only internal.

Thanks: Dennis Balkir

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1844729 13f79535-47bb-0310-9956-ffa450edef68
2018-10-24 07:55:37 +00:00