Kayıtlar

Starting a Replica Set

Resim

Mongodb Explain Plans

Resim

Mongodb text index

Resim

M310: MongoDB Security Homework 2.1

Download Handouts: m310-hw-2.1.zip For this homework exercise you're going to spin up a replica set and create some users with different roles based on the different tasks that each user needs to be able to perform. Your replica set should be running on the following ports: Type Primary Secondary Secondary Port 31210 31211 31212 Your replica set should have authentication enabled using a shared keyfile. After you have your members up and running you can connect to the  mongod  running on port  31210 . Once connected create the following users: User Password Can Cannot userAdmin badges create users on any database run dbhash sysAdmin cables configure a replica set and add shards run hostInfo dbAdmin collections create a collection on any database run insert dataLoader dumpin insert data on any database run validate The  Can  column denotes tasks that the user should be able to complete. The  Cannot column denotes tasks that the...

9 3 Replica set syncing demo

Resim

Screen 1.6.1 - Enable keyfile based Replica Set internal authentication 2

Resim

Mongodb Authentication

mongodb    db version v3.0.7  mac üzerinde yapılan işlemler önceden açtığınız mongo penceresi varsa eğer use admin db.shutdownServer() diyip açık mongod temiz bir şekilde kapatıyoruz daha sonra mongod çalıştırırken aşağıdaki parametreler ile çalıştırıyoruz mongod --auth --dbpath ../data/db Burada --auth parametresi mongo database'in authentication ile çalışacağını gösterir. Daha sonra başka bir terminal ekranında  mongo ekranına geçiyoruz mongo standart test db'ye giriş yapıyor fakat komut çalıştırmak istediğimizde çalıştıramadığımızı görüyoruz. Bu yüzden  use admin komutunu kullanarak admin db'ye geçiyoruz. Ve bir adet kullanıcı ekliyoruz db.createUser({ user: 'admin', pwd: 'admin', roles: [{ role: 'userAdminAnyDatabase', db : 'admin'}] }) Bu kullanıcı ekleme işlemi tek sefer yapılabilecek bir işlemdir. Başka kullanıcı eklemeye izin vermez mongodb bu aşamada. Kull...