Gary,
Your describe a typical technique where a single DB user is defined to connect to the DB server, and then application users as managed "by hand" in your own DB table.
This solution has the advantage of being simple and portable, but prevents to use DB features based on DB user definitions.
I assume that you want to define a DB user for each real end user, in order to use DB server features like SQL privileges, auditing...
This is a good thing, but keep in mind that each DB engine has its own specifics when is comes to user management.
So if you plan to support several other DB engines with your application, you better keep your current solution.
You will also have more DB administration to do, for example, give privileges to DB users to access the tables created by the owner of the tables, select the DB schema after connection.
From a Genero process point of view, fglrun acts as a C program using the MySQL C client library.
The MySQL ODI drivers uses the following C API functions to connect to the server:
- mysql_options(cn->dbcHandle, MYSQL_READ_DEFAULT_FILE, <filename>) -- If FGLPROFILE entry dbi.database.dbname.mys.config is defined
- mysql_options(cn->dbcHandle, MYSQL_READ_DEFAULT_GROUP, "client") -- to read options from the [client] section of your config file
- mysql_real_connect( ... ) -- using user name / password ...
I suggest that you have a look at the MySQL guide:
-
https://dev.mysql.com/doc/refman/8.0/en/security.html-
https://dev.mysql.com/doc/refman/8.0/en/authentication-plugins.htmlThen we should talk about the options.
The solution can be different depending on your architecture:
For example, if fglrun programs run on the same machine as the MySQL server, and it's a Linux/UNIX, maybe you could use the auth_socket authentication plugin.
Useful BDL doc links:
-
https://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/t_fgl_odiagmys_004.html-
https://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_fgl_Connections_008.html-
https://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_fgl_Connections_018.htmlSeb