Download the PHP package xorgxx/doctrine-encryptor-bundle without Composer
On this page you can find all versions of the php package xorgxx/doctrine-encryptor-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download xorgxx/doctrine-encryptor-bundle
More information about xorgxx/doctrine-encryptor-bundle
Files in xorgxx/doctrine-encryptor-bundle
Package doctrine-encryptor-bundle
Short Description This bundle provides Encrypt/Decrypt data sensible in a Db system in your application.Its main goal is to make it simple for you to manage encrypt & decrypt sensible data into Db!This bundle is to refresh the old bundle [DoctrineEncryptBundle]
License proprietary
Informations about the package doctrine-encryptor-bundle
DoctrineEncryptorBundle { Symfony 6/7 }
This bundle provides Encrypt/Decrypt data sensible in a Db system in your application. Its main goal is to make it simple for you to manage encrypt & decrypt sensible data into Db! This bundle is to refresh the old bundle DoctrineEncryptBundle
The aim of this bundle is to establish, in an automatic and transparent manner, a robust encryption and decryption system by externalizing data, in strict compliance with European recommendations and the directives of the General Data Protection Regulation (GDPR).
PSR-12
Installation RELEASE !
Install the bundle for Composer
`
Doctrine migrations
🚨 You will have to make migration to add NeoxEncryptor in your entities. 🚨 `
Install, setup, folder, .pem .key
- You may have to create manual folder: config/doctrine-encryptor
php bin/console neox:encryptor:install
follow instruction (this command will setup config files : doctrine-encryptor & gaufrette for you).php bin/console neox:encryptor:openssl
follow instruction.
NOTE: You may need to use [ symfony composer dump-autoload ] to reload autoload
..... Done 🎈
Config file
doctrine_encryptor.yaml file `
We recommended setting up your cache system symfony cache
More security getting key form external store
🚨 We use KnpGaufrette . In this setup, all keys are stored externally and are not accessible from within your website. This means that even if someone gains access to your code, they won't be able to access the keys, providing an additional layer of security for your encryption system. In order, you have to configure at liste one "adapter": config/gaufrette.yaml `
/**
* ===== openSSLSym is match faster !! | ======
* openSSLAsym because is Asymetric we cant put macth data in encrypte SO it's not working well yet!!
* 🚨 Due to instability issues (after ~100 caractes), it is advisable not to use
* the openSSLAsym encryptor for handling advanced data typing (obejt, array, ...).!!
**/
- Cipher Algorithm list
- Encryptor list
- Logs & reversing
Usage !
In entity, you want to secure field (data) in Entity ``
Custom facker
This is special to manage typing and want to be shown in a database. Most of the attributes are recognized be the bundle string, int, date ...., But in some cas as PhoneNumber, [...] bundle will not recognized! So you will need to add service.
Then is Entity file add attribute [facker: PhoneFacker::class]
TWIG
To manage on template twig to decrypt field `
Important !
Consider the size / length of field you want to crypt when you chose "in" !! ex: length:20 ``
Beware !!
- NO possibility to make index or search on field encrypted
🚨 🚨 Danger 🚨🚨
!!! Before you change anything key, attribute "in"/"out" ... !!!
- Decrypt all before
- Change what you want ex: attribute from "in" to "out"
- Encrypt ALL
[CLI] Command build-in
php bin/console neox:encryptor:wasaaaa
// command line to crypt/decryptphp bin/console neox:encryptor:openssl
// command to create .pem & .keyphp bin/console neox:encryptor:halite
// command to create .pem & .keyphp bin/console neox:encryptor:switch
// command to switch to new encryptor: ex: halite to openSSLSymphp bin/console neox:encryptor:renew // command to change all .pem & .key files. mainly to change cryptage.
For exemple | php bin/console neox:encryptor:switch | Process automatique will do this : ex: halite to openSSLSym
- Decrypt all with the current encryptor halite
- Modify in doctrine_encryptor.yaml |-> encryptor_system: halite >>> openSSLSym
- Clear the cache
- Then you can encrypt by using
php bin/console neox:encryptor:wasaaaa
as normally.
!! ??? WASAAAA ? 😉
❔Now if you encrypt or decrypt much time, it will just be crypt or decrypt much time. Data will still be manage.
Tools power
Occasionally, we may require access to a full range of data (4000 lines or more) for various checks or analyses. However, waiting for hours due to the conversion of encrypted data is not desirable. In such cases, disabling the EventListener is imperative. `
🚨🚨 FEATURE ADVANCE in the box in a future version
Contributing
If you want to contribute (thank you!) to this bundle, here are some guidelines:
-
I'm not an expert in Pest/PHPUnit testing, so I haven't been able to complete the tests. If anyone can offer assistance, please reach out to me. Thank you!
- Please respect the Symfony guidelines
- Test everything! Please add tests cases to the tests/ directory when:
- You fix a bug that wasn't covered before
- You add a new feature
- You see code that works but isn't covered by any tests (there is a special place in heaven for you)
Todo
History/log of command line to have protection when encrypt/decrypt !!- Testing App !! Need help for this.
- IT DAS NOT CONVERT ADVANCE TYPE (objet, array, date ....)
Add a Remote system for storage Hash => Keyto be able to encrypt/decrypt, according to a propriety type | int, string, phone ....Custom provider class Encrypt/decrypt.Dispatcher to custom code.Command wasaaaa : to manage more easily status, encrypt, decrypt ....
Thanks
All versions of doctrine-encryptor-bundle with dependencies
ext-openssl Version *
doctrine/doctrine-bundle Version ^2.0|^3.0
doctrine/orm Version ^2.0|^3.0
knplabs/knp-gaufrette-bundle Version *
paragonie/halite Version ^5.1
symfony/config Version ^6.3|^7.0
symfony/console Version ^6.3|^7.0
symfony/dependency-injection Version ^6.3|^7.0
symfony/deprecation-contracts Version ^2.2|^3
symfony/framework-bundle Version ^6.3|^7.0
symfony/process Version ^6.3|^7.0
symfony/property-access Version ^6.3|^7.0
symfony/string Version ^6.3|^7.0
twig/twig Version ^2.12|^3.0
symfony/yaml Version ^6.3|^7.0