Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0049159Openbravo ERPA. Platformpublic2022-04-28 09:542022-04-29 14:18
caristu 
caristu 
highminorhave not tried
closedfixed 
5
 
PR22Q3 
Core
No
0049159: Add a new authentication method that authenticates by just setting the Authorization header with basic authentication
Currently we have the BasicHttpAuthorizationProvider which follows the standard HTTP basic authentication[1].

It would be nice to have a different authorization provider to authenticate with an external system that does not strictly follow the standard HTTP authentication but expects to directly have the basic authentication in the Authorization header of the request.

[1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication [^]
.
No tags attached.
related to feature request 0048579 closed caristu Push API 
causes defect 0049171 closed caristu External system with Basic Auth (Always in Header) does not allow to enter user and password 
Issue History
2022-04-28 09:54caristuNew Issue
2022-04-28 09:54caristuAssigned To => Triage Platform Base
2022-04-28 09:54caristuModules => Core
2022-04-28 09:54caristuTriggers an Emergency Pack => No
2022-04-28 09:54caristuAssigned ToTriage Platform Base => caristu
2022-04-28 09:54caristuStatusnew => acknowledged
2022-04-28 09:54caristuStatusacknowledged => scheduled
2022-04-28 09:55caristuRelationship addedrelated to 0048579
2022-04-28 10:11caristuSummarySupport setting HTTP request headers in authorization methods => Add a new authentication method that authenticates setting the Authorization header with basic authentication
2022-04-28 10:11caristuDescription Updatedbug_revision_view_page.php?rev_id=23973#r23973
2022-04-28 10:12caristuSummaryAdd a new authentication method that authenticates setting the Authorization header with basic authentication => Add a new authentication method that authenticates just setting the Authorization header with basic authentication
2022-04-28 10:12caristuDescription Updatedbug_revision_view_page.php?rev_id=23974#r23974
2022-04-28 11:29hgbotNote Added: 0136835
2022-04-28 11:56caristuSummaryAdd a new authentication method that authenticates just setting the Authorization header with basic authentication => Add a new authentication method that authenticates by just setting the Authorization header with basic authentication
2022-04-28 18:38hgbotResolutionopen => fixed
2022-04-28 18:38hgbotStatusscheduled => closed
2022-04-28 18:38hgbotNote Added: 0136841
2022-04-28 18:38hgbotFixed in Version => PR22Q3
2022-04-28 18:38hgbotNote Added: 0136842
2022-04-29 08:33alostaleRelationship addedcauses 0049171
2022-04-29 14:18ivancaceresIssue Monitored: ivancaceres

Notes
(0136835)
hgbot   
2022-04-28 11:29   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/578 [^]
(0136841)
hgbot   
2022-04-28 18:38   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/578 [^]
(0136842)
hgbot   
2022-04-28 18:38   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: a4bcd39d50f179bbad42fb3aeba950b50fdf8d1e
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 28-04-2022 13:17:32
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/a4bcd39d50f179bbad42fb3aeba950b50fdf8d1e [^]

fixes ISSUE-49159: new "set always the basic auth in header" auth provider

  Provide a new authorization provider to authenticate against external
systems which do not follow the standard HTTP authentication but expect
the basic auth information to be always present in the request header.

  Note that for the encoding of the basic credentials we are using the
same solution the standard JDK implementation of the Authenticator
applies when authenticating with basic credentials.

---
A src/org/openbravo/service/externalsystem/http/BasicHttpAlwaysInHeaderAuthorizationProvider.java
A src/org/openbravo/service/externalsystem/http/HttpAuthorizationRequestHeaderProvider.java
M src-db/database/sourcedata/AD_REF_LIST.xml
M src-test/src/org/openbravo/service/externalsystem/http/HttpExternalSystemCommunicationTest.java
M src/org/openbravo/service/externalsystem/http/BasicHttpAuthorizationProvider.java
M src/org/openbravo/service/externalsystem/http/HttpExternalSystem.java
---