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

[enhancement] updating of the user accounts via SQL statement #1862

Closed
thinkORo opened this issue Jul 2, 2023 · 5 comments · Fixed by #3566
Closed

[enhancement] updating of the user accounts via SQL statement #1862

thinkORo opened this issue Jul 2, 2023 · 5 comments · Fixed by #3566
Labels
C-enhancement Category Enhancements

Comments

@thinkORo
Copy link

thinkORo commented Jul 2, 2023

What type of enhancement is this?

Configuration

What does the enhancement do?

With a specific SQL statement, like select update_user_accounts(), the user has the ability to refresh an updated static_user_provider-file.

This would have the advantage of not having to restart the service to get a new list of users or passwords.

Implementation challenges

I would assume that there is not special implementation challenge. But I have not done this in Rust before.
But I would like to support in any way.

@thinkORo thinkORo added the C-enhancement Category Enhancements label Jul 2, 2023
@killme2008
Copy link
Contributor

Good idea!

I would assume that there is not special implementation challenge. But I have not done this in Rust before.
But I would like to support in any way.

It's great if you want to try.

@thinkORo
Copy link
Author

thinkORo commented Jul 3, 2023

Contrary to my own suggestion with select update_user_accounts(), after looking at the code, I would perhaps suggest more of an alter system refresh_user_accounts.

For this I would extend statements/alter.rs by AlterSystem (in addition to AlterTable) at the beginning to be able to offer further functions later if necessary.

I am looking forward to your feedback.

@evenyag
Copy link
Contributor

evenyag commented Jul 3, 2023

What about adding the keyword reload or refresh? e.g. alter system reload user_accounts.

We could reuse this keyword to reload other things. I find out clickhouse has some system reload commands.
https://clickhouse.com/docs/en/sql-reference/statements/system#reload-dictionaries

@tisonkun
Copy link
Contributor

Try impl in #3564 (comment).

Succeed but I tend to reject this one. See the comment linked above.

@tisonkun
Copy link
Contributor

In short: Briefly we can try to provide a way for custom user provider impl.

Or a generic dynamic user provider impl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category Enhancements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants