Mongo Properties
  • 17 Nov 2022
  • Dark
    Light
  • PDF

Mongo Properties

  • Dark
    Light
  • PDF

Article Summary

Definition

All mongo properties are contained within the mongo object in the IAP Service Instance Configuration for the adapter. The Mongo properties are used to define a database where the adapter can store information. At the current time, three things are stored in the database – metrics, throttling queue, and (if desired) the adapter configuration.

Property Type Required Description
host string No The server where the adapter mongo database can be found.
port integer No The port on the server where the adapter mongo database can be found.
database string No The adapter database within the mongo instance.
username string No The username used to log into the database.
password string No The password used at login to the database.
replSet string No If a replica set is being used, it should be defined here.
db_ssl object No Defines SSL encryption with the database.

enabled: Determines whether the mongo server system has SSL/TLS enabled for requests. The fields within the objext are similar to the standard adapter SSL/TLS properties.

accept_invalid_certs:Determines if the adapter should accept invalid (i.e., ignore) certificates.

ca_file:The fully qualified path name to the CA file used for SSL.

key_file:The fully qualified path name to the key file used for SSL.

cert_file:The fully qualified path name to the certificate file used for SSL.

Example Scenario

  • Keep in mind the adapter does not need Mongo to work. You can either turn metrics off, or the adapter can store metrics on the file system and throttling can be done in memory.
  • The adapter does not want to store database information in the IAP database because it can cause issues when upgrading IAP.
  • The example properties show an adapter database on server mymongo.com accessible on port 27017. The adapter database is called adapter-xyz and we are connecting to the database via username and password.
  • In this example:
    • A replica set is not used.
    • SSL is not used to connect.

IAP Service Instance Configuration Properties for the Adapter

SAMPLE PROPERTIES

"mongo": {
 "host": "mymongo.com",
 "port": 27017,
 "database": "adapter-xyz",
 "username": "username",
 "password": "password",
 "replSet": "",
 "db_ssl": {
   "enabled": false,
   "accept_invalid_cert": true,
   "ca_file": "",
   "key_file": "",
   "cert_file": ""
 }
},

Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.