Docs Menu
Docs Home
/
MongoDB Ops Manager
/ / / /

1๊ฐœ์˜ ํ”„๋กœ์ ํŠธ์— ๊ธฐ์กด ์‚ฌ์šฉ์ž ์ถ”๊ฐ€

์ด ํŽ˜์ด์ง€์˜ ๋‚ด์šฉ

  • Resource
  • ์š”์ฒญ ๋งค๊ฐœ๋ณ€์ˆ˜
  • ์š”์ฒญ ๊ฒฝ๋กœ ๋งค๊ฐœ๋ณ€์ˆ˜
  • ์š”์ฒญ ์ฟผ๋ฆฌ ๋งค๊ฐœ๋ณ€์ˆ˜
  • ์š”์ฒญ ๋ณธ๋ฌธ ๋งค๊ฐœ๋ณ€์ˆ˜
  • ์‘๋‹ต
  • ์š”์ฒญ ์˜ˆ์‹œ
  • ์‘๋‹ต ์˜ˆ์‹œ

์ฐธ๊ณ 

๊ทธ๋ฃน๊ณผ ํ”„๋กœ์ ํŠธ๋Š” ๋™์˜์–ด์ž…๋‹ˆ๋‹ค. {PROJECT-ID}๋Š” ํ”„๋กœ์ ํŠธ ID์™€ ๋™์ผํ•ฉ๋‹ˆ๋‹ค. ๊ธฐ์กด ๊ทธ๋ฃน์˜ ๊ฒฝ์šฐ, ๊ทธ๋ฃน/ํ”„๋กœ์ ํŠธ ID๋Š” ๋™์ผํ•˜๊ฒŒ ์œ ์ง€๋ฉ๋‹ˆ๋‹ค. ์ด ํŽ˜์ด์ง€์—์„œ๋Š” ์„ค๋ช…์— ๋Œ€ํ•ด ์–˜๊ธฐํ•  ๋•Œ ๋”์šฑ ์นœ์ˆ™ํ•œ ์šฉ์–ด ๊ทธ๋ฃน์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ์—”๋“œํฌ์ธํŠธ๋Š” ๋ฌธ์„œ์— ๋ช…์‹œ๋œ ๋Œ€๋กœ ์œ ์ง€๋ฉ๋‹ˆ๋‹ค.

์ด ๋ฆฌ์†Œ์Šค ๋Š” MongoDB Ops Manager ์— ์žˆ๋Š” ์‚ฌ์šฉ์ž๋ฅผ ๋‹ค๋ฅธ ํ”„๋กœ์ ํŠธ ์— ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค. ์ƒˆ ์‚ฌ์šฉ์ž๋ฅผ ์ƒ์„ฑํ•˜์—ฌ ํ”„๋กœ์ ํŠธ ์— ์ถ”๊ฐ€ํ•˜์ง€๋Š” ์•Š์Šต๋‹ˆ๋‹ค. ๊ธฐ๋ณธ๊ฐ’ ์œผ๋กœ ์‚ฌ์šฉ์ž๋Š” ๋จผ์ € ํ”„๋กœ์ ํŠธ ์— ๋Œ€ํ•œ ์ดˆ๋Œ€๋ฅผ ๋ฐ›์Šต๋‹ˆ๋‹ค. mms.user.bypassInviteForExistingUsers ์„ค์ •์„ true ๋กœ ์„ค์ •ํ•˜๋‹ค ํ•œ ๊ฒฝ์šฐ์—๋งŒ ํ”„๋กœ์ ํŠธ ์— ์ง์ ‘ ์‚ฌ์šฉ์ž๋ฅผ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๊ธฐ๋ณธ URL: https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0

POST /groups/{PROJECT-ID}/users
Parameter
์œ ํ˜•
์„ค๋ช…
ํ”„๋กœ์ ํŠธ ID
๋ฌธ์ž์—ด
(ํ•„์ˆ˜ ์‚ฌํ•ญ) ํ”„๋กœ์ ํŠธ์˜ ๊ณ ์œ  ์‹๋ณ„์ž์ž…๋‹ˆ๋‹ค.

๋‹ค์Œ ์ฟผ๋ฆฌ ๋งค๊ฐœ๋ณ€์ˆ˜๋Š” ์„ ํƒ ์‚ฌํ•ญ์ž…๋‹ˆ๋‹ค.

์ด๋ฆ„
์œ ํ˜•
ํ•„์š”์„ฑ
์„ค๋ช…
๊ธฐ๋ณธ๊ฐ’
pretty
๋ถ€์šธ
์˜ต์…˜
์‘๋‹ต ๋ณธ๋ฌธ์ด ํ”„๋ฆฌํ‹ฐํ”„๋ฆฐํŠธ ์— ์žˆ์–ด์•ผ ํ•˜๋Š”์ง€ ์—ฌ๋ถ€๋ฅผ ๋‚˜ํƒ€๋‚ด๋Š” ํ”Œ๋ž˜๊ทธ์ž…๋‹ˆ๋‹ค. ํ˜•์‹.
false
envelope
๋ถ€์šธ
์˜ต์…˜

