eloquent-model-encrypt merge requestshttps://git.customd.com/composer/eloquent-model-encrypt/-/merge_requests2024-02-07T13:55:44+13:00https://git.customd.com/composer/eloquent-model-encrypt/-/merge_requests/16chore: corrected encrypt, decrypt function descriptions2024-02-07T13:55:44+13:00Ravindu Thaveeshachore: corrected encrypt, decrypt function descriptionsCorrected the encrypt, decrypt function descriptions on Abstracts/Engine.php class.Corrected the encrypt, decrypt function descriptions on Abstracts/Engine.php class.Ravindu ThaveeshaRavindu Thaveeshahttps://git.customd.com/composer/eloquent-model-encrypt/-/merge_requests/15fix: Checks whether there are any encrypted fields changing in an update, and...2024-02-07T13:55:44+13:00Craig Smithfix: Checks whether there are any encrypted fields changing in an update, and...fix: Checks whether there are any encrypted fields changing in an update, and bypasses encryption if not.fix: Checks whether there are any encrypted fields changing in an update, and bypasses encryption if not.https://git.customd.com/composer/eloquent-model-encrypt/-/merge_requests/14Draft: Feat/cache old attributes2022-12-08T15:28:25+13:00Rick HambrookDraft: Feat/cache old attributesAdding a trait that will allow easy access to non-encrypted from/to (before/after) values after model updates.
The trait: `CacheOldAttributesTrait`
Get changes: `$changes = $model->getUpdatedAttributes();`
Format:
```php
array [
"...Adding a trait that will allow easy access to non-encrypted from/to (before/after) values after model updates.
The trait: `CacheOldAttributesTrait`
Get changes: `$changes = $model->getUpdatedAttributes();`
Format:
```php
array [
"first_name": [
"from": "Jane",
"to": "John"
],
"last_name": [
"from": "Smithe",
"to": "Smith"
],
]
```
All names are WIP and open to change.
### Notes
#### Fuzzy Dirtiness
Currently the trait uses fuzzier checks than standard `getDirty()`. Eg `5` > `5.0` will not be considered dirty. Perhaps this can be configured on a per-attribute basis. This is based off the updated value being cast to the same `type` as the original value on the model. So `false` on the model will match `0` as an updated value.
#### Return Format
Usually the return format is an array keyed by the field name with the values being an array with `from` and `to` values. Passing `true` to the `getUpdatedAttributes()` function will return the sub-array as json encoded for better compatibility with [Spatie Activity Log](https://github.com/spatie/laravel-activitylog).https://git.customd.com/composer/eloquent-model-encrypt/-/merge_requests/13Draft: Resolve "[Feature] - Api token Storage Ability"2022-09-08T09:17:38+12:00Craig SmithDraft: Resolve "[Feature] - Api token Storage Ability"Closes #4
* [ ] migration for pem tokens
* [ ] ability to assign to a Bearer Token
* [ ] ability to assign to a unique key
* [ ] ability to enforce a expiry
* [ ] ability to work with refresh tokens / bearer tokens (passport)Closes #4
* [ ] migration for pem tokens
* [ ] ability to assign to a Bearer Token
* [ ] ability to assign to a unique key
* [ ] ability to enforce a expiry
* [ ] ability to work with refresh tokens / bearer tokens (passport)Craig SmithCraig Smithhttps://git.customd.com/composer/eloquent-model-encrypt/-/merge_requests/12feat: Lara 9 / php 82022-08-11T16:58:45+12:00Craig Smithfeat: Lara 9 / php 8Breaking Change: no loner supporting older versionBreaking Change: no loner supporting older versionhttps://git.customd.com/composer/eloquent-model-encrypt/-/merge_requests/11fix: only map through fields that are to be encypted2021-12-08T11:40:21+13:00Craig Smithfix: only map through fields that are to be encyptedFixes issues with encryption
it should:
[ ] loop through all attributes that have been set
[ ] filter out any that are not encryptable
[ ] encrypt any remaining values that are not encryptedFixes issues with encryption
it should:
[ ] loop through all attributes that have been set
[ ] filter out any that are not encryptable
[ ] encrypt any remaining values that are not encryptedCraig SmithCraig Smithhttps://git.customd.com/composer/eloquent-model-encrypt/-/merge_requests/10feat: Upgrade syntax for migrations2021-09-01T14:06:05+12:00Craig Smithfeat: Upgrade syntax for migrations--- deprecates existing methods and these should be updated--- deprecates existing methods and these should be updatedhttps://git.customd.com/composer/eloquent-model-encrypt/-/merge_requests/9debugging data2022-08-23T14:15:58+12:00Craig Smithdebugging datahttps://git.customd.com/composer/eloquent-model-encrypt/-/merge_requests/8Update src/Traits/Keystore.php, src/Observers/Encryption.php,...2020-11-23T09:49:13+13:00Craig SmithUpdate src/Traits/Keystore.php, src/Observers/Encryption.php,...Update src/Traits/Keystore.php, src/Observers/Encryption.php, src/Traits/Decryption.php, README.md filesUpdate src/Traits/Keystore.php, src/Observers/Encryption.php, src/Traits/Decryption.php, README.md filesSam SehnertSam Sehnerthttps://git.customd.com/composer/eloquent-model-encrypt/-/merge_requests/7Update composer.json, src/ModelEncryption.php, src/Observers/Encryption.php,...2020-11-18T16:00:36+13:00Craig SmithUpdate composer.json, src/ModelEncryption.php, src/Observers/Encryption.php,...Update to deal with db names where we prefix the connection name to the table.
this was beign carried over into the encryption and causing issuesUpdate to deal with db names where we prefix the connection name to the table.
this was beign carried over into the encryption and causing issuesSam SehnertSam Sehnerthttps://git.customd.com/composer/eloquent-model-encrypt/-/merge_requests/6Refactor keystore2020-05-06T09:15:58+12:00Sam SehnertRefactor keystoreWhat I Did
----------
+ Updated keystore to select key entries in one statement instead of two
+ Updated decryption and observer to only load keystore entries if something needs to be decrypted or encrypted
Implications
------------
Thi...What I Did
----------
+ Updated keystore to select key entries in one statement instead of two
+ Updated decryption and observer to only load keystore entries if something needs to be decrypted or encrypted
Implications
------------
This may affect updating of records in particular.
Testing
-------
+ Install this package in TPS or ArtMoney Laravel systems
+ Ensure encryption and decryption works as expected
+ Take special care to test updating of records, and ensuring the appropriate users / keys can decrypt again.Craig SmithCraig Smithhttps://git.customd.com/composer/eloquent-model-encrypt/-/merge_requests/5Laravel 7 compatability2020-04-27T13:56:54+12:00Craig SmithLaravel 7 compatabilityhttps://git.customd.com/composer/eloquent-model-encrypt/-/merge_requests/4Update encryption keys to automatically map newer users to the keys if need be.2020-02-25T16:22:36+13:00Craig SmithUpdate encryption keys to automatically map newer users to the keys if need be.Sam SehnertSam Sehnerthttps://git.customd.com/composer/eloquent-model-encrypt/-/merge_requests/3Feature/openssl seal2019-11-19T13:37:56+13:00Craig SmithFeature/openssl seal## What I Did
+ updated dependancy of eloquent-async-keys to the updated version (Review first)
+ updated keystore tables / database mappings
+ moved model events into observer
* Note: requires updated `eloquent-async-keys` to be merged...## What I Did
+ updated dependancy of eloquent-async-keys to the updated version (Review first)
+ updated keystore tables / database mappings
+ moved model events into observer
* Note: requires updated `eloquent-async-keys` to be merged and tagged (2.0.0) first
* Note: minimal tests currently - only has a global encryption providerSam SehnertSam Sehnerthttps://git.customd.com/composer/eloquent-model-encrypt/-/merge_requests/2Minor fix to sort out issues with encryption and null values2019-11-04T14:10:35+13:00Craig SmithMinor fix to sort out issues with encryption and null valueshttps://git.customd.com/composer/eloquent-model-encrypt/-/merge_requests/1Fixed for decryption errors to allow to continue on (engine not provided / ke...2019-10-18T13:35:39+13:00Craig SmithFixed for decryption errors to allow to continue on (engine not provided / key not provided)