uatuko / ruek

🔐 Lightning fast, global scale authorization service without the overhead of a yet another DSL.
Apache License 2.0
94 stars 6 forks source link

Drop lookup identities #36

Closed uatuko closed 1 year ago

uatuko commented 1 year ago

LookupIdentities gRPC endpoint is a bit odd since it attempts to retrieve an identity by sub and the response (LookupIdentitiesResponse) returns a list of identities which will have either 0 entries (if there are no matches) or 1 entry if there is a match. Since sub must be unique across identities there can't be more than 1 result.

This change is to drop the LookupIdentities gRPC endpoint and update RetrieveIdentity endpoint to allow retrieving identities by sub.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.08 :warning:

Comparison is base (0f713b4) 88.64% compared to head (3e3adaa) 88.56%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #36 +/- ## ========================================== - Coverage 88.64% 88.56% -0.08% ========================================== Files 24 24 Lines 1347 1338 -9 Branches 96 96 ========================================== - Hits 1194 1185 -9 Misses 132 132 Partials 21 21 ``` | [Impacted Files](https://app.codecov.io/gh/uditha-atukorala/gatekeeper/pull/36?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Uditha+Atukorala) | Coverage Δ | | |---|---|---| | [src/datastore/identities.h](https://app.codecov.io/gh/uditha-atukorala/gatekeeper/pull/36?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Uditha+Atukorala#diff-c3JjL2RhdGFzdG9yZS9pZGVudGl0aWVzLmg=) | `60.00% <ø> (ø)` | | | [src/service/mappers.cpp](https://app.codecov.io/gh/uditha-atukorala/gatekeeper/pull/36?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Uditha+Atukorala#diff-c3JjL3NlcnZpY2UvbWFwcGVycy5jcHA=) | `93.04% <ø> (-0.35%)` | :arrow_down: | | [src/datastore/identities.cpp](https://app.codecov.io/gh/uditha-atukorala/gatekeeper/pull/36?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Uditha+Atukorala#diff-c3JjL2RhdGFzdG9yZS9pZGVudGl0aWVzLmNwcA==) | `94.62% <100.00%> (-0.06%)` | :arrow_down: | | [src/service/grpc.cpp](https://app.codecov.io/gh/uditha-atukorala/gatekeeper/pull/36?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Uditha+Atukorala#diff-c3JjL3NlcnZpY2UvZ3JwYy5jcHA=) | `78.44% <100.00%> (-0.13%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.