| | Integration and Data Mapping Integrating OTM / G-Log with external and legacy systems - including XML, WebServices, SOA, ESB, BPEL, EDI and Oracle's Fusion. |  | 
January 9th, 2008, 15:41
| | Junior Member | | Join Date: Jan 2008
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
Rep Power: 0 | | | Interfacing from ASP.NET Is there a way I can have my ASP.NET web application authenticate a user using OTM (web service, API) if I pass the user id and password? I just need to know if the user is a valid user in OTM and if possible their SCAC code they are associated with.
I would appreciate any info or links to this subject.
Thank you.
Last edited by shinsoft : January 9th, 2008 at 15:43.
Reason: added more tags
| 
January 9th, 2008, 16:01
|  | Site Moderator | | Join Date: Jun 2006 Location: West Chester, PA
Posts: 790
Thanks: 51
Thanked 194 Times in 119 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
Rep Power: 10 | | | Re: Interfacing from ASP.NET I can't think of a way to handle this with the currently exposed web service or XML APIs, though I can tell you that OTM 6.0 is going to expose much more functionality (including Agents) via web service APIs.
I can think of two ways to tackle this. - Create a servlet or similar lightweight app that verifies the OTM user directly against the OTM DB -- make sure that it only makes read requests and you won't ever have to worry about data issues.
- Utilize an SSO (Single Sign-On) infrastructure, so that a centralized LDAP repository is used for all applications, including OTM. You can then query against this to see whether a user has access to OTM and/or other applications.
Does anyone have an alternate suggestion?
--Chris | 
January 9th, 2008, 16:24
| | Junior Member | | Join Date: Jan 2008
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
Rep Power: 0 | | | Re: Interfacing from ASP.NET Chris,
Thanks for your quick reply.
Option 1 sounds good but I believe the password is stored with encryption so I couldn't validate it without first decrypting it. Is there way to decrypt this within OTM?
Thank you. | 
January 10th, 2008, 12:29
| | Junior Member | | Join Date: Jan 2008 Location: Atlanta
Posts: 23
Thanks: 1
Thanked 5 Times in 5 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
Rep Power: 0 | | | Re: Interfacing from ASP.NET Here's another suggestion, but I've don't have an application in front of me to test it so it may not work.
Couldn't you just send an empty/bad XML message to the integration servlet? I know this will not validate the SCAC, but I think you can build an XML message that will fail purposely due to construct or some other reason. You could ignore that.
Now I do realize this causes a little more overheard than one might desire.
I think the DB method is probably the simplest, but like the other poster I believe it is encrypted.
Good Luck! | 
January 10th, 2008, 15:42
|  | Site Moderator | | Join Date: Jun 2006 Location: West Chester, PA
Posts: 790
Thanks: 51
Thanked 194 Times in 119 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
Rep Power: 10 | | | Re: Interfacing from ASP.NET Actually, OTM uses a one-way password hash, so there's no way to decrypt. In order to compare, you'd have to encrypt the user-supplied password and then compare the two encrypted values to each other.
Now, it has been a long time since I've worked with this code (around 4 years), but I believe that the password encryption in OTM is based on the Base64 algorithm (no pun intended). If your OTM environment and classpath are setup, you can get the Base64 encoded version of a password by using the following command: Code: glog.util.appclass.Base64Encoding <text password> You'll need to test this, to ensure it hasn't changed, but this should help.
--Chris | 
January 11th, 2008, 16:23
| | Junior Member | | Join Date: Jan 2008
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
Rep Power: 0 | | | Re: Interfacing from ASP.NET Quote:
Originally Posted by chrisplough Actually, OTM uses a one-way password hash, so there's no way to decrypt. In order to compare, you'd have to encrypt the user-supplied password and then compare the two encrypted values to each other.
Now, it has been a long time since I've worked with this code (around 4 years), but I believe that the password encryption in OTM is based on the Base64 algorithm (no pun intended). If your OTM environment and classpath are setup, you can get the Base64 encoded version of a password by using the following command: Code: glog.util.appclass.Base64Encoding <text password> You'll need to test this, to ensure it hasn't changed, but this should help.
--Chris | Thanks for the suggestion. We'll give that a try. Is there a documentation that would describe Code: glog.util.appclass.Base64Encoding <text password> in more detail?
Thank you. | 
January 11th, 2008, 19:28
|  | Site Moderator | | Join Date: Jun 2006 Location: West Chester, PA
Posts: 790
Thanks: 51
Thanked 194 Times in 119 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
Rep Power: 10 | | | Re: Interfacing from ASP.NET No - unfortunately, there is no documentation. I only know about this functionality because I was involved in the development of OTM and this was one of the internal classes that we used now and then to Base64 encode passwords.
Here's a quick description, though: The password that you pass to the class in clear text (<text password>) will be returned to you on the command line as the Base64 encoded equivalent. So, you pass it an argument, which is the clear-text password and it gives you the encoded version.
--Chris | 
January 21st, 2008, 14:24
| | Junior Member | | Join Date: Jan 2008 Location: Arden Hills, MN
Posts: 1
Thanks: 0
Thanked 1 Time in 1 Post
Groans: 0
Groaned at 0 Times in 0 Posts
Rep Power: 0 | | | Re: Interfacing from ASP.NET There is a databse stored procedure that will do the trick for you.
pkg_gl_password.validate_password('user name','password')
This is a boolean function that will return true if you supply the correct password for the user id. We are running version 5.5, CU2. I don't know in what other versions this function is available. | | The Following User Says Thank You to rwitalka For This Useful Post: | |  | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | |