![]() ![]() ![]() Python (46) AWS (45) Docker (36) Linux (27) Elasticsearch (24) DevOps (22) Storage (19) Kubernetes (19) Security (13) MongoDB (12) Python Flask (12) Monitoring (12) BigData (11) CICD (11) DynamoDB (10) NoSQL (9) Databases (9) Networking (9) Traefik (9) IAM (8) Swarm (8) RaspberryPi (8) Golang (8) Civo (8) S3 (7) Ubuntu (7) Lambda (7) NFS (7) VPN (6) Clustering (6) MySQL (6) Nginx (6) Analytics (6) GlusterFS (6) Java (6) API (6) Concourse (6) Programming (6) Pipelines (6) Prometheus (6) K3S (6) Authentication (5) Kibana (5) Deployment (5) Virtualization (5) Distributed Storage (5) Scripting (5) Flask-Series (5) Encryption (5) Ruby (4) Logstash (4) Hadoop (4) SSH (4) Bash (4) CLI (4) Filebeat (4) Performance (4) Alpine (4) Serverless (4) OpenFaas (4) Nagios (4) Jenkins (4) ELK (3) Mail (3) High-Availability (3) Ansible (3) Nodejs (3) MicroServices (3) Cryptography (3) Gitlab (3) Gitea (3) Drone (3) Letsencrypt (3) Containers (3) Grafana (3) ECS (3) Rails (2) Active Directory (2) DNS (2) Spark (2) Hive (2) PHP (2) EMR (2) LoadBalancer (2) Boto (2) Payara (2) WebApps (2) Reverse-Proxy (2) Minio (2) RocketChat (2) Search-Engine (2) API-Gateway (2) Terraform (2) EC2 (2) SSM (2) 12Factor (2) Ansible-Tutorial (2) Hello-World (2) Ruby-Tutorial-Series (2) Memcached (2) Caching (2) golang-tutorial (2) Multiprocessing (2) SSL (2) Metrics (2) Longhorn (2) Multipass (2) Getting Started (1) JavaScript (1) Piranha (1) asp. Share: Twitter Facebook LinkedIn Comments db.createRole(role, writeConcern) role Information and permissions regarding the role. We can also inherit privileges from a different role in the new roles. We can create an independent role within MongoDB by expressing permissions on all privileges explicitly. Thanks for reading, if you enjoy my content feel free to follow me on Twitter at subscribe to my newsletter. The readWrite role in the product database. List the collections and read the data from it for demonstration purposes: > use mytest In this case read only access to the mytest db.įirst logon to mongodb and switch to the admin database: $ mongo -u dbadmin -p -authenticationDatabase admin The first method we will create the user and assign it the read permissions that he needs. Note: If you require a mongodb docker compose configuration, have a look at my docs page:įirst Method: Creating and Assigning the User One user that will have access to one MongoDB Database and all the Collections, and one user with access to one MongoDB Database and only one Collection. In this post I will demonstrate how to setup 2 read only users in MongoDB. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |