Skip to content

Commit f276e66

Browse files
users
1 parent b56cd61 commit f276e66

File tree

2 files changed

+31
-3
lines changed

2 files changed

+31
-3
lines changed

new_core_concepts/modules/ROOT/pages/typedb/databases.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This section covers the management of databases and the definition of the schema, which provides the structural foundation for your data.
44

5-
== Managing Databases
5+
== Managing databases
66

77
In TypeDB, databases are high-level containers for your data and its corresponding schema. Database creation and deletion are administrative
88
operations performed through tools like the TypeDB Console or programmatically via the client drivers, rather than through TypeQL queries.
Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,32 @@
11
= Users
22

3-
[placeholder]
4-
Managing users in TypeDB server.
3+
This section covers the management of users in TypeDB.
4+
5+
== Managing users
6+
7+
Like database management, all user management operations are administrative, meaning they are performed through the TypeDB Console or client
8+
drivers by a user _with administrative privileges_, rather than with TypeQL queries.
9+
10+
After first boot, the only user is `admin`. Cloud users will be able to set a custom initial password for `admin` during the initial
11+
setup. In TypeDB CE, the default initial password for `admin` is `password`.
12+
13+
The lifecycle of a user is managed through a few simple commands. An administrator can add a new user at any time using `user create
14+
<username> [<password>]` in the Console (you will be prompted for a password if it's not provided), or programmatically with
15+
driver.users.create("<username>", "<password>"). To view all users currently on the server, an administrator can use the `user list`
16+
command. If a user's access needs to be revoked, it can be done permanently with the `user delete <username>` command.
17+
18+
A user can change their password using `user update-password <username> [<new-password>]` in the Console (once again, you will be prompted
19+
for a new password if it's not provided), or programmatically with `driver.users.updatePassword("<new-password>")`.
20+
An administrator can change any user's password with the same command.
21+
22+
== Permissions
23+
24+
TypeDB's permission model is comprised of two roles. The administrator role is currently exclusive to the user `admin` and has full
25+
administrative privileges, including the ability to manage users and databases. Any other user is considered a standard user and, by
26+
default, is granted read and write permissions for all databases on the server, but cannot perform administrative actions. This model
27+
simplifies permission management by focusing on user-level access rather than complex, object-level grants.
28+
29+
For a secure deployment, it is crucial to follow best practices. In a CE deployment, it is recommended to change the default admin password
30+
immediately. Furthermore, instead of using the powerful admin account for your applications, you should create dedicated standard users for
31+
each application or service. This follows the principle of least privilege and ensures that your applications have the necessary database
32+
access without possessing unnecessary administrative rights.

0 commit comments

Comments
 (0)