[PR #185] [MERGED] Rules #799

Closed
opened 2025-11-13 12:11:09 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fosrl/pangolin/pull/185
Author: @oschwartz10612
Created: 2/11/2025
Status: Merged
Merged: 2/11/2025
Merged by: @miloschwartz

Base: devHead: rules


📝 Commits (10+)

📊 Changes

17 files changed (+1401 additions, -28 deletions)

View changed files

📝 Makefile (+0 -3)
📝 server/auth/actions.ts (+11 -7)
📝 server/db/schema.ts (+13 -1)
📝 server/lib/consts.ts (+1 -1)
📝 server/routers/badger/verifySession.ts (+114 -1)
📝 server/routers/external.ts (+27 -0)
server/routers/resource/createResourceRule.ts (+101 -0)
server/routers/resource/deleteResourceRule.ts (+71 -0)
📝 server/routers/resource/index.ts (+4 -0)
server/routers/resource/listResourceRules.ts (+132 -0)
📝 server/routers/resource/updateResource.ts (+2 -1)
server/routers/resource/updateResourceRule.ts (+130 -0)
📝 server/setup/migrations.ts (+3 -1)
server/setup/scripts/1.0.0-beta13.ts (+29 -0)
📝 src/app/[orgId]/settings/resources/[resourceId]/connectivity/page.tsx (+28 -13)
📝 src/app/[orgId]/settings/resources/[resourceId]/layout.tsx (+5 -0)
src/app/[orgId]/settings/resources/[resourceId]/rules/page.tsx (+730 -0)

📄 Description

Community Contribution License Agreement

By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.

Description

Rules allow you to control access to your resource based on a set of criteria. You can create rules to allow or deny access based on IP address or URL path. Deny rules take precedence over allow rules. If a request matches both an allow and a deny rule, the deny rule will be applied.
Actions

Always Allow: Bypass all authentication methods

Always Deny: Block all requests; no authentication can be attempted

Matching Criteria

Match a specific IP address
Match a range of IP addresses in CIDR notation
Match a URL path or pattern

Closes #141
Closes #143


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fosrl/pangolin/pull/185 **Author:** [@oschwartz10612](https://github.com/oschwartz10612) **Created:** 2/11/2025 **Status:** ✅ Merged **Merged:** 2/11/2025 **Merged by:** [@miloschwartz](https://github.com/miloschwartz) **Base:** `dev` ← **Head:** `rules` --- ### 📝 Commits (10+) - [`befdc3a`](https://github.com/fosrl/pangolin/commit/befdc3a002a91cbea65915a0f4a98cca54588546) Add table - [`b926396`](https://github.com/fosrl/pangolin/commit/b92639647ae545b507fb9f92588377a5cd27c3f9) Add applyRules to resources - [`2f49be6`](https://github.com/fosrl/pangolin/commit/2f49be69fe137d7ca270f1e0e1aec95f4070b810) Initial pass at rules - [`3cd20ca`](https://github.com/fosrl/pangolin/commit/3cd20cab5525c62d588e902dc0ea0ada1a285fcd) Merge branch 'dev' into rules - [`da3c882`](https://github.com/fosrl/pangolin/commit/da3c8823f8404d57e7c488931a8e44972d97b28b) rename to resource rules and add api endpoints - [`8f96d07`](https://github.com/fosrl/pangolin/commit/8f96d0795c4edb0302bcb66da4e3dcc4616e17ad) Add update - [`4a6da91`](https://github.com/fosrl/pangolin/commit/4a6da91fafd10c9d02934b473ae3cd8cbf73b112) API and rule screen working - [`42434ca`](https://github.com/fosrl/pangolin/commit/42434ca8323a63c9ad80ab9432aa000bcba1eb22) Add validation - [`874c673`](https://github.com/fosrl/pangolin/commit/874c67345ee353bf5357b67a9ec26a1c7ed084a5) Adjust rule processing - [`9694261`](https://github.com/fosrl/pangolin/commit/9694261f3e2cc285bd2418ac193713f9a84f57b7) Add enable rules toggle ### 📊 Changes **17 files changed** (+1401 additions, -28 deletions) <details> <summary>View changed files</summary> 📝 `Makefile` (+0 -3) 📝 `server/auth/actions.ts` (+11 -7) 📝 `server/db/schema.ts` (+13 -1) 📝 `server/lib/consts.ts` (+1 -1) 📝 `server/routers/badger/verifySession.ts` (+114 -1) 📝 `server/routers/external.ts` (+27 -0) ➕ `server/routers/resource/createResourceRule.ts` (+101 -0) ➕ `server/routers/resource/deleteResourceRule.ts` (+71 -0) 📝 `server/routers/resource/index.ts` (+4 -0) ➕ `server/routers/resource/listResourceRules.ts` (+132 -0) 📝 `server/routers/resource/updateResource.ts` (+2 -1) ➕ `server/routers/resource/updateResourceRule.ts` (+130 -0) 📝 `server/setup/migrations.ts` (+3 -1) ➕ `server/setup/scripts/1.0.0-beta13.ts` (+29 -0) 📝 `src/app/[orgId]/settings/resources/[resourceId]/connectivity/page.tsx` (+28 -13) 📝 `src/app/[orgId]/settings/resources/[resourceId]/layout.tsx` (+5 -0) ➕ `src/app/[orgId]/settings/resources/[resourceId]/rules/page.tsx` (+730 -0) </details> ### 📄 Description ## Community Contribution License Agreement By creating this pull request, I grant the project maintainers an unlimited, perpetual license to use, modify, and redistribute these contributions under any terms they choose, including both the AGPLv3 and the Fossorial Commercial license terms. I represent that I have the right to grant this license for all contributed content. ## Description Rules allow you to control access to your resource based on a set of criteria. You can create rules to allow or deny access based on IP address or URL path. Deny rules take precedence over allow rules. If a request matches both an allow and a deny rule, the deny rule will be applied. Actions Always Allow: Bypass all authentication methods Always Deny: Block all requests; no authentication can be attempted Matching Criteria Match a specific IP address Match a range of IP addresses in CIDR notation Match a URL path or pattern Closes #141 Closes #143 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-13 12:11:09 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#799