Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0035325
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Retail Modules] Web POSminorhave not tried2017-02-21 13:202017-06-26 11:29
ReportermtaalView Statuspublic 
Assigned Tomtaal 
PrioritynormalResolutionfixedFixed in VersionRR17Q3
StatusclosedFix in branchFixed in SCM revision10bfabca502a
ProjectionnoneETAnoneTarget VersionRR17Q3
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0035325: Support basic authentication in mobile service calls

DescriptionWhen a client calls an Openbravo webservice it is common to use basic authentication. The client can be for example SoapUI or java code. In java code one can implement basic authentication in the client side with snippet like this [1].

The way basic authentication works is that a request is done in a standard way. If the request returns a 401 then the client side code will react by sending basic authentication credentials (possibly asking the user to enter them). In the java code below the getPasswordAuthentication is called for the second request.

However, in our case we were not always forcing a basic authentication. So external tools like soap ui do not work.


[1]
    Authenticator.setDefault(new Authenticator() {
      @Override
      protected PasswordAuthentication getPasswordAuthentication() {
        return new PasswordAuthentication(getLogin(), getPassword().toCharArray());
      }
    });
Steps To ReproduceImplement a webservice call using code as shown in the test case:

https://code.openbravo.com/tools/automation/pi-mobile/file/06f84e282873/src-test/org/openbravo/test/mobile/retail/mobilecore/webservice/WebServicesHelper.java#l226 [^]
Proposed SolutionReturn basic authentication header in case of a 401.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to feature request 00353263.0PR17Q2 closedmtaal Openbravo ERP Support basic authentication 
related to feature request 00362383.0PR17Q3 closedmtaal Openbravo ERP Support basic authentication: if a stateless request has an invalid login then set the status code to unauthorized 

-  Notes
(0094507)
mtaal (manager)
2017-02-21 13:39

http://wiki.openbravo.com/wiki/How_To_Call_An_Openbravo_Webservice_From_Java#Basic_Authentication:_two_ways_to_do_it [^]
(0094510)
hgbot (developer)
2017-02-21 13:49

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 10bfabca502a30ceedf966720a7528ba2b1cb7df
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Feb 21 13:49:30 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/10bfabca502a30ceedf966720a7528ba2b1cb7df [^]

Fixes issue 35325: Support basic authentication in mobile service calls
Set the basic authentication realm

---
M src/org/openbravo/mobile/core/process/WebServiceAuthenticatedServlet.java
---
(0094511)
hgbot (developer)
2017-02-21 13:53

Repository: tools/automation/pi-mobile
Changeset: 1e44a524fa1fbfe6529e3392c919b309d99c728c
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Feb 21 13:53:08 2017 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/1e44a524fa1fbfe6529e3392c919b309d99c728c [^]

Related to issue 35325, related to issue 35326
Comment out the headers which pass directly basic auth information. Are not needed anymore.
Keep commented code for later usage/reference

---
M src-test/org/openbravo/test/mobile/retail/mobilecore/webservice/WebServicesHelper.java
---
(0094595)
hgbot (developer)
2017-02-24 09:49

Repository: tools/automation/pi-mobile
Changeset: e346994c7452dcb03ce1b3667be01809f26a3633
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri Feb 24 09:49:36 2017 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/e346994c7452dcb03ce1b3667be01809f26a3633 [^]

Related to issue 35325, related to issue 35326
Backout of changeset as it causes several offline tests to fail

---
M src-test/org/openbravo/test/mobile/retail/mobilecore/webservice/WebServicesHelper.java
---
(0094597)
hgbot (developer)
2017-02-24 09:51

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 7dc2ca4492a6e9935a75692b18349fc7c1940731
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri Feb 24 09:51:13 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/7dc2ca4492a6e9935a75692b18349fc7c1940731 [^]

Related to issue 35325: Support basic authentication in mobile service calls
Backed out of changeset as it causes serveral offline tests to fail

---
M src/org/openbravo/mobile/core/process/WebServiceAuthenticatedServlet.java
---
(0097336)
mtaal (manager)
2017-06-12 23:43

Accidentally pushed all changes in related ERP core issue

- Issue History
Date Modified Username Field Change
2017-02-21 13:20 mtaal New Issue
2017-02-21 13:20 mtaal Assigned To => mtaal
2017-02-21 13:20 mtaal Triggers an Emergency Pack => No
2017-02-21 13:21 mtaal Summary Support double request approach of basic authentication => Support basic authentication in mobile service calls
2017-02-21 13:21 mtaal Review Assigned To => marvintm
2017-02-21 13:24 mtaal Relationship added related to 0035326
2017-02-21 13:39 mtaal Note Added: 0094507
2017-02-21 13:49 hgbot Checkin
2017-02-21 13:49 hgbot Note Added: 0094510
2017-02-21 13:49 hgbot Status new => resolved
2017-02-21 13:49 hgbot Resolution open => fixed
2017-02-21 13:49 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/10bfabca502a30ceedf966720a7528ba2b1cb7df [^]
2017-02-21 13:53 hgbot Checkin
2017-02-21 13:53 hgbot Note Added: 0094511
2017-02-24 09:44 mtaal Status resolved => new
2017-02-24 09:44 mtaal Resolution fixed => open
2017-02-24 09:49 hgbot Checkin
2017-02-24 09:49 hgbot Note Added: 0094595
2017-02-24 09:51 hgbot Checkin
2017-02-24 09:51 hgbot Note Added: 0094597
2017-03-29 13:43 AugustoMauch Target Version RR17Q2 => RR17Q3
2017-06-12 23:39 mtaal Relationship added related to 0036238
2017-06-12 23:43 mtaal Status new => scheduled
2017-06-12 23:43 mtaal Note Added: 0097336
2017-06-12 23:43 mtaal Status scheduled => resolved
2017-06-12 23:43 mtaal Fixed in Version => RR17Q3
2017-06-12 23:43 mtaal Resolution open => fixed
2017-06-26 11:29 marvintm Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker