Get All Certificates API
출처: 문서
본문
Get All Certificates API
Introduced 2.15 {: .label .label-purple }
클러스터의 모든 노드에서 사용 중인 인증서를 노드별로 검색해요. 하나의 노드에서 사용 중인 인증서를 검색하려면 Get Node Certificates API를 사용해요.
이 API는 슈퍼관리자용이에요. 사용자 이름과 비밀번호 대신 관리자 인증서로 인증해요. 자세한 내용은 Access control for the API를 참조해요. {: .note}
엔드포인트
GET /_plugins/_security/api/certificates
쿼리 매개변수
다음 표는 사용 가능한 쿼리 매개변수를 나열해요. 모든 쿼리 매개변수는 선택사항이에요.
| 매개변수 | 데이터 타입 | 설명 |
|---|---|---|
cert_type |
String | 모든 노드에서 검색할 인증서 유형(HTTP, TRANSPORT, 또는 ALL)이에요. |
timeout |
String | 시간 초과 전에 모든 노드에서 인증서를 검색하는 데 소비할 최대 시간(초)이에요. |
요청 예시
GET _plugins/_security/api/certificates
{% include copy-curl.html security=true %}
응답 예시
응답은 여기서 간략하게 표시했어요:
{
"_nodes": {
"total": 1,
"successful": 1,
"failed": 0
},
"cluster_name": "opensearch-cluster",
"nodes": {
"DOlaf_0NSe-HkUXbca8-xA": {
"name": "opensearch-node1",
"certificates": {
"http": [
{
"format": "pem",
"alias": null,
"subject_dn": "CN=Example Com Inc. Root CA,OU=Example Com Inc. Root CA,O=Example Com Inc.,DC=example,DC=com",
"san": "",
"serial_number": "76447790750572770562330390669309351583040514274",
"issuer_dn": "CN=Example Com Inc. Root CA,OU=Example Com Inc. Root CA,O=Example Com Inc.,DC=example,DC=com",
"has_private_key": false,
"not_after": "2034-02-17T17:00:36Z",
"not_before": "2034-02-17T17:00:36Z"
},
{
"format": "pem",
"alias": null,
"subject_dn": "CN=node-0.example.com,OU=node,O=node,L=test,C=de",
"san": "[[2, localhost], [2, node-0.example.com], [7, 0:0:0:0:0:0:0:1], [7, 127.0.0.1], [8, 1.2.3.4.5.5]]",
"serial_number": "602402108696974692907516685054550755684962846902",
"issuer_dn": "CN=Example Com Inc. Root CA,OU=Example Com Inc. Root CA,O=Example Com Inc.,DC=example,DC=com",
"has_private_key": true,
"not_after": "2034-02-17T17:03:25Z",
"not_before": "2034-02-17T17:03:25Z"
}
],
"transport": [ ... ],
"transport_client": [ ... ]
}
}
}
}
응답 본문 필드
응답 본문은 다음 필드가 포함된 JSON 객체예요.
| 필드 | 데이터 타입 | 설명 |
|---|---|---|
_nodes |
Object | 요청이 도달한 노드 수와 성공 및 실패한 노드 수예요. |
cluster_name |
String | 클러스터 이름이에요. |
nodes |
Object | 각 노드의 인증서로, 노드 ID를 키로 사용해요. |
nodes.<node_id>.name |
String | 노드 이름이에요. |
nodes.<node_id>.certificates |
Object | 노드의 인증서로, http, transport, transport_client 목록으로 그룹화되어 있어요. |
각 인증서에는 다음 필드가 포함되어 있어요.
| 필드 | 데이터 타입 | 설명 |
|---|---|---|
format |
String | 인증서 형식(예: pem)이에요. |
alias |
String | 키스토어에서 인증서의 별칭이에요. 별칭이 없으면 null이에요. |
subject_dn |
String | 인증서 주체의 고유 이름이에요. |
issuer_dn |
String | 인증서를 발급한 인증 기관의 고유 이름이에요. |
san |
String | 인증서의 주체 대체 이름이에요. |
serial_number |
String | 인증서의 일련번호예요. |
has_private_key |
Boolean | 노드가 인증서의 개인 키를 보유하고 있는지 여부예요. |
not_before |
String | 인증서가 유효해지는 날짜와 시간이에요. |
not_after |
String | 인증서가 만료되는 날짜와 시간이에요. |