0Pricing
Elasticsearch & Full Text Search Systems · 강의

API 키 및 감사 로그 기록

비밀번호 대신 범위가 지정된 API 키로 프로그래밍 방식의 접근을 보호하고, Elasticsearch 감사 로그를 활성화하고 읽어 누가 무엇을 했는지 입증하는 방법을 익혀 보세요.

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

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

Beyond Passwords

Applications should not authenticate with a human's username and password. Elasticsearch provides API keys: scoped, revocable credentials ideal for services. Pair them with audit logging to track every security-relevant action.

What Is an API Key

An API key is a credential tied to a set of permissions, with an optional expiration. It can be limited to a subset of the creating user's privileges, following the principle of least privilege.

Creating a Key

Use the create API key endpoint. The response includes an id and api_key value shown only once, so store it securely.

POST /_security/api_key
{
  "name": "logging-app",
  "expiration": "30d"
}

Restricting a Key

Attach role_descriptors to limit what the key can do, even if the creating user has more power. Here the key may only read one index.

POST /_security/api_key
{
  "name": "reader",
  "role_descriptors": {
    "ro": {
      "indices": [{ "names": ["logs-*"], "privileges": ["read"] }]
    }
  }
}

Using a Key

Send the base64-encoded id:api_key pair in the Authorization header with the ApiKey scheme.

GET /logs-2024/_search
Authorization: ApiKey VnVhQ2ZHY0JDZGJrU...

Revoking Keys

Compromised or retired keys are invalidated immediately, without changing any user's password. You can revoke by id, by name, or all keys owned by a user.

DELETE /_security/api_key
{
  "name": "logging-app"
}

Why Audit Logging

Audit logs answer the compliance question: who did what, when, and from where. They record authentication attempts, access grants and denials, and configuration changes.

Enabling the Audit Log

Audit logging is turned on in elasticsearch.yml. It is disabled by default because it generates significant volume.

xpack.security.audit.enabled: true

Filtering Events

Tune which events are captured with include/exclude lists to avoid drowning in noise. Common choices keep access_denied and authentication_failed while dropping routine reads.

xpack.security.audit.logfile.events.exclude: [ access_granted ]

Reading Audit Output

Audit events are written as structured JSON to a dedicated log file. Each line includes the event type, user, client IP, request path, and outcome, making it easy to ship into Kibana for analysis.

Best Practices

Rotate API keys regularly, scope them tightly, store the audit log on durable storage separate from the cluster, and alert on repeated authentication_failed events that may signal an attack.

Quick Check

Test your understanding of API keys.

Recap

You learned to secure access and accountability:

  • API keys are scoped, expiring, revocable credentials for applications.
  • Use role_descriptors to enforce least privilege.
  • Audit logging records who did what, when, and from where.
  • Filter audit events to manage volume and alert on failed authentications.

자주 묻는 질문

“API 키 및 감사 로그 기록” 강의는 무료인가요?

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

“API 키 및 감사 로그 기록”에서 뭘 배우나요?

비밀번호 대신 범위가 지정된 API 키로 프로그래밍 방식의 접근을 보호하고, Elasticsearch 감사 로그를 활성화하고 읽어 누가 무엇을 했는지 입증하는 방법을 익혀 보세요. 브라우저에서 직접 실행하는 실습 코드로 Elasticsearch & Full Text Search Systems을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.

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

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

“API 키 및 감사 로그 기록” 강의는 얼마나 걸리나요?

대부분의 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(으)로 돌아가기