How can we ensure security and integrity of data stored in MongoDB?
You are mixing concepts here. Transactions are related to atomicity and guarantee that multiple operations are either executed as a whole or not at all.
Consistency, however is (simplified) the guarantee that after each successful transaction or operation applied, the database is in a a valid, usable state.
An example

Note This example is simplified for the sake of understandability.

Often people say that you can not use MongoDB for financial operations such as account balancing, since it lacks transactions. They could not be farer from the truth.
Take a simple example of two users, each with an account:
{
  _id:&quot;act1&quot;,
  owner: &quot;Foo Bar&quot;
},
{
  _id: &quot;act2&quot;,
  owner: &quot;Bar Baz&quot;
}

And now, we have a collection we call &quot;transfers&quot;. Each of our accounts get $100.00 from an outside source:
db.transfers.insert({from:&quot;Scroogey&quot;, to:&quot;act1&quot;, amount: 100.00, date: new ISODate()})
db.transfers.insert({from:&quot;Scroogey&quot;, to:&quot;act2&quot;, amount: 100.00 , date: new ISODate()}})

Now, how do we get the balance of our two accounts? Say Foo Bar wants to check his balance. We have to do an aggregation for that:
db.transfers.aggregate([
  { $match:{ $or:[ { from:&quot;act1&quot; },{ to:&quot;act1&quot; } ]}},
  { $sort:{ date:1 }},
  { $group:{
    _id:&quot;act1&quot;,
    balance:{
      $sum:{
        $cond:[
          { $eq: [ &quot;$to&quot;, &quot;act1&quot; ] },
          &quot;$amount&quot;,
          {$multiply:[&quot;$amount&quot;,-1]}
        ]}
      }
    }
  }
])

Which gives us the correct value when run against transfers:
{ &quot;_id&quot; : &quot;act1&quot;, &quot;balance&quot; : 100 }

So far, so good. So how does this relate to atomicity and consistency?

In MongoDB, a write operation is atomic on the level of a single document, even if the operation modifies multiple embedded documents within a single document.

So if we insert a document into the transfers collection, we achieve what we want: atomic transfers from and to accounts. Say Foo Bar wants to send Bar Baz $20.25:
db.transfers.insert({from:&quot;act1&quot;,to:&quot;act2&quot;, amount: 20.25, date: new ISODate()})

Atomic and consistent. Now, if we run our aggregation again, we get the correct result:
{ &quot;_id&quot; : &quot;act1&quot;, &quot;balance&quot; : 79.75 }

If Bar Baz checks his account
db.transfers.aggregate([
  { $match:{ $or:[ { from:&quot;act2&quot; },{ to:&quot;act2&quot; } ]}},
  { $sort:{ date:1 }},
  { $group:{
    _id:&quot;act2&quot;,
    balance:{
      $sum:{
        $cond:[
          { $eq: [ &quot;$to&quot;, &quot;act2&quot; ] },
          &quot;$amount&quot;,
          {$multiply:[&quot;$amount&quot;,-1]}
        ]}
      }
    }
  }
])

he sees the correct value, too:
{ &quot;_id&quot; : &quot;act2&quot;, &quot;balance&quot; : 120.25 }

We have an atomic system to do account balancing without transactions! And still we have a log of all transfers from and to an account which you need anyway. We just use it differently.
There is another way to do it
There is a way to achieve multi-document atomicity from the applications point of view, called Two-Phase-Commits.
Basically, it is an extension of the above. You'd have a transaction collection, in which pending operations are documented. Only if all operations are done successful, the transaction is marked as committed. There are various rollback scenarios. This is definetly more work than doing it like documented above, and should only be considered in case the data model can not be designed for the according use case. That would be the case when dealing with legacy systems, for example, in which you want to add features which would rely on transactions.
Basically you move the transaction logic from the DBMS to the application. This is not necessarily as disadvantage, since control over the various stages of a transaction which is supposed to be committed is much more granular.
Conclusion
As we have seen, there are not transactions. With careful data modeling and a bit of knowledge about the inner workings and tools provided by MongoDB, there is hardly any use case that can not be implemented with MongoDB. It might not be the best tool for any use case, however, and you should choose your persistence system carefully.
If you really need transactions, use the Two-Phase-Commit approach.