Skip to content

chore(backend): introduce a filter ash policy#1388

Draft
lusergit wants to merge 3 commits intoedgehog-device-manager:mainfrom
lusergit:push-tuypoxkuolso
Draft

chore(backend): introduce a filter ash policy#1388
lusergit wants to merge 3 commits intoedgehog-device-manager:mainfrom
lusergit:push-tuypoxkuolso

Conversation

@lusergit
Copy link
Copy Markdown
Collaborator

@lusergit lusergit commented Apr 21, 2026

What this PR does / why we need it:

Adds a new ash policy to filter (whatever entity) based on the list of ids OpenFGA provides when listing objects

They are meant to be used together to create policies to authorize users to do any activity inside of edgehog.

Additional documentation e.g. usage docs, diagrams, reviewer notes, etc.:


Thanks for sending a pull request! If this is your first time, here are some tips for you:
  1. You can take a look at our developer guide for an introduction on Edgehog development!
  2. Make sure to read CONTRIBUTING.md and CODE_OF_CONDUCT.md
  3. If the PR is unfinished or you're actively working on it, mark it as draft

When fixing existing issues, use github's syntax to link your pull request to it

fixes #<issue number>

We also have a syntax to signal dependencies to other open pull requests

depends on #<pr number>
depends on https://github.com/...

In case of stacked PRs, you may add the PR number in the last commit's title instead:

gitGraph
    commit id: "Current master"
    branch feat1
    checkout feat1
    commit id: "feat: add something"
    commit id: "feat: add something else (#100)"
    branch feat2
    checkout feat2
    commit id: "refactor: do something"
    commit id: "fix: solve issue"
    commit id: "feat: add a feature (#101)"
    branch feat3
    checkout feat3
    commit id: "feat: feat without pr number"
Loading

@lusergit lusergit requested a review from Dam-99 April 21, 2026 13:40
@lusergit lusergit marked this pull request as draft April 21, 2026 13:43
@lusergit lusergit force-pushed the push-tuypoxkuolso branch 2 times, most recently from d0d008b to 4d6543d Compare April 21, 2026 14:17
@lusergit lusergit changed the title chore(backend): compile OpeFGA API to include service chore(backend): introduce check and filter ash policies Apr 22, 2026
@lusergit lusergit force-pushed the push-tuypoxkuolso branch 2 times, most recently from 537f02d to ab1693b Compare April 22, 2026 08:28
Copy link
Copy Markdown
Contributor

@Dam-99 Dam-99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some nits about typos, also in the second commit message

Comment thread backend/lib/edgehog/auth/providers/behaviour.ex Outdated
Comment thread backend/lib/edgehog/auth/policies/check.ex Outdated
@lusergit lusergit force-pushed the push-tuypoxkuolso branch 8 times, most recently from ac95190 to 04ad04d Compare April 28, 2026 09:28
@lusergit lusergit force-pushed the push-tuypoxkuolso branch from 04ad04d to b80d3b1 Compare April 30, 2026 14:25
Signed-off-by: Luca Zaninotto <luca.zaninotto@secomind.com>
@lusergit lusergit force-pushed the push-tuypoxkuolso branch 3 times, most recently from 3ab0beb to 1f6a1b6 Compare April 30, 2026 14:32
@lusergit lusergit changed the title chore(backend): introduce check and filter ash policies chore(backend): introduce a filter ash policy Apr 30, 2026
@lusergit lusergit force-pushed the push-tuypoxkuolso branch 3 times, most recently from 659f4e5 to 27a5c81 Compare April 30, 2026 14:56
Adds necessary callbacks and functions to the fga service. These callbacks are
necessary for
- handling single checks
- handling synchronous and streamed filter

Adds initial support for an `OpenFGA` provider for authentication.

Signed-off-by: Luca Zaninotto <luca.zaninotto@secomind.com>
Adds a filter policy that can be used to filter based on the value of a specific
field and the relation the actor has with such field.

Signed-off-by: Luca Zaninotto <luca.zaninotto@secomind.com>
@lusergit lusergit force-pushed the push-tuypoxkuolso branch from 27a5c81 to 4781d4e Compare April 30, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants