Skip to content

Conversation

ChrisPdgn
Copy link
Contributor

@ChrisPdgn ChrisPdgn commented Jul 10, 2023

This PR refactors the way we use access control in mongoose. Now, authorization module doesn't create views but returns authorized queries that calculate the accessible docs through aggregation.

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other (please describe)

Does this PR introduce a breaking change?

  • Yes
  • No

The PR fulfills these requirements:

  • It's submitted to the main branch
  • When resolving a specific issue, it's referenced in the PR's description (e.g. fix #xxx, where "xxx" is the issue number)

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature

Other information:

@ChrisPdgn ChrisPdgn requested review from kkopanidis and kon14 July 10, 2023 14:04
@ghost
Copy link

ghost commented Jul 10, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@ChrisPdgn ChrisPdgn marked this pull request as draft July 12, 2023 10:27
@ChrisPdgn ChrisPdgn marked this pull request as ready for review July 14, 2023 14:57
@kon14 kon14 changed the title refactor(database,authorization,grpc-sdk): refactor views in mongoose refactor(database,authorization,grpc-sdk): Mongo authz query aggregations Nov 20, 2023
@kon14
Copy link
Contributor

kon14 commented Nov 20, 2023

This seems to be working as expected.

We should ideally delete any View docs for Mongo users, but given how the gRPC API already exposed view creation we could be deleting non-authz ones explicitly created by the users themselves.

@kon14 kon14 marked this pull request as draft November 20, 2023 13:28
@kon14 kon14 marked this pull request as ready for review November 20, 2023 13:32
kkopanidis and others added 5 commits November 21, 2023 12:35
* fix(database): parsedQuery types

* fix(database): sql/mongo null queries ignored due to authz checks

* fix(database): isNil checks not checking empty objects

* fix(database): null-less query types
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.

3 participants