Docs Menu
Docs Home
/
MongoDB Cluster-to-Cluster Sync
/

ユーザー権限

mongosync接続文字列で指定されたユーザーには、ソースクラスターと宛先クラスターで必要な権限が必要です。 権限は、書込みブロック設定を変更するか、逆同期を使用するかによって、環境によって異なります。

自己管理型権限は次のとおりです。

同期タイプ
必要なソース権限
必要な宛先権限

default

  • backup

  • clusterMonitor

  • readAnyDatabase

二重書込みブロック

元に戻す

複数の反転

サーバー ロールの詳細については、「自己管理型配置でのロールベースのアクセス制御 」を参照してください。

ユーザー権限を更新するには、 grantRolesToUserを参照してください。

Atlas の権限は次のとおりです。

同期タイプ
必要なソース権限
必要な宛先権限

default

  • atlasAdmin

二重書込みブロック、元対応、または複数元の逆

Atlas のロールと特権の詳細については、組み込みのロールと特権 を参照してください。

Atlas user権限を更新するには、「プロジェクトへのアクセス権の管理 」を参照してください。

注意

最小特権は mongosync のバージョンによって異なる場合があります。

最小のソース特権は次のとおりです。

同期タイプ
最小ソース特権

default

[
{
"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" ]
},
{
"resource": { "system_buckets": "" },
"actions": [ "listCollections", "listIndexes" ]
}
]

書込み (write) ブロック

デフォルトのソースコードからのすべての特権には、次の追加があります。

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

元に戻す

デフォルトのソース特権とデフォルトの宛先特権のすべて。

複数の反転

デフォルトのソース特権とデフォルトの宛先特権のすべてに次の追加が行われます。

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

V4.4 移行

[
{
"resource": { "cluster": true },
"actions": [
"addShard",
"appendOplogNote",
"flushRouterConfig",
"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" ]
}
]

最小の宛先特権は次のとおりです。

同期タイプ
最小宛先特権

default

[
{
"resource": { "cluster": true },
"actions": [
"appendOplogNote",
"enableSharding",
"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": "config", "collection": "shards" },
"actions": [ "find" ]
},
{
"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" ]
},
{
"resource": { "db": "config", "collection": "tags" },
"actions": [ "find" ]
},
{
"resource": { "system_buckets": "" },
"actions": [ "listCollections", "listIndexes" ]
}
]

書き込みブロッキング

デフォルトの宛先特権のすべて。

元に戻す

デフォルトのソース特権とデフォルトの宛先特権のすべてに次の追加が行われます。

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

複数の反転

デフォルトのソース特権とデフォルトの宛先特権のすべてに次の追加が行われます。

[
{ "resource": { "db": "", "collection": "" }, "actions": [ "dropDatabase" ] }
]
  • 4.4ソースクラスターから移行する場合、ソースクラスターには clusterManager または v4.4 にリストされている最小権限が必要です。

    v4.4 の最小ソース権限これらは次のとおりです。

    同期タイプ
    最小ソース特権

    V4.4 移行

    [
    {
    "resource": { "cluster": true },
    "actions": [
    "addShard",
    "appendOplogNote",
    "flushRouterConfig",
    "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" ]
    }
    ]
  • 二重書込み (write) ブロックと逆同期はサポートされていません。

戻る

ログ記録

項目一覧