delphi - Firebird 2.5 中的 Windows 身份验证

标签 delphi authentication windows-authentication firebird2.5 dbexpress

我可以使用 Windows 用户而不是使用 SYSDBA 和 MASTERKEY 凭据登录 firebird 数据库吗?如果是,请告诉我如何连接firebird数据库。

我使用的是 Delphi XE3 和 Firebird 2.5。在更新“受信任”的配置文件代替此处指定的默认“ native ”后,我需要通过登录用户对用户进行身份验证:https://firebirdsql.org/file/documentation/release_notes/html/en/2_5/rnfb25-fbconf-authent.html

这是我的代码:

SQLConnection1.LoginPrompt := False;
//SQLConnection1.Params.add('user_name='); 
//SQLConnection1.Params.add('password='); 
SQLConnection1.Params.add('os authentication=True') ; 
SQLConnection1.Connected:= True

它仍然要求提供凭据。

最佳答案

(V.2.1) From Firebird 2.1 onward, Windows “Trusted User” security can be applied for authenticating Firebird users on a Windows host. The Trusted User's security context is passed to the Firebird server and, if it succeeds, it is used to determine the Firebird security user name.

Simply omitting the user and password parameters from the DPB/SPB will automatically cause Windows Trusted User authentication to be applied, in almost all cases. See the Environment section, below, for exceptions

来自official documentation

另外,看看这个问题 - https://dba.stackexchange.com/questions/154735/how-to-enable-windows-authentication-in-firebird-2-5

关于delphi - Firebird 2.5 中的 Windows 身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44135982/

相关文章:

php - 来自 2 个表的 MySql session

c# - 具有 Windows 身份验证的 ASP.NET Core 身份

ios - UIWebView Windows 身份验证 SWIFT

java - 德尔福: Constructing Abstract Class like Java

delphi - 当 GroupView 处于事件状态时,向 TListView 添加或插入项目总是将其添加到末尾

delphi - 从 Chromium 嵌入式框架 3 打印

c# - .Net Core IdentityServer4 获取认证用户

asp.net - 由于 IIS 中的 "Default Document",必须登录两次 ASP.NET 应用程序

asp.net-core - 使用Windows Auth对用户进行身份验证,然后在ASPNET Core 2.1中生成JWT

delphi - Delphi XE中占用大量内存的TStringList对象