Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Ldap Authentication

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ldap Authentication

    Hello ,

    Can anyone please guide me how does Alpha five handle ldap authentication . I want to use LDAP authentication . Help will be appreciated .

    Thanks

  • #2
    Re: Ldap Authentication

    If you don't get anyone who can rattle off the code/process, I can write a generic utility for this. I'd need to crack open my books, but I did write several LDAP utilities in my pre-Alpha Five days.
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

    Comment


    • #3
      Re: Ldap Authentication

      Thanks Steve . I found some previous posts on it where there was a link to microsoft website .Let me play around with it and see if I can get it done , if u know of any online resource on this please share .

      Appreciate your help

      Thanks

      Comment


      • #4
        Re: Ldap Authentication

        If you have any luck, please let us know.

        Thanks in advance.
        Tommy Thompson
        Thompson Consulting Services
        Beautiful Kentucky Lake, Springville, TN 38256
        [email protected]

        Comment


        • #5
          Re: Ldap Authentication

          We use Alpha5 web apps with LDAP on the intranet at the place I work. The LDAP had already been set up with users and groups and was being used for other stuff way before we started with Alpha5, so I don't know much about that side of it.

          We built a single Login web app that interfaces with the LDAP, and include code on the a5w pages of all the apps to redirect to this Login. It saves the user's userID and associated groups to a protected session variable, and redirects back to the user's original target page.

          The Login web app is a single dialog with fields for the username and password. It's been a long time since I actually set up the Login dialog, and I'm pretty sure it's the farthest thing from a generic utility- you'd have to customize for your setup. But I'll pass along the code as it is now if it helps.

          Here's the code in the validate event:
          Code:
          strUsername = ut(currentform.Controls.txtUsername.value)
          strPassword = currentform.Controls.txtPassword.value
          
          on error goto Error_Handler
          
          objDomain = ole.GetObject("GC://rootDSE")
          objADsPath = objDomain.Get("defaultNamingContext")
          delete objDomain
          con = OLE.Create("ADODB.Connection")
          con.provider ="ADsDSOObject"
          con.Properties("User ID") = strUsername
          con.Properties("Password") = strPassword
          con.open("Active Directory Provider")
          Com = ole.Create("ADODB.Command")
          Com.ActiveConnection = con
          Com.CommandText ="select memberof FROM 'GC://"+objADsPath+"' where sAMAccountname='"+strUsername+"'"
          rs = Com.Execute()
          rs.Close()
          con.Close()
          
          delete rs
          delete con
          
          End
          
          Error_Handler:
          
          currentform.has_error = .t.
          currentform.error_message = "Incorrect Username or Password"
          
          End
          and here is what is in the AfterValidate event:
          Code:
          dim strNoTargetUrl as c
          strNoTargetUrl = "http://alpha5/login/NoRedirect.a5w"
          
          strUsername = ut(currentform.Controls.txtUsername.value)
          strPassword = currentform.Controls.txtPassword.value
          
          on error goto Error_Handler
          
          'get the groups
          objDomain = ole.GetObject("GC://rootDSE")
          objADsPath = objDomain.Get("defaultNamingContext")
          delete objDomain
          con = OLE.Create("ADODB.Connection")
          con.provider ="ADsDSOObject"
          con.Properties("User ID") = strUsername
          con.Properties("Password") = strPassword
          con.open("Active Directory Provider")
          Com = ole.Create("ADODB.Command")
          Com.ActiveConnection = con
          Com.CommandText ="select memberof FROM 'GC://"+objADsPath+"' where sAMAccountname='"+strUsername+"'"
          rs = Com.Execute()
          membership = rs.fields.item("memberof").value
          rs.Close()
          con.Close()
          
          delete rs
          delete con
          
          Dim newgroup as c
          Dim grouplist as c
          
          For each group in membership
           newgroup = extract_string(group,"CN=","," )
           grouplist = grouplist + ut(newgroup) + ","
          Next group
          
          'be sure to set the logged-in, groups, and userID variable
          session.__protected__FlagIsLoggedIn = .t.
          session.__protected__Groups = grouplist
          session.__protected__UserID = strUsername
          
          'redirect back to the place we came from
          if eval_valid("session.targetUrl") then
              if session.targetURL <> "" then
                  Currentform.RedirectTarget = session.targetURL
              else
                  'currentform.redirectTarget = strNoTargetUrl
              end if
          else
              'currentform.redirectTarget = strNoTargetUrl
          end if
          
          
          
          end 
          
          Error_Handler:
          
          currentform.has_error = .t.
          currentform.error_message = "Incorrect Username or Password"
          
          End
          If you think it might be useful, I can post the template we use to build new web apps that has tables and forms to handle security, since we've found no easy way to use the built-in Alpha5 security tables with this LDAP login.

          Comment


          • #6
            Re: Ldap Authentication

            I'll see if I can integrate it with security framework. I have a spec in front of me that also requires LDAP Authentication. The last time I wrote such a utility, Netscape was the dominant browser.
            Steve Wood
            Join the ALPHA DEVELOPERS NETWORK
            There is no Cloud. It's just someone else's computer.
            Web - Mobile - Hosting - Products - Frameworks - Developer Resources
            AlphaToGo | IADN (100% Alpha Anywhere Websites)

            Comment


            • #7
              Re: Ldap Authentication

              Looking good. Keep up the good work. I'm surprised more people don't need this capability.
              Tommy Thompson
              Thompson Consulting Services
              Beautiful Kentucky Lake, Springville, TN 38256
              [email protected]

              Comment


              • #8
                Re: Ldap Authentication

                I'll still look at it, but turns out I need the LDAP for an Alpha Desktop app, not the web.

                On the web, I know I can accomplish auto-login if the user passes LDAP authentication. But what I don't know how to do is avoid having all those authorized individuals also in Alpha's Security Framework. The whole point of LDAP Authentication is to have the LDAP Server authenticate, and NOT maintain redundant information in whatever product you are logging in to, Alpha in this case. The LDAP Server would have to store Security Group information that matched what you had in Security Framework. I think this method would work:

                -- If authenticated by the LDAP server, instantly create a new user in Security Framework based on the LDAP authentication information, or reuse an existing on if present. Then auto-log them in. Purge that user after the session expires.

                I think it is possible to do all of this using a normal Login dialog by inserting some code on the login.a5w page that fires just after they press the Submit button but before it gets to Security Framework. Not sure about that, but easy to test.
                Steve Wood
                Join the ALPHA DEVELOPERS NETWORK
                There is no Cloud. It's just someone else's computer.
                Web - Mobile - Hosting - Products - Frameworks - Developer Resources
                AlphaToGo | IADN (100% Alpha Anywhere Websites)

                Comment

                Working...
                X