AI 에이전트의 경우: 문서 인덱스는 https://www.mongodb.com/ko-kr/docs/llms.txt에서 사용할 수 있으며, 모든 페이지의 마크다운 버전은 어떤 URL 경로에 .md를 추가하여 사용할 수 있습니다.
Docs Menu

connectionStatus(데이터베이스 명령)

connectionStatus

현재 연결에 대한 정보, 특히 인증된 사용자의 상태와 사용 가능한 권한을 반환합니다.

이 명령은 다음 환경에서 호스팅되는 배포에서 사용할 수 있습니다.

  • MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud

참고

This command is supported in all MongoDB Atlas clusters. For information on Atlas support for all commands, see Unsupported Commands.

명령은 다음과 같은 구문을 가집니다:

db.runCommand(
{
connectionStatus: 1,
showPrivileges: <boolean>
}
)

connectionStatus 다음과 같은 선택적 필드를 지원합니다.

필드
유형
설명

showPrivileges

부울

Optional. Set showPrivileges to true to instruct connectionStatus to return the full set of privileges that currently-authenticated users possess.

기본적으로 이 필드는 false입니다.

To run connectionStatus use the db.runCommand() method, as in the following:

db.runCommand( { connectionStatus: 1, showPrivileges: true } )
connectionStatus.authInfo

사용자 및 사용 가능한 권한을 포함하여 현재 연결의 인증 상태에 대한 데이터가 포함된 문서입니다.

connectionStatus.authinfo.authenticatedUsers

인증된 각 사용자에 대한 문서가 포함된 배열입니다.

connectionStatus.authInfo.authenticatedUsers[n].user

사용자의 이름입니다.

connectionStatus.authInfo.authenticatedUsers[n].db

사용자의 자격 증명과 연결된 데이터베이스입니다.

connectionStatus.authinfo.authenticatedUserRoles

현재 연결에 부여된 각 역할에 대한 문서가 있는 배열입니다.

connectionStatus.authinfo.authenticatedUserRoles[n].role

현재 인증된 사용자와 연관된 현재 역할의 정의입니다. 자세한 내용은 기본 제공 역할 및 권한 작업을 참조하세요.

connectionStatus.authinfo.authenticatedUserRoles[n].db

The database to which role applies.

connectionStatus.authInfo.authenticatedUserPrivileges

현재 연결에 부여된 조치를 설명하는 문서가 리소스별로 그룹화된 배열입니다.

connectionStatus.authInfo.authenticatedUserPrivileges[n].resource

A document describing the database and, if applicable, collection to which connectionStatus.authInfo.authenticatedUserPrivileges[n].actions applies.

connectionStatus.authInfo.authenticatedUserPrivileges[n].actions

지정된 리소스에 대해 연결이 access할 수 있는 권한 조치를 나열하는 배열입니다.

connectionStatus.authInfo.UUID

현재 연결된 클라이언트 의 UUID입니다.

connectionStatus.ok

명령의 반환 값입니다. 값이 1이면 성공입니다.

이 페이지 평가하기

이 페이지의 내용