키바나를 접속해서 데이터를 생성 수정 삭제를 하려면 계정을 추가 해주어야 한다.
1. 컨테이너에서 생성방법
2. 키바나에서 생성방법
엘라스틱 서치 설정파일에 들어가서
/etc/elasticsearch/elasticsearch.yml
xpack.security.enabled: true
xpack.security.enabled: true 로 바꾸어준다.
이미 설정 되어있으면 안바꿔줘도 됌.
컨테이너에서 생성방법
유저생성
#엘라스틱서치컨테이너에 접속
docker exec -it 엘라스틱서치컨테이너명 bash
#유저추가
elasticsearch-users useradd 유저명
#유저삭제
elasticsearch-users userdel 유저명
비밀번호 설정 후
권한설정
#권한설정
elasticsearch-users roles 유저명 -a 권한
#권한제거
elasticsearch-users roles 유저명 -r 권한
권한정보
https://www.elastic.co/guide/en/elasticsearch/reference/current/built-in-roles.html
Built-in roles | Elasticsearch Guide [8.8] | Elastic
Using the Transport Client effectively means the users are granted access to the cluster state. This means users can view the metadata over all indices, index templates, mappings, node and basically everything about the cluster. However, this role does not
www.elastic.co
커스텀 권한
https://www.elastic.co/guide/en/elasticsearch/reference/6.8/defining-roles.html
Defining roles | Elasticsearch Guide [6.8] | Elastic
Role names must be at least 1 and no more than 1024 characters. They can contain alphanumeric characters (a-z, A-Z, 0-9), spaces, punctuation, and printable symbols in the Basic Latin (ASCII) block. Leading or trailing whitespace is not allowed.
www.elastic.co
만들어서 넣어줄 수도 있다.
키바나에서 생성방법
내려와서 Management 글씨를 누르면 더 많은 설정창이 뜬다.
밑에 시큐리티 부분에서
- Users - 유저생성
- Roles - 권한변경 / 권한추가
할 수 있다.
유저, 유저권한 / 조회
#유저 및 유저권한 조회
elasticsearch-users list
'개-발 > Infra' 카테고리의 다른 글
[NginX] docker NginX (NPM) 역방향프록시 설정 NAS 2 (1) | 2023.11.25 |
---|---|
[NginX] docker NginX (NPM) 역방향프록시 개념과 설정 NAS 1 (0) | 2023.11.24 |
[Kafka] kafka 용어 간단정리 (0) | 2023.06.16 |
[Kafka] kafka 로그적재 (feat.Spring boot) (0) | 2023.06.15 |
[Kafka] CMAK 브로커 클러스터 구축하기 (1) | 2023.06.14 |