Neo4j Graph Database Fundamentals · บทเรียน

การจัดการผู้ใช้และบทบาท

เรียนรู้การสร้างและจัดการผู้ใช้ กำหนดบทบาท และกำหนดสิทธิ์การเข้าถึงแบบกำหนดเองภายใน Neo4j

บทเรียน 1 จาก 411 ขั้นตอน

การจัดการผู้ใช้และบทบาท เป็นบทเรียน Neo4j Graph Database Fundamentals ฟรีบน CoddyKit นี่คือบทเรียนที่ 1 จากทั้งหมด 4 บทเรียน คุณสามารถอ่านบทเรียนทั้งหมดด้านล่างฟรี — จากนั้นลองปฏิบัติด้วยตัวคุณเองในเบราว์เซอร์พร้อมตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7 บทเรียนนี้เป็นส่วนหนึ่งของเส้นทางการเรียน Neo4j Graph Database Fundamentals และความก้าวหน้าของคุณจะซิงค์ข้ามเว็บและแอป CoddyKit คอร์ส Neo4j Graph Database Fundamentals มีบทเรียนทั้งหมด 4 บทเรียน

บางส่วนของบทเรียนนี้ยังไม่ได้รับการแปล และแสดงเป็นภาษาอังกฤษ

Secure Your Graph Data

Welcome to securing your Neo4j database! Just like any valuable asset, your graph data needs protection.

This lesson introduces the essential steps to manage who can access and modify your Neo4j database.

Control Access to Your Data

Why bother with user management? Imagine a bank vault without proper access control – chaos!

  • Security: Prevent unauthorized access.
  • Accountability: Track who does what.
  • Compliance: Meet regulatory requirements.

It's about making sure only the right people have the right permissions.

AuthN vs. AuthZ

These terms are often confused, but they're distinct:

  • Authentication (AuthN): Who are you? This verifies a user's identity (e.g., username and password).
  • Authorization (AuthZ): What can you do? This determines what actions an authenticated user is allowed to perform.

First, we prove who we are (AuthN), then the system decides what we can do (AuthZ).

Meet the Default Admin

When you first install Neo4j, a default administrative user named neo4j is created.

  • It has full administrative privileges.
  • The initial password is also neo4j.
  • Important: Always change this default password immediately after installation for security!

This user is your entry point to managing the database.

Adding New Users

To add new individuals or applications to your database, you'll create new user accounts.

Each user needs a unique username and a strong password. This ensures proper authentication before any actions are taken.

Let's see how to do this using Cypher, Neo4j's query language.

Creating Users with Cypher

The CREATE USER command is straightforward. Remember to choose a secure password!

Try running this example in your Neo4j Browser or cypher-shell:

CREATE USER 'alice' SET PASSWORD 'securePassword123';

Changing Passwords

Passwords should be changed regularly, and users might forget them. Neo4j provides commands to manage user passwords.

  • Change your own password: ALTER CURRENT USER SET PASSWORD 'newPassword';
  • Change another user's password (admin only): ALTER USER 'alice' SET PASSWORD 'anotherNewPass';

Always use strong, unique passwords!

What are Roles?

Roles are collections of privileges that can be assigned to users. Instead of giving individual permissions to each user, you assign them a role.

Neo4j comes with several built-in roles, such as:

  • admin: Full administrative access.
  • architect: Can create/manage schema (nodes, relationships, properties).
  • publisher: Can write data.
  • reader: Can only read data.

This simplifies managing permissions across many users.

Granting Roles

Once you've created users and understand roles, the next step is to grant specific roles to users. A user can have multiple roles.

Use the GRANT ROLE command to assign roles. To remove a role, use REVOKE ROLE.

Let's grant our new user 'alice' the 'reader' role:

GRANT ROLE reader TO alice;

Check Your Understanding

You've learned how to create users and assign roles. Let's test your knowledge!

Lesson Summary

