Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #190
What does this PR do?
Allows to store an encrypted ID number as a new user verification type. The model makes use of a key identifier which value is expected to be defined in application secrets.
How should this be manually tested?
Define in
config/secrets.yml
a new secret using RSA public key algorithm for the value. To create a valid key use, for example:You can create a new id number verification calling:
Once saved,
verification
will only store theid_number
encrypted with the previously defined key. This value is accessible callingverification.encrypted_id_number
Does this PR changes any configuration file?
Not directly, but to create valid User::Verification::IdNumber instances at least a public key using RSA public key algorithm should be defined in
config/secrets.yml
and used in encryption_key attribute..env.example
?config/application.yml
?config/secrets.yml
?(Changes in these files might need to update the role in Ansible)