Coder Social home page Coder Social logo

henridv / doctrineencryptbundle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ambta/doctrineencryptbundle

0.0 2.0 0.0 94 KB

Bundle allows you to create doctrine entities with fields that will be protected by an encryption algorithms

License: MIT License

PHP 100.00%

doctrineencryptbundle's Introduction

DoctrineEncryptBundle

Bundle allows to create doctrine entities with fields that will be protected with help of some encryption algorithm in database and it will be clearly for developer, because bundle is uses doctrine life cycle events

This is an fork from the original bundle created by vmelnik-ukrain (Many thanks to him) which can be found here: vmelnik-ukraine/DoctrineEncryptBundle

I improved several things, i make better use of the doctrine events. and it works with lazy loading (relationships)! This will be an long term project we will be working on with long-term support and backward compatibility. We are using this bundle in all our own symfony2 project. More about us can be found on our website. Ambta.com

What does it do exactly

It gives you the opportunity to add the @Encrypt annotation above each string property

/**
 * @Encrypt
 */
protected $username;

The bundle uses doctrine his life cycle events to encrypt the data when inserted into the database and decrypt the data when loaded into your entity manager. It is only able to encrypt string values at the moment, numbers and other fields will be added later on in development.

Advantages and disadvantaged of an encrypted database

Advantages

  • Information is stored safely
  • Not worrying about saving backups at other locations
  • Unreadable for employees managing the database

Disadvantages

  • Can't use ORDER BY on encrypted data
  • In SELECT WHERE statements the where values also have to be encrypted
  • When you lose your key you lose your data (Make a backup of the key on a safe location)

Documentation

This bundle is responsible for encryption/decryption of the data in your database. All encryption/decryption work on the server side.

The following documents are available:

License

This bundle is under the MIT license. See the complete license in the bundle

Versions

I'm using Semantic Versioning like described here

Todos

The following items will be done in order

  1. Review of complete code + fixes/improvements and inline documentation (2.1.1)
  2. Add support for the other doctrine relationships (manyToMany, ManyToOne) (2.2)
  3. Recreate documentation (2.3)
  4. Create example code (2.3)
  5. Create an function to encrypt unencrypted database and vice versa (console command, migration, changed key, etc.) (2.4)
  6. Look for a posibility of automatic encryption of query parameters (2.5)
  7. Look for a posibility to override findOneBy for automatic encryption of parameters (2.6)
  8. Add support to encrypt data by reference to other property as key (Encrypt data specific to user with user key etc.) (2.7)
  9. Add Format-preserving encryption for all data types Doctrine documentation Types (3.0)

doctrineencryptbundle's People

Contributors

dev-marcel avatar vmelnik-ukraine avatar michaelfeinbier avatar ambta avatar maks-rafalko avatar mkraemer avatar benr77 avatar henridv avatar wassafr avatar jongotlin avatar bboykeen avatar ph-lars avatar valegar avatar westinpigott avatar jr-k avatar wcoppens avatar

Watchers

 avatar James Cloos 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.