0Pricing
Elasticsearch & Full Text Search Systems · 강의

사용자 인증과 역할

사용자 인증을 구성하고 역할을 만들며 권한을 할당하여 클러스터에 접근할 수 있는 사용자와 수행 가능한 작업을 제어합니다.

사용자 인증과 역할은(는) CoddyKit의 무료 Elasticsearch & Full Text Search Systems 강의입니다. 이것은 4개 중 1번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 Elasticsearch & Full Text Search Systems 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. Elasticsearch & Full Text Search Systems 강의에는 총 4개의 강의가 포함되어 있습니다.

이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.

Securing Your Search Data

Imagine your search engine holds sensitive customer data or internal documents. Without proper security, anyone could potentially access, modify, or delete it.

This lesson will show you how to protect your Elasticsearch cluster by controlling who can do what.

Elasticsearch Security Features

Elasticsearch's security features, part of what was formerly X-Pack, provide robust controls for your cluster. They include:

  • Authentication: Verifying user identities.
  • Authorization: Defining what authenticated users can do.
  • Encryption: Securing communication.

We'll focus on authentication and authorization in this lesson.

Activating Security Settings

To enable security, you need to configure your elasticsearch.yml file. This is typically done during the initial setup of your cluster.

Add the following line to enable security features in your configuration:

xpack.security.enabled: true

Built-in Administrator Users

When security is enabled, Elasticsearch creates several built-in users with predefined roles. The most important is the elastic user.

  • elastic: The superuser, with full administrative privileges. Use this for initial setup and critical operations.
  • kibana_system: Used by Kibana to connect to Elasticsearch.
  • logstash_system: Used by Logstash for monitoring.

You'll set passwords for these during the initial setup process.

Creating Your First User

Let's create a new user named dev_user. We'll use the Elasticsearch Users API, which allows you to manage users via REST calls.

This API call creates a user and sets their password. Remember to use strong, unique passwords!

PUT /_security/user/dev_user
{
  "password": "myStrongPassword123",
  "full_name": "Developer User",
  "email": "dev@example.com"
}

Defining User Permissions with Roles

In Elasticsearch, roles are central to authorization. A role is a collection of privileges that define what actions a user can perform.

  • Simplifies Management: Assign a role, not individual permissions, to users.
  • Granular Control: Roles can grant cluster-level and index-level privileges.
  • Cumulative: Users can have multiple roles, and their privileges are combined.

Common Predefined Roles

Elasticsearch comes with several useful built-in roles, providing common sets of permissions:

  • superuser: Grants all privileges across the cluster.
  • viewer: Can read data from all indices.
  • editor: Can read and write data to all indices.
  • kibana_user: Allows access to Kibana features.

These roles are great starting points, but often you'll need more specific control.

Crafting Custom Roles

Let's create a custom role called my_app_reader that can only read data from an index named my_application_data.

This role grants read and view_index_metadata privileges on a specific index. It also includes basic cluster monitoring privileges.

PUT /_security/role/my_app_reader
{
  "cluster": [
    "monitor",
    "read_ilm"
  ],
  "indices": [
    {
      "names": [ "my_application_data" ],
      "privileges": [ "read", "view_index_metadata" ]
    }
  ]
}

Assigning Roles to Users

Now that we have our dev_user and my_app_reader role, let's assign the role to the user. We'll update the dev_user to have this role.

Remember, users can be assigned multiple roles, inheriting all privileges from each one they possess.

PUT /_security/user/dev_user
{
  "password": "myStrongPassword123",
  "full_name": "Developer User",
  "email": "dev@example.com",
  "roles": [ "my_app_reader" ]
}

Understanding Roles & Privileges

Consider a user named analyst. This user has two roles assigned:

  • sales_reader: Grants read privilege on the sales_data index.
  • finance_writer: Grants read and write privileges on the finance_reports index.

Which of the following actions are permitted for the analyst user?

Recap: Secure Your Cluster

You've learned the fundamentals of Elasticsearch security!

  • We discussed why security is crucial for your data.
  • Explored how to enable security and identify built-in users.
  • Understood roles as collections of privileges.
  • Created custom users and roles using the Security API.
  • Assigned roles to users to control access.

Proper authentication and authorization are key to a secure and robust Elasticsearch deployment.

자주 묻는 질문

“사용자 인증과 역할” 강의는 무료인가요?

네 — “사용자 인증과 역할” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 Elasticsearch & Full Text Search Systems 강의 전체를 잠금 해제할 수 있습니다. Elasticsearch & Full Text Search Systems 강의에는 총 4개의 강의가 포함되어 있습니다.

“사용자 인증과 역할”에서 뭘 배우나요?

사용자 인증을 구성하고 역할을 만들며 권한을 할당하여 클러스터에 접근할 수 있는 사용자와 수행 가능한 작업을 제어합니다. 브라우저에서 직접 실행하는 실습 코드로 Elasticsearch & Full Text Search Systems을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.

Elasticsearch & Full Text Search Systems을(를) 시작하는 데 경험이 필요한가요?

사전 경험은 필요하지 않습니다. CoddyKit의 Elasticsearch & Full Text Search Systems은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 1번째 강의입니다.

“사용자 인증과 역할” 강의는 얼마나 걸리나요?

대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.

이 Elasticsearch & Full Text Search Systems 강의에서 코드를 작성하고 실행할 수 있나요?

네. 모든 Elasticsearch & Full Text Search Systems 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.

이 강의의 모든 강의

  1. 사용자 인증과 역할
  2. 필드 및 문서 수준 보안
  3. TLS/SSL과 네트워크 보안
  4. API 키 및 감사 로그 기록
← Elasticsearch & Full Text Search Systems(으)로 돌아가기