UseGssApi: Boolean;
UseGssApi: Boolean;
The UseGssApi property determines use of authentication for the PostgreSQL server by the GSS API mechanism.
Working of GSS API in Windows requires the libpq.dll library built with support of GSS API, which is part of the PostgreSQL product, and installed MIT Kerberos for Windows. These software products are not included into Foresight Analytics Platform.
To execute the example add a link to the Metabase system assembly.
Sub UserProc;
Var
MbMan: IMetabaseManager;
MbDefs: IMetabaseDefinitions;
MbDef: IMetabaseDefinition;
PostgreSPLD: IPrimaryPostgresSPLD;
Begin
MbMan := MetabaseManagerFactory.Active;
MbDefs := MbMan.Definitions;
MbDef := MbDefs.Add;
MbDef.DriverId := "POSTGRES";
MbDef.Id := "Test_PostgreSQL";
MbDef.Name := "Test_PostgreSQL";
MbDef.Authentication := AuthenticationMode.Password;
MbDef.SecurityPackage := "STANDARDSECURITYPACKAGE";
PostgreSPLD := MbDef.LogonData As IPrimaryPostgresSPLD;
PostgreSPLD.Server := "Server";
PostgreSPLD.Database := "PPTest";
PostgreSPLD.UseGssApi := True;
PostgreSPLD.KrbSrvName := "POSTGRES";
MbDef.Save;
End Sub UserProc;
After executing the example a new repository description is created based on the GSS API authentication type. The schema to which the connection is established is located on the "Server" server, which uses the PostgreSQL DBMS.
The specified procedure is an entry point for the .NET assembly.
Imports Prognoz.Platform.Interop.Metabase;
Public Shared Sub Main(Params: StartParams);
Var
MbManClass: MetabaseManagerFactoryClass = New MetabaseManagerFactoryClass();
MbMan: MetabaseManager;
MbDefs: IMetabaseDefinitions;
MbDef: IMetabaseDefinition;
PostgreSPLD: IPrimaryPostgresSPLD;
Begin
MbMan := MbManClass.Active;
MbDefs := MbMan.Definitions;
MbDef := MbDefs.Add();
MbDef.DriverId := "POSTGRES";
MbDef.Id := "Test_PostgreSQL";
MbDef.Name := "Test_PostgreSQL";
MbDef.Authentication := AuthenticationMode.amPassword;
MbDef.SecurityPackage := "STANDARDSECURITYPACKAGE";
PostgreSPLD := MbDef.LogonData As IPrimaryPostgresSPLD;
PostgreSPLD.Server := "Server";
PostgreSPLD.Database := "PPTest";
PostgreSPLD.UseGssApi := True;
PostgreSPLD.KrbSrvName := "POSTGRES";
MbDef.Save();
End Sub;
See also: