[ 
https://issues.apache.org/jira/browse/OFBIZ-12160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Albert J Carter-Corbin updated OFBIZ-12160:
-------------------------------------------
    Description: 
Authentication works fine with all web applications, but when attempting to 
authenticate with the ofbiz-rest-impl plugin the following log message is 
displayed:

{code:java}
2021-01-24 18:13:40,482 |27.0.0.1-9009-exec-3 |LoginServices |I| 
[LoginServices.userLogin] Invalid User : 'cartercorbin-admin'; User not found.
2021-01-24 18:13:40,482 |27.0.0.1-9009-exec-3 |ServiceDispatcher |W| Service 
Failure [userLogin]: User not found.
2021-01-24 18:13:40,483 |27.0.0.1-9009-exec-3 |ServiceDispatcher |T| Sync 
service [ofbiz-rest-jersey/userLogin] finished in [3] milliseconds
2021-01-24 18:13:40,483 |27.0.0.1-9009-exec-3 |HttpBasicAuthFilter |E| User not 
found.
{code}
The multi-tenant sites appear to work fine with.

I modified the LoginService.java to verify what i was seeing:

{code:java}
userLogin = EntityQuery.use(delegator).from("UserLogin").where("userLoginId", 
username).cache(isServiceAuth).queryOne(); {code}

To the following

{code}
List<GenericValue> userLogins = 
EntityQuery.use(delegator).from("UserLogin").queryList();
if(ObjectUtils.isNotEmpty(userLogins)) {
Debug.logError(String.format("Login Count: %s", userLogins.size()), MODULE);
}

userLogin = EntityQuery.use(delegator).from("UserLogin").where("userLoginId", 
username).cache(isServiceAuth).queryOne(); {code}
{code}

And found that when authenticating with the plugin the userLogins was empty.  
THe logins are not empty when logging into the various websites in ofbiz.  This 
had worked a last month before I updated pulled the latest updates.  

I used the https://localhost:443/rest/ as the starting point.  I am very 
interested in using and extending the various endpoints in ofbiz.  I actually 
already started to expose ui services to be used in another ui framework.  I 
would love to be able to continue. 

  was:
Authentication works fine with all web applications, but when attempting to 
authenticate with the ofbiz-rest-impl plugin the following log message is 
displayed:

{code:java}
2021-01-24 18:13:40,482 |27.0.0.1-9009-exec-3 |LoginServices |I| 
[LoginServices.userLogin] Invalid User : 'cartercorbin-admin'; User not found.
2021-01-24 18:13:40,482 |27.0.0.1-9009-exec-3 |ServiceDispatcher |W| Service 
Failure [userLogin]: User not found.
2021-01-24 18:13:40,483 |27.0.0.1-9009-exec-3 |ServiceDispatcher |T| Sync 
service [ofbiz-rest-jersey/userLogin] finished in [3] milliseconds
2021-01-24 18:13:40,483 |27.0.0.1-9009-exec-3 |HttpBasicAuthFilter |E| User not 
found.
{code}
The multi-tenant sites appear to work fine with.

I modified the LoginService.java to verify what i was seeing:

{code:java}
userLogin = EntityQuery.use(delegator).from("UserLogin").where("userLoginId", 
username).cache(isServiceAuth).queryOne(); {code}

To the following

{code}
List<GenericValue> userLogins = 
EntityQuery.use(delegator).from("UserLogin").queryList();
if(ObjectUtils.isNotEmpty(userLogins)) {
Debug.logError(String.format("Login Count: %s", userLogins.size()), MODULE);
}

userLogin = EntityQuery.use(delegator).from("UserLogin").where("userLoginId", 
username).cache(isServiceAuth).queryOne(); {code}
{code}

And found that when authenticating with the plugin the uerLogins was empty.  
THe logins are not empty when logging into the various websites in ofbiz.  This 
had worked a last month before I updated pulled the latest updates.  

I used the https://localhost:443/rest/ as the starting point.  I am very 
interested in using and extending the various endpoints in ofbiz.  I actually 
already started to expose ui services to be used in another ui framework.  I 
would love to be able to continue. 


> Cannot authentication with ofbiz-rest-impl with multi-tenant enabled 
> ---------------------------------------------------------------------
>
>                 Key: OFBIZ-12160
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-12160
>             Project: OFBiz
>          Issue Type: Bug
>          Components: rest
>    Affects Versions: Trunk
>         Environment: CentOS Linux 8 Core
> ofbiz-framework trunk branch (01/23/2021)
> ofbix-rest-impl trunk branch (01/23/2021)
> OpenJDK 1.9.0_262 64 Bit
> Running behind Apache HTTPd with Tomcat 9 and mod_jk
>            Reporter: Albert J Carter-Corbin
>            Priority: Minor
>
> Authentication works fine with all web applications, but when attempting to 
> authenticate with the ofbiz-rest-impl plugin the following log message is 
> displayed:
> {code:java}
> 2021-01-24 18:13:40,482 |27.0.0.1-9009-exec-3 |LoginServices |I| 
> [LoginServices.userLogin] Invalid User : 'cartercorbin-admin'; User not found.
> 2021-01-24 18:13:40,482 |27.0.0.1-9009-exec-3 |ServiceDispatcher |W| Service 
> Failure [userLogin]: User not found.
> 2021-01-24 18:13:40,483 |27.0.0.1-9009-exec-3 |ServiceDispatcher |T| Sync 
> service [ofbiz-rest-jersey/userLogin] finished in [3] milliseconds
> 2021-01-24 18:13:40,483 |27.0.0.1-9009-exec-3 |HttpBasicAuthFilter |E| User 
> not found.
> {code}
> The multi-tenant sites appear to work fine with.
> I modified the LoginService.java to verify what i was seeing:
> {code:java}
> userLogin = EntityQuery.use(delegator).from("UserLogin").where("userLoginId", 
> username).cache(isServiceAuth).queryOne(); {code}
> To the following
> {code}
> List<GenericValue> userLogins = 
> EntityQuery.use(delegator).from("UserLogin").queryList();
> if(ObjectUtils.isNotEmpty(userLogins)) {
> Debug.logError(String.format("Login Count: %s", userLogins.size()), MODULE);
> }
> userLogin = EntityQuery.use(delegator).from("UserLogin").where("userLoginId", 
> username).cache(isServiceAuth).queryOne(); {code}
> {code}
> And found that when authenticating with the plugin the userLogins was empty.  
> THe logins are not empty when logging into the various websites in ofbiz.  
> This had worked a last month before I updated pulled the latest updates.  
> I used the https://localhost:443/rest/ as the starting point.  I am very 
> interested in using and extending the various endpoints in ofbiz.  I actually 
> already started to expose ui services to be used in another ui framework.  I 
> would love to be able to continue. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to