What Xray databases are used for?


Differences and purpose of Xray databases:


MongoDB – includes the following:
1. Vulnerabilities – holds information about vulnerabilities and components (not artifacts – components can have several files)
2. Watches – an identity that defines the scope of the resources you want to watch
3. Policies – an identity which enforces security and license compliance behaviors
4. Components which comes from outside – extra metadata and info on components such as: who created the component, last updated, etc

PosgreSQL – holds files' data – during indexing, all the data is saved on the PostgreSQL database and includes the indexed components, component ID and checksums.
Xray checks if there is a match between vulnerability and component on the components table. If there is a match, it triggers a violation.

RabbitMQ is quite different than the rest of the databases – it's holding and managing all the messages of Xray in queues.
It includes events, indexing, persists and analyzing messages. Events can refer to the events which are being sent from Artifactory instances.
Indexing is the process of indexing artifacts that are being download from Artifactory, persists is the part of processing information to the database.
Analyzing is referring to scanning or sending notifications which are part of the analyzing process.