Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Sichere ProgrammierungBreeze TTS 2 vs ElevenLabs: Open Source TTS Verdict(23.09.2026 um 05:44 Uhr)
Sichere ProgrammierungAgentic AI vs Generative AI: The 2026 Verdict(23.09.2026 um 05:44 Uhr)
Sichere ProgrammierungI made my agent prove every quote against the source document(23.09.2026 um 05:45 Uhr)
Sichere Programmierung8mb.video Alternative: Skip the Line, Skip the Upsell(23.09.2026 um 05:47 Uhr)
Sichere ProgrammierungBuilding a GTA 6 JSON API for entities and current status(23.09.2026 um 05:52 Uhr)
Sichere ProgrammierungEvery filter needs a documented exception(23.09.2026 um 06:01 Uhr)
Sichere ProgrammierungBreeze TTS 2 vs ElevenLabs: Open Source TTS Verdict(23.09.2026 um 05:44 Uhr)
Sichere ProgrammierungAgentic AI vs Generative AI: The 2026 Verdict(23.09.2026 um 05:44 Uhr)
Sichere ProgrammierungI made my agent prove every quote against the source document(23.09.2026 um 05:45 Uhr)
Sichere Programmierung8mb.video Alternative: Skip the Line, Skip the Upsell(23.09.2026 um 05:47 Uhr)
Sichere ProgrammierungBuilding a GTA 6 JSON API for entities and current status(23.09.2026 um 05:52 Uhr)
Sichere ProgrammierungEvery filter needs a documented exception(23.09.2026 um 06:01 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Users, Roles and Groups in SQL - CA33

My Thinking and Approach Introduction In this task, I worked with roles and permissions in SQL using the dvdrental database. The goal was to control access to different tables by creating roles, assigning privileges, and…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!




My Thinking and Approach









Introduction



In this task, I worked with roles and permissions in SQL using the dvdrental database. The goal was to control access to different tables by creating roles, assigning privileges, and managing user groups.



This helped me understand how database security works in real-world applications.









Problem Statement




  • Create roles with limited access

  • Grant and revoke permissions

  • Restrict access to specific columns

  • Manage users using groups









My Initial Thought



At first, I thought:




  • Roles are just users

  • Permissions are simple



But I realized:




  • Roles control access at different levels

  • Permissions can be very specific

  • Security is very important in databases









Key Observation




  • GRANT is used to give permissions

  • REVOKE is used to remove permissions

  • Roles can be grouped for easier management

  • Column-level access is possible









Solutions






Task 1: Create report_user with access to film table






CREATE ROLE report_user WITH LOGIN PASSWORD 'password';

GRANT SELECT ON film TO report_user;






Explanation:




  • Creates a login role

  • Allows only read access to film table









Task 2: Fix access to customer table






GRANT SELECT ON customer TO report_user;






Explanation:




  • Grants permission to read customer table









Task 3: Restrict columns in customer table






REVOKE SELECT ON customer FROM report_user;

GRANT SELECT (customer_id, first_name, last_name) ON customer TO report_user;






Explanation:




  • Removes full access

  • Grants access only to specific columns









Task 4: Create support_user with limited permissions






CREATE ROLE support_user WITH LOGIN PASSWORD 'password';

GRANT SELECT ON customer TO support_user;

GRANT UPDATE (email) ON customer TO support_user;






Explanation:




  • Can view customer data

  • Can update only email column

  • No DELETE permission given









Task 5: Remove film access from report_user






REVOKE SELECT ON film FROM report_user;






Explanation:




  • Removes access to film table









Task 6: Create readonly_group






CREATE ROLE readonly_group;

GRANT SELECT ON ALL TABLES IN SCHEMA public TO readonly_group;






Explanation:




  • Group with read-only access

  • Applies to all tables









Task 7: Create users and assign to group






CREATE ROLE analyst1 WITH LOGIN PASSWORD 'password';
CREATE ROLE analyst2 WITH LOGIN PASSWORD 'password';

GRANT readonly_group TO analyst1;
GRANT readonly_group TO analyst2;






Explanation:




  • Creates two users

  • Adds them to readonly group









Final Understanding




  • Roles help in managing permissions efficiently

  • Access can be controlled at table and column level

  • Groups simplify permission management for multiple users









Conclusion



This task helped me understand how to manage users, roles, and permissions in a database. It showed how important access control is for maintaining data security and integrity.

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Users, Roles and Groups in SQL - CA33

Thematisch verwandte Begriffe: Users, Roles, Groups, CA33 · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-18163 | IBM Financial Transaction Manager (FTM) for RedHat OpenShift could allow…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick