AvailableIncluded in beta access

Micro-course · Intermediate

Roles, permissions and data security

Grant only the access required and understand row-level security.

60 to 75 minCommon SQL · PostgreSQL5 lessons · 7 activities available
Start the course

Free 30-day beta access · no payment · progress saved

The business problem

A reporting user must neither modify tables nor see every population.

What you will be able to do

Design roles, apply GRANT and REVOKE, and explain row-level security.

  • Apply least privilege
  • Use GRANT and REVOKE
  • Create a read-only role
  • Understand RLS

Scope of this micro-course

This micro-course targets one focused skill. It does not replace a complete path or server administration training.

Prerequisites

  • Tables and views

Project and practice

7 verified exercises are available. Validation is based on the programme exercises.

Focused path

Your programme, in order.

Content remains centralised: completing an activity here also updates the path that contains it.

Micro-lessons

  1. 01
    Check before interpreting

    Document level of detail, ownership, dependencies and freshness. Verify rights to underlying objects and measure gain before materializing.

    Open lesson
  2. 02
    The problem to solve before syntax

    Giving owner rights to an application increases the impact of an error or injection. Analysts, applications and administrators do not have the same needs.

    Open lesson
  3. 03
    Build a controllable method

    Create loginless group roles, grant permissions to schemas and objects, and then assign these roles to login identities. Remove unnecessary public rights and set default privileges.

    Open lesson
  4. 04
    Check before interpreting

    Really test with SET ROLE or a dedicated connection: read allowed, write denied and no out-of-scope access. Table rights do not always override USAGE on schema or sequences.

    Open lesson
  5. 05
    Check before interpreting

    Test a valid insert and then each violation separately. Give meaningful names to important constraints so that the error is exploitable.

    Open lesson

Practical exercises

  1. 01
    Test roles and permissions positively and negatively

    Grant read, deny write, and check actual privileges.

    Do exercise
  2. 02
    Grant billing read access 2 training scenario

    Apply the principle of least privilege to a laboratory table. You must produce the result, check it on the source data and explain what it allows you to decide in this billing system.

    Do exercise
  3. 03
    Grant Logistics Playback Access 3 · Training Scenario

    Apply the principle of least privilege to a laboratory table. You must produce the result, check it on the source data and explain what it allows you to decide in this national expeditions.

    Do exercise
  4. 04
    Grant read access hr 4 · training scenario

    Apply the principle of least privilege to a laboratory table. You must produce the result, control it on the source data and explain what it allows you to decide in this human resources management.

    Do exercise
  5. 05
    Grant read access to audit 5 training scenario

    Apply the principle of least privilege to a laboratory table. You must produce the result, check it on the source data and explain what it allows you to decide in this audit log.

    Do exercise
  6. 06
    Create and maintain reliable views

    Check the nature and definition of the objects, not just a few rows returned.

    Do exercise
  7. 07
    Create a reusable view audit 5 training scenario

    Centralize a definition of active data without copying the query. You must produce the result, check it on the source data and explain what it allows you to decide in this audit log.

    Do exercise

Back to the full catalogue