Learn the "why" behind slow queries and how to fix them in our 2-Part Webinar.
Register now >
Docs Menu
Docs Home
/ /

사용자 권한

mongosync 연결 문자열 에 지정된 사용자는 소스 및 대상 클러스터에 대한 필수 권한이 있어야 합니다. 권한은 환경과 쓰기 차단 설정을 수정하려는지 또는 역 동기화 사용하려는지 여부에 따라 달라집니다.

자체 managed 권한은 다음과 같습니다.

동기화 유형
필수 소스 권한
필수 대상 권한

기본값

  • backup

  • clusterMonitor

  • readAnyDatabase

이중 쓰기 차단

반전

다중 반전

서버 역할에 대한 자세한 내용 은 자체 관리 배포서버의 역할 기반 액세스 제어를 참조하세요.

사용자 권한을 업데이트 하려면 grantRolesToUser 를 참조하세요.

Atlas 권한은 다음과 같습니다.

동기화 유형
필수 소스 권한
필수 대상 권한

기본값

  • atlasAdmin

이중 쓰기 차단, 반전 또는 다중 반전

Atlas 역할에 대한 자세한 내용은 Atlas user 역할을 참조하세요.

Atlas user 권한을 업데이트 하려면 프로젝트에 대한 액세스 관리를 참조하세요.

참고

최소 권한은 mongosync 버전에 따라 변경될 수 있습니다.

최소 소스 권한은 다음과 같습니다.

동기화 유형
최소 소스 권한

기본값

[
{
"resource": { "cluster": true },
"actions": [
"appendOplogNote",
"getDefaultRWConcern",
"getShardMap",
"hostInfo",
"listDatabases",
"listShards",
"replSetGetConfig",
"replSetGetStatus",
"serverStatus"
]
},
{
"resource": { "db": "", "collection": "" },
"actions": [
"changeStream",
"collStats",
"find",
"indexStats",
"listCollections",
"listIndexes"
]
},
{
"resource": { "db": "admin", "collection": "system.version" },
"actions": [ "find" ]
},
{
"resource": { "db": "", "collection": "system.js" },
"actions": [ "listCollections", "listIndexes" ]
},
{
"resource": { "db": "config", "collection": "shards" },
"actions": [ "find" ]
},
{
"resource": { "db": "config", "collection": "collections" },
"actions": [ "find" ]
},
{
"resource": { "db": "config", "collection": "version" },
"actions": [ "find" ]
},
{
"resource": { "db": "config", "collection": "settings" },
"actions": [ "find", "update" ]
},
{
"resource": { "system_buckets": "" },
"actions": [ "listCollections", "listIndexes" ]
}
]

쓰기 차단

다음이 추가된 기본값 소스 권한의 모든 것:

[
{
"resource": { "cluster": true },
"actions": [ "bypassWriteBlockingMode", "setUserWriteBlockMode" ]
}
]

반전

기본값 소스 권한과 기본값 대상 권한의 모든 것.

다중 반전

다음이 추가된 기본값 소스 권한 및 기본값 대상 권한의 모든 것:

[
{ "resource": { "db": "", "collection": "" }, "actions": [ "dropDatabase" ] }
]

V5.0 마이그레이션

[
{
"resource": { "cluster": true },
"actions": [
"appendOplogNote",
"getDefaultRWConcern",
"getShardMap",
"hostInfo",
"listDatabases",
"listShards",
"replSetGetConfig",
"replSetGetStatus",
"serverStatus"
]
},
{
"resource": { "db": "", "collection": "" },
"actions": [
"changeStream",
"collStats",
"find",
"indexStats",
"listCollections",
"listIndexes"
]
},
{
"resource": { "db": "admin", "collection": "system.version" },
"actions": [ "find" ]
},
{
"resource": { "db": "", "collection": "system.js" },
"actions": [ "listCollections", "listIndexes" ]
},
{
"resource": { "db": "config", "collection": "shards" },
"actions": [ "find" ]
},
{
"resource": { "db": "config", "collection": "collections" },
"actions": [ "find" ]
},
{
"resource": { "db": "config", "collection": "version" },
"actions": [ "find" ]
},
{
"resource": { "db": "config", "collection": "settings" },
"actions": [ "find", "update" ]
}
]

