Skip to content

Encrypted database password in tenant_db_config #44

Answered by Shotman
KrijnK asked this question in Q&A
Discussion options

You must be logged in to vote

I actually did something like that by creating new properties in my DbConfig entity (the one extending TenantDbConfigurationInterface and using the TenantDbConfigTrait Trait) called dbNameSecure dbPortSecure etc and using https://github.com/mediamonks
doctrine-extensions transformable for encryption I used defuse encryption
and then overwritting the getters and setters for the normal properties to retreive/set the encrypted ones
For example with the password field :

//create a new column
    #[ORM\Column(type: Types::BLOB, nullable: true, options: ["default" => null])]
    #[Transformable(name: 'defuse_encrypt_key')]
    protected $dbPasswordSecure = null;

//REST OF THE ENTITY
//Override…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by KrijnK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants