콘솔의 API 플레이그라운드 또는 GraphQL-over-HTTP API를 사용하여 Panther의 API를 호출할 수 있습니다. 이러한 방법에 대한 자세한 내용은 Panther API.
아래 섹션에서 핵심 사용자 및 역할 관리 작업에 대한 GraphQL 쿼리, 뮤테이션 및 엔드투엔드 워크플로 예제를 확인하세요.
일반적인 사용자 및 역할 관리 작업
아래는 Panther에서 가장 일반적인 GraphQL 사용자 및 역할 관리 작업의 일부입니다. 이 예제들은 GraphQL 클라이언트(또는)로 전송해야 하는 문서를 보여줍니다. curl)을 사용하여 Panther의 GraphQL API를 호출하기 위해 전송해야 하는 문서를 보여줍니다.
참고: createdAt 필드는 ISO 8601 날짜 및 시간 표준입니다.
사용자 목록 조회
사용자 조회
새 사용자 초대
사용자 업데이트
사용자 삭제
역할 목록 조회
역할 조회
새 역할 생성
참고: 권한 UserModify 는 Panther 플랫폼에 대한 전체 관리자 액세스를 제공합니다. 새 역할에 이 권한을 부여할 때 신중하게 결정하세요.
역할 업데이트
참고: updateRole 입력의 권한에는 모든 역할에 대한 원하는 권한이 포함되어야 합니다.
mutation deleteUser{
deleteUser(input: {
id: "8h81hfh-ij828db"
})
{
id # 삭제 작업은 `user` 객체를 반환하지 않습니다; ID만 반환됩니다
}
}
query roles {
roles(
# 이 입력은 선택 사항입니다. 입력이 없으면 쿼리는 모든 역할을 반환합니다.
input: {
nameContains: "admin",
sortDir: ascending
})
{
createdAt
id
이름
권한
updatedAt
updatedBy {
... on User {
email
id
}
... on APIToken {
id
이름
}
}
# RBAC 로그 유형별 설정이 활성화된 경우에만 사용됩니다
logTypeAccess
logTypeAccessKind
}
}
query adminRole {
roleByName(
name: "admin"
) {
createdAt
id
이름
권한
updatedAt
updatedBy {
... on User {
email
id
}
... on APIToken {
id
이름
}
}
# RBAC 로그 유형별 설정이 활성화된 경우에만 사용됩니다
logTypeAccess
logTypeAccessKind
}
}
query adminRole {
roleById(
id: "feeafade-c545"
) {
createdAt
id
logTypeAccess
logTypeAccessKind
이름
권한
updatedAt
updatedBy {
... on User {
email
id
}
... on APIToken {
id
이름
}
}
# RBAC 로그 유형별 설정이 활성화된 경우에만 사용됩니다
logTypeAccess
logTypeAccessKind
}
}
mutation createRole {
createRole(input: {
name: "new-role"
permissions: [
UserRead
AlertRead
]
})
{
role {
이름
id
권한
}
}
}
mutation createRole {
createRole(input: {
name: "new-role"
permissions: [
UserRead
AlertRead
]
# RBAC 로그 유형별 기능이 활성화된 경우에만 사용됩니다
logTypeAccess:["AWS.ALB"]
logTypeAccessKind: ALLOW
})
{
role {
이름
id
권한
logTypeAccess
logTypeAccessKind
}
}
}
mutation updateRole {
updateRole(input: {
id: "fea8sje-92jdnhc"
name: "updated-role-name"
permissions: [
UserRead
AlertRead
AlertModify
]
})
{
role {
이름
id
권한
}
}
}
mutation updateRole {
updateRole(input: {
id: "fea8sje-92jdnhc"
name: "updated-role-name"
permissions: [
UserRead
AlertRead
AlertModify
]
# RBAC 로그 유형별 기능이 활성화된 경우에만 사용됩니다
logTypeAccess:["AWS.ALB"]
logTypeAccessKind: DENY
})
{
role {
이름
id
권한
logTypeAccess
logTypeAccessKind
}
}
}