Kerberos & ODBC connection

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

Kerberos & ODBC connection

Postby gkipe » Tue Feb 15, 2011 3:31 pm

We are turning on Kerberos network protocol on our iSeries machine, and we are using iSeries Access for Windows ( Client Access ) for our ODBC configuration. The iSeries is configured properly along with out Citrix machines ( the iSeries Emulator published on Citrix is authenticating correctly with Kerberos ).

So the Smalltalk code thats been in place, needs to be reworked to get an ODBC connection using Kerberos. What do I pass for the #password: in the current code? AbtDatabaseLogonSpec is expecting a password. Do I need to use other classes to get a connection? I have tried passing nil and '' to no avail. Any and all help or guidance is much appreciated. -Garet

Code: Select all
| conSpec logonSpec connectResult |
conSpec := AbtDatabaseConnectionSpec
      forDbmClass: self dbmClass
      dataSourceName: aDsn.

logonSpec := AbtDatabaseLogonSpec
   id: anUserId trimBlanks
   password: aPassword trimBlanks
   server: aSystem.

connectResult := (conSpec connectUsingAlias: ('Connection for: ', logonSpec id) logonSpec: logonSpec ifError: [:a | self logonError. ^false]).
connectResult isAbtError
   ifTrue: [Transcript cr; show: 'The database connection was not completed. Results = ', connectResult printString. ^false].

Posts: 24
Joined: Tue Feb 03, 2009 11:05 am

Re: Kerberos & ODBC connection

Postby marten » Fri Feb 18, 2011 2:03 pm

Answering this question seems to be not that easy. Perhaps it would be easier to answer, if you would already know, how this is done using C or C++ and ODBC. Telling us this, it would be much easier to answer how it is done in Smalltalk.

Marten Feldtmann, Principal Smalltalk User, Private
SkypeMe callto://marten.feldtmann
Posts: 641
Joined: Sat Oct 14, 2006 7:10 am
Location: Hamburg - Germany

Re: Kerberos & ODBC connection

Postby gkipe » Sun Feb 20, 2011 6:38 am

I just got lucky and passed in a new empty LogonSpec, with no variables set at all. I did this on a whim, and it worked. Somehow the Kerberos authentication is smart enough on the iSeries to know when a new empty LogonSpec is passed to go look at the windows active directory login/password and it authenticates properly.
Posts: 24
Joined: Tue Feb 03, 2009 11:05 am

Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: No registered users and 1 guest