Get Distinguished Names API
출처: 문서
본문
Distinguished Names 조회 API
1.0부터 도입됨 {: .label .label-purple }
allow list에 있는 distinguished name을 조회해요. 클러스터 이름을 지정하면 특정 클러스터나 노드의 distinguished name을 조회할 수 있고, 클러스터 이름을 생략하면 모든 클러스터와 노드의 distinguished name을 조회해요.
이 API는 superadmin 전용이에요. 사용자 이름과 비밀번호 대신 admin 인증서로 인증하세요. 자세한 내용은 API 접근 제어를 참고하세요. {: .note}
엔드포인트
GET /_plugins/_security/api/nodesdn
GET /_plugins/_security/api/nodesdn/{cluster_name}
경로 파라미터
사용 가능한 경로 파라미터는 다음 표에서 확인할 수 있어요.
| 파라미터 | 데이터 타입 | 필수 여부 | 설명 |
|---|---|---|---|
cluster_name |
String | No | 노드 distinguished name을 조회하려는 클러스터의 이름이에요. 생략하면 모든 클러스터와 노드의 distinguished name이 반환돼요. |
쿼리 파라미터
사용 가능한 쿼리 파라미터는 다음 표에서 확인할 수 있어요. 모든 쿼리 파라미터는 선택 사항이에요.
| 파라미터 | 데이터 타입 | 설명 |
|---|---|---|
show_all |
Boolean | 응답에 정적으로 구성된 노드 distinguished name을 포함할지 여부예요. |
요청 예제
다음 요청은 모든 클러스터와 노드의 distinguished name을 조회해요:
GET _plugins/_security/api/nodesdn
{% include copy-curl.html security=true %}
다음 요청은 cluster3 클러스터의 distinguished name을 조회해요:
GET _plugins/_security/api/nodesdn/cluster3
{% include copy-curl.html security=true %}
응답 예제
모든 클러스터와 노드를 대상으로 한 요청의 응답에는 클러스터마다 항목이 하나씩 포함돼요:
{
"cluster1": {
"nodes_dn": [
"CN=cluster1.example.com"
]
}
}
한 클러스터의 distinguished name을 조회하면 응답에 해당 클러스터만 포함돼요:
{
"cluster3": {
"nodes_dn": [
"CN=cluster3.example.com"
]
}
}