-
Notifications
You must be signed in to change notification settings - Fork 673
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
MG-2404 - Use Policy CRUD wrapper to directly talk to SpiceDB #2405
Conversation
a55448b
to
b7083b8
Compare
b7083b8
to
3835e97
Compare
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
3835e97
to
c2172fc
Compare
Signed-off-by: 1998-felix <[email protected]>
pkg/policy/policy.go
Outdated
// 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 { |
There was a problem hiding this comment.
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?
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
@@ -30,18 +30,18 @@ type service struct { | |||
clients postgres.Repository | |||
idProvider magistrala.IDProvider | |||
auth grpcclient.AuthServiceClient | |||
policy policy.PolicyService | |||
policy policy.PolicyClient |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same, policyClient
.
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
…h#2405) Signed-off-by: 1998-felix <[email protected]> Signed-off-by: nyagamunene <[email protected]>
…h#2405) Signed-off-by: 1998-felix <[email protected]> Signed-off-by: nyagamunene <[email protected]>
…h#2405) Signed-off-by: 1998-felix <[email protected]>
…h#2405) Signed-off-by: 1998-felix <[email protected]>
…h#2405) Signed-off-by: 1998-felix <[email protected]> Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
…h#2405) Signed-off-by: 1998-felix <[email protected]> Signed-off-by: nyagamunene <[email protected]>
…h#2405) Signed-off-by: 1998-felix <[email protected]> Signed-off-by: nyagamunene <[email protected]>
…h#2405) Signed-off-by: 1998-felix <[email protected]> Signed-off-by: nyagamunene <[email protected]>
…h#2405) Signed-off-by: 1998-felix <[email protected]>
…h#2405) Signed-off-by: 1998-felix <[email protected]> Signed-off-by: Felix Gateru <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
…h#2405) Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
…h#2405) Signed-off-by: 1998-felix <[email protected]> Signed-off-by: Dusan Borovcanin <[email protected]>
…h#2405) Signed-off-by: 1998-felix <[email protected]> Signed-off-by: Felix Gateru <[email protected]>
…h#2405) Signed-off-by: 1998-felix <[email protected]> Signed-off-by: Felix Gateru <[email protected]>
…h#2405) Signed-off-by: 1998-felix <[email protected]> Signed-off-by: Felix Gateru <[email protected]>
Signed-off-by: 1998-felix <[email protected]> Signed-off-by: Dusan Borovcanin <[email protected]>
…h#2405) Signed-off-by: 1998-felix <[email protected]> Signed-off-by: Dusan Borovcanin <[email protected]>
…h#2405) Signed-off-by: 1998-felix <[email protected]> Signed-off-by: Felix Gateru <[email protected]>
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