CockroachDB Videos
← Back to all videos

SECURITY DEFINER | Distributed Functions in CockroachDB

2025-02-10

Demos & Tutorials Security in CockroachDB

Description

In CockroachDB 24.3, we allowed functions and stored procedures to function as the SECURITY DEFINER. This means in simple terms, to run as the creator intended. The default setting for CockroachDB for functions and stored procedures to run as the SECURITY INVOKER. In this video, our Technical Evangelist Rob Reid demonstrates: - How to create a SECURITY DEFINER function in CockroachDB - How to abstract away sensitive information whilst allowing a user to perform their role SECURITY DEFINER | Distributed Functions in CockroachDB 00:00 What is a SECURITY DEFINER in CockroachDB? 00:20 When should you use SECURITY DEFINER? 00:38 Creating a CockroachDB Cluster [Demo] 00:56 Example: An eCommerce team member [Demo] 01:27 Example: Creating a SECURITY DEFINER role [Demo] 02:15 Example: Executing as the definer [Demo] 02:43 Stored procedures in CockroachDB Read our docs: https://cockroa.ch/4h2IMgo About Cockroach Labs: Cockroach Labs is a pioneering software company at the forefront of database technology, dedicated to delivering resilient and scalable database solutions to run mission-critical workloads for the world's most important businesses. With a mission to scale when others fail, Cockroach Labs is revolutionizing the way businesses manage their data with its innovative cloud native distributed SQL database, CockroachDB.