์‘๋‹ต์„ ์—”๋ฒจ๋กœํ”„์— ๋ž˜ํ•‘ํ• ์ง€ ์—ฌ๋ถ€๋ฅผ ๋‚˜ํƒ€๋‚ด๋Š” ํ”Œ๋ž˜๊ทธ์ž…๋‹ˆ๋‹ค.

์ผ๋ถ€ API ํด๋ผ์ด์–ธํŠธ๋Š” HTTP ์‘๋‹ต ํ—ค๋” ๋˜๋Š” ์ƒํƒœ ์ฝ”๋“œ์— ์•ก์„ธ์Šคํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. ์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๋ ค๋ฉด ์ฟผ๋ฆฌ์—์„œ envelope=true๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.

ํ•˜๋‚˜์˜ ๊ฒฐ๊ณผ๋ฅผ ๋ฐ˜ํ™˜ํ•˜๋Š” ์—”๋“œํฌ์ธํŠธ์˜ ๊ฒฝ์šฐ ์‘๋‹ต ๋ณธ๋ฌธ์—๋Š” ๋‹ค์Œ์ด ํฌํ•จ๋ฉ๋‹ˆ๋‹ค.

์ด๋ฆ„
์„ค๋ช…
status
HTTP ์‘๋‹ต ์ฝ”๋“œ
content
์˜ˆ์ƒ๋˜๋Š” ์‘๋‹ต ๋ณธ๋ฌธ
false
์ด๋ฆ„
์œ ํ˜•
์„ค๋ช…
id
๋ฌธ์ž์—ด
๊ธฐ์กด ์‚ฌ์šฉ์ž์˜ ๊ณ ์œ  ์‹๋ณ„์ž์ž…๋‹ˆ๋‹ค.
roles
๊ฐ์ฒด ๋ฐฐ์—ด
์ด ์‚ฌ์šฉ์ž์—๊ฒŒ ํ• ๋‹น๋œ ์—ญํ• ์ž…๋‹ˆ๋‹ค.
roles.groupId
๋ฌธ์ž์—ด
ํ”„๋กœ์ ํŠธ ์—ญํ• ์˜ ๊ณ ์œ  ์‹๋ณ„์ž์ž…๋‹ˆ๋‹ค.
roles.roleName
๋ฌธ์ž์—ด
์‚ฌ์šฉ์ž ์—ญํ• ์˜ ํ‘œ์‹œ ์ด๋ฆ„์ž…๋‹ˆ๋‹ค.
์ด๋ฆ„
์œ ํ˜•
์„ค๋ช…
์ด๋ฉ”์ผ ์ฃผ์†Œ
๋ฌธ์ž์—ด
Ops Manager ์‚ฌ์šฉ์ž์˜ ์ด๋ฉ”์ผ ์ฃผ์†Œ์ž…๋‹ˆ๋‹ค.
์ด๋ฆ„
๋ฌธ์ž์—ด
๋ฐ˜ํ™˜๋œ Ops Manager ์‚ฌ์šฉ์ž์˜ ํ‘œ์‹œ๋˜๋Š” ์ด๋ฆ„์ž…๋‹ˆ๋‹ค.
id
๋ฌธ์ž์—ด
์‚ฌ์šฉ์ž์˜ ๊ณ ์œ  ์‹๋ณ„์ž์ž…๋‹ˆ๋‹ค.
๋งํฌ
๊ฐ์ฒด ๋ฐฐ์—ด

ํ•˜์œ„ ๋ฆฌ์†Œ์Šค ๋ฐ/๋˜๋Š” ๊ด€๋ จ ๋ฆฌ์†Œ์Šค์— ๋Œ€ํ•œ ํ•˜๋‚˜ ์ด์ƒ์˜ ๋งํฌ์ž…๋‹ˆ๋‹ค. ์‘๋‹ต์˜ ๋ชจ๋“  links ๋ฐฐ์—ด์—๋Š” self ์ด๋ผ๋Š” ๋งํฌ๊ฐ€ ํ•˜๋‚˜ ์ด์ƒ ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. URL๊ฐ„์˜ ๊ด€๊ณ„๋Š” ์›น ๋งํฌ ์‚ฌ์–‘์—์„ค๋ช…๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.

