alpacon token acl command

API 토큰의 명령어 ACL 규칙을 관리합니다. 토큰이 alpacon exec 또는 비대화형 alpacon websh SERVER "command"를 통해 실행할 수 있는 서버 측 셸 명령어를 설정합니다.

기본 거부: 토큰에 명령어 ACL이 없으면 모든 원격 명령어 실행이 거부됩니다.

alpacon token acl command [flags]
alpacon token acl command [command]

옵션 (Options)

  -h, --help   help for command

와일드카드 패턴

*를 와일드카드로 사용하여 임의의 인수를 매칭할 수 있습니다:

ACL 규칙매칭됨매칭 안 됨
whoamiwhoami (정확히 일치)whoami --help
echo *echo "hello", echo foo bar
systemctl status *systemctl status nginx, systemctl status appsystemctl restart nginx
docker compose *docker compose up -d, docker compose psdocker run nginx

예제

# allow exact command only
alpacon token acl command add my-api-token --command="whoami"
 
# allow any arguments with wildcard
alpacon token acl command add my-api-token --command="systemctl status *"
 
# list command ACL rules
alpacon token acl command ls my-api-token

관련 명령어

최종 수정: