 |
Forums |
Admin Discussion Forums: help Start New Thread
| Message: 89351 |
 |
BY: Jesper Skov (jskovjbdk) DATE: 2009-08-05 09:04 SUBJECT: Two patches to sspi.rb Greetings,
I have just posted two patches to sspi.rb in the Tracker.
They allow me to use rubysspi to do full client-server authentication on windows. That it, they extend rubysspi from being a proxy client to handle both sides of the SSPI authentication.
I use it to make an authenticated server in Java (since I never managed to find JAAS implementations that do the equivalent). I hope to fully document that (and provide sources) on my blog http://buildmeister.blogspot.com within the next month or so.
The patch as provided allow you to do something like the below (sorry, it may not be 100% valid - it is untested copy-paste code):
-------
server = Win32::SSPI::NegotiateAuth.new()
server.server_initialize()
client = Win32::SSPI::NegotiateAuth.new()
clientNegotiation = client.get_initial_token('Negotiate')
serverChallenge = server.accept_authentication(clientNegotiation, true)
clientResponse = client.complete_authentication(serverChallenge)
server.accept_authentication(clientResponse)
server.get_context_names()
-------
I hope someone will find it useful.
| |
Thread View
Post a followup to this message
|
 |