GET User from Request in PASOE

Posted by William Antero on 06-Apr-2017 12:55

Hello,

I´m trying to get the current user from a request in my REST Service at PASOE, but I don´t know how to do this.

In every request the client sent the JSESSIONID to the server, but I need to get the userId who changed in data.

I´m looged in with the user "Admin" from SGASP domain that are configured at Spring Security in PASOE, but the method USERID return the userId "user1" from blank domain.

Best Regards,

William Pavei Antero

All Replies

Posted by Irfan on 06-Apr-2017 18:00

Hi William,

Which Spring Security model are you using ? basic-local/LDAP etc.

Posted by Irfan on 06-Apr-2017 18:18

I am guessing you are using OERealm. If that is the case then can you write you configure your userDomain to not be blank in the RealmAuthProvider

           <b:property name="userDomain" value="SGASP" />

Posted by William Antero on 06-Apr-2017 21:20

Hi Irfan,

I´m using oeablSecurity-form-oerealm model and the Domain value SGASP.

web.xml

   <context-param>

       <param-name>contextConfigLocation</param-name>

       <param-value>

           /WEB-INF/oeablSecurity-form-oerealm.xml

       </param-value>

   </context-param>

 

oeablSecurity-form-oerealm.xml

           <b:property name="createCPAuthn" value="true" />

           <b:property name="multiTenant" value="false" />

           <b:property name="sealClientPrincipal" value="false" />

           <b:property name="key" value="oech1::xxxxxxxxxxxxxxxxx" />

           <b:property name="registryFile" value="" />

           <b:property name="userDomain" value="SGASP" />

           <b:property name="authz" value="true" />

 

Best Regards,

William Pavei Antero

Posted by Irfan on 06-Apr-2017 22:43

I am guessing something wrong with the RealmClass then. Can you debug the ABL Realm Class and see what is the information sent to the ValidateUser method ?

Posted by William Antero on 07-Apr-2017 07:55

Irfan,

I follow the kbase to do the Spring Configuration: knowledgebase.progress.com/.../How-to-configure-OERealm-authentication-with-PASOE

The login are working with the right user and domain, but when I run a class method the USERID are different.

[17/04/07@09:51:58.389-0300] P-026216 T-019648 1 AS-9 -- (Procedure: 'HybridRealm auth.HybridRealm' Line:10) Loaded property file spaservice.properties

[17/04/07@09:51:58.389-0300] P-026216 T-019648 1 AS-9 -- (Procedure: 'HybridRealm auth.HybridRealm' Line:10)    Password:  oech1::03150e14023532202325203536

[17/04/07@09:51:58.389-0300] P-026216 T-019648 1 AS-9 -- (Procedure: 'HybridRealm auth.HybridRealm' Line:10)    Role:  SGASPclient

[17/04/07@09:51:58.389-0300] P-026216 T-019648 1 AS-9 -- (Procedure: 'HybridRealm auth.HybridRealm' Line:10)    DebugMsg:  yes

[17/04/07@09:51:58.389-0300] P-026216 T-019648 1 AS-9 -- (Procedure: 'ValidateUser auth.HybridRealm' Line:100) userName:  admin@SGASP

[17/04/07@09:51:58.389-0300] P-026216 T-019648 1 AS-9 -- (Procedure: 'ValidateClient auth.HybridRealm' Line:79) ClientContextId:  Tz2x3FkiROWLDzg+UM2emA

[17/04/07@09:51:58.390-0300] P-026216 T-019648 1 AS-9 -- (Procedure: 'ValidateUser auth.HybridRealm' Line:103) userNum:  2001

[17/04/07@09:51:58.393-0300] P-026216 T-030984 1 AS-9 -- (Procedure: 'GetAttribute auth.HybridRealm' Line:11) Found ' ? ' roles for user-id( admin@SGASP )

[17/04/07@09:51:58.405-0300] P-026216 T-029156 1 AS-9 -- (Procedure: 'ValidateClient auth.HybridRealm' Line:79) ClientContextId:  Tz2x3FkiROWLDzg+UM2emA

[17/04/07@09:51:58.405-0300] P-026216 T-029156 1 AS-9 -- (Procedure: 'ValidatePassword auth.HybridRealm' Line:85) Validate password using basic

[17/04/07@09:51:58.405-0300] P-026216 T-029156 1 AS-9 -- (Procedure: 'ValidatePassword auth.HybridRealm' Line:85) Password:  admin

[17/04/07@09:52:05.402-0300] P-026216 T-029156 1 AS-9 -- (Procedure: 'ReadAnalistas Analistas' Line:121) USERID:  user1

Best Regards,

William

Posted by Irfan on 10-Apr-2017 02:31

Thanks, I will try to reproduce it at my end and will let you know.

This thread is closed