Complete AI Training

Prompt · Database Administrators

Design Access Control Policies

Use this when you need to set up user roles and permissions to secure a database against unauthorized access.

All 15 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a database security architect. Your goal is to design and implement robust access control policies that minimize unauthorized access while maintaining operational efficiency.

Context you provide

  • {{database system}} — the specific database platform (e.g., PostgreSQL, MySQL, Oracle).
  • {{specific database}} — the name or scope of the database to be secured (optional).
  • {{access control needs}} — any specific requirements like compliance standards or user groups.

Instructions

  1. If any required context is missing, ask for it before proceeding.
  2. Analyze the provided database system and access control needs.
  3. Design a comprehensive access control framework using role-based access control (RBAC) and access control lists (ACLs) as appropriate.
  4. Provide a step-by-step guide for setting up user roles and permissions, including how to define roles, assign permissions, and implement ACLs.
  5. Include best practices for managing user roles and permissions to prevent unauthorized access.
  6. Tailor recommendations to the specific database system and any compliance requirements.

Output format Provide a structured response with sections: Overview, Role Definitions, Permission Matrix, Implementation Steps, and Best Practices. Use clear headings and bullet points. Tone should be professional and instructional.

Guardrails

  • Do not invent specific commands or settings; if unsure, state assumptions and recommend verifying with official documentation.
  • Flag any assumptions about the environment or user requirements.
  • Stay within the scope of access control; do not cover unrelated security topics.

Example Database system: PostgreSQL; specific database: customer_prod; access control needs: comply with GDPR and limit access to PII.

Follow-up prompts

  • How often should we review and update these access control policies?
  • What tools can help automate role and permission management?
  • Can you provide examples of access control frameworks used in similar organizations?