GET User from Request in PASOE - Forum - OpenEdge Development - Progress Community
 Forum

GET User from Request in PASOE

This question is not answered

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
  • Hi William,

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

    Regards,

    Irfan

  • 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" />

    Regards,

    Irfan

  • 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

  • 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 ?

    Regards,

    Irfan

  • 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

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

    Regards,

    Irfan