์„ฑ
๋ฌธ์ž์—ด
๋ฐ˜ํ™˜๋œ Ops Manager ์‚ฌ์šฉ์ž์˜ ํ‘œ์‹œ๋˜๋Š” ์„ฑ์ž…๋‹ˆ๋‹ค.
roles
๊ฐ์ฒด ๋ฐฐ์—ด
์ด ์‚ฌ์šฉ์ž์—๊ฒŒ ํ• ๋‹น๋œ ์—ญํ• ์ž…๋‹ˆ๋‹ค.
roles.groupId
๋ฌธ์ž์—ด
ํ”„๋กœ์ ํŠธ ์—ญํ• ์˜ ๊ณ ์œ  ์‹๋ณ„์ž์ž…๋‹ˆ๋‹ค.
roles.roleName
๋ฌธ์ž์—ด
์‚ฌ์šฉ์ž ์—ญํ• ์˜ ํ‘œ์‹œ ์ด๋ฆ„์ž…๋‹ˆ๋‹ค.
์‚ฌ์šฉ์ž ์ด๋ฆ„
๋ฌธ์ž์—ด
Ops Manager ์‚ฌ์šฉ์ž ์ด๋ฆ„์ž…๋‹ˆ๋‹ค.
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--include \
--request POST "https://{opsManagerHost}:{port}/api/public/v1.0/groups/{PROJECT-ID}/users?pretty=true" \
--data '
[
{
"id": "{USER-ID}",
"roles": [{
"roleName": "GROUP_OWNER"
}]
}
]'

์ฐธ๊ณ 

๋‹จ์ผ ์‚ฌ์šฉ์ž๋ฅผ ์ถ”๊ฐ€ํ•˜๋Š” ๊ฒฝ์šฐ์—๋„ ์—”ํ„ฐํ‹ฐ ๋ฐฐ์—ด์„ ๋ณด๋‚ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์ถ”๊ฐ€ํ•˜๋ ค๋Š” ๊ฐ ์‚ฌ์šฉ์ž์— ๋Œ€ํ•ด ์‚ฌ์šฉ์ž ID์™€ ์‚ฌ์šฉ์ž๊ฐ€ ๋ณด์œ ํ•ด์•ผ ํ•˜๋Š” ์—ญํ• ์„ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค. ์—ญํ•  ๊ฐ’์€ ์‚ฌ์šฉ์ž ๋ฆฌ์†Œ์Šค์˜ roles.roleName ํ•„๋“œ์— ๋Œ€ํ•œ ์„ค๋ช…์„ ์ฐธ์กฐํ•˜์„ธ์š”.

์ด๋ฏธ ํ”„๋กœ์ ํŠธ ๋ฉค๋ฒ„์ธ ์‚ฌ์šฉ์ž๋ฅผ ์ง€์ •ํ•˜๋ฉด ํ•ด๋‹น ์‚ฌ์šฉ์ž์˜ ๊ธฐ์กด ์—ญํ• ์„ ์ง€์ •๋œ ๊ถŒํ•œ์œผ๋กœ ๋ฎ์–ด์”๋‹ˆ๋‹ค.

HTTP/1.1 401 Unauthorized
Content-Type: application/json;charset=ISO-8859-1
Date: {dateInUnixFormat}
WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=false
Content-Length: {requestLengthInBytes}
Connection: keep-alive
HTTP/1.1 200 OK
Vary: Accept-Encoding
Content-Type: application/json
Strict-Transport-Security: max-age=300
Date: {dateInUnixFormat}
Connection: keep-alive
Content-Length: {requestLengthInBytes}
X-MongoDB-Service-Version: gitHash={gitHash}; versionString={ApplicationVersion}
{
"links" : [ {
"href" : "http://{opsManagerHost}:{port}/api/public/v1.0/groups/{PROJECT-ID}/users?pretty=true&pageNum=1&itemsPerPage=100",
"rel" : "self"
} ],
"results" : [ {
"emailAddress" : "joe.bloggs@example.com",
"firstName" : "Joe",
"id" : "{USER-ID}",
"lastName" : "Bloggs",
"links" : [ {
"href" : "http://{opsManagerHost}:{port}/api/public/v1.0/users/{USER-ID}",
"rel" : "self"
}, {
"href" : "http://{opsManagerHost}:{port}/api/public/v1.0/users/{USER-ID}/accessList",
"rel" : "http://mms.mongodb.com/accessList"
} ],
"roles" : [ {
"groupId" : "{PROJECT-ID}",
"roleName" : "GROUP_OWNER"
}, {
"groupId" : "{OTHER-PROJECT-ID}",
"roleName" : "GROUP_OWNER"
}
...
],
"username" : "joe.bloggs"
}, {
"emailAddress" : "jim.bloggs@example.com",
"firstName" : "Jim",
"id" : "{OTHER-USER-ID}",
"lastName" : "Bloggs",
"links" : [ {
"href" : "http://{opsManagerHost}:{port}/api/public/v1.0/users/{OTHER-USER-ID}",
"rel" : "self"
}, {
"href" : "http://{opsManagerHost}:{port}/api/public/v1.0/users/{OTHER-USER-ID}/accessList",
"rel" : "http://mms.mongodb.com/accessList"
} ],
"roles" : [ {
"roleName" : "GLOBAL_READ_ONLY"
}, {
"groupId" : "{PROJECT-ID}",
"roleName" : "GROUP_OWNER"
} ],
"username" : "jim.bloggs"
} ],
"totalCount" : 2
}

๋Œ์•„๊ฐ€๊ธฐ

ํ•˜๋‚˜์˜ ํ”„๋กœ์ ํŠธ์—์„œ ๋ชจ๋“  ์‚ฌ์šฉ์ž ๊ฐ€์ ธ์˜ค๊ธฐ