You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: UPGRADING.md
+18-14Lines changed: 18 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,17 +32,6 @@ The following items have been added. Copy the properties in **src/Config/Auth.ph
32
32
- `permission_denied` and `group_denied` are added to `Config\Auth::$redirects`.
33
33
- `permissionDeniedRedirect()` and `groupDeniedRedirect()` are added.
34
34
35
-
#### Config\AuthToken
36
-
37
-
If you are using the HMAC authentication you need to update the encryption settings in **app/Config/AuthToken.php**.
38
-
You will need to update and set the encryption key `$hmacEncryptionKey`. This should be set using .env and/or system
39
-
environment variables. Instructions on how to do that can be found in the
40
-
[Setting Your Encryption Key](https://codeigniter.com/user_guide/libraries/encryption.html#setting-your-encryption-key)
41
-
section of the CodeIgniter 4 documentation.
42
-
43
-
You also may wish to adjust the default Driver `$hmacEncryptionDriver` and the default Digest `$hmacEncryptionDigest`,
44
-
these currently default to `'OpenSSL'` and `'SHA512'` respectively.
45
-
46
35
### Fix Custom Filter If extends `AbstractAuthFilter`
47
36
48
37
If you have written a custom filter that extends `AbstractAuthFilter`, now you need to add and implement the `redirectToDeniedUrl()` method to your custom filter.
@@ -58,10 +47,25 @@ protected function redirectToDeniedUrl(): RedirectResponse
58
47
->with('error', lang('Auth.notEnoughPrivilege'));
59
48
}
60
49
```
61
-
### Database Migrations
62
50
63
-
After updating the `$hmacEncryptionKey` value, you will need to run `php spark migrate --all` in order to encrypt any
64
-
existing HMAC tokens.
51
+
### Fix to HMAC Secret Key Encryption
52
+
53
+
#### Config\AuthToken
54
+
55
+
If you are using the HMAC authentication you need to update the encryption settings in **app/Config/AuthToken.php**.
56
+
You will need to update and set the encryption key `$hmacEncryptionKey`. This should be set using .env and/or system
57
+
environment variables. Instructions on how to do that can be found in the
58
+
[Setting Your Encryption Key](https://codeigniter.com/user_guide/libraries/encryption.html#setting-your-encryption-key)
59
+
section of the CodeIgniter 4 documentation.
60
+
61
+
You also may wish to adjust the default Driver `$hmacEncryptionDriver` and the default Digest `$hmacEncryptionDigest`,
62
+
these currently default to `'OpenSSL'` and `'SHA512'` respectively.
63
+
64
+
#### Encrypt Existing Keys
65
+
66
+
After updating the `$hmacEncryptionKey` value, you will need to run `php spark shield:hmac encrypt` in order to encrypt
67
+
any existing HMAC tokens. This only needs to be run if you have existing unencrypted HMAC secretKeys in stored in the
0 commit comments