diff --git a/.env b/.env index a71f157699..9ab702cbe0 100644 --- a/.env +++ b/.env @@ -126,4 +126,4 @@ _APP_PROJECT_REGIONS=default _APP_FUNCTIONS_CREATION_ABUSE_LIMIT=5000 _APP_STATS_USAGE_DUAL_WRITING_DBS=database_db_main _APP_TRUSTED_HEADERS=x-forwarded-for -_APP_CONSOLE_DEV_KEY_SECRET=a-secret-key \ No newline at end of file +_APP_PLATFORM_DEV_KEY_SECRET=a-secret-key \ No newline at end of file diff --git a/app/config/console.php b/app/config/console.php index 6d99758ad3..d369fc9781 100644 --- a/app/config/console.php +++ b/app/config/console.php @@ -52,15 +52,15 @@ $console = [ 'smtpBaseTemplate' => APP_BRANDED_EMAIL_BASE_TEMPLATE, 'devKeys' => [ new Document([ - '$id' => ID::custom('consoleDevKey'), + '$id' => ID::custom('platformDevKey'), '$permissions' => [], 'projectInternalId' => ID::custom('console'), 'projectId' => ID::custom('console'), - 'name' => 'Console dev key', + 'name' => 'Platform dev key', 'expire' => null, 'sdks' => [], 'accessedAt' => null, - 'secret' => System::getEnv('_APP_CONSOLE_DEV_KEY_SECRET') + 'secret' => System::getEnv('_APP_PLATFORM_DEV_KEY_SECRET') ]) ] ]; diff --git a/docker-compose.yml b/docker-compose.yml index 38a991ef70..ca2178f175 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -224,7 +224,7 @@ services: - _APP_FUNCTIONS_CREATION_ABUSE_LIMIT - _APP_CUSTOM_DOMAIN_DENY_LIST - _APP_TRUSTED_HEADERS - - _APP_CONSOLE_DEV_KEY_SECRET + - _APP_PLATFORM_DEV_KEY_SECRET extra_hosts: - "host.docker.internal:host-gateway" diff --git a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php index 64c0eac641..762b35a1ed 100644 --- a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php +++ b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php @@ -5382,16 +5382,16 @@ class ProjectsConsoleClientTest extends Scope */ public function testConsoleDevKeys(): void { - $consoleDevKey = System::getEnv('_APP_CONSOLE_DEV_KEY_SECRET', ''); + $platformDevKey = System::getEnv('_APP_PLATFORM_DEV_KEY_SECRET', ''); $abuseMockKey = 'key_' . \uniqid(); - $this->assertNotEmpty($consoleDevKey); + $this->assertNotEmpty($platformDevKey); $client = $this->client; - $hitMockEndpoint = function (bool $withDevKey) use ($client, $consoleDevKey, $abuseMockKey) { + $hitMockEndpoint = function (bool $withDevKey) use ($client, $platformDevKey, $abuseMockKey) { $headers = []; if ($withDevKey) { - $headers['x-appwrite-dev-key'] = $consoleDevKey; + $headers['x-appwrite-dev-key'] = $platformDevKey; } $response = $client->call(Client::METHOD_GET, '/mock/tests/abuse', $headers, [