Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Krael
New Member

Securing R Data Source with ODBC

Hello,

 

The main use case here is to create a data source using R Script that will connect to a database via the ODBC package to SELECT data into an array and then send that data via REST to Azure Machine Learning.

 

The concern here is that the ODBC connection at the very least will require plain text credentials to be stored in the script. I want to avoid this at all costs to ensure better securit of the data script.

 

 

Some questions:

 

Does anyone know if the entire R Script data source is encrypted once it's used as a data source in Power BI? If not, would using the Data Gateway be a good option? In my research, the ODBC connection with R can have a DSN setup to secure the credentials and or use Keyring as part of the package. But, I'm unsure if even R Script is a supported data source on the gateway to begin with. If so, it seems that may be a better option.

6 REPLIES 6
v-yuezhe-msft
Employee
Employee

@Krael,

Yes. You can refresh the R data source using personal mode gateway in Power BI Service.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

How exactly does that work though? Does PowerBI only ingest the data from the source from the gateway or does it save a version of that R script and run it in the cloud?

 

My assumption here is the R data source is stored on the gateway and remains on that gateway. It never gets published with the report in the cloud. Therefore, if the report file in the cloud gets compromised, the actual R script does not.

@Krael,

Please check how Power BI gateway works between on-premises data sources and Power BI Service in  the following article.

https://docs.microsoft.com/en-us/power-bi/service-gateway-getting-started 

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I know that is possible with the gateway. This is one solution. Your answer really doesn't answer my question in regards to the security of the scripts and so forth on that gateway.

 

I'm having to use a R script for a data source, which is pulling the data from within that R script using an ODBC connection. This means, the R script is making the connection to the database, not the gateway. I'm trying to see if there is a way around that OR if the R script itself is encrypted when deployed on the VM with the gateway? Think of the connection between the gateway where the R script lives and is being called and PowerBI. Is that communcation between the report and gateway secured? Then is the script itself encrypted at rest?

 

I'm not using SQL Server 2017 or anything on-premis. If I use a gateway, it's all going to be in Azure with the R script connecting to Azure Data Warehouse. I have a feeling my only solution here is to use Azure Data Lake Analytics where the R script can be ran ahead of time and stored in the Azure Data Warehouse as a table.

@Krael,

All data and information between gateway and Power BI is secured. For more details about security, please take a look at the following articles.

http://blog.pragmaticworks.com/power-bi-and-data-security-on-premises-data-gateway
https://docs.microsoft.com/en-us/power-bi/service-admin-power-bi-security


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Krael
New Member

Here is the use case.

 

https://powerbi.microsoft.com/en-us/blog/power-bi-azure-ml/

 

Seems Personal Gateway was used in this case.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors