Rename to platform key

This commit is contained in:
Matej Bačo committed 2025-12-31 14:44:55 +01:00
1 parent 81b5abd756
commit d6717bfc67
4 files changed
+9 -9

No files matched your search

+1 -1
View File
@@ -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
_APP_PLATFORM_DEV_KEY_SECRET=a-secret-key
+3 -3
View File
@@ -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')
])
]
];
+1 -1
View File
@@ -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"
@@ -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, [