php - Symfony, how can I make the credential from an in_memory provider private in a public code base? -


i setup symfony project use credential in_memory provider:

providers:     in_memory:         memory:             users:                 user1:                     password: password1                     roles: 'role1' 

now code application going released on github , want keep credentials private.

is there way load configurations different (non-versioned) file? i'm looking solution allows me edit code little possible and, if possible, avoid changing security provider used.

you can define password parameter

in security.yml :

providers:     in_memory:         memory:             users:                 user1:                     password: "%your_parameter_key%"                     roles: 'role1' 

in parameters.yml :

parameters:     your_parameter_key: your_secret_password 

usually, parameters.yml should ignored git.


Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -