You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the console has no means of creating or deleting a user. Following is a proposal for console commands.
Expected behavior
CREATE USER username IDENTIFIED BY password
DROP USER username
For the HTTP-API endpoints this could translate to:
create user: api/v1/user/username
Given the server-only users, I think it would make sense to constrain these commands to the console, as for the CREATE DATABASE and DROP DATABASE commands?
The console supports 2 new commands when connected to a remote server:
create user <user-name> identified by <user-password> [grant connect to <db-name>*]
The user password must be at least 5 characters and not more than 256 characters. Any character is fine but spaces.
the list of databases must be separated by a comma in case multiple databases are provided.
And
dropuser<user-name>
On the server there are 2 new HTTP commands:
POST /user where the payload is the JSON used by the command, it's already in the docs. Example:
Activity
lvca commentedon Dec 8, 2022
Ref from #661.
lvca commentedon Dec 8, 2022
I'm going to work on this soon. I believe supporting the console should be quick with the syntax @gramian proposed.
lvca commentedon Dec 9, 2022
Ok, this is supported now.
The console supports 2 new commands when connected to a remote server:
The user password must be at least 5 characters and not more than 256 characters. Any character is fine but spaces.
the list of databases must be separated by a comma in case multiple databases are provided.
And
On the server there are 2 new HTTP commands:
POST
/userwhere the payload is the JSON used by the command, it's already in the docs. Example:{"name":"elon","password":"musk","databases":{"*":["admin"]}}If
databasesfield is not existent, then the user can access to any databases on the server like it was defining"databases":{"*":["admin"]}.To delete a user execute a HTTP:
DELETE
/user/{user-name}.Both HTTP commands require server authentication, you can use "root".
Supported create and drop of server users from console and HTTP commands
lvca commentedon Dec 9, 2022
@gramian any help with the docs would be VERY appreciated :-)
[-]User management via API or console[/-][+]User management via API and console[/+]chore(studio-deps-dev)(deps-dev): bump enhanced-resolve from 5.21.0 t…
Supported create and drop of server users from console and HTTP commands
chore(studio-deps-dev)(deps-dev): bump enhanced-resolve from 5.21.0 t…