2017 © Pedro Peláez
 

library doctrine-encrypt-bundle

Symfony 2 bundle which allows to encrypt data in database with some encrypt algorithm

image

ambta/doctrine-encrypt-bundle

Symfony 2 bundle which allows to encrypt data in database with some encrypt algorithm

  • Friday, September 30, 2016
  • by ambta
  • Repository
  • 5 Watchers
  • 48 Stars
  • 77,102 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 118 Forks
  • 28 Open issues
  • 19 Versions
  • 8 % Grown

The README.md

DoctrineEncryptBundle

Warning This repository is not actively maintained or developed anymore. In our opinion encrypting database information this way is not good practice and mainly gives little extra protection, but at a huge cost of usability and performance. It can only help when the database itself is stolen without keys. We have now phased it out in our own projects., (*1)

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, (*2)

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

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, (*4)

What does it do exactly

It gives you the opportunity to add the @Encrypted annotation above each string property, (*5)

/**
 * @Encrypted
 */
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., (*6)

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., (*7)

The following documents are available:, (*8)

License

This bundle is under the MIT license. See the complete license in the bundle, (*9)

Versions

I'm using Semantic Versioning like described here, (*10)

Todos

The following items will be done in order, (*11)

  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)

The Versions

30/09 2016

dev-master

9999999-dev

Symfony 2 bundle which allows to encrypt data in database with some encrypt algorithm

  Sources   Download

MIT

The Requires

 

by Marcel van Nuil

doctrine symfony encrypt aes256 decrypt rijndael

30/09 2016

2.5.4

2.5.4.0

Symfony 2 bundle which allows to encrypt data in database with some encrypt algorithm

  Sources   Download

MIT

The Requires

 

by Marcel van Nuil

doctrine symfony encrypt aes256 decrypt rijndael

20/09 2016

2.5.3

2.5.3.0

Symfony 2 bundle which allows to encrypt data in database with some encrypt algorithm

  Sources   Download

MIT

The Requires

 

by Marcel van Nuil

doctrine symfony encrypt aes256 decrypt rijndael

04/04 2016

2.5.2

2.5.2.0

Symfony 2 bundle which allows to encrypt data in database with some encrypt algorithm

  Sources   Download

MIT

The Requires

 

by Marcel van Nuil

doctrine symfony encrypt aes256 decrypt rijndael

08/02 2016

v2.5.1

2.5.1.0

Symfony 2 bundle which allows to encrypt data in database with some encrypt algorithm

  Sources   Download

MIT

The Requires

 

by Marcel van Nuil

doctrine symfony encrypt aes256 decrypt rijndael

08/02 2016

v2.5

2.5.0.0

Symfony 2 bundle which allows to encrypt data in database with some encrypt algorithm

  Sources   Download

MIT

The Requires

 

by Marcel van Nuil

doctrine symfony encrypt aes256 decrypt rijndael

18/01 2016

v2.4.5

2.4.5.0

Symfony 2 bundle which allows to encrypt data in database with some encrypt algorithm

  Sources   Download

MIT

The Requires

 

by Marcel van Nuil

doctrine symfony encrypt aes256 decrypt rijndael

02/09 2015

v2.4.4

2.4.4.0

Symfony 2 bundle which allows to encrypt data in database with some encrypt algorithm

  Sources   Download

MIT

The Requires

 

by Marcel van Nuil

doctrine symfony encrypt aes256 decrypt rijndael

02/09 2015

v2.4.3

2.4.3.0

Symfony 2 bundle which allows to encrypt data in database with some encrypt algorithm

  Sources   Download

MIT

The Requires

 

by Marcel van Nuil

doctrine symfony encrypt aes256 decrypt rijndael

03/08 2015

2.4.3

2.4.3.0

Symfony 2 bundle which allows to encrypt data in database with some encrypt algorithm

  Sources   Download

MIT

The Requires

 

by Marcel van Nuil

doctrine symfony encrypt aes256 decrypt rijndael

23/06 2015

v2.4.2

2.4.2.0

Symfony 2 bundle which allows to encrypt data in database with some encrypt algorithm

  Sources   Download

MIT

The Requires

 

by Marcel van Nuil

doctrine symfony encrypt aes256 decrypt rijndael

24/04 2015

2.4.1

2.4.1.0

Symfony 2 bundle which allows to encrypt data in database with some encrypt algorithm

  Sources   Download

MIT

The Requires

 

by Marcel van Nuil

doctrine symfony encrypt aes256 decrypt rijndael

16/04 2015

2.4

2.4.0.0

Symfony 2 bundle which allows to encrypt data in database with some encrypt algorithm

  Sources   Download

MIT

The Requires

 

by Marcel van Nuil

doctrine symfony encrypt aes256 decrypt

08/04 2015

2.2

2.2.0.0

Symfony 2 bundle which allows to encrypt data in database with some encrypt algorithm

  Sources   Download

MIT

The Requires

 

by Marcel van Nuil

doctrine symfony encrypt aes256 decrypt

12/03 2015

2.1.1

2.1.1.0

Symfony 2 bundle which allows to encrypt data in database with some encrypt algorithm

  Sources   Download

MIT

The Requires

 

by Victor Melnik
by Marcel van Nuil

doctrine symfony encrypt aes256 decrypt

11/03 2015

v2.1

2.1.0.0

Symfony 2 bundle which allows to encrypt data in database with some encrypt algorithm

  Sources   Download

MIT

The Requires

 

by Victor Melnik
by Marcel van Nuil

doctrine symfony encrypt aes256 decrypt

05/01 2013

2.0.1

2.0.1.0

Symfony 2 bundle which allows to encrypt data in database with some encrypt algorithm

  Sources   Download

MIT

The Requires

 

by Victor Melnik

doctrine encrypt aes256 decrypt

17/11 2012

2.0.0

2.0.0.0

Symfony 2 bundle which allows to encrypt data in database with some encrypt algorithm

  Sources   Download

MIT

The Requires

 

by Victor Melnik

doctrine encrypt aes256 decrypt

14/11 2012

1.0.0

1.0.0.0

Symfony 2 bundle which allows to encrypt data in database with some encrypt algorithm

  Sources   Download

MIT

The Requires

 

by Victor Melnik

doctrine encrypt aes256 decrypt