Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Scroll Ignore
scroll-viewporttrue
scroll-pdftrue
scroll-officetrue
scroll-chmtrue
scroll-docbooktrue
scroll-eclipsehelptrue
scroll-epubtrue
scroll-htmlfalse
Panel
titleSommaire

Table of Contents
stylenone



Concept

Pour vous assurer que seul Shinken ait accès L'authentification par mot de passe à MongoDB garantit que seul l'utilisateur Shinken peut accéder aux données dans la base, il faut activé .

Activer l'authentification par

login

mot de passe dans

Shinken.Activer l'authentification par mot de passe dans MongoDB

MongoDB

Pour activer l'authentification dans MongoDB, il rajoute le champ suivant dans le fichier de configuration /etc/mongod.conf 



Code Block
languagejs
themeConfluence

security:
 authorization: enabled



Exemple de fichier de configuration :


Code Block
languagejs
themeConfluence


# for documentation of all options, see:
#   http://docs.mongodb.org/manual/reference/configuration-options/

# where to write logging data.
systemLog:
  destination: file
  logAppend: true
  path: /var/log/mongodb/mongod.log

# Where and how to store data.
storage:
  dbPath: /var/lib/mongo
  journal:
    enabled: true


# how the process runs
processManagement:
  fork: true  # fork and run in background
  pidFilePath: /var/run/mongodb/mongod.pid


# network interfaces
# NOTE: when go as a replicat member (cluster), change the 27017 to 27018 according to configuration
#       and comment the bindIp parameter
net:
  port: 27017
  unixDomainSocket:
    enabled: false
  bindIp: 127.0.0.1  # Listen to local interface only, comment to listen on all interfaces.




storage:
    engine: wiredTiger


security:
 authorization: enabled



Pour prendre en compte l'activation de l'authentification, il faut redémarrer le démon de la base de données : 



Créer l'utilisateur Shinken


Déclarer l'utilisateur et le mot de passe dans Shinken


Dans les fichiers de configuration


Dans les commandes


...