Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MG-2404 - Use Policy CRUD wrapper to directly talk to SpiceDB #2405

Merged
merged 17 commits into from
Sep 6, 2024

Conversation

felixgateru
Copy link
Contributor

@felixgateru felixgateru commented Sep 2, 2024

What type of PR is this?

This is a feature because it replaces policy gRPC client in policy CRUD wrapper with direct communication with SpiceDB.

What does this do?

Which issue(s) does this PR fix/relate to?

Have you included tests for your changes?

No, tests for the policy wrapper will be included in subsequent prs.

Did you document any new/modified feature?

Yes, in code documentation for functions has been updated.

Notes

@felixgateru felixgateru force-pushed the mg2404-policy branch 2 times, most recently from a55448b to b7083b8 Compare September 3, 2024 11:32
@felixgateru felixgateru changed the title Mg2404- Replace policy gRPC client in policy CRUD wrapper with direct communication with SpiceDB. MG-2404 - Replace policy gRPC client in policy CRUD wrapper with direct communication with SpiceDB. Sep 3, 2024
@felixgateru felixgateru self-assigned this Sep 3, 2024
@felixgateru felixgateru marked this pull request as ready for review September 4, 2024 04:25
@dborovcanin dborovcanin changed the title MG-2404 - Replace policy gRPC client in policy CRUD wrapper with direct communication with SpiceDB. MG-2404 - Use Policy CRUD wrapper to directly talk to SpiceDB Sep 4, 2024
// authorization services (e.g. ORY Keto).
//
//go:generate mockery --name PolicyAgent --output=./mocks --filename agent.go --quiet --note "Copyright (c) Abstract Machines"
type PolicyAgent interface {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need the both Agent and Client, especially since they have almost exactly the same interface?

@@ -30,18 +30,18 @@ type service struct {
clients postgres.Repository
idProvider magistrala.IDProvider
auth grpcclient.AuthServiceClient
policy policy.PolicyService
policy policy.PolicyClient
Copy link
Collaborator

Choose a reason for hiding this comment

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

Rename to policyClient.

"github.com/absmach/magistrala/users/postgres"
)

const defLimit = uint64(100)

type handler struct {
clients postgres.Repository
policy policy.PolicyService
policy magistrala.PolicyServiceClient
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same, policyClient.

@dborovcanin dborovcanin merged commit 415aaa1 into absmach:auth-middleware Sep 6, 2024
1 of 2 checks passed
dborovcanin pushed a commit that referenced this pull request Sep 10, 2024
dborovcanin pushed a commit that referenced this pull request Sep 12, 2024
dborovcanin pushed a commit that referenced this pull request Sep 13, 2024
dborovcanin pushed a commit that referenced this pull request Sep 19, 2024
dborovcanin pushed a commit that referenced this pull request Sep 24, 2024
nyagamunene pushed a commit to nyagamunene/magistrala that referenced this pull request Sep 25, 2024
dborovcanin pushed a commit to nyagamunene/magistrala that referenced this pull request Sep 27, 2024
felixgateru added a commit to felixgateru/magistrala that referenced this pull request Sep 30, 2024
felixgateru added a commit to felixgateru/magistrala that referenced this pull request Sep 30, 2024
nyagamunene pushed a commit to nyagamunene/magistrala that referenced this pull request Oct 1, 2024
dborovcanin pushed a commit that referenced this pull request Oct 3, 2024
dborovcanin pushed a commit that referenced this pull request Oct 7, 2024
nyagamunene pushed a commit to nyagamunene/magistrala that referenced this pull request Oct 7, 2024
dborovcanin pushed a commit to nyagamunene/magistrala that referenced this pull request Oct 8, 2024
nyagamunene pushed a commit to nyagamunene/magistrala that referenced this pull request Oct 8, 2024
felixgateru added a commit to felixgateru/magistrala that referenced this pull request Oct 8, 2024
felixgateru added a commit to felixgateru/magistrala that referenced this pull request Oct 8, 2024
dborovcanin pushed a commit that referenced this pull request Oct 14, 2024
felixgateru added a commit to felixgateru/magistrala that referenced this pull request Oct 15, 2024
felixgateru added a commit that referenced this pull request Oct 15, 2024
dborovcanin pushed a commit that referenced this pull request Oct 15, 2024
dborovcanin pushed a commit to dborovcanin/magistrala that referenced this pull request Oct 15, 2024
felixgateru added a commit to felixgateru/magistrala that referenced this pull request Oct 15, 2024
felixgateru added a commit to felixgateru/magistrala that referenced this pull request Oct 15, 2024
felixgateru added a commit to felixgateru/magistrala that referenced this pull request Oct 17, 2024
dborovcanin pushed a commit that referenced this pull request Oct 17, 2024
felixgateru added a commit to felixgateru/magistrala that referenced this pull request Oct 24, 2024
felixgateru added a commit to felixgateru/magistrala that referenced this pull request Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants