Skip to content

Commit e24bbee

Browse files
committed
Enable signed audience by default
1 parent 964ddd4 commit e24bbee

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Please check the table below on what the values mean and what their value should
7171
| `STACKKIT_CLOUD_TASKS_QUEUE` | The default queue a job will be added to |`emails`
7272
| `STACKKIT_CLOUD_TASKS_SERVICE_EMAIL` | The email address of the service account. Important, it should have the correct roles. See the section below which roles. |`[email protected]`
7373
| `STACKKIT_CLOUD_TASKS_HANDLER` (optional) | The URL that Cloud Tasks will call to process a job. This should be the URL to your Laravel app. By default we will use the URL that dispatched the job. |`https://<your website>.com`
74-
| `STACKKIT_CLOUD_TASKS_SIGNED_AUDIENCE` (optional) | True or false depending if you want extra security by signing the audience of your tasks. May misbehave in certain Cloud Run setups. Defaults to false. | `false`
74+
| `STACKKIT_CLOUD_TASKS_SIGNED_AUDIENCE` (optional) | True or false depending if you want extra security by signing the audience of your tasks. May misbehave in certain Cloud Run setups. Defaults to true. | `true`
7575
</details>
7676
<details>
7777
<summary>

src/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public static function getHandler($handler): string
8989
*/
9090
public static function getAudience(array $config): ?string
9191
{
92-
return $config['signed_audience'] ?? false
92+
return $config['signed_audience'] ?? true
9393
? hash_hmac('sha256', self::getHandler($config['handler']), config('app.key'))
9494
: null;
9595
}

tests/TestCase.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ protected function getEnvironmentSetUp($app)
103103
'location' => 'europe-west6',
104104
'handler' => env('CLOUD_TASKS_HANDLER', 'https://docker.for.mac.localhost:8080'),
105105
'service_account_email' => '[email protected]',
106+
'signed_audience' => true,
106107
]);
107108
$app['config']->set('queue.failed.driver', 'database-uuids');
108109
$app['config']->set('queue.failed.database', 'testbench');

0 commit comments

Comments
 (0)