k8s/EFK
EFK API Key 생성, 조회, 삭제하기
바리새인
2025. 1. 30. 15:00
생성
POST _security/api_key
{
"name": "{키 이름}",
"role_descriptors": {
"custom_role": {
"cluster": ["all"],
"index": [
{
"names": ["*"],
"privileges": ["read", "write"]
}
]
}
}
}
결과
{
"id": "{ID}",
"name": "{키 이름}",
"api_key": "{키값}",
"encoded": "{인코딩값}"
}
조회
GET _security/api_key
삭제
# 1개 삭제
DELETE _security/api_key
{
"id": "kEfPtZQBsgQes-7X0bVH"
}
# 여러개 삭제
DELETE _security/api_key
{
"ids": ["kEfPtZQBsgQes-7X0bVH","jkfItZQBsgQes-7XdbVH"]
}