(OFBIZ-11709)
Some people may want to use another TemplateClassResolver than SAFER_RESOLVER
This creates a new templateClassResolver security property and uses it in
FreeMarkerWorker::makeConfiguration by default
(OFBIZ-11609)
Fixes the if(test): toString() is not the same than getCanonicalName()
Also while at it, in case of exception, uses NoCsrfDefenseStrategy as default
(OFBIZ-)
After the VM demos crash yesterday, I had a look at the log of trunk demo and
found a lot of recurring errors block due to CsrfUtil::generateTokenForNonAjax.
It's not a big deal but it's annoying to have such useless errors cluttering the
logs
SystemProperties
(OFBIZ-11594)(OFBIZ-11470)
After adding more latitude to set same site by using
EntityUtilProperties::getPropertyValueFromDelegatorName for retrieving the value
possibly from the DB as a SystemProperty, adds the value as strict in
SSOJWTDemoData.xml
SystemProperties
(OFBIZ-11594)
This comes handy when testing, from examples component, the internal SSO feature
which allows a token based login between OFBiz instances
The SSOJWTDemoData.xml inadvertently slipped in w/ previous commit
Never ever install Eclipse Checkstyle plugin. It does not use the same version
than Gradle, it's then a mess (Eclipse's is newer).
Fixes issues in CsrfUtilTests.java
Mostly manually-automated, so some changes are not perfect. I have manually
changed back excessive ones
Comments out ArrayTypeStyle checkstyle
Updates checkstyleMain.maxErrors
(OFBIZ-11306)
Simple strategy is to rely on SameSite 'strict' value in SameSiteFilter in all
supported branches. No backport needed with the changes here.
Thanks: James for all the good work we did together :)
(OFBIZ-11342)
Improved javadoc
Set 'checkMultiLevelAdminPermissionValidity' visibility to default
Add another test verifying that hierarchy in permission is respected
Thanks Mathieu for your review
(OFBIZ-11342)
Add unit tests for permission control feature.
Add new method to manage multilevel permission control.
This allowing an user with PARTYMGR_ADMIN permission to impersonate
another user with PARTYMGR_PCM_CREATE permission.
We currently have two ways to define component loading order. Either
by using ‘depends-on’ attribute in “component-config.xml” or by adding
a “component-load.xml” file at the root of a component directory.
“depends-on” is more flexible because it handles partial ordering when
“component-load.xml” defines a total order which is not necessarily
meaningful, so it is better to rely only “depends-on”.
This removes the usage of “component-load.xml” to use ‘depends-on’
instead. The dependency declarations correspond to the total ordering
previously defined but will need to be refined in the future to relax
unnecessary dependency declarations.
Only “framework/base/config/component-load.xml” which defines the
top-level directories order (framework, applications, themes and
plugins) is kept.
(including admin) via "Forget Your Password"
(OFBIZ-4361)
Adds the security.token.key value and change the login.secret_key_string value
The security.token.key value is not mandatory for the "Forget Your Password"
feature but then only the username and password are used to create the JWT key.
Adds a reference for both properties to the
"Passwords and JWT (JSON Web Tokens) usage"
documentation to suggest users to choose the way to store these keys
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866518 13f79535-47bb-0310-9956-ffa450edef68
(including admin) via "Forget Your Password"
(OFBIZ-4361)
Currently, any user (via ecommerce "Forget Your Password") has the ability to
reset another users password, including "admin" without permission.
By simply entering "admin" and clicking "Email Password", the following is
displayed:
The following occurred:
A new password has been created and sent to you. Please check your Email.
This now forces the user of the ERP to change their password.
It is also possible to generate a dictionary attack against ofbiz because there
is no capta code required. This is serious security risk.
I have modified the patch following comments I made in the Jira, notably
Removed unused Java variables
Removed a check in LoginEvents::forgotPassword which prevented to show error
messages
Changed fr and en SecurityExtPasswordSentToYou
+ SecurityExtThisEmailIsInResponseToYourRequestToHave labels
+ template PasswordEmail.ftl
+ loginservices.token_incorrect labels
Added fr and en SecurityExtIgnoreEmail + SecurityExtLinkOnce labels
Removed changes in general.properties
I did not remove the 2 GetSecurityQuestion.ftl files (webpos one was still in)
There is still room for improvement. I'll discuss them on the Jira and dev
ML. But this version is already strong enough to not wait that the patch is
inapplicable!
Thanks: mz4wheeler (Mike Z) for the Jira, Nicolas Malin for the patch, I guess
with some Gil's help, and all others for comments and ideas
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866478 13f79535-47bb-0310-9956-ffa450edef68
called directly.
(OFBIZ-11152)
Gives an advice to reassure users about the seriousness of the issue
This issue can be easily reproduced by going to example/control/FormWidgetExamples
Other backend components are less concerned but it happens sometimes in them too.
It's quite hard to understand what's happening.
This is a sequel of OFBIZ-10895
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866255 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-11161)
the "dtd" directories are already present as resources distributed
inside OFBiz jar, so there is no need to augment the classpath to find
the XML schema inside those directories.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1865796 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10939)
The ‘@Override’ annotation helps readers understand that the method at
hand is overriding a super class or implementing an interface.
Additionally it allows the compiler to check if the methods annotated
with ‘@Override’ are actually implementing an abstract method.
Using that annotation makes ‘@see foo.bar.ParentClass#myMethod’
comments useless, so those they have been removed for the newly
annotated methods.
Thanks Jacques Le Roux and Swapnil M Mane for acknowledging the commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858295 13f79535-47bb-0310-9956-ffa450edef68
(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
(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
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
(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
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