Skip to content

Commit 1caca2c

Browse files
[13.x] Add an upgrade guide entry for key file permissions (#1841)
* add upgrade guide entry for key file permissions * add alternative
1 parent 1507155 commit 1caca2c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

UPGRADE.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,25 @@ The JSON API provided by Passport has been deprecated. If you need to continue u
103103
Passport::$registersJsonApiRoutes = true;
104104
}
105105

106+
### Key Files Permissions Validation
107+
108+
PR: https://github.com/laravel/passport/pull/1789
109+
110+
Passport now validates the permissions of key files on supported operating systems. If you encounter an exception indicating incorrect permissions, you can fix it by running the following code once:
111+
112+
```php
113+
if (! windows_os()) {
114+
chmod(Passport::keyPath('oauth-public.key'), 0660);
115+
chmod(Passport::keyPath('oauth-private.key'), 0600);
116+
}
117+
```
118+
119+
Alternatively, you may disable this validation entirely (not recommended) by setting `Passport::$validateKeyPermissions` to `false` within the `boot` method of your application’s `App\Providers\AppServiceProvider` class:
120+
121+
```php
122+
Passport::$validateKeyPermissions = false;
123+
```
124+
106125
### OAuth Client Table Changes (Optional)
107126

108127
PR: https://github.com/laravel/passport/pull/1744, https://github.com/laravel/passport/pull/1797

0 commit comments

Comments
 (0)