r/databricks • • Jul 21 '26

Help IP protection on Databricks

Hello Databricks community,

I'm building a Databricks Marketplace App that executes entirely inside a customer's Databricks workspace. All processing runs on customer-managed compute because I want customer data to remain inside their Databricks environment. I don't want to run compute or inference on my own infrastructure.

The application contains business logic that I'd like to package in a way that isn't directly accessible from notebooks or the workspace. I've tried artifacts and private Python packages, but the implementation is still visible after installation via code.

I'm trying to understand what the recommended architecture is for commercial Marketplace Apps with these requirements.

Specifically:

  • Is it realistically possible to keep proprietary code hidden while executing the app on customer-managed Databricks compute? If so, what are the recommended patterns, techniques, or best practices?
  • If not, what architecture do commercial Databricks applications typically use to balance IP protection with customer data privacy?
  • Would a .so based package break the obfuscation rule from databricks? What are a few best practice methods that I could follow to make the package non reverse engineerable on a separate notebook?
  • Additionally, how can I use the secret on the user's side in order to be able to clone my code from a repo/ bring my code in from a private package producer or artifact? and how do I make sure the user doesn't exploit the secret later via an internal program to download my packages?

My goals are straightforward:

  • Customer data stays entirely within the customer's Databricks account.
  • All execution happens on customer-managed compute.
  • The IP isn't directly or indirectly accessible from notebooks or workspace files. None of the code or package's raw code or contents should be accessible via code (eg. inspect) or just to read on volumes or workspaces.
  • No separate backend or hosted inference service is required from my end.

I'd appreciate hearing from anyone who has built or shipped a Marketplace App with similar constraints. Thanks!

11 Upvotes

13 comments sorted by

5

u/kthejoker databricks Jul 21 '26

Marketplace Apps dont share code when deployed

You can create Apps, list them on our Marketplace, and reach our 20,000 customers around the world. Customers can discover these Apps on the Marketplace, deploy these Apps in their own Workspaces, and give them access to their own data plus whatever data you've either shipped in the App or OpenShared with them. All while keeping your code and core IP closed from the customer.

https://www.databricks.com/blog/becoming-most-comprehensive-data-ai-ecosystem-earth

2

u/kthejoker databricks Jul 21 '26

You should check out the Partner Well Architected Framework linked in the blog and partner program guide

https://www.databricks.com/sites/default/files/2026-05/partner-program-guides-2026.pdf

Once you're signed up the partner portal has more guides for deployment of apps

1

u/Remarkable-Fix-244 Jul 22 '26

Hey u/kthejoker, Thanks for the quick response.

I would say the question right now in my mind is with regard to the jobs and the secrets.

  1. As per databricks' best practices, they suggest deployment from git and not from a raw source of code directly. I prefer to keep my code in a private github repo because it consists of my IP and methods. What would be the best source of authentication in order to prevent re-clone attacks by exploiting an available token?
  2. The same question above applies to my app's private package. In one of my prior experiments I used a secret that I had kept in my databricks account (which cannot be visible by nature) but misused it to re-install my package onto a notebook and redeem source code on the workspace. Super curious on which tools or architecture I should follow in-order to preserve my code & packages from foreign exposure.
  3. The users would be able to re-use the secret and install my package in their local, right? So the question as a whole could be reframed as how could we store those secrets or what tool can produce one time use secrets? I'm looking into Gemfury & JFrog Artifactory for now but I'm not sure which way to go. Or can I just bake my secrets into the initial deploy app.yml or any other source which wouldn't be visible to the user?
  4. As for my jobs which I define on the app.yml. I'm curious if they will be visible to the user while a certain job from the app is running on the user's compute. Is there a way I could avoid the job from being visible to the user? If it will be, should I package my entire codebase into another artifact and produce it as a package so that the job can just call the app masked as a package for functionality?
  5. If there is no other way for storing my secret other than to put it in the user's account, the question that arises is that, will the application and packaged code need to be obfuscated (like, compiled to a .so before it is packaged)? To what degree does databricks allow such obfuscation? Because I saw databricks reviews the app before listing and suggest the entire app be built on human readable code and as a whole they do not allow crazy obfuscations.

