Giter VIP home page Giter VIP logo

flac-mongodb's Introduction

FLAC for mongodb - provides a way to do field level access control in mongodb using 2.6+ that has support for redact in aggregate:

    final BasicDBObject query = new BasicDBObject("firstName", "Sheldon");
    final BasicDBObject keys = new BasicDBObject();

    DBCollection dbCollectionSrc = getDbCollectionUsedForTesting();
    // below we use the UserSecurityAttributesMapCapco that knows how to do our application logic of
    // c:TS also maps to c:S,  c:C, and  c:U
    final UserSecurityAttributesMap userSecurityAttributes = new UserSecurityAttributesMapCapco("c" , "TS");

    RedactedDBCollection redactedDBCollection = new RedactedDBCollection(dbCollectionSrc, userSecurityAttributes);
    Cursor dbObjects = redactedDBCollection.find(query, keys);
    Cursor dbObjects = redactedDBCollection.aggregate( ... );

notice that we have a redactedDBCollection.find working on a DBCollection that is protected by FLAC access controls and that the find is really based on aggregate using $redac to limit sub-documents as needed

This effort differs from the one given in project: https://github.com/TPopovich/flac-mongodb-requires-changes-to-javacoredrivers as that one requires changes to the mongodb drivers, and that is harder to do -- any changes need to be carefully vetted before release as it could impact many important applications.

This project's effort is the enable effective usage of FLAC in mongodb. But not design it in a way to be as seamless in how you can use this new "DB Collection" as we did in the other project listed above. In that other project we created a unified DBCursor to access the output as you would using a native DBCollection from mongo. Here we have the same find() findOne() and aggregate() methods but they return Cursor output. This approach does not require any modification to mongodb's java drivers.

flac-mongodb's People

Contributors

tpopovich avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.