๋ฐ์ดํฐ๋ฒ ์ด์ค ๋๊ตฌ ์ธ์ฆ
์ด ํ์ด์ง์ ๋ด์ฉ
100.11.0๋ถํฐ๋ Atlas Workload Identity Federation ๊ณผ ํจ๊ป ๋ฐ์ดํฐ๋ฒ ์ด์ค ๋๊ตฌ๋ฅผ ์ฌ์ฉํ์ฌ Microsoft Azure ๋ฐ Google Cloud Platform ์์ ์คํ MongoDB ์ ๋ํ ์ฐ๊ฒฐ์ ์ธ์ฆํ ์ ์์ต๋๋ค.
์์
์ด ์น์ ์์๋ Workload Identity Federation์ ์ฌ์ฉํ๋ ๋ฐ์ดํฐ๋ฒ ์ด์ค ๋๊ตฌ์ ์๋ฅผ ๋ณด์ฌ์ค๋๋ค.
์ฐ๊ฒฐ ๋ฌธ์์ด ์์ ์(๋ฅผ)(์ผ)๋ก ์ค์ ํ๋ค ํ์์ authMechanism
MONGODB-OIDC
๋ฐ๋ผ ์(๋ฅผ)authMechanismProperties
์ค์ ํ๋ค .
Microsoft Azure ์ ๊ฒฝ์ฐ
authMechanismProperties
์ENVIRONMENT:azure,TOKEN_RESOURCE:<audience>
๋ก ์ค์ ํ๋ค ํฉ๋๋ค. ์ฐธ๊ณ : Microsoft Azure Kubernetes Service)๋ฅผ ์ฌ์ฉํ๋ ๊ฒฝ์ฐTOKEN_RESOURCE
๋ฅผ ์๋ตํฉ๋๋ค.Google Cloud Platform ์ ๊ฒฝ์ฐ
authMechanismProperties
์ENVIRONMENT:gcp,TOKEN_RESOURCE:<audience>
๋ก ์ค์ ํ๋ค ํฉ๋๋ค.
<audience>
์ ์ก์ธ์ค ํ ํฐ์ด ์๋๋ ์ ํ๋ฆฌ์ผ์ด์
๋๋ ์๋น์ค๋ก ๋ฐ๊ฟ๋๋ค. ์์ธํ ๋ด์ฉ์ ID ์ ๊ณต์ ํ๋๋ฅผ ์ฐธ์กฐํ์ธ์.
Microsoft Azure ์ธ์คํด์ค ๋ฉํ๋ฐ์ดํฐ ์๋น์ค๋ฅผ ์ฌ์ฉํ์ฌ MongoDB ์ ์ฐ๊ฒฐ
๋ค์ mongodump
์์ Microsoft Azure ์ธ์คํด์ค ๋ฉํ๋ฐ์ดํฐ ์๋น์ค(IMDS)๋ฅผ ์ฌ์ฉํ์ฌ MongoDB ์ ์ฐ๊ฒฐํฉ๋๋ค.
mongodump --uri "mongodb://mongodb.example.com:20017/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:azure,TOKEN_RESOURCE:https://www.example.com" \ --username admin
Microsoft Azure Kubernetes Service๋ฅผ ์ฌ์ฉํ์ฌ MongoDB ์ ์ฐ๊ฒฐ
Microsoft Azure Kubernetes Service๋ฅผ ์ฌ์ฉํ์ฌ MongoDB ์ ์ฐ๊ฒฐํ๋ ค๋ฉด ๋ค์ ํ๊ฒฝ ๋ณ์๋ฅผ ์ ์ํ์ธ์.
ํ๊ฒฝ ๋ณ์ | ์ค๋ช
|
---|---|
| Azure tenant identifier. |
| Azure ์ ํ๋ฆฌ์ผ์ด์ ํด๋ผ์ด์ธํธ ์๋ณ์์ ๋๋ค. |
| ์ธ์ฆํ managed ID์ Azure ํด๋ผ์ด์ธํธ ์๋ณ์์ ๋๋ค. |
| Azure ์ฐํฉ ํ ํฐ ํ์ผ ๊ฒฝ๋ก์ ๋๋ค. |
Azure ๋ฐ ๋ณ์์ ๋ํ ์์ธํ ๋ด์ฉ์ Microsoft Azure ์ค๋ช ์๋ฅผ ์ฐธ์กฐํ์ธ์.
๋ค์ mongodump
์์ ์์๋ ํ๊ฒฝ ๋ณ์๋ฅผ ์ ์ํ๊ณ MongoDB ์ ์ฐ๊ฒฐํฉ๋๋ค.
AZURE_TENANT_ID=08206ab8-16a0-406d-85e4-2f15f5620fac \ AZURE_APP_CLIENT_ID=b6c835da-e536-425b-9405-64bc471e245b \ AZURE_CLIENT_ID=f176d4eb-7dcd-4f66-bccf-aaa316ee61fd \ AZURE_FEDERATED_TOKEN_FILE=/var/run/secrets/azure/tokens/azure-identity-token \ mongodump --uri "mongodb://mongodb.example.com:20017/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:azure" \ --username "admin"
์ด ์์ ์์๋ TOKEN_RESOURCE
์ด ํ์ํ์ง ์์ต๋๋ค.
Google Cloud Platform ์์ MongoDB ์ ์ฐ๊ฒฐ
๋ค์ mongodump
์์ Google Cloud Platform ์์ MongoDB ์ ์ฐ๊ฒฐํฉ๋๋ค.
mongodump --uri "mongodb://mongodb.example.com:20017/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:gcp,TOKEN_RESOURCE:https://www.example.com" \ --username "admin"
Google Cloud Platform ์๋ ํ๊ฒฝ ๋ณ์๊ฐ ํ์ํ์ง ์์ต๋๋ค.