Algolia Privacy in Bubble

Hi everyone,

Has someone fine a way to add privacy rules for Algolia search in Bubble?

We have integrated the search in our app but are afraid that all data is public since we cannot use the privacy rule “when current user is logged in” (since then Algolia isn’t working anymore).

Looking forward to hearing from you

1 Like

I think you should ask customer support for this query. They can help you better.

1 Like

I am waiting for the response, but I came across the “Algolia Search” plugin and was wondering whether it is possible to add privacy rules in Bubble with this plugin?

Right now, I only used Algolia with the keys but here I need to check the “everyone else” option in the privacy tab in Bubble.

However, we would like to use Algolia for sensitive data and are wondering whether there is any way to solve this?

Since this is quite urgent for us, we would be willing to pay to get some support for this issue.

I’d never heard of TypeSense, but looks pretty neat. Are you hosting yourself or using their cloud service? When you say your using privacy settings, are you doing so through TypeSense or your own rules within Bubble? @J805

Hi @ap11 , thanks for reaching out.

"However, we would like to use Algolia for sensitive data and are wondering whether there is any way to solve this?" - Yes, it is possible to limit the access to data for each user by defining a filtering rule inside the plugin tab - Screenshot.

A solution for your use case is that in the Algolia dashboard define a filtering rule, see the screenshot. And inside the plugin, you can set this filter either static or dynamic. Here is an example. In this way, it will select which information should be displayed to your user depending on his status.

Here you can find some useful information on how to set filters:
Algolia Search V. 2.0 Documentation - Configuring display for your index

"Since this is quite urgent for us, we would be willing to pay to get some support for this issue." - Unfortunately, we do not provide plugin customization or custom plugin development services. Apologies for the inconvenience.
In case your project requires only small adjustments, I would recommend checking the Freelance section at the Bubble forum: Jobs / Freelance - Bubble Forum or check on UpWork or Fiverr for Bubble freelancer development offers.

Please try my suggestions and let me know if they helped.
Best regards,
Zeroqode Support Team

1 Like

I have used the cloud service for now. I have thought about setting up my own server for testing purposes just to see if I could do it. Just haven’t had time to do it.

With it being through the api connector we were able to keep privacy settings in the app and send things to TypeSense on the backend without having to expose our data to the public.

Type sense also is encrypted at rest too. Hope that makes sense. :blush:

This is a pretty recent development for me so I’m still digging in deeper about how to secure it even more. Currently the app is for internal purposes so it works great. Not sure how it would work yet with multi tenant/company apps.

2 Likes

Thanks for sharing @J805

Would love to hear more about your learning here as things progress!

2 Likes

Hey,

Has anyone found a fix for this yet? We’re struggling with it .Our application requires privacy rules because we use auto-binding.
The min we set a privacy rule, the data isn’t retrieved in Algolia hence making it impossible for us to search on the app.

Please let me know if anyone has a fix for this. Or, is there anyway we can use Auto-binding without privacy rules.

Currently, the only off the shelf search solution that scales like Algolia while preserving privacy rules is Omnisearch (which, in full disclosure, is a plugin I made). It works with both Algolia and Typesense (hence the “omni” in omnisearch).

But if you don’t want to use that, you can also build this yourself. Generally, you will need to:

  • Setup your API connector to send data from Bubble to Algolia
  • Then, actually send data to Algolia (it’s best practice to only send what you need to search)
  • Then, you have two options:
    1. Set up another API connector endpoint to retrieve search results from Algolia. You will bind this to trigger a search when your users type into a search box. This is slow since it relies on the native Bubble search input (which updates it’s value state with a delay).
    2. Build a custom visual element that executes your searches for you (using javascript). This will be the fastest option since it can fetch results from Algolia every instant users type a key into the search bar.
  • However you choose to actually fetch from Algolia, you’ll want to return the BubbleObjectID. Nothing else. This way, the data will be returned from your Bubble tables which is what enforces privacy rules.

So in the end, both Bubble and Algolia house your data, but you’re angle is to use Algolia to search the data and then Bubble is the one actually returning it. Kind of strange, I know, but it’s the only way to enforce privacy rules. Rolling this yourself, you’ll also have to figure out a way to add your search filters, resync Algolia indices whenever you change/add columns to search, handle how to setup indices for multiple Bubble dev environments (test, live, others). It can be done it just takes time.

2 Likes

Hello @vinay, :wave:

We think you might find this document helpful: Using Algolia | Bubble Docs It covers a lot of useful information. Please check it out. :pray:

Best regards,
Zeroqode Support Team.

1 Like