Files
ofbiz-framework/framework/common/servicedef/services_security.xml
T
Jacques Le Roux 0dd553ec96 A modified patch from Harsha Chadhar for "New feature to reclaim a user account - Using Security Questions" https://issues.apache.org/jira/browse/OFBIZ-4983
jleroux: the issue description is quite lengthy so I will summarise it here, please refer to the Jira issue for details.
"When a customer creates an account on eCommerce site, s/he will also need to answer a security question. This security question then can be used by the user to reclaim her/his account in case s/he forgets her/his password. If the user correctly answers the required security question while reclaiming her/his account, her/his password will be sent through email notification. This part would work in the same way as the existing functionality of email password (forget password)."

The description was actually more ambitious (several questions, possibility for users to create own questions) but AFAIK these parts have not been implemented.

Apart updating the patch which did not merge, I got 2 majors issues (and few others I will not report here) I bypassed with workarounds.

Unlike Harsha, and as I reported earlier in the issue, I never got the username (userLoginId) back when using hidden parameters in the request body (not in requestParameters, ie UtilHttp.getParameterMap(request)), nor actually any parameters. This is maybe due to my OS (Windows7 was XP before) or my email client (Outlook Express then, now Thunderbird) or even my SMTP configuration (I used my ISP SMTP server) but most probably because I did it all on my sole machine (localhost). I tried to understand what was happening to request body parameters with http://www.telerik.com/fiddler, but finally gave up because it's even more complicated when https is in the picture. So I decided to rather use parameters in the URL (Query string). It's a bit less safe, though the password is OFBiz encrypted, and should be replaced. But it's safe enough because only the user should receive this message and even if the message is sniffed during its journey it should be hard to decrypt the password!

Harsha used the SecurityExtUiLabels.xml (created by ashish at r1618415) in securityext component but there is already a SecurityextUiLabels.xml in common component. Since I use Windows OFBiz was unable to retrieve the labels from SecurityExtUiLabels.xml since I guess it looked into a SecurityextUiLabels.xml. So I renamed a SecurityExtUiLabels.xml to EmailPassword.xml.










git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1716915 13f79535-47bb-0310-9956-ffa450edef68
2015-11-27 20:37:15 +00:00

