Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Per-user encryption #2

Open
thyseus opened this issue Nov 7, 2016 · 0 comments
Open

Per-user encryption #2

thyseus opened this issue Nov 7, 2016 · 0 comments

Comments

@thyseus
Copy link

thyseus commented Nov 7, 2016

Hey,

thanks for this great extension. In 2015 you wrote:

The current version currently uses a global key for encryption, but in the future I will add an easy way to do per-user encryption.

The only issue with per-user encryption is that you need to generate and store the user key otherwise you'd obviously lose the data. I just want to think about the best approach to include that without either assuming too much stuff or increasing the coupling.

I will probably release a new version next week with per-user encryption anyway!

How about using a PHP callback function to determine the current necessary password, like this:

'password' => function() { return Yii::$app->user->secret; }

Of course, the user needs to ensure that his secret never changes over time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant