LogoLogo
Start Trial
  • Overview
    • What is DeltaStream?
    • Core Concepts
      • Access Control
      • Region
      • SQL
      • Store
      • Database
      • Query
      • Visualizing Data Lineage
      • Function
  • Getting Started
    • Free Trial Quick Start
    • Starting with the Web App
    • Starting with the CLI
  • Tutorials
    • Managing Users and User Roles
      • Inviting Users to an Organization
      • Administering Users in your Organization
      • Using the CLI to Manage User Roles
      • Example: Setting Up Custom Roles for Production and Stage
    • Creating Stores for Streaming Data
    • Using Multiple Stores in Queries
    • Creating Relations to Structure Raw Data
    • Namespacing with Database and Schema
    • Creating and Querying Materialized Views
    • Creating a Function
    • Securing Your Connections to Data Stores
      • Introducing DeltaStream Private Links
      • Creating an AWS Private Link from DeltaStream to your Confluent Kafka Dedicated Cluster
      • Enabling Private Link Connectivity to Confluent Enterprise Cluster and Schema Registry
      • Creating a Private Link from DeltaStream to Amazon MSK
      • Creating a Private Link for RDS Databases
      • Deleting a Private Link
    • Integrations
      • Connecting to Confluent Cloud
      • Databricks
      • PostgreSQL
      • Snowflake
      • WarpStream
    • Serialization
      • Working with ProtoBuf Serialized Data and DeltaStream Descriptors
      • Working with Avro Serialized Data and Schema Registries
      • Configuring Deserialization Error Handling
  • Reference
    • Enterprise Security Integrations
      • Okta SAML Integration
      • Okta SCIM Integration
    • Metrics
      • Prometheus Integration
      • Built-In Metrics
      • Custom Metrics in Functions
    • SQL Syntax
      • Data Formats (Serialization)
        • Serializing with JSON
        • Serializing with Primitive Data Types
        • Serializing with Protobuf
      • Data Types
      • Identifiers and Keywords
      • Command
        • ACCEPT INVITATION
        • CAN I
        • COPY DESCRIPTOR_SOURCE
        • COPY FUNCTION_SOURCE
        • DESCRIBE ENTITY
        • DESCRIBE QUERY
        • DESCRIBE QUERY METRICS
        • DESCRIBE QUERY EVENTS
        • DESCRIBE QUERY STATE
        • DESCRIBE RELATION
        • DESCRIBE RELATION COLUMNS
        • DESCRIBE ROLE
        • DESCRIBE SECURITY INTEGRATION
        • DESCRIBE <statement>
        • DESCRIBE STORE
        • DESCRIBE USER
        • GENERATE COLUMNS
        • GENERATE TEMPLATE
        • GRANT OWNERSHIP
        • GRANT PRIVILEGES
        • GRANT ROLE
        • INVITE USER
        • LIST API_TOKENS
        • LIST DATABASES
        • LIST DESCRIPTORS
        • LIST DESCRIPTOR_SOURCES
        • LIST ENTITIES
        • LIST FUNCTIONS
        • LIST FUNCTION_SOURCES
        • LIST INVITATIONS
        • LIST METRICS INTEGRATIONS
        • LIST ORGANIZATIONS
        • LIST QUERIES
        • LIST REGIONS
        • LIST RELATIONS
        • LIST ROLES
        • LIST SCHEMAS
        • LIST SCHEMA_REGISTRIES
        • LIST SECRETS
        • LIST SECURITY INTEGRATIONS
        • LIST STORES
        • LIST USERS
        • PRINT ENTITY
        • REJECT INVITATION
        • REVOKE INVITATION
        • REVOKE PRIVILEGES
        • REVOKE ROLE
        • SET DEFAULT
        • USE
      • DDL
        • ALTER API_TOKEN
        • ALTER SECURITY INTEGRATION
        • CREATE API_TOKEN
        • CREATE CHANGELOG
        • CREATE DATABASE
        • CREATE DESCRIPTOR_SOURCE
        • CREATE ENTITY
        • CREATE FUNCTION_SOURCE
        • CREATE FUNCTION
        • CREATE INDEX
        • CREATE METRICS INTEGRATION
        • CREATE ORGANIZATION
        • CREATE ROLE
        • CREATE SCHEMA_REGISTRY
        • CREATE SCHEMA
        • CREATE SECRET
        • CREATE SECURITY INTEGRATION
        • CREATE STORE
        • CREATE STREAM
        • CREATE TABLE
        • DROP API_TOKEN
        • DROP CHANGELOG
        • DROP DATABASE
        • DROP DESCRIPTOR_SOURCE
        • DROP ENTITY
        • DROP FUNCTION_SOURCE
        • DROP FUNCTION
        • DROP METRICS INTEGRATION
        • DROP RELATION
        • DROP ROLE
        • DROP SCHEMA
        • DROP SCHEMA_REGISTRY
        • DROP SECRET
        • DROP SECURITY INTEGRATION
        • DROP STORE
        • DROP STREAM
        • DROP USER
        • UPDATE ENTITY
        • UPDATE SCHEMA_REGISTRY
        • UPDATE SECRET
        • UPDATE STORE
      • Query
        • APPLICATION
        • Change Data Capture (CDC)
        • CREATE CHANGELOG AS SELECT
        • CREATE STREAM AS SELECT
        • CREATE TABLE AS SELECT
        • Function
          • Built-in Functions
          • Row Metadata Functions
        • INSERT INTO
        • Materialized View
          • CREATE MATERIALIZED VIEW AS
          • SELECT (FROM MATERIALIZED VIEW)
        • Query Name and Version
        • Resume Query
        • RESTART QUERY
        • SELECT
          • FROM
          • JOIN
          • MATCH_RECOGNIZE
          • WITH (Common Table Expression)
        • TERMINATE QUERY
      • Sandbox
        • START SANDBOX
        • DESCRIBE SANDBOX
        • STOP SANDBOX
      • Row Key Definition
    • Rest API
Powered by GitBook
On this page
  • Using the OrgAdmin Role
  • 1. Adding OrgAdmin Users
  • 2. Switching to a different role
  • Using the UserAdmin Role
  • 1. Managing Invitations
  • 2. Managing Roles
  • Using the SecurityAdmin Role
  • 1. Granting Privileges to Roles
  • 2. Granting Ownership of Objects to Different Roles
  • Using the SysAdmin Role
  1. Tutorials
  2. Managing Users and User Roles

Administering Users in your Organization

PreviousInviting Users to an OrganizationNextUsing the CLI to Manage User Roles

Last updated 5 months ago

This tutorial is helpful if you've just been given access to a new DeltaStream . It discusses the responsibilities of different administrator roles.

Note For additional background, see this in DeltaStream.

One of the first things to do when you begin to assemble a new organization in DeltaStream is to invite users to add other administrators to administrative roles, including:

  • sysadmin

  • securityadmin

  • useradmin

  • orgadmin

Note the role hierarchy illustrated in the diagram below:

Admin roles are built into DeltaStream. There are 4 types of admin roles:

  1. ORGADMIN — Root of the the role hierarchy. This role manages operations at the organization level.

  2. SYSADMIN — Role that has privileges to create, manage, and drop objects.

  3. USERADMIN — Role that has privileges to manage users and roles within the organization.

  4. SECURITYADMIN — Role that manages any object grants globally. This role inherits privileges from the useradmin role.

Important Admin roles are the most powerful roles in DeltaStream. Only select individuals should have them.

Using the OrgAdmin Role

The orgadmin role is the single most powerful role in DeltaStream. Use it only only for routine administrative tasks, such as inviting and removing users. Do not use it to grant access to resources for activities such creating and querying streams. For example, when you create objects such as databases, schemas, or relations, use the sysadmin or lower roles in the hierarchy. Similarly, when you invite new users or create new roles, use the useradmin role.

Tip As a best practice, use a lower role whenever possible.

When someone first gets access to DeltaStream, they're granted the orgadmin role. In turn they inherit the sysadmin and securityadmin roles, and their default role sysadmin.

1. Adding OrgAdmin Users

INVITE USER 'user@demo.org' WITH (
  'roles' = (orgadmin, sysadmin), 
  'default' = sysadmin
);

Important Do not set OrgAdmin as the default role for people you invite into your organization.

2. Switching to a different role

After you invite others to be orgadmin, switch to use a different role.

USE ROLE useradmin;

Using the UserAdmin Role

1. Managing Invitations

Inviting other people to the organization

INVITE USER 'user@demo.org' WITH (
  'roles' = (useradmin, "public"), 
  'default' = "public"
);

Listing Invitations

<no-db>/<no-store># LIST PENDING INVITATIONS;
             Invitation ID             | Org name |                            Org ID                            |     Email     | Invited by  |    User roles    | Default role
---------------------------------------+----------+--------------------------------------------------------------+---------------+-------------+------------------+---------------
  8f7a4504-ce64-4ee3-a9b5-227925e9dq44 | doc_org  | 830e26fe-de4g-4996-839f-bccb258f8f91                         | user@demo.org | useradmin   | useradmin,public | public

Revoking Invitations

REVOKE INVITATION 8f7a4504-ce64-4ee3-a9b5-227925e9dq44;

Describing a User

<no-db>/<no-store># DESCRIBE USER 'user@demo.org' ;
  Given name | Family name |     Email     | Locale
-------------+-------------+---------------+---------
  user       | Demo        | user@demo.org | en

  GrantedRoles | Inherited
---------------+------------
  useradmin    |
  public       | ✓

2. Managing Roles

Granting a specific role to an individual or to another role

GRANT ROLE sysadmin TO USER 'user@demo.org';

The below example shows how to grant the custom role my_role to the sysadmin role:

GRANT ROLE my_role TO ROLE sysadmin;

Revoking a role from either a user or another role

REVOKE ROLE sysadmin FROM USER 'user@demo.org';

The below example shows how to revoke the custom role my_role from the sysadmin role:

REVOKE ROLE my_role FROM ROLE sysadmin;

Creating a custom role

CREATE ROLE production_role;

Dropping a custom role

DROP ROLE production_role;

Using the SecurityAdmin Role

The securityadmin role should be the default role for managing object grants. As the securityadmin role inherits privileges from the useradmin role, it's also a powerful role. And as with the orgadmin and useradmin roles, take care to give the role of securityadmin only to people who will need it.

1. Granting Privileges to Roles

GRANT CREATE_DATABASE ON ORGANIZATION TO ROLE my_role;

Revoking privileges from existing roles

REVOKE CREATE_DATABASE ON ORGANIZATION FROM ROLE my_role;

2. Granting Ownership of Objects to Different Roles

You can only transfer ownership of an object when:

  • the current role is the owner of the object and has been granted the destination role

  • the current role is securityadmin

Custom roles should be owned by the useradmin. You can grant the Sysadmin or other custom roles but not grant ownership.

Tip Avoid granting ownership of roles to the sysadmin role or to any roles that sysadmin inherits.

GRANT OWNERSHIP ON DATABASE db TO my_role;

Using the SysAdmin Role

The sysadmin role has the privileges to create, manage, and drop objects. Most day-to-day tasks are done in the sysadmin role or in a custom role thesysadmin is granted.

Some of the main actions that sysadmin can perform include:

Tip This role typically is at the root of the hierarchy for all custom roles that also create, manage, or drop objects. In this way the sysadmin role is in charge of all objects in the organization.

See also:

  • Creating Stores for Streaming Data

  • Using Multiple Stores in Queries

  • Creating Relations to Structure Raw Data

  • Namespacing with Database and Schema

  • Creating and Querying Materialized Views

To add people to your organization, use the orgadmin or useradmin role. To invite others to be an orgadmin, use the .

For more details, see and .

The useradmin role should be the default for managing users and creating custom roles. The useradmin role is also powerful, as it includes the privilege to . As with orgadmin and securityadmin, be judicious when assigning the role of useradmin.

The below example shows how to use the command to invite someone who has the useradmin and public roles. The default role is public:

The below example shows how to use the command; to see invitations you've only just sent, use LIST PENDING INVITATIONS:

To delete a pending invitation, use the command:

To print (view) information about an existing user, use the command:

The below example shows how to use the command to grant the sysadmin role to a user:

The below example shows how to use the command to revoke the sysadmin role from a user:

The below example shows how to use the command to create the production_role role:

The below example shows how to using the command to drop the production_role role:

DeltaStream allows a finite number of privileges. To view them, see .

The below example shows how to use the command to grant the CREATE_DATABASE privilege to the my_role role:

The below example shows how to use the command to revoke the CREATE_DATABASE privilege from the my_role role:

The below example shows how to use the command to grant ownership of the db to the my_role role:

/

/

/

/

/

/

INVITE USER command
grant roles
INVITE USER
LIST INVITATIONS
REVOKE INVITATION
DESCRIBE USER
GRANT ROLE
REVOKE ROLE
CREATE ROLE
DROP ROLE
GRANT <PRIVILEGE>
REVOKE <PRIVILEGE>
GRANT OWNERSHIP
Database
CREATE STORE
DROP STORE
CREATE ENTITY
DROP ENTITY
CREATE DATABASE
DROP DATABASE
CREATE SCHEMA
DROP SCHEMA
CREATE STREAM
DROP STREAM
CREATE CHANGELOG
DROP CHANGELOG
CREATE MATERIALIZED VIEW AS
SELECT
TERMINATE QUERY
high-level overview of access control concepts
Inviting Users to an Organization
Access Control Core Concepts
Switching Roles
organization
DeltaStream Role Hierarchy