-
Notifications
You must be signed in to change notification settings - Fork 13
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
Sy 877 server api middleware #731
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## rc #731 +/- ##
==========================================
- Coverage 51.31% 50.98% -0.34%
==========================================
Files 1055 1066 +11
Lines 81142 82146 +1004
Branches 3288 3297 +9
==========================================
+ Hits 41638 41880 +242
- Misses 38484 39258 +774
+ Partials 1020 1008 -12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
See my comments. Also, please do a review of all endpoints to make sure we're not accidentally leaking information by using named return values after checking access.
ctx context.Context, | ||
req AccessRetrievePolicyRequest, | ||
) (res AccessRetrievePolicyResponse, err error) { | ||
res.Policies = make([]rbac.Policy, 0) |
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.
Useless allocation. Just use nil.
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.
If this is nil then upon encoding as json it won't get encoded into an empty list
Note that Pluto tests do not pass because the client does not compile due to type errors |
addressed |
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.
Address my comments. Also freighter test is failing - flaky or did the formatting tests mess something up?
Seemed flakey, passing now |
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.
Is there functionality here we should also test in QA?
Yes, we should probably test the ability to register new users |
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.
LGTM
Feature Pull Request Template
Key Information
Description
API middleware & client libraries supporting user registration and policy management.
Please review and consider these three questions I had while in development:
auth
field can be undefined if the user did not provide username & password upon starting the client. Should this still be the case? Shouldn't we allowauth
to always be an available service so the user canregister
even if they did not log in?Basic Readiness Checklist
Migrations
properly migrated to new formats.
properly migrated to new formats.
Manual QA Additions
with necessary manual QA steps to test my change.
Breaking Changes
/api/v1/auth/protected/change-password -> /api/v1/user/protected/change-password
/api/v1/auth/protected/change-username -> /api/v1/user/protected/change-username
/api/v1/auth/register -> /api/v1/user/register