From 55f25878a6eca7d0af1652eee52ef05f51fa74f2 Mon Sep 17 00:00:00 2001 From: Marcel Date: Wed, 11 Mar 2015 11:14:07 +0100 Subject: [PATCH] Updated some documentation --- README.md | 31 ++++++++++++++++++++++-- Resources/doc/configuration_reference.md | 9 ++----- Resources/doc/index.md | 3 +-- Resources/doc/installation.md | 2 +- 4 files changed, 33 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 6e8dd3e2..d23cf355 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,35 @@ help of some encryption algorithm in database and it will be clearly for develop This is an fork from the original bundle created by vmelnik-ukrain (Many thanks to him) which can be found here: [vmelnik-ukraine/DoctrineEncryptBundle](https://github.com/vmelnik-ukraine/DoctrineEncryptBundle) -I improved several things, i make better use of the doctrine events. -and it works with lazy loading (relationships)! +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](https://ambta.com) + +###What does it do exactly + +It gives you the opportunity to add the @Encrypt annotation above each (string/text) field + +``` +/** + * @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 diff --git a/Resources/doc/configuration_reference.md b/Resources/doc/configuration_reference.md index f1e820c1..52b7ea98 100644 --- a/Resources/doc/configuration_reference.md +++ b/Resources/doc/configuration_reference.md @@ -1,19 +1,14 @@ #Configuration Reference -All available configuration options are listed below with their default values. +All available configuration options are listed below. ``` yaml - ambta_doctrine_encrypt: - # Secret key for encrypt algorithm. All secret key checks are encryptor tasks only. # We recommend an 32 character long key (256 bits), Use another key for each project! - +# Store a backup of this key on a secure location, losing this key will mean losing your data! secret_key: ~ # Required - # If you want, you can use your own Encryptor. Encryptor must implements EncryptorInterface interface # Default: Ambta\DoctrineEncryptBundle\Encryptors\AES256Encryptor - encryptor_class: ~ #optional - ``` diff --git a/Resources/doc/index.md b/Resources/doc/index.md index 1cb3662d..36b5bfe3 100644 --- a/Resources/doc/index.md +++ b/Resources/doc/index.md @@ -1,7 +1,6 @@ #DoctrineEncryptBundle -This bundle is responsible for encryption/decryption of the data in DB. All encryption/decryption work -on PHP side +This bundle is responsible for encryption/decryption of the data in DB. All encryption/decryption work on PHP side The following documents are available: diff --git a/Resources/doc/installation.md b/Resources/doc/installation.md index a22379a4..cf6e21f2 100644 --- a/Resources/doc/installation.md +++ b/Resources/doc/installation.md @@ -25,7 +25,7 @@ Composer will install the bundle to your project's `vendor/ambta` directory. ### Step 2: Enable the bundle -Enable the bundle in the kernel: +Enable the bundle in the kernel by adding it: ``` php