Hello, I'm currently using <Permit.io> for my clou...
# opal
j
Hello, I'm currently using Permit.io for my cloud-based SaaS product. We're currently talking with a customer who would require an on-premise solution. I'm wondering how common it is to support both Permit hosted for our cloud product and then setting up an OPAL based solution for our on-premise product. Does anyone have a similar setup?
a
Hi @Jack Muller, I'm an AI assistant for Permit.io. I'll analyze available sources and get back to you shortly.
Yes, this is a common and supported setup. Permit.io offers different deployment options specifically designed for scenarios like yours (1) . For on-premise deployments, there are two main approaches : ​*Light on-prem*​: You continue to use the management interfaces in the cloud, and only deploy the administration components (primarily the OPAL server) on the local network . You then sync the downloaded state from the cloud git repository (which you own) to the local git-repository, which the local OPAL-server would track . This option is less expansive and less labor intensive than full on-prem . ​*Full on-prem*​: The entire Permit.io setup is provided as Kubernetes helm charts . This is the most expansive and labor intensive option . The hybrid nature of Permit.io SaaS is designed to handle most cases without security, compliance, stability, or availability hurdles . On-premise deployments are typically needed for air-gapped networks or where compliance/security require on-premise by default . OPAL (Open Policy Administration Layer) is the core engine that powers Permit.io (2) (3) , and it's built specifically for these distributed scenarios (4) . It's stateless by design , uses outgoing websocket connections to circumvent routing/firewall concerns , and operates on a client-server architecture (5) . For getting started with on-premise deployments, you can reach out to [support@permit.io](mailto:suppo
To learn more, see the sources I considered: [[1] on-Prem](https://docs.permit.io/how-to/deploy/on-prem) [[2] OPAL - an Authorization Service for Fine-Grained Permissions](https://www.permit.io/blog/introduction-to-opal) [[3] 12 Open Source Auth Tools That Will Help You Build Better Applications](https://www.permit.io/blog/top-12-open-source-auth-tools) [[4] Design](https://docs.opal.ac/overview/design) [[5] ⚡OPAL⚡](https://github.com/permitio/opal/blob/master/README.md)
j
I don't think we could afford a full on-premise license at this point. My thought is to slowly start paying more for the cloud and try and use the open source options for on-premise.
o
Hi Jack, I'll let others answers on their experience. But I'll note that what you're describing is technically feasible, but I'm not sure I'd recommend it. In the end of the day Permit and OPAL aren't the same thing, and you might find a lot of effort being required to bridge the gaps. I'd encourage you to consider Permit hybrid options (if customer is not airgapped), or our on-prem offering
j
The customer is air gapped unfortunately
I can reach out to support to get a quote for on-prem
o
In this case, I'd consider an OPA+OPAL setup for them, but take into account in the design that this is a different setup than your Permit one, and will be more limited / less feature rich. We actually have a similar setup for Permit' own backend authz - as we can't use Permit for Permit without a long chain of recursion problems 😅
😅 1
j
Ah that is very interesting. Thanks for the idea. Can you point out any of the main features gaps? We use a combo of ABAC, RBAC, ReBAC and role derivations. We also use the permit terraform provider which I'm guessing would be a gap.
t
@Jack Muller, you can run a PDP in offline only mode so that it doesn't have any cloud dependancies. There's a bit of manual updating involved on your end but doable.
You create the policy, then download an offline policy and then bootstrap the PDP with the data and policy that was generated by Permit.
Any update to policy would have to be done on your end so all the policy syncing is removed (OPAL). Typically customers are happy to have this trade off.
j
@Thomas that is an interesting idea. What would the process for new data that needs to be made available in OPA be?
For instance a new relationship created between two resource instances? Or a new resource instance?
t
The instance data is static unless you have connection to the control plane or have configured OPAL to fetch from internal data source.
Policy doesn't change much, it's users + instances that chang. That's really the major point to discuss here.
o
+1 For @Thomas's Offline PDP mode suggestion
j
We do have a requirement that new data be created and then immediately checked to make sure users can access it. It seems like this would mean that we need OPAL and not just OPA in offline mode? I read through the offline mode documentation section but not sure if I'm missing part of @Thomas suggestion.
I'm imagining something like, user creates a new instance in our platform, our platform writes to some data store. OPAL is used to update the PDP with the new data so that OPA can make a decision.
t
no, you're right. there is a dependency since the data is synced from the control plane to the PDP via OPAL
@Jack Muller that use case falls under our Light On-Prem deployment option.
j
I see yea I realize I misunderstood the air-gapped part from @Or Weis’s response above.
The customer has their own on-premise network.
So in the light on-prem, I could create the generated policies and config for a new version of my platform using the Permit Cloud and then provide the generated policies and config as part of an update script or new version installer to the customer.
Does that sound like the right understanding @Thomas?
t
Yes and the light on-prem opal sever lets you manage any policy data changes that would need to happen.
j
Thanks @Thomas. Can the permit sdk be used to update the data store that is part of the on-premise part of the diagram? I’m still trying to understand in what format the data needs to be in for the OPAL client to read it into the PDP correctly
t
the reason light-on prem has the opal-server pulled down to the on-prem level is so you can make data updates. if a new user or assignment is created in your external db you can instruct opal server of the change and the client would go fetch it.
p
Hey guys, I'm working with Jack to test an on-prem setup for our air-gapped customer. I was able to follow Thomas' suggestion and set up an offline PDP by starting it online to get the initial data, then forcing offline mode. Thanks for that! I verified that resources and relationships could be created, they were persisted across container restarts, and that checks based on them worked as expected. First, we were pleased to see how much seems to work in offline mode, so we're curious, what kind of capabilities would be missing? Clearly we don't get any of the SaaS web interface or data persistence, but we'd like to understand whether we might hit any brick walls. Second, since we intend to support most customers on SaaS permit, we will need to update the air gapped customer over time. Is there any method you can suggest that would allow us to upgrade their PDP service version without losing their data? Would it be as simple as copying the backup file? Likewise, when we do want to update policies for them, how could we do that? Would we need to temporarily reconnect the container to the internet? Is there an easier way?
p
Hey, thanks for reaching out ! It seems our team is a little busy right now, a human will be with you within the next hour or so. In the meantime, can I help you ?
p
I'm good, Check. No rush on this answer.
n
Hi @Peter Webb thanks for reaching and these are great questions. One of will get back to you tomorrow!
👍 1
t
Hey Peter. To update the PDP, it's just a swap out of images so pretty straight forward. In offline mode, the PDP operates with the local backup of configuration, data, and policies (1) . The PDP will use backup files from the mounted volume when
PDP_ENABLE_OFFLINE_MODE=true
is set . Upgrading PDP Version Without Data Loss Yes, you can preserve data across PDP upgrades by maintaining the backup files. The backup consists of: • PDP configuration backup:
pdp_cloud_config_backup.json
(encrypted with your PDP_API_KEY) • Policy store backup:
policy_store_backup.json
(contains both data & code) To upgrade: 1. Stop the current PDP container gracefully (this triggers a backup) 2. Copy/preserve the
/app/backup
directory contents 3. Start the new PDP version with the same volume mount:
Copy code
docker run -it -p 7766:7000 -p 8181:8181 
  --env PDP_API_KEY=<YOUR_API_KEY> \
  --env PDP_ENABLE_OFFLINE_MODE=true \
  -v <HOST_BACKUP_DIR_OR_NAMED_VOLUME>:/app/backup
  permitio/pdp-v2:latest
Updating Policies for Air-Gapped Environments For policy updates without internet connectivity, you have a few options: Pre-generate backup files: Run a PDP in an online environment with updated policies, let it generate the backup files, then transfer those files to the air-gapped environment .
p
Great. Thanks Thomas.
permit check 1
my pleasure 1