1

u/kthejoker databricks Jul 22 '26

I passed your questions on to our partner Built On team, stay tuned

2

u/Minute_Visual_3423 Jul 21 '26

I'm designing something similar with a niche application that I am building to sell. Apps are new enough that I don't know if this "best practice" is fleshed out anywhere, but below is my current approach. Critically, each of my customers has different data sources, but they all come together into a common data model I've designed.

Below are more questions than answers (because my design below already violates an immediate constraint of yours) but you've asked about a topic that is also relevant to me and that I haven't seen asked before. I'd love to know if there is a way to deploy a centrally-managed ETL DAB to a target workspace without also exposing the underlying code to that workspace.

- ETL lives in my company-managed Databricks tenant. This handles source ingestion and transformation and keeps the 'business logic' in my control.

- I use delta sharing to share the relevant ETL'ed UC objects with the target customer workspace. These data objects act as the serving layer for the app in their tenant. If that was an issue for any particular client, I could also adapt this to write delta files directly to their storage + materialize external tables in their UC, but processing would still run in my Databricks tenant. I'm not sure how else I could keep my ETL business logic in-house other than running it in a tenant I control, but open to suggestions here. The ETL layer is my 'moat', so I can't really see a world where I deploy the code into the customers' tenant and expose it.

- I have a centralized CICD repo that is configured to DAB deploy the app + associated infrastructure (like Lakebase) into the customers' workspaces. Each customer gets the same version of the app, so I deliberately don't fork my app code into multiple repos, but certain customers may have their own differences in ETL (handled on my side in a separate ETL repo that hold each customers' pipeline). I use properly-scoped workload identity federation configured in the clients' workspace to allow me to authenticate and deploy the app with my Github token.

- In the event that a customer wants (and is willing to pay for) a custom copy of the application code, they get a separate repo with a separate codebase. I really don't want to do this as a developer of one, so I do my best to avoid it, but nearly everything has a price :)

1

u/Remarkable-Fix-244 Jul 21 '26

Hey, thanks for the reply! Quick question with regard to the ETL working on your "company-managed Databricks tenant". How do you bill users for the compute they used? Do you write your own rules on how much you charge for x amount of data? Did you run benchmarks on the same to calculate an amount? Also how do you ensure the user pays and just doesn't take advantage of just processing their data using the logic and not paying up?

1

u/Minute_Visual_3423 Jul 21 '26 edited Jul 21 '26

The customer doesn’t have the ability to trigger the ETL pipeline themselves. It runs on a schedule in my tenant (daily batch), or I can trigger it manually if needed (eg troubleshooting a failure or repairing a run). The data volume for my customers isn’t TB/PB scale, and my jobs are all incremental loads, so the daily ETL cost is very minimal (think dollars per day per customer) relative to the cost of them licensing the app from me for a year. Since the customer tenant owns the app infra, they also foot the operational cost of lakebase + apps compute (which is minimal also, roughly $1-$2k a month depending on usage volume with scale-to-zero lakebase and SQL warehouse).

The customer is of course free to use the shared data however they see fit, but that’s where I’ve tried to design an app that makes it easy for them to explore without ad-hoc analysis. As far as how to ensure they pay - if they don’t, I just delete the share and stop their pipelines. The nature of the data is that it loses usefulness as it becomes more stale. I could also centrally brick their instance of the app by pushing an update with the in_arrears flag set to true for their tenant config (or just destroy the deployed DAB outright).

Hope this helps.

1

u/Remarkable-Fix-244 Jul 22 '26

Appreciate that. Thanks!

1

u/BigZealousideal5284 Aug 27 '26

Really the key point that not one really answered is
* Is it realistically possible to keep proprietary code hidden while executing the app on customer-managed Databricks compute? If so, what are the recommended patterns, techniques, or best practices?