최소 대상 권한은 다음과 같습니다.

동기화 유형
최소 대상 권한

기본값

[
{
"resource": { "cluster": true },
"actions": [
"appendOplogNote",
"getDefaultRWConcern",
"getShardMap",
"hostInfo",
"listDatabases",
"listShards",
"replSetGetConfig",
"replSetGetStatus",
"serverStatus"
]
},
{
"resource": { "db": "", "collection": "" },
"actions": [
"bypassDocumentValidation",
"changeStream",
"collMod",
"convertToCapped",
"createCollection",
"createIndex",
"dropCollection",
"dropIndex",
"enableSharding",
"find",
"indexStats",
"insert",
"listCollections",
"listIndexes",
"remove",
"renameCollectionSameDB",
"update",
"bypassWriteBlockingMode",
"setUserWriteBlockMode"
]
},
{
"resource": { "db": "admin", "collection": "system.version" },
"actions": [ "find" ]
},
{
"resource": { "db": "", "collection": "system.js" },
"actions": [ "listCollections", "listIndexes" ]
},
{
"resource": { "db": "", "collection": "system.views" },
"actions": [ "dropCollection" ]
},
{
"resource": { "db": "config", "collection": "version" },
"actions": [ "find" ]
},
{
"resource": { "db": "config", "collection": "collections" },
"actions": [ "find" ]
},
{
"resource": { "db": "config", "collection": "settings" },
"actions": [ "find", "update" ]
},
{
"resource": { "db": "config", "collection": "shards" },
"actions": [ "find", "update" ]
},
{
"resource": { "db": "config", "collection": "tags" },
"actions": [ "find", "update", "remove" ]
},
{
"resource": { "system_buckets": "" },
"actions": [ "listCollections", "listIndexes" ]
}
]

쓰기 차단

기본값 대상 권한의 모든 것.

반전

다음이 추가된 기본값 소스 권한 및 기본값 대상 권한의 모든 것:

[
{ "resource": { "db": "", "collection": "" }, "actions": [ "dropDatabase" ] }
]

다중 반전

다음이 추가된 기본값 소스 권한 및 기본값 대상 권한의 모든 것:

[
{ "resource": { "db": "", "collection": "" }, "actions": [ "dropDatabase" ] }
]
  • 5.0 소스 클러스터에서 마이그레이션하는 경우, 소스 클러스터 clusterManager 또는 v5.0에 나열된 최소 권한이 있어야 합니다.

    v5.0 에 대한 최소 소스 권한 다음과 같습니다.

    동기화 유형
    최소 소스 권한

    V5.0 마이그레이션

    [
    {
    "resource": { "cluster": true },
    "actions": [
    "appendOplogNote",
    "getDefaultRWConcern",
    "getShardMap",
    "hostInfo",
    "listDatabases",
    "listShards",
    "replSetGetConfig",
    "replSetGetStatus",
    "serverStatus"
    ]
    },
    {
    "resource": { "db": "", "collection": "" },
    "actions": [
    "changeStream",
    "collStats",
    "find",
    "indexStats",
    "listCollections",
    "listIndexes"
    ]
    },
    {
    "resource": { "db": "admin", "collection": "system.version" },
    "actions": [ "find" ]
    },
    {
    "resource": { "db": "", "collection": "system.js" },
    "actions": [ "listCollections", "listIndexes" ]
    },
    {
    "resource": { "db": "config", "collection": "shards" },
    "actions": [ "find" ]
    },
    {
    "resource": { "db": "config", "collection": "collections" },
    "actions": [ "find" ]
    },
    {
    "resource": { "db": "config", "collection": "version" },
    "actions": [ "find" ]
    },
    {
    "resource": { "db": "config", "collection": "settings" },
    "actions": [ "find", "update" ]
    }
    ]
  • 이중 쓰기 차단 및 역 동기화 지원되지 않습니다.

돌아가기

지표

이 페이지의 내용