[GENERAL] "could not accept SSPI security context"

2010-11-22 Thread Reto Schöning
Hi, I've set up 8.3 to use SSPI for authentication (clients and server on windows XP). I can successfully connect from clients using psql and another db client using SSPI authentication. However when trying to connect with Npgsql (2.0.11) as the same user, the following error occurs: "could no

Re: [GENERAL] "could not accept SSPI security context"

2011-02-02 Thread Ahmed
The issue has been addressed and patch has been submitted. Refer to Npgsql mailing thread http://lists.pgfoundry.org/pipermail/npgsql-devel/2011-February/001116.html http://lists.pgfoundry.org/pipermail/npgsql-devel/2011-February/001116.html . -- View this message in context: http://postgresql

Re: [GENERAL] "could not accept SSPI security context"

2011-02-02 Thread Francisco Figueiredo Jr.
Thank you very much for your patch! I'm going to review and apply it. As soon as it is done, I'll let you know. On Wed, Feb 2, 2011 at 12:52, Ahmed wrote: > > The issue has been addressed and patch has been submitted. Refer to Npgsql > mailing thread > http://lists.pgfoundry.org/pipermail/npgs

Re: [GENERAL] "could not accept SSPI security context"

2011-02-06 Thread Francisco Figueiredo Jr.
Hi, Ahmed! Thanks for checking this problem. It is really a bug in Npgsql to convert the bytes value with ASCII encoder. If we change that line to use the UTF-8 encoder, wouldn't it suffice to fix this problem? Also, wouldn't change the AuthenticationSSPI case to use context.Host instead of Bra

Re: [GENERAL] "could not accept SSPI security context"

2011-02-17 Thread Ahmed
Hi Francisco, I tried changing that one line to use UTF-8 encoder, but the password packet didn't get fixed. It works smoothly if kept in byte array instead of string. I think changing the AuthenticationSSPI case to use context.Host may break the cases Brar's mentioned. -- View this message i

Re: [GENERAL] "could not accept SSPI security context"

2011-02-19 Thread Brar Piening
On Thu, 17 Feb 2011 07:58:46 -0800 (PST), Ahmed wrote: I tried changing that one line to use UTF-8 encoder, but the password packet didn't get fixed. It works smoothly if kept in byte array instead of string. Yes, as SSPI uses binary bytes we have to avoid to convert them to characters and back

Re: [GENERAL] "could not accept SSPI security context"

2011-02-24 Thread Ahmed Shinwari
On Sat, Feb 19, 2011 at 11:31 PM, Brar Piening wrote: > On Thu, 17 Feb 2011 07:58:46 -0800 (PST), Ahmed > wrote: > >> I tried changing that one line to use UTF-8 encoder, but the password >> packet >> didn't get fixed. It works smoothly if kept in byte array instead of >> string. >> > Yes, as SS

Re: [GENERAL] "could not accept SSPI security context"

2011-03-10 Thread Ahmed Shinwari
Hi Fransisco, I tested the latest Npgsql driver (2.0.12.0), the issue has been fixed. I was able to connect Npgsql test application from my Windows XP client machine with the PostgreSQL server running on Windows 2003 Server. Thank you for applying the patch. On Thu, Feb 24, 2011 at 3:37 PM, Ahm

Re: [GENERAL] "could not accept SSPI security context"

2011-03-10 Thread Francisco Figueiredo Jr.
That's great! I'm glad to hear it. Thank you very much for providing patches for this issue. -- Sent from my Android phone Francisco Figueiredo Jr. Npgsql lead developer fxjr.blogspot.com twitter.com/franciscojunior Em 10/03/2011 09:01, "Ahmed Shinwari" escreveu: > Hi Fransisco, > > I tested t

Re: [GENERAL] "could not accept SSPI security context"

2010-11-22 Thread Magnus Hagander
On Mon, Nov 22, 2010 at 10:21, Reto Schöning wrote: > Hi, > > I've set up 8.3 to use SSPI for authentication (clients and server on > windows XP). I can successfully connect from clients using psql and another > db client using SSPI authentication. However when trying to connect with > Npgsql (2.0

Re: [GENERAL] "could not accept SSPI security context"

2010-11-22 Thread Magnus Hagander
Plase don't drop the mailinglist from the thread. On Mon, Nov 22, 2010 at 11:57, Reto Schöning wrote: > Thanks for the hint. The full error message from npgsql including that > detail row is > Npgsql.NpgsqlException was unhandled >   Message="FATAL: XX000: could not accept SSPI security context"

Re: [GENERAL] "could not accept SSPI security context"

2010-11-22 Thread Reto Schöning
Here's the log output for a failed connection: 2010-11-22 13:25:54 CET FATAL: could not accept SSPI security context 2010-11-22 13:25:54 CET DETAIL: The logon attempt failed (8009030c) 2010/11/22 Magnus Hagander > Plase don't drop the mailinglist from the thread. > > > On Mon, Nov 22, 2010

Re: [GENERAL] "could not accept SSPI security context"

2010-11-22 Thread Magnus Hagander
Hmm. That's a simple SEC_E_LOGON_DENIED. Simply meaning usedname/password is incorrect. The security eventlog on the server (or domain controller) might have more information around it. If not, I'm not sure what's wrong there - if it happens only in npgsql it must be related to that. Or perhaps - b

Re: [GENERAL] "could not accept SSPI security context"

2010-11-23 Thread Brar Piening
On Mon, 22 Nov 2010 13:43:14 +0100, Magnus Hagander wrote: Hmm. That's a simple SEC_E_LOGON_DENIED. Simply meaning usedname/password is incorrect. The security eventlog on the server (or domain controller) might have more information around it. If not, I'm not sure what's wrong there - if it hap

Re: [GENERAL] "could not accept SSPI security context"

2010-11-29 Thread Reto Schöning
thanks a lot for the hints. client side logging: the user name corresponds to the expected user, without the domain prefix ("rsc"). See the full log output below. security event log: I should get that shortly from our IT. Regards, Reto 29.11.2010 10:37:17 4412 Debug Entering NpgsqlConnection.Npg

Re: [GENERAL] "could not accept SSPI security context"

2010-11-29 Thread Reto Schöning
I just heard back from our IT. There's nothing in the logs for this connection attempt, but they noted in the Npgsql log that the authentication was attempted using NTLM. However our domain controller no longer supports NTLM, but only LDAP(s) and kerberos (it's a Windows 2008 server). From the docs

Re: [GENERAL] "could not accept SSPI security context"

2010-11-29 Thread Brar Piening
On Mon, 29 Nov 2010 15:27:35 +0100, Reto Schöning wrote: I just heard back from our IT. There's nothing in the logs for this connection attempt, but they noted in the Npgsql log that the authentication was attempted using NTLM. However our domain controller no longer supports NTLM, but only LD

Re: [GENERAL] "could not accept SSPI security context"

2010-12-03 Thread Brar Piening
Passing null instead of empty string for the principal shouldn't make any difference as an empty CLR-String should be marshalled to an empty (null terminated) C-String. The problem could also be in InitializeSecurityContext which happens in respnse to AuthenticationGSSContinue. If you happen

Re: [GENERAL] "could not accept SSPI security context"

2010-12-22 Thread Reto Schöning
ok we moved to VS08 and I can at last experiment with the npgsql code. I tried forcing "kerberos" instead of "negotiate" in the call to AcquireCredentialsHandle in SSPIHandler.cs. The exception message I then get in the first call to InitializeSecurityContext() is "The security database on the ser

Re: [GENERAL] "could not accept SSPI security context"

2010-12-22 Thread Brar Piening
Original Message Subject: Re: [GENERAL] "could not accept SSPI security context" From: Reto Schöning To: Brar Piening Date: 22.12.2010 17:08 "The security database on the server does not have a computer account for this workstation trust relationship&q

Re: [GENERAL] "could not accept SSPI security context"

2010-12-23 Thread Reto Schöning
() in npgsql and libpq do the same thing though. Regards, Reto 2010/12/22 Brar Piening > Original Message > Subject: Re: [GENERAL] "could not accept SSPI security context" > From: Reto Schöning > To: Brar Piening > Date: 22.12.2010 17:08 > > &g

Re: [GENERAL] "could not accept SSPI security context"

2012-01-20 Thread G_Hosa_Phat
Ahmed wrote > > I tested the latest Npgsql driver (2.0.12.0), the issue has been fixed. I > was able to connect Npgsql test application from my Windows XP client > machine with the PostgreSQL server running on Windows 2003 Server. > > Thank you for applying the patch. > I've been trying to deve

Re: [GENERAL] "could not accept SSPI security context"

2012-01-20 Thread Brar Piening
G_Hosa_Phat wrote: I've been trying to develop a new application in VB.NET (VS2008) against a PostgreSQL 9.1.1 database server running on Windows Server 2008 using SSPI authentication, and I'm running into this same error. I've tried both specifying the username and not specifying it in my Npgsq

Re: [GENERAL] "could not accept SSPI security context"

2012-01-20 Thread G_Hosa_Phat
Brar Piening wrote > > Just a guess: You don't have something like "host all all 127.0.0.1/32 > sspi" in your pg_hba.conf do you? > > Regards, > > Brar > I don't have that set. Here's a sample from my pg_hba (slightly redacted to obfuscate our internal network address scheme). # TYPE DATAB

Re: [GENERAL] "could not accept SSPI security context"

2012-01-22 Thread Ahmed Shinwari
Hi, In my email, I mistakenly assumed that the next version would be 2.0.12.0, which was not. My bad. I checked the source and confirmed that the 2.0.11.0 has the bug, and the immediate next version (2.0.11.91) has the fix. You can use the version 2.0.11.92

Re: [GENERAL] "could not accept SSPI security context"

2012-01-23 Thread G_Hosa_Phat
Ahmed wrote > > Hi, > > In my email, I mistakenly assumed that the next version would be 2.0.12.0, > which was not. My bad. > > I checked the source and confirmed that the 2.0.11.0 has the bug, and the > immediate next version (2.0.11.91) has the fix. You can use the version > 2.0.11.92 >