Neo4j Graph Database Fundamentals · レッスン

ユーザー管理とロール

Neo4j内でユーザーを作成・管理し、ロールを割り当て、カスタムアクセス権限を定義する方法を学びます。

レッスン 1/411 ステップ

「ユーザー管理とロール」はCoddyKit上の無料Neo4j Graph Database Fundamentalsレッスンです。 これはレッスン1/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これは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.

無料で開始

AI チューターと学ぶ Neo4j Graph Database Fundamentals — 無料

ブラウザでリアルコードを書いて実行し、24/7 の AI チューターから瞬時にサポートを受け、ウェブまたはアプリで続きから学習できます。

コース
12
レッスン
48

よくある質問

「ユーザー管理とロール」レッスンは無料ですか?

はい。「ユーザー管理とロール」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、Neo4j Graph Database Fundamentalsコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 Neo4j Graph Database Fundamentalsコースには全4レッスンが含まれています。

「ユーザー管理とロール」で何を学びますか?

Neo4j内でユーザーを作成・管理し、ロールを割り当て、カスタムアクセス権限を定義する方法を学びます。 ブラウザで直接実行するハンズオンコードでNeo4j Graph Database Fundamentalsを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。

Neo4j Graph Database Fundamentalsを始めるのに経験は必要ですか?

事前経験は必要ありません。CoddyKitのNeo4j Graph Database Fundamentalsは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン1/4です。

「ユーザー管理とロール」レッスンにはどのくらい時間がかかりますか?

ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。

このNeo4j Graph Database Fundamentalsレッスンでコードを書いて実行できますか?

はい。すべてのNeo4j Graph Database Fundamentalsレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。

このコースのすべてのレッスン

  1. ユーザー管理とロール
  2. 認証と認可
  3. Neo4jデプロイメントのセキュリティ確保
  4. きめ細かなアクセス制御と監査
← Neo4j Graph Database Fundamentalsに戻る