You can translate the question and the replies:

Authentication credentials information to set up Rule.

Is there a field I can reference to set up a plan based on the underlying database connection credentials being used? For example, if the database connection has been created with user ID = 'JoeB' , can I refernece this credential when creating a plan to stop a query when the connection credential contains 'JoeB'? I have found the 'username' field, however this applies to the user running the query, rather than the credentials being used to access the underlying database. Thanks in advance for any input!!
user
08-01-2018 16:37:29 -0500
code

4 Answers

Hi, In Virtual DataPort you can use the command DESC DATASOURCE JDBC <datasource_name> to describe the jdbc datasource connection which will contain the user name used for connecting to the underlying database. In order to use the username, I would write a custom function which would be parsing the datasource vql to get the username information of the underlying database and then use it in the plan for restriction as per your requirement. To know more about DESC commands refer to "[Output Schema of the DESC Commands](https://community.denodo.com/docs/html/browse/6.0/vdp/developer/appendix/output_schema_of_the_desc_commands/output_schema_of_the_desc_commands#output-schema-of-the-desc-commands)" and to know more about custom functions refer to "[Developing Custom Functions](https://community.denodo.com/docs/html/browse/6.0/vdp/developer/developing_extensions/developing_custom_functions/developing_custom_functions#developing-custom-functions)" of the Virtual DataPort Developer Guide. Hope this helps.
Denodo Team
09-01-2018 06:19:30 -0500
code
Thanks so much for this response. I believe this is exactly what I am looking for! I will begin to work with this info!
user
09-01-2018 07:55:30 -0500
After further research it does not appear that I could use the above recommendation as this does not fit with any of the available fields used to evaluate a rule: https://community.denodo.com/docs/html/browse/6.0/vdp/administration/appendix/resource_manager_available_fields_to_evaluate_a_rule/resource_manager_available_fields_to_evaluate_a_rule#resource-manager-available-fields-to-evaluate-a-rule Please advise if there is another way that this can be done? Or if I am missing something. Thanks!
user
10-01-2018 12:15:35 -0500
Hi, In order to restrict the query based on the username used for creating the data source, you need to get the username from the data source vql and then use it. This username is different from the one available in the "Available Fields to Evaluate a Rule". I would recommend creating a custom policy, which is invoked before the Virtual DataPort server executes a query over a view. Using this you will be able to reject a query based on the username. To know more about custom policies in Denodo read the section ["Custom Policies"](https://community.denodo.com/docs/html/browse/6.0/vdp/developer/custom_policies/custom_policies#custom-policies) of the Virtual DataPort Developer Guide. If you have a valid support user id, you can create a support case and the Denodo Support team will be able to provide you with a better help. Hope this helps.
Denodo Team
08-02-2018 05:09:12 -0500
code
You must sign in to add an answer. If you do not have an account, you can register here