**Description** <!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. --> ⚒️ Fixes https://github.com/truecharts/public/issues/33114 **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [x] 🪛 Bugfix - [x] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [x] 🔃 Refactor of current code - [ ] 📜 Documentation Changes **🧪 How Has This Been Tested?** <!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration --> **📃 Notes:** <!-- Please enter any other relevant information here --> **✔️ Checklist:** - [x] ⚖️ My code follows the style guidelines of this project - [x] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made changes to the documentation - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [x] ⬆️ I increased versions for any altered app according to semantic versioning - [x] I made sure the title starts with `feat(chart-name):`, `fix(chart-name):`, `chore(chart-name):`, `docs(chart-name):` or `fix(docs):` **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --------- Co-authored-by: alfi0812 <admin@alfi0812.de>
2.2 KiB
title
| title |
|---|
| Authelia Rules |
This is a collection of some common Authelia Rules.
:::note[RULE ORDER]
It is important that rules are created in the correct order in Authelia. Rules are processed from top to bottom with the first matching rule being applied. The most narrow rules should be applied first with the most broad rules last.
:::
:::note[DEFAULT POLICY]
For these rules to work as intended, your default access control policy must be set to deny.
:::
All rules requiring Authelia authentication were configured with two_factor (2FA). If you do not want 2FA on some or all rules replace the Policy with one_factor.
In this guide we assume you have a group admin and a group user in LDAP.
Members of the admin group will have access to everything.
Members of the user group will only have access to a select set of apps you choose.
API Rule
This rule will bypass Authelia for API level access in most apps. This should always be your first rule.
// values.yaml
- domain: "*.example.com"
policy: bypass
resources:
- "^/api([/?].*)?$"
- "^/api([/?].*)?$"
- "^/identity.*$"
- "^/triggers.*$"
- "^/meshagents.*$"
- "^/meshsettings.*$"
- "^/agent.*$"
- "^/control.*$"
- "^/meshrelay.*$"
- "^/wl.*$"
Vaultwarden
This rule will allow users of the admin group to access the Vaultwarden admin page and bypass Authelia when accessing the webportal as auth is already provided by vaultwarden.
// values.yaml
- domain: "vaultwarden.example.com"
policy: two_factor
subject: group:admin
resources: "^*/admin.*$"
- domain: "vaultwarden.example.com"
policy: deny
resources: "^*/admin.*$"
- domain: "vaultwarden.example.com"
policy: bypass
User Rule
This rule will allow users in the user group access to only the specified applications.
// values.yaml
- domain:
- "jellyfin.example.com"
- "nextcloud.example.com"
- "whateveryouwant.example.com"
policy: two_factor
subject: group:user
Catch All Rule
This rule will give access to everything to users of the admin group.
// values.yaml
- domain:
- "example.com"
- "*.example.com"
policy: two_factor
subject: group:admin