INSTALL 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. 0. Brief description.
  2. fbSampleExtAuth plugin is useful when you want to run 'execute statement on external'
  3. statement connecting to databases on non-local servers but do not wish to explicitly
  4. add login and password to your PL/SQL code. When 2 servers completely trust each other
  5. this plugin may be used to enable access to remote database without entering login and
  6. password in SQL code. To ensure that connection comes from trusted source shared secret
  7. key (placed into plugin's .conf file) is used. That means that the value of a "Key"
  8. parameter should be exacly the same for all trusting each other hosts. Pay attention -
  9. SQL name of connected user on remote host may not match local logon, it depends also
  10. upon mappings on remote host.
  11. 1. Before starting the build.
  12. This authentication plugin is using TomCrypt (https://www.libtom.net/LibTomCrypt/) library.
  13. Firebird since v.4 is actively using it. Depending upon build type tomcrypt binary may be
  14. included or not included into your package. In a case when it's included you will find
  15. appropriate H-files in tomcrypt.include subdir. If not that means that native OS library
  16. is used and you should also work with it. Depending upon your OS you will may be need
  17. to install development package for tomcrypt.
  18. 2. Building plugin.
  19. Type 'make' in this directory. Build system supposes that it was not moved out of standard
  20. firebird tree. In a case when you did it manually you will sooner of all have to change
  21. Makefile appropriately. If you use firebird with different operating systems and/or hardware
  22. you should build plugin for each used configuration.
  23. 3. Installing plugin.
  24. Makefile has install target (make install) which may be used for current box. However
  25. this is not full solution because plugin is supposed to be used to connect at least two
  26. separate servers. See 'Testing' for more details.
  27. 4.Testing.
  28. - imagine you have two hosts: host1 and host2;
  29. - generate configuration file using fbSampleExtAuthKeygen utility on any of them (only ONCE -
  30. on ONE host !!!);
  31. - copy that file and plugin itself to $FIREBIRD/plugins directory on each host;
  32. - modify firebird.cond, it should contain something like:
  33. AuthServer = Srp256, fbSampleExtAuth
  34. AuthClient = Srp256, fbSampleExtAuth
  35. lines, certainly something else may be used instead recommended Srp256;
  36. - if you need WIN_SSPI plugin please add it AFTER fbSampleExtAuth;
  37. - do not forget to restart firebird after reconfiguring it;
  38. - create minimal required mapping on host1:
  39. CREATE MAPPING EXT USING PLUGIN fbSampleExtAuth FROM ANY USER TO USER EXTUSER;
  40. - run the following script on host2:
  41. SET TERM ^;
  42. EXECUTE BLOCK RETURNS(REMNAME CHAR(32)) AS BEGIN
  43. EXECUTE STATEMENT 'SELECT CURRENT_USER FROM RDB$DATABASE'
  44. ON EXTERNAL 'host1:employee' INTO :REMNAME;
  45. SUSPEND;
  46. END^
  47. SET TERM ;^
  48. you should get something like this:
  49. REMNAME
  50. ==============================
  51. EXTUSER
  52. - explicitly specifying login and/or password in SQL statement normally deactivates
  53. this plugin but one can use IgnoreLogin and IgnorePassword parameters to change that.