This utility adds predefined data to the MongoDB permissions API database. The utility uses the same config type as the permissions API service, so any custom configuration can be added via environment variables.
- The roles collection is populated with data in the roles.json file.
- The policies collection is populated with data in the policies.json
In a terminal, ensure you are in the import-script directory:
cd import-scriptRun the import script with the default configuration:
go run import.goIn a terminal, ensure you are in the import-script directory:
cd import-scriptOpen an SSH tunnel to the environment (replace {cluster address}):
dp ssh develop publishing 1 -p 27017:{cluster address}:27017Run the import script, setting the required configuration values:
MONGODB_IS_SSL=true MONGODB_USERNAME=... MONGODB_PASSWORD=... go run import.go