`path-help` — 경로별 도움말 조회하기
path-help — 경로별 도움말 조회하기
vault path-help는 경로(path)에 대한 API 도움말을 가져오는 명령어예요. Vault의 모든 엔드포인트는 마크다운 형식의 내장 도움말을 제공해요. 여기에는 시스템 경로, 시크릿 엔진, 인증(auth) 방식이 모두 포함돼요.
도움말 시스템은 Vault의 다양한 기능을 배우는 가장 쉬운 방법이면서, 동시에 새로운 경로를 발견하게 해주는 통로예요.
path-help를 사용하기 전에 Vault의 "경로(path)" 개념을 이해하는 게 중요해요. 경로는 vault read, vault write 등에 넘기는 파라미터를 말해요. 예를 들면 secret/foo나 aws/config/root 같은 형태죠. 사용 가능한 경로는 활성화된 시크릿 엔진에 따라 달라져요. 그래서 어떤 경로가 지원되는지 찾을 때는 이 대화형 도움말이 꼭 필요한 도구예요.
지원되는 경로를 찾으려면 vault path-help PATH를 사용해요. 예를 들어 AWS 시크릿 엔진을 활성화했다면 vault path-help aws로 그 백엔드가 지원하는 경로를 볼 수 있어요. 경로는 정규표현식(regular expression)으로 표시되는데, 처음엔 읽기 어려워 보이지만 굉장히 정확해요.
출처: 문서
본문
예시 (Examples)
KV 시크릿 엔진의 도움말을 보려면 이렇게 해요:
$ vault path-help secret
## DESCRIPTION
The KV backend reads and writes arbitrary secrets to the backend.
The secrets are encrypted/decrypted by Vault: they are never stored
unencrypted in the backend and the backend never has an opportunity to
see the unencrypted value.
Leases can be set on a per-secret basis. These leases will be sent down
when that secret is read, and it is assumed that some outside process will
revoke and/or replace the secret at that path.
## PATHS
The following paths are supported by this backend. To view help for
any of the paths below, use the help command with any route matching
the path pattern. Note that depending on the policy of your auth token,
you may or may not be able to access certain paths.
^.*$
Pass-through secret storage to the storage backend, allowing you to
read/write arbitrary data into secret storage.
마음에 드는 경로를 찾았다면, 백엔드 도움말의 정규표현식 중 하나에 매칭되는 "경로"를 vault path-help <path>에 넣어 더 자세히 알아볼 수 있어요.
$ vault path-help secret/password
Request: password
Matching Route: ^.*$
Pass-through secret storage to the storage backend, allowing you to
read/write arbitrary data into secret storage.
## PARAMETERS
lease (string)
Lease time for this key when read. Ex: 1h
## DESCRIPTION
The pass-through backend reads and writes arbitrary data into secret storage,
encrypting it along the way.
A lease can be specified when writing with the "lease" field. If given, then
when the secret is read, Vault will report a lease with that duration. It
is expected that the consumer of this backend properly writes renewed keys
before the lease is up. In addition, revocation must be handled by the
user of this backend.
사용법 (Usage)
모든 명령어에 기본으로 포함된 표준 플래그 외에는 별도의 플래그가 없어요.
더 알아보기 (Learn more)
vault read— 데이터 조회vault write— 데이터 작성vault auth help— 인증 방식 도움말