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

feat(auth): watch file user provider #3566

Merged
merged 24 commits into from Mar 27, 2024

Conversation

tisonkun
Copy link
Contributor

@tisonkun tisonkun commented Mar 22, 2024

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

What's changed and what's your intention?

This closes #1862.

Implement greptime standalone start --user-provider=watch_file_user_provider:./users.toml that would watch on the file for updates.

This is what @thinkORo wants in the original issue, but in a way more suitable for our model.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR does not require documentation updates.

Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
@github-actions github-actions bot added the docs-not-required This change does not impact docs. label Mar 22, 2024
Cargo.toml Outdated Show resolved Hide resolved
Signed-off-by: tison <wander4096@gmail.com>
Copy link

codecov bot commented Mar 22, 2024

Codecov Report

Attention: Patch coverage is 78.08219% with 48 lines in your changes are missing coverage. Please review.

Project coverage is 84.85%. Comparing base (dd18d8c) to head (67219e6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3566      +/-   ##
==========================================
- Coverage   85.21%   84.85%   -0.37%     
==========================================
  Files         924      925       +1     
  Lines      153524   153676     +152     
==========================================
- Hits       130831   130401     -430     
- Misses      22693    23275     +582     

Copy link
Contributor

@killme2008 killme2008 left a comment

Choose a reason for hiding this comment

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

Good job! Looks cool.

src/auth/src/error.rs Show resolved Hide resolved
src/auth/src/user_provider.rs Outdated Show resolved Hide resolved
src/auth/src/user_provider.rs Outdated Show resolved Hide resolved
src/auth/src/user_provider/watch_file_user_provider.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@shuiyisong shuiyisong left a comment

Choose a reason for hiding this comment

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

Please resolve the comments. Let's go 🚀

Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
@tisonkun
Copy link
Contributor Author

All addressed. I may wait a bit for any feedback on #3566 (comment); otherwise, I'll merge this one tomorrow.

Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
This reverts commit d7a0be1.
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
@tisonkun
Copy link
Contributor Author

I'll merge this as is now.

If you have other ideas on #3566 (comment), please drop a comment. We still have the chance to make changes before 0.8 or even 1.0 release.

@tisonkun tisonkun added this pull request to the merge queue Mar 27, 2024
Merged via the queue into GreptimeTeam:main with commit d832795 Mar 27, 2024
18 checks passed
@tisonkun tisonkun deleted the dynamic-file-user-provider branch March 27, 2024 01:33
@killme2008
Copy link
Contributor

@tisonkun
Copy link
Contributor Author

Thanks for pointing out the doc source. I'll update for this and the admin /maintenance endpoint in days.

@github-actions github-actions bot added docs-required This change requires docs update. and removed docs-not-required This change does not impact docs. labels Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-required This change requires docs update.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[enhancement] updating of the user accounts via SQL statement
4 participants