Great job! In this lesson, we covered the fundamentals of user management and roles in Neo4j:

  • The importance of authentication and authorization.
  • How to create new users using CREATE USER.
  • Managing user passwords with ALTER USER.
  • Understanding built-in roles like admin, reader, and publisher.
  • Assigning roles to users with GRANT ROLE.

This knowledge is crucial for securing your graph database! Next, we'll dive deeper into defining custom access privileges.

เริ่มต้นได้ฟรี

เรียนรู้ Neo4j Graph Database Fundamentals ด้วย AI tutor — ฟรี

เขียนและเรียกใช้โค้ดจริงในเบราว์เซอร์ของคุณ รับความช่วยเหลือทันทีจาก AI tutor 24/7 และเรียนรู้ต่อจากที่คุณหยุดบนเว็บหรือในแอป

คอร์ส
12
บทเรียน
48

คำถามที่พบบ่อย

บทเรียน “การจัดการผู้ใช้และบทบาท” ฟรีหรือไม่

ใช่ — ข้อความเต็มของ “การจัดการผู้ใช้และบทบาท” ฟรีให้อ่านที่นี่บนเว็บ เพื่อปฏิบัติแบบโต้ตอบ (ตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7) และปลดล็อคส่วนที่เหลือของคอร์ส Neo4j Graph Database Fundamentals ให้อัปเกรดเป็น CoddyKit PRO คอร์ส Neo4j Graph Database Fundamentals มีบทเรียนทั้งหมด 4 บทเรียน

คุณจะเรียนรู้อะไรในบทเรียน “การจัดการผู้ใช้และบทบาท”

เรียนรู้การสร้างและจัดการผู้ใช้ กำหนดบทบาท และกำหนดสิทธิ์การเข้าถึงแบบกำหนดเองภายใน Neo4j คุณปฏิบัติ Neo4j Graph Database Fundamentals ด้วยโค้ดที่ใช้งานได้จริงที่คุณเรียกใช้โดยตรงในเบราว์เซอร์ และติวเตอร์ AI ตลอด 24/7 ตอบคำถามของคุณขณะที่คุณไปผ่านบทเรียน

คุณต้องมีประสบการณ์ก่อนที่จะเริ่มเรียน Neo4j Graph Database Fundamentals หรือไม่

ไม่จำเป็นต้องมีประสบการณ์มาก่อน Neo4j Graph Database Fundamentals บน CoddyKit ออกแบบมาสำหรับผู้เริ่มต้นไปจนถึงผู้เรียนขั้นสูง คุณสามารถเริ่มต้นที่นี่หรือเริ่มจากตัวแรกและเรียนด้วยความเร็วของคุณเอง นี่คือบทเรียนที่ 1 จากทั้งหมด 4 บทเรียน

บทเรียน “การจัดการผู้ใช้และบทบาท” ใช้เวลานานแค่ไหน

บทเรียน CoddyKit ส่วนใหญ่ใช้เวลาประมาณ 5–10 นาที แต่ละบทเรียนจึงสั้นและเป็นแบบโต้ตอบ คุณสามารถก้าวหน้าอย่างต่อเนื่องและกลับมาเรียนต่อจากตรงที่เพิ่งหยุดบนเว็บและแอปได้เลย

ฉันเขียนและรันโค้ดในบทเรียน Neo4j Graph Database Fundamentals นี้ได้ไหม

ได้ บทเรียน Neo4j Graph Database Fundamentals ทุกบทมีตัวแก้ไขโค้ดในตัว คุณจึงเขียนและรันโค้ดจริงได้เลยในเบราว์เซอร์ และได้รับข้อเสนอแนะจาก AI ในทันที — ไม่ต้องติดตั้งในเครื่องของคุณ

บทเรียนทั้งหมดในหลักสูตรนี้

  1. การจัดการผู้ใช้และบทบาท
  2. การยืนยันตัวตนและการอนุญาต
  3. การรักษาความปลอดภัยในการติดตั้งใช้งาน Neo4j
  4. การควบคุมการเข้าถึงแบบละเอียดและการตรวจสอบย้อนหลัง
← กลับไปที่ Neo4j Graph Database Fundamentals