#1 2012-11-12 16:56:20

corchi72
Member
Registered: 2010-12-10
Posts: 232

Can I use window authentication to authenticate to the server?

Can I use window authentication to authenticate to the server automatically without synopse I'll be prompted for the password.
It seems a little difficult but I need this for NT users


I wanted to use the active directory of windows to signin as in MySQL

thanks

Last edited by corchi72 (2012-11-13 09:30:46)

Offline

#2 2012-11-13 13:23:09

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,571
Website

Re: Can I use window authentication to authenticate to the server?

It's not possible in current implementation.
In my project I modify TSQLRestServer.Auth method (ugly but I really need this) and redirect user credential check to LDAP server. But user need to provide password.
To authenticate to the server automatically (without password enter) you need  to implement Kerberos support. I plane to do it, but later.

Offline

#3 2012-11-13 15:06:21

corchi72
Member
Registered: 2010-12-10
Posts: 232

Re: Can I use window authentication to authenticate to the server?

ok thanks I think I will manage the user and password as I always have.

however, I would ask how you managed to change password of each user, ie the user can change the password alone has the right or privilege to be administrator?

Offline

#4 2012-11-13 15:30:32

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,571
Website

Re: Can I use window authentication to authenticate to the server?

I redirect password check to LDAP and not store pwd in my database at all. So if user want to change password he/she change it in LDAP (Windows Domain in my case).

Offline

#5 2012-11-13 15:38:51

corchi72
Member
Registered: 2010-12-10
Posts: 232

Re: Can I use window authentication to authenticate to the server?

Unfortunately I just verified that I can not change the password of the Administrator are not TSQLAuthUser sen. Right?

var
  APassword:String;
  AAuthUser:TSQLAuthUser;
begin
   if Assigned(CurrentClient) and  Assigned(CurrentClient.SessionUser) then
   begin
      try
      AAuthUser := TSQLAuthUser.Create(CurrentClient, 'LogonName=?', [CurrentClient.SessionUser.LogonName]);
      if AAuthUser.ID>0 then
      begin
        APassword := Dialogs.InputBox('Change password', 'New password:','');
        if length(trim(APassword))>0 then
        begin

          AAuthUser.PasswordPlain := APassword;
          CurrentClient.Update(AAuthUser);

        end;
      end;
      finally
        AAuthUser.Free;
      end;
   end;
end;

Offline

#6 2012-11-13 17:12:13

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: Can I use window authentication to authenticate to the server?

For security reasons, you can not change the user password from a client directly.

You can do it in two ways:
- Change the corresponding user group right;
- From the server side, define a service which will be able to directly access the TSQLRestServer instance, and will have the right to change the password.

Offline

#7 2012-11-14 10:32:02

corchi72
Member
Registered: 2010-12-10
Posts: 232

Re: Can I use window authentication to authenticate to the server?

ok Thanks

Offline

Board footer

Powered by FluxBB