In conventional terminology, Imperva Data Security Fabric (DSF) is a database system, replete with a GUI interface for aggregation pipeline building, workflow orchestration, extensible scripting (Playbooks), and self-service data discovery (Kibana-based Discover). Imperva DSF is purpose-built for data protection, audit, and compliance. Above and beyond these purpose-built capabilities, Imperva DSF administrators can extend DSF to house, and report on, event logs from other business applications. MongoDB is a document database management system that is completely compatible with Imperva DSF.
This blog will briefly introduce MongoDB Collections, how to create them, insert Documents into them, and how to retrieve Documents from them. With a populated collection in place, all of the aforementioned DSF capabilities are available to be applied to the collection and the documents the collection contains.
Within an Imperva DSF installation, the MongoDB Terminal application can be found at: /data/jsonar/apps/<version>/bin
To log into the MongoDB Terminal, you would use the Imperva DSF admin credentials:
- ./mongo –quiet –port 27117 –uadmin –p
With MongoDB, databases are created, simply by beginning to use them:
- use vince_database
With the database created, a collection gets created with the insertion of the first document into the collection. Ensure a time tag is included with the document:
- db.vince_collection.insertOne({title:”Wizard Of Oz”,year:”1939”,created_on:new Date()})
Confirmation that the document has been inserted would be straightforward:
- db.vince_collection.find({title:”Wizard Of Oz”})
We have our collection, but the collection is not yet accessible in a useful way by DSF. Within the Imperva DSF portal, an index pattern would need to be defined for the collection, and it is that index pattern that you can consider to be your conventional database table (for query purposes and the such):
Pick the time tag field from the dropdown list, and name your index pattern:
Your index pattern is now available for use within the Data Security Fabric portal, and you can consider the index pattern to be just as accessible as a conventional database table:
For use cases that require the programmatic retrieval of documents from the collection, an example Python program follows:
For more on this topic see – MongoDB: The Definitive Guide: Powerful and Scalable Data Storage 3rd Edition – by Shannon Bradshaw, Eoin Brazil, Kristina Chodorow
The post How to use DSF Collections & Index Patterns – A Tutorial appeared first on Blog.
*** This is a Security Bloggers Network syndicated blog from Blog authored by Vince Mastromarco. Read the original post at: https://www.imperva.com/blog/how-to-use-dsf-collections-index-patterns-a-tutorial/