Ability to define "rule groups" and use them to apply to resources #3497
Closed
rsaffi
started this conversation in
Feature Requests
Replies: 1 comment 1 reply
|
I think this use case is covered by the resource policies
https://pangolin.net/news/1-19-release
|
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
In the "access rules" section of a resource, adding individual entries is repetitive and error prone. There are many scenarios that every resource (or a large subset of them) naturally require the same access rules. It would be convenient to be able to predefine groups of rules and on the access rules page of the resources, be able to toggle whether you want or not one or more of the predefined groups to apply to that resource or not.
Motivation
I currently have 66 public resources in my pangolin instance. For the vast majority of them, I apply specific access rules, like:
For each of the 66 resources I need to add each individual rule. I realized it would be very convenient if the idea of having rule groups existed, then I could simply check them to be applied to the ruleset of a resource and be done with it. And if I ever want to add a new CIDR of a trusted network, instead of doing so in each resource, I could simply add it to the rule group and every resource that include/enable that rule group, would automatically inherit the newly added IP range (or country, thinking from a geoip perspective).
Proposed Solution
I'm not entirely sure how to propose a solution, other than what I have already wrote. I'm typically not a person with a UI mindset, so I'm not good at conceiving how would be the best way for this to be shown on the Pangolin webui. Regardless, I tried to mock something using the browser inspector and editing elements, to try and give a visual idea of what I'm proposing.
In this example, the access rules for the public resource include two groups: first the "Trusted Networks" group and second the "Trusted Countries" group. For the sake of this example, there are also two additional and individual rules, one allowing for an extra country to have the "pass to auth" action and a final/last rule for "block access" to any other countries.
This is how it would look like from the public resource's "Access Rules" section:
Inspecting each of the groups, we can see their own list of actions:
Trusted Networks:

Trusted Countries:

The place to define rule groups should live in its own section on the sidebar, since these are globally scoped and can be assigned to any resource.
Alternatives Considered
No response
Additional Context
No response
All reactions