This page describes Calíope 1.8, the version I am building right now. 1.7 is on the App Store for the Mac, iPad, iPhone, Apple Watch, Apple TV and Apple Vision Pro. The changelog says which version each feature landed in.

Adds an “Open in Calíope” button to every topic. It only works with the app installed.

Users

User management

Create, edit and delete server accounts along with their privileges.

Where it is: Workspace › Tools › Users

Open Users from the workspace navigation bar. The left panel lists every account on the server, with the ones the server installs grouped separately; the search field filters by name. Select an account to load its privileges.

What appears on the right depends on the engine, because the security model is not the same. In MySQL and MariaDB an account is user@host and privileges are granted at four scopes: Global, Database, Table and Routine. In PostgreSQL an account is a role, there is no host, and instead of the global scope you get its attributes, which are not granted but set. What an engine does not have is not drawn greyed out: it is not drawn.

Inside each card the checkboxes are grouped by Data, Structure, Routines, Administration and Replication. Tick what applies and press Save changes; while there are unsaved changes the header says so, and Discard changes goes back to what is on the server.

In SQL Server an account is a server login, with no host; in each database it acts through the user linked to it, which Calíope finds on its own. Privileges go at five scopes —Global (the server), Connection (a database), Database (a schema), Table and Routine— and a DENY is shown as a third state, crossed out and named: here it can be seen but not changed; it is set and removed from the SQL Editor.

Without permission to read the accounts — in MySQL and MariaDB, SELECT on the mysql database — the list says “Couldn’t read the server’s accounts”, with the server's reason underneath and a button to retry, and the footer shows no count. In PostgreSQL it does not happen: any account can read the roles. In SQL Server, without VIEW ANY DEFINITION the list brings only the accounts the session can see, and a banner above it says so, with the missing permission. And if not everything the selected account has could be read —its privileges, its roles or what it owns—, a banner above its details says what wasn’t read, with the server’s text or the missing permission; while it’s there, Save changes is off, because saving would write over what can’t be seen. In Backups, the server accounts section says with the same banner that they couldn’t be read or that they are only the ones the session sees, and the backup’s log notes it when it starts.

ClickHouse

In ClickHouse the list brings accounts and roles together. Accounts defined in the server's configuration file, and default, appear under System with a padlock: they can't be changed through SQL. A partial revoke —granting on a database and revoking on one of its tables— shows on that table's card struck through and labelled REVOKE: here you can see it but not change it. The privileges of each card come from the server, so they change with its version. Permission to write belongs to the connection: if your account lacks ACCESS MANAGEMENT or CREATE USER, also through a role, the tool lists the same, but the buttons are off and a strip with a padlock says why. Changes take effect at once and only roles are offered for granting. An account's simultaneous queries and expiry go in its Account card, and the hourly limits in a quota of the account's own (see Edit user).

Oracle

In Oracle the list shows accounts and roles together, plus PUBLIC, the role everyone belongs to; Oracle's own accounts and roles appear under System. Each account owns the schema that bears its name. Privileges come in four scopes: Global (system privileges such as CREATE TABLE), Database (privileges on a whole schema, such as SELECT ANY TABLE on it), Table and Routine, where packages appear too. Above them you see the profile with its password limits, when the password expires and the tablespace: they're read, not changed here. For PUBLIC and Oracle's accounts only what's granted on user schemas is shown. Without permission to read DBA_USERS the list shows only your account, with its roles and privileges, and a banner says so. Privileges on sequences, types and columns aren't shown. Writing needs one system privilege per action on your connection: CREATE USER to create, ALTER USER to change the password or lock, DROP USER to delete, and GRANT ANY PRIVILEGE, GRANT ANY OBJECT PRIVILEGE or GRANT ANY ROLE to grant; without it, that button is disabled and says which one is missing. Oracle's own accounts aren't changed here: a banner says so.

With a read-only environment tag, this tool isn’t offered. With one that confirms writes, every change —creating or editing a user, their privileges, their roles— asks first with the action’s name, and deleting a user carries the tag in its confirmation title.

MySQLMariaDBAuroraTiDB

Below the cards, Member of says which roles the account belongs to, direct ones and inherited ones with their path, and lets you add one or remove a direct one. In MySQL and TiDB a role is an account (CREATE ROLE) and any account can be granted; once granted it is active at sign-in (SET DEFAULT ROLE ALL). In MariaDB a role appears in the list without a host, and from 10.11 PUBLIC comes first: whatever is granted to it, everyone has.

Keywords: users, roles, privileges, permissions, GRANT, user admin

Create a new user

Add an account with its name and password.

Where it is: Users › New user

Press New user in the Users bar. Enter the name, the host and the password. The account is created with no privileges and is left selected, so you can assign them right away.

The host field and the authentication method picker only appear where the engine has them. PostgreSQL has neither: where a connection is accepted from is decided by the server’s pg_hba.conf, and how the password is encrypted is decided by the server configuration, not by the account. The role is created with LOGIN and INHERIT, as CREATE USER does, so it can sign in; its other attributes are ticked afterwards on its own card.

SQL Server doesn't have them either: the account is a login, with no host and no method to choose.

Oracle

In Oracle there's no host and no method: the account is created with CREATE USER … IDENTIFIED BY and gets CREATE SESSION, which is what lets it log in. The password can't contain double quotes. Without a password a schema-only account is created (NO AUTHENTICATION), which holds objects but can't log in. The server sets the tablespace and the quota: without a quota the account can't store rows, and you give it one from the SQL Editor (ALTER USER … QUOTA). In a pluggable database (PDB) a name starting with C## belongs to a common user and isn't created here: the form says so.

TiDB

In TiDB the picker offers mysql_native_password, caching_sha2_password, tidb_sm3_password and auth_socket: the other MySQL ones aren't loaded on the server.

Keywords: create user, new user, CREATE USER, password

Delete a user

Delete an account from the server.

Where it is: Users › Delete user

Select the account in the left panel and press Delete in the header. A confirmation dialog shows what will be removed. The action cannot be undone.

The accounts the server installs appear in their own group and cannot be deleted from here.

In PostgreSQL the server may refuse, and that is not a Calíope bug: a role that owns objects or holds granted privileges cannot be dropped until those are removed. Calíope does not issue DROP OWNED BY on its own, because that would delete data nobody asked to delete. Remove its grants first —including the “all tables” ones, which also leave a default privilege behind— or reassign what it owns.

In SQL Server deleting removes the account's user in every database and then the login. The server refuses while one of those users owns a schema: hand the schema to someone else first (ALTER AUTHORIZATION).

Oracle

In Oracle an account is its schema: deleting it is DROP USER … CASCADE, which also deletes all its tables, views and code, and the confirmation says so. A role is deleted with DROP ROLE. Oracle's own accounts can't be deleted here.

ClickHouse

In ClickHouse deleting an account also drops its own quota (caliope_<account>), if it had one.

Keywords: delete user, DROP USER, remove, revoke

Change user password

Change the password of an existing account.

Where it is: Users › Edit user

Select the account in the left panel and press Edit in the header. The edit form opens.

The form only shows what the engine has. In MySQL and MariaDB it carries the password, the authentication method, the account lock and the hourly resource limits. In PostgreSQL it carries the password and nothing else: there is no lock —an account is closed by removing its LOGIN attribute, which is on its own card— and no hourly limits, while the concurrent connection count and the expiry date are edited next to the attributes.

The form opens with what the server has: whether the account is locked and its hourly limits. A limit of 0 means no limit, and setting one back to 0 removes it. If the server won’t let the limits be read, a banner says so with its text, the fields are off and saving doesn’t write them: empty, they would say “no limit”. Leave the password field empty if you only want to change the other settings.

In SQL Server it carries the password and the lock (ALTER LOGIN … DISABLE: the login can't sign in and keeps its permissions); there are no hourly limits and no expiry date per account.

Oracle

In Oracle it has the password and the lock (ALTER USER … ACCOUNT LOCK: the account can't log in and the server answers ORA-28000). There are no hourly limits: the password limits come from its profile, shown in the account header. The password can't contain double quotes. Concurrent connections is the SESSIONS_PER_USER of its profile. Since several accounts share a profile, Calíope writes the limit in a profile of the account's own, <ACCOUNT>_CALIOPE, a copy of its profile with that limit changed, and assigns it; empty means no limit, and the own profile goes away with the account. Reading and writing it needs the dictionary (DBA_PROFILES), and it applies only with RESOURCE_LIMIT = TRUE, the default: otherwise the account header says so.

TiDB

In TiDB it has the password, the method, the lock and, of the limits, only MAX_USER_CONNECTIONS: TiDB accepts the hourly limits and doesn't keep them, so they aren't offered. An account that requires TLS (REQUIRE SSL) keeps it when you save: TiDB drops it on any ALTER USER that doesn't repeat it, and Calíope repeats it.

ClickHouse

In ClickHouse it has the password, its method and the hourly limits, which are a quota of the account's own, caliope_<account>, with a one-hour interval: queries, errors, result_rows and read_rows. With all four at 0 the quota is dropped, and it goes with the account. A quota someone else defined for several accounts is not touched from here. There is no lock. Concurrent connections and Expires on go in the account's Account card: the limit is on queries at a time (max_concurrent_queries_for_user), because over HTTP there is no lasting connection, and the expiry is VALID UNTIL, in UTC.

The Users Security review brings the accounts it finds wrong here with Fix; see “Security review”.

Keywords: change password, password, edit user, ALTER USER, credentials, new password

Manage privileges by database, table, and routine

Assign granular permissions at the database, table, or specific routine level.

Where it is: Users › Privileges tree

Each privilege scope is a card with its granted counter and its WITH GRANT OPTION switch:

  • Role attributes — PostgreSQL only. These are not privileges: they are properties of the role (LOGIN, SUPERUSER, CREATEDB…) written with ALTER ROLE. Concurrent connections and the expiry date sit at the bottom.
  • Global — MySQL family and SQL Server. They apply to the whole server (e.g. SUPER or PROCESS in MySQL, VIEW SERVER STATE in SQL Server).
  • Connection — PostgreSQL and SQL Server. In PostgreSQL, the privileges of the cluster database the profile points at: CONNECT, CREATE and TEMPORARY, which decide whether the account can connect at all. In SQL Server, those over a whole database (CONNECT, CREATE TABLE…).
  • Database — over every object in a database (in PostgreSQL and SQL Server, of a schema).
  • Table — over one specific table.
  • Routine — over a stored procedure or function.

Inside each card the checkboxes are grouped by category, with Select all per group, and ALL PRIVILEGES is highlighted at the top because it grants the whole scope at once.

To add a scope that is not listed, use Add object in the bottom bar; if the session’s account can’t see the whole catalog of the chosen database, a banner in that sheet says so, with the missing permission. Save changes runs the required REVOKE and GRANT statements; if the server rejects any, a notice appears next to the button with the detail. In MySQL and MariaDB it then runs FLUSH PRIVILEGES, and so do creating, editing and deleting an account.

ClickHouse

With ClickHouse there are three cards: Global, Database and Table. There is no Routine, Connection or role attributes. Below, the Account card has Concurrent connections and Expires on, saved with the rest.

Oracle

With Oracle there are four cards: Global (system privileges; its switch is the ADMIN OPTION), Database (privileges on a whole schema, such as SELECT ANY TABLE ON SCHEMA), Table (also views and materialized views) and Routine (procedures, functions and packages). There's no Connection card and no role attributes. Column privileges —Oracle grants only INSERT, UPDATE and REFERENCES that way— show with their columns, like UPDATE ("PRICE"). Removing one removes the privilege on the whole table, because Oracle’s REVOKE takes no columns; if the account also had it on the table, Calíope grants that back.

TiDB

With TiDB there are three cards: Global, Database and Table. There is no Routine: TiDB has no stored procedures or functions.

The Users Security review brings the accounts it finds wrong here with Fix; see “Security review”.

Keywords: privileges, GRANT, REVOKE, database, table, routine, granular permissions, EXECUTE, SUPER

Security review

Says which server accounts are wrong, by severity, takes you to what fixes them, lets you accept what is that way on purpose, exports a PDF report and can review every week.

Where it is: Workspace › Tools › Users

Security review is the other view of Users: you choose it at the top, between Accounts and Security review, and the number beside it is the high and medium severity findings still open. It reads the server's accounts and says which ones are wrong, from most to least severe. It never changes anything on its own: it only reads, and what you fix goes through the same sheets and confirmations as always.

It runs when you enter the view and, once per session, when you open Users; Review again runs it again, and the time of the last one is shown at the top. Each finding says the account, what's wrong and the evidence as the server gives it; Why and what to do expands why it matters and what to do. The server's internal accounts aren't reviewed, except the administration account, which is the one that matters most.

What it checks, by severity.

  • High: an account without a password; a password equal to the account name, or a known default one, only where the server lets it be checked without reading it; a superuser that can log in from any address.
  • Medium: all privileges on an account that isn't the administration account; permission to grant to others; an account open to any address; the role every account belongs to holding more than it ships with; a weak authentication method.
  • Low: a password that never expires; a locked or expired account that keeps privileges; an account unused for more than 90 days, where the server keeps the last login.

Passwords are never read. Where the server can compare a password without showing it, the comparison happens there and only the result comes back. Where it can't, those checks appear at the end, under Couldn’t be checked on this server, with the reason, just like what the session's account has no permission to read.

Fix takes you to what already exists in Users for that account, with its usual confirmation: the Edit user sheet (password, authentication method and lock; see “Change user password”) or, in Accounts with the account selected, its privileges panel (revoke, remove the grant option, roles and expiry; see “Manage privileges by database, table, and routine”). What isn't changed from Users —an account's host, a line of the server's configuration, an account defined in a file— has no button: the finding's text says where it's changed.

Accept is for what is that way on purpose. It takes a short note, and the finding moves to Accepted, folded at the end with its note and date, and stops counting. If the finding changes —different evidence on the same account— it comes back. Remove acceptance returns it to the list.

What you accept travels through iCloud. It's saved with the connection and, with iCloud sync on, reaches your other devices. Each acceptance carries the connection it belongs to, the check, the name of the server account (with its host, where the account has one), a fingerprint of the finding, the note and the date, and nothing else: no passwords and no privileges. It's deleted with the connection and when erasing all data.

Review security every week, at the top of the view, is per connection and off by default. When on, the device where you turned it on reviews that connection every seven days with its own connection, also with Calíope closed (see “Scheduled runs with Calíope closed”), and notifies only when a new high or medium severity finding appears that you haven't accepted. The first review doesn't notify: it records what was already there, and the same goes for the first one after turning it off and on again. The notice is a notification that opens this view when tapped; the watch only gets the connection's name and how many findings there are of each severity, never account names. On other devices the view says which device reviews it and offers Review from here. What was already notified is remembered only by the device that reviews.

Export report saves the last review as a PDF, without reading the server again: the server and the date, the open findings with why they matter and what to do, what you accepted with its note, and what couldn't be checked. The PDF carries the account names and this device's name, and reaches whoever you give it to.

What can't be checked on each server, and why.

MySQLMariaDBAuroraTiDB

A password equal to the name and a default password aren't checked: doing so would mean reading the password or trying to log in with it. Neither is an unused account: the server doesn't keep when each account last logged in. The host is part of the account, so an account open to any address (%) or an open superuser has no Fix: the text says to create it with a narrower host and drop this one. Reading the accounts needs SELECT on the mysql database; without it, the view says it couldn't read them, with the server's text.

MySQLAuroraTiDB

There's no role every account belongs to, so that check doesn't run.

MySQL

mysql_native_password is checked, but recent versions no longer load it, so it hardly ever appears.

MariaDBTiDB

mysql_native_password is the default method, and it appears as weak on almost every account.

MariaDB

The PUBLIC role is compared with what it ships with, which is nothing.

PostgreSQL

A password equal to the name and a default password aren't checked, for the same reason: it would mean reading it. Neither is an unused account: PostgreSQL doesn't keep the last login. “No password” and the weak method (md5 versus SCRAM-SHA-256) come from pg_authid, which only a superuser can read; the password doesn't leave the server, which classifies it and returns only the method's name. Where an account can log in from comes from pg_hba_file_rules (a superuser only): a line that matches any address opens the account, and that line is the evidence. It's changed in pg_hba.conf, not in Users. PostgreSQL has no lock: “locked or expired” is a past VALID UNTIL.

SQL Server

SQL Server doesn't restrict a login by address: there's no wildcard host, and every enabled login with power over the server (sa, sysadmin, CONTROL SERVER) appears as an open superuser; Fix takes you to disable it. It doesn't keep each login's last login. The empty password, the one equal to the name and a short list of default passwords are compared with PWDCOMPARE, on the server: Calíope doesn't read the password, but that comparison runs on the server and can show up in its audit or its traces as a password check. Each comparison has a cost, so only enabled logins are compared. Those three checks and the weak hash need CONTROL SERVER, and without VIEW ANY DEFINITION the view can't read the logins. CHECK_EXPIRATION is off by default: almost every SQL login appears with a password that never expires.

ClickHouse

A password equal to the name, a default password and an unused account aren't checked, and there's no role every account belongs to. An account without HOST is HOST NONE: it can't log in. The weak methods are plaintext_password and double_sha1_password. There's no lock: “locked or expired” is a past VALID UNTIL. “All privileges” means covering ALL as the server defines it in system.privileges. Accounts from users.xml are reviewed, but they're changed in the server's configuration, not in Users. Reading the accounts needs system.users, system.grants, system.role_grants and system.privileges.

Oracle

Oracle doesn't restrict an account by address: SYS, SYSTEM and every account with DBA or SYSDBA appear as an open superuser, and SYS and SYSTEM have no Fix because they belong to Oracle. A password equal to the name isn't checked; the server compares default passwords (DBA_USERS_WITH_DEFPWD) and returns only the account's name. “No password” never appears: a NO AUTHENTICATION account is schema-only and can't log in. The weak method is a password that keeps the 10G version. An unused account comes from LAST_LOGIN, and one that never logged in counts from its creation; administrative logins aren't kept. Everything needs to read the dictionary (SELECT ANY DICTIONARY or SELECT_CATALOG_ROLE).

Keywords: security, security review, audit, accounts, password, no password, default password, superuser, wildcard host, privileges, GRANT OPTION, PUBLIC, mysql_native_password, md5, PWDCOMPARE, accept, report, PDF, weekly

Roles, inheritance and ownership in PostgreSQL

Why this screen does not look like the MySQL one, and what each part means.

Where it is: Workspace › Tools › Users

PostgreSQL has no separate users and groups: it has roles, and a role is both at once. A role with the LOGIN attribute can sign in; one without it exists to group privileges and hand them to others. That is why the screen changes shape, and not on a whim.

There is no host. An account is a bare name. Where a connection is accepted from is decided by pg_hba.conf, which belongs to the server and not to the account, so Calíope neither shows it here nor can change it.

Attributes are not privileges. SUPERUSER, CREATEDB, CREATEROLE, REPLICATION, BYPASSRLS, INHERIT and LOGIN are set with ALTER ROLE, not granted with GRANT. On save, Calíope writes all of them: whatever you leave unticked is turned off. That is what makes the screen truthful — if only the ticked ones were written, unticking a box would not turn it off and it would come back on its own the next time you opened the account.

Membership is transitive. If app is a member of readers and readers of auditors, then app has what auditors has without anyone granting it. The Member of card tells direct memberships from inherited ones and shows the path of each. Inherited ones cannot be removed from here, which is why they have no button: what would have to be revoked is the link, and that link belongs to another role.

PUBLIC is not a role: it is everyone. It appears in the list as one more account because otherwise an object granted to everyone would look private. By default PUBLIC may connect to the database and execute any function.

The owner has everything over what it owns, and that never appears as a grant. A freshly created table has no privilege rows in the catalogue at all, and its owner can still do whatever it likes with it. That is why the header carries the “owns N objects” badge and those cards are drawn ticked and greyed out: there is nothing to grant and nothing to revoke.

“Grant on all tables” is two statements. In MySQL, ON database.* also covers tables created tomorrow; here it takes two commands that do not mean the same thing: one reaches the tables that exist now and the other the future ones. The second one, moreover, only covers those created by the account Calíope is connected with. Neither comes back afterwards as a checkbox on the schema card, because they are not schema privileges. The button next to it undoes both, and it is needed: while the default privilege remains, the server will not let you delete the account.

What is missing. There is no account lock —you remove LOGIN—, no hourly limits —only the concurrent connection count—, no authentication method picker —the server decides— and no FLUSH PRIVILEGES: here the catalogue is the source, and a GRANT is already in force by the time the server answers.

Keywords: roles, PostgreSQL, inheritance, membership, PUBLIC, owner, attributes, LOGIN, SUPERUSER, GRANT, default privileges