144 lines
9.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
<description>OFBiz Security Services</description>
<vendor>OFBiz</vendor>
<version>1.0</version>
<!-- SecurityGroup services -->
<service name="createSecurityGroup" engine="entity-auto" invoke="create" default-entity-name="SecurityGroup" auth="true">
<description>Create an SecurityGroup</description>
<permission-service service-name="securityPermissionCheck" main-action="CREATE"/>
<attribute name="groupId" type="String" mode="IN" optional="false"/>
<attribute name="description" type="String" mode="IN" optional="true"/>
</service>
<service name="updateSecurityGroup" engine="entity-auto" invoke="update" default-entity-name="SecurityGroup" auth="true">
<description>Update a SecurityGroup</description>
<permission-service service-name="securityPermissionCheck" main-action="UPDATE"/>
<attribute name="groupId" type="String" mode="IN" optional="false"/>
<attribute name="description" type="String" mode="IN" optional="true"/>
</service>
<!-- SecurityPermission services -->
<service name="createSecurityPermission" engine="entity-auto" invoke="create" default-entity-name="SecurityPermission" auth="true">
<description>Create a SecurityPermission</description>
<permission-service service-name="securityPermissionCheck" main-action="CREATE"/>
<attribute name="permissionId" type="String" mode="IN" optional="false"/>
<attribute name="description" type="String" mode="IN" optional="true"/>
</service>
<service name="updateSecurityPermission" engine="entity-auto" invoke="update" default-entity-name="SecurityPermission" auth="true">
<description>Update a SecurityPermission</description>
<permission-service service-name="securityPermissionCheck" main-action="UPDATE"/>
<attribute name="permissionId" type="String" mode="IN" optional="false"/>
<attribute name="description" type="String" mode="IN" optional="true"/>
</service>
<!-- SecurityPermission to SecurityGroup services -->
<service name="addSecurityPermissionToSecurityGroup" engine="entity-auto" invoke="create" default-entity-name="SecurityGroupPermission" auth="true">
<description>Add a SecurityPermission to a SecurityGroup</description>
<permission-service service-name="securityPermissionCheck" main-action="CREATE"/>
<attribute name="groupId" type="String" mode="IN" optional="false"/>
<attribute name="permissionId" type="String" mode="IN" optional="false"/>
</service>
<service name="removeSecurityPermissionFromSecurityGroup" engine="entity-auto" invoke="delete" default-entity-name="SecurityGroupPermission" auth="true">
<description>Remove a SecurityPermission from a SecurityGroup</description>
<permission-service service-name="securityPermissionCheck" main-action="DELETE"/>
<attribute name="groupId" type="String" mode="IN" optional="false"/>
<attribute name="permissionId" type="String" mode="IN" optional="false"/>
</service>
<!-- UserLogin to SecurityGroup services -->
<service name="addUserLoginToSecurityGroup" engine="entity-auto" invoke="create" default-entity-name="UserLoginSecurityGroup" auth="true">
<description>Add a UserLogin to a SecurityGroup</description>
<permission-service service-name="securityPermissionCheck" main-action="CREATE"/>
<attribute name="userLoginId" type="String" mode="IN" optional="false"/>
<attribute name="groupId" type="String" mode="IN" optional="false"/>
<attribute name="fromDate" type="Timestamp" mode="IN" optional="true"/>
<attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/>
</service>
<service name="updateUserLoginToSecurityGroup" engine="entity-auto" invoke="update" default-entity-name="UserLoginSecurityGroup" auth="true">
<description>Update a UserLogin to SecurityGroup Appl</description>
<permission-service service-name="securityPermissionCheck" main-action="UPDATE"/>
<attribute name="userLoginId" type="String" mode="IN" optional="false"/>
<attribute name="groupId" type="String" mode="IN" optional="false"/>
<attribute name="fromDate" type="Timestamp" mode="IN" optional="false"/>
<attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/>
</service>
<service name="removeUserLoginToSecurityGroup" engine="entity-auto" invoke="delete" default-entity-name="UserLoginSecurityGroup" auth="true">
<description>Remove a UserLogin to SecurityGroup Appl</description>
<permission-service service-name="securityPermissionCheck" main-action="DELETE"/>
<attribute name="userLoginId" type="String" mode="IN" optional="false"/>
<attribute name="groupId" type="String" mode="IN" optional="false"/>
<attribute name="fromDate" type="Timestamp" mode="IN" optional="false"/>
<attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/>
</service>
<!-- ProtectedView to SecurityGroup services -->
<service name="addProtectedViewToSecurityGroup" engine="entity-auto" invoke="create" default-entity-name="ProtectedView" auth="true">
<description>Add a Protected View to a SecurityGroup</description>
<permission-service service-name="securityPermissionCheck" main-action="CREATE"/>
<attribute name="viewNameId" type="String" mode="IN" optional="false"/>
<attribute name="groupId" type="String" mode="IN" optional="false"/>
<attribute name="maxHits" type="Long" mode="IN" optional="false"/>
<attribute name="maxHitsDuration" type="Long" mode="IN" optional="false"/>
<attribute name="tarpitDuration" type="Long" mode="IN" optional="false"/>
</service>
<service name="updateProtectedViewToSecurityGroup" engine="entity-auto" invoke="update" default-entity-name="ProtectedView" auth="true">
<description>Update a Protected View to SecurityGroup Assignment</description>
<permission-service service-name="securityPermissionCheck" main-action="UPDATE"/>
<attribute name="viewNameId" type="String" mode="IN" optional="false"/>
<attribute name="groupId" type="String" mode="IN" optional="false"/>
<attribute name="maxHits" type="Long" mode="IN" optional="false"/>
<attribute name="maxHitsDuration" type="Long" mode="IN" optional="false"/>
<attribute name="tarpitDuration" type="Long" mode="IN" optional="false"/>
</service>
<service name="removeProtectedViewFromSecurityGroup" engine="entity-auto" invoke="delete" default-entity-name="ProtectedView" auth="true">
<description>Remove a Protected View from a SecurityGroup</description>
<permission-service service-name="securityPermissionCheck" main-action="DELETE"/>
<attribute name="viewNameId" type="String" mode="IN" optional="false"/>
<attribute name="groupId" type="String" mode="IN" optional="false"/>
</service>
<!-- permission check -->
<service name="securityPermissionCheck" engine="simple"
location="component://common/script/org/ofbiz/common/permission/CommonPermissionServices.xml" invoke="genericBasePermissionCheck">
<implements service="permissionInterface"/>
<attribute name="primaryPermission" type="String" mode="IN" optional="true" default-value="SECURITY"/>
</service>
<service name="createUserLoginSecurityQuestion" engine="entity-auto" invoke="create" default-entity-name="UserLoginSecurityQuestion" auth="true">
<description>Create a UserLoginSecurityQuestion</description>
<auto-attributes include="pk" mode="IN" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
</service>
<service name="updateUserLoginSecurityQuestion" engine="entity-auto" invoke="update" default-entity-name="UserLoginSecurityQuestion" auth="true">
<description>Update a UserLoginSecurityQuestion</description>
<auto-attributes include="pk" mode="IN" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
</service>
<service name="removeUserLoginSecurityQuestion" engine="entity-auto" invoke="delete" default-entity-name="UserLoginSecurityQuestion" auth="true">
<description>Remove UserLoginSecurityQuestion</description>
<auto-attributes include="pk" mode="IN" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
</service>
</services>