0

What does DPB mean in Firebird, and how to use isc_dpb_trusted_auth parameter?

Vinod_cmdl
  • 49
  • 9
  • You are asking two question, please rephrase so you ask the question that is most important to you or split it into two questions (for one, I don't think you really care what the DPB is, and that forcing trusted auth is what matters). Also please specify which programming language and connection library you are using. Also, I'm considering voting to close as duplicate of https://stackoverflow.com/questions/44135982/windows-authentication-in-firebird-2-5 as this is essential that question again, but in a different disguise. – Mark Rotteveel Jun 01 '17 at 07:34
  • 1
    Possible duplicate of [Windows Authentication in Firebird 2.5](https://stackoverflow.com/questions/44135982/windows-authentication-in-firebird-2-5) – Mark Rotteveel Jun 01 '17 at 07:43
  • Consider asking your question on the Firebird-support or on a support forum of the database component you are using. – Mark Rotteveel Jun 01 '17 at 07:45
  • @MarkRotteveel in this question, I asked about DPB and isc_dpb_trusted_auth. I have not asked about any delphi code. What is the answer in previous question you specified? – Vinod_cmdl Jun 01 '17 at 08:58
  • It would be great if you give me a solution of my question rather than pointing to duplicate question. I asked here for DPB. – Vinod_cmdl Jun 01 '17 at 09:00
  • You are asking what DPB is, and you are asking how you can force trusted auth; they are two different things (and the second you already asked previously and apparently didn't get a satisfactory answer, as it is the third time you ask). I can answer the first question, but not the second one without doing some research. And the answer to the second one will depend on what you use to connect (and it will also influence whether or not I (or some one else) can answer that question). Therefor: please ask separate questions, and consider asking it on Firebird-support instead. – Mark Rotteveel Jun 01 '17 at 11:21

1 Answers1

0

What does DPB mean in Firebird

Most probably it is "Database Parameter Buffer", and there is TPB for "Transaction...." and SPB for "Service ..." (used in Services API).

And Firebird 2.1.7 bugslist has the following quote:

The engine was incorrectly populating integer containers in the blob parameter buffer (BPB)

I think those abbreviations were conceived more than 30 years ago, when the database today known as Firebird was being developed as proposed new component of VAX VMS operating system.

You may go Firebird-developers maillist and ask how current developers guess what DPB stand for. Or you may try to find mr. Starkey and mrs. Harrison and ask if they still remember what they meant more than 30 years ago.

how to use isc_dpb_trusted_auth parameter

This is described in two sources that I can see. And both use the same words.

  • https://firebirdsql.org/rlsnotesh/rnfb210-wintrusted.html
  • c:\Program Files\Firebird\Firebird_2_1\doc\README.trusted_authentication.txt

    To keep legacy behavior when ISC_USER/ISC_PASSWORD variables are set in environment, they are picked and used instead of trusted authentication. In case when trusted authentication is needed and ISC_USER/ISC_PASSWORD are set, add new DPB parameter isc_dpb_trusted_auth to DPB.

It seems it does not matter which value the parameter has, it only sometime matters whether it is present or not.

To connect the database you call Firebird function isc_attach_database. This function takes 6 parameters. #5 is the length of DPB binary block and #6 is the pointer to DPB binary block.

Example of building of binary DPB block you can find in the sources of your library of choice that you use to connect to firebird server.

For example with Unified Interbase library you can start exploring examples\UIB\API\ projects. They all use calls like

 UL.AttachDatabase(new_dbname, newdb, 'user_name = SYSDBA; password = masterkey');

The last string being the parameter list. For trusted aithenticaton to work, according to the documentation quoted above, you have to remove user_name and password parameters and optionally you may add trusted_auth parameter with any value. Then you can trace it down to the function CreateDBParams, which creates the DPB binary representation out of your text key-value list string.

PS. would you try to compile those examples - do not forget to configure UIB library to use Firebird 2.1 or higher API by enabling FB21 option in uib.inc file.

Arioch 'The
  • 15,799
  • 35
  • 62
  • " ...add new DPB parameter isc_dpb_trusted_auth to DPB" this is exactly the question. How to implement it? I want to know the way to do this. – Vinod_cmdl Jun 08 '17 at 09:11
  • That is not the question of Firebird, but of the library you use. You do not use direct Firebird API. You use some intermediate library. For example i pointed you to examples with UIB library, read the sources, trace dependencies, and find hi level method. But again, that is not the question about Firebird how you use some you library. It is the question to the library itself. – Arioch 'The Jun 08 '17 at 10:51