1
0
Fork 0
mirror of synced 2024-06-01 18:39:57 +12:00

Merge branch '0.14.x' of https://github.com/appwrite/appwrite into feat-new-event-model

This commit is contained in:
Torsten Dittmann 2022-04-19 15:16:43 +02:00
commit 0552f92d50
26 changed files with 121 additions and 80 deletions

1
.env
View file

@ -56,6 +56,7 @@ _APP_FUNCTIONS_MEMORY_SWAP=0
_APP_FUNCTIONS_INACTIVE_THRESHOLD=60
OPEN_RUNTIMES_NETWORK=appwrite_runtimes
_APP_EXECUTOR_SECRET=your-secret-key
_APP_EXECUTOR_HOST=http://appwrite-executor/v1
_APP_MAINTENANCE_INTERVAL=86400
_APP_MAINTENANCE_RETENTION_EXECUTION=1209600
_APP_MAINTENANCE_RETENTION_ABUSE=86400

View file

@ -1,3 +1,6 @@
# Unreleased Version
- Renamed `providers` to `authProviders` in project collection **Breaking Change**
# Version 0.13.4
## Features

View file

@ -185,6 +185,7 @@ ENV _APP_SERVER=swoole \
_APP_FUNCTIONS_MEMORY=128 \
_APP_FUNCTIONS_MEMORY_SWAP=128 \
_APP_EXECUTOR_SECRET=a-random-secret \
_APP_EXECUTOR_HOST=http://appwrite-executor/v1 \
_APP_EXECUTOR_RUNTIME_NETWORK=appwrite_runtimes \
_APP_SETUP=self-hosted \
_APP_VERSION=$VERSION \

View file

@ -512,7 +512,7 @@ $collections = [
'filters' => ['json'],
],
[
'$id' => 'providers',
'$id' => 'authProviders',
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,

View file

@ -81,7 +81,7 @@ return [
[
'key' => 'apple',
'name' => 'Apple',
'version' => '0.3.1',
'version' => '0.4.0',
'url' => 'https://github.com/appwrite/sdk-for-apple',
'package' => 'https://github.com/appwrite/sdk-for-apple',
'enabled' => true,
@ -116,7 +116,7 @@ return [
[
'key' => 'android',
'name' => 'Android',
'version' => '0.4.1',
'version' => '0.5.0',
'url' => 'https://github.com/appwrite/sdk-for-android',
'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-android',
'enabled' => true,
@ -180,7 +180,7 @@ return [
[
'key' => 'cli',
'name' => 'Command Line',
'version' => '0.15.0',
'version' => '0.16.0',
'url' => 'https://github.com/appwrite/sdk-for-cli',
'package' => 'https://www.npmjs.com/package/appwrite-cli',
'enabled' => true,
@ -208,7 +208,7 @@ return [
[
'key' => 'nodejs',
'name' => 'Node.js',
'version' => '5.0.0',
'version' => '5.1.0',
'url' => 'https://github.com/appwrite/sdk-for-node',
'package' => 'https://www.npmjs.com/package/node-appwrite',
'enabled' => true,
@ -226,7 +226,7 @@ return [
[
'key' => 'deno',
'name' => 'Deno',
'version' => '3.0.0',
'version' => '3.1.0',
'url' => 'https://github.com/appwrite/sdk-for-deno',
'package' => 'https://deno.land/x/appwrite',
'enabled' => true,
@ -244,7 +244,7 @@ return [
[
'key' => 'php',
'name' => 'PHP',
'version' => '4.0.0',
'version' => '4.1.0',
'url' => 'https://github.com/appwrite/sdk-for-php',
'package' => 'https://packagist.org/packages/appwrite/appwrite',
'enabled' => true,
@ -262,7 +262,7 @@ return [
[
'key' => 'python',
'name' => 'Python',
'version' => '0.7.0',
'version' => '0.8.0',
'url' => 'https://github.com/appwrite/sdk-for-python',
'package' => 'https://pypi.org/project/appwrite/',
'enabled' => true,
@ -280,7 +280,7 @@ return [
[
'key' => 'ruby',
'name' => 'Ruby',
'version' => '4.0.0',
'version' => '4.1.0',
'url' => 'https://github.com/appwrite/sdk-for-ruby',
'package' => 'https://rubygems.org/gems/appwrite',
'enabled' => true,
@ -370,7 +370,7 @@ return [
[
'key' => 'kotlin',
'name' => 'Kotlin',
'version' => '0.3.0',
'version' => '0.4.0',
'url' => 'https://github.com/appwrite/sdk-for-kotlin',
'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-kotlin',
'enabled' => true,
@ -392,7 +392,7 @@ return [
[
'key' => 'swift',
'name' => 'Swift',
'version' => '0.3.1',
'version' => '0.4.0',
'url' => 'https://github.com/appwrite/sdk-for-swift',
'package' => 'https://github.com/appwrite/sdk-for-swift',
'enabled' => true,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"version": "0.13.0",
"version": "0.13.4",
"title": "Appwrite",
"description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)",
"termsOfService": "https://appwrite.io/policy/terms",
@ -904,7 +904,7 @@
"parameters": [
{
"name": "provider",
"description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, vk, yahoo, yammer, yandex, wordpress, stripe.",
"description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, vk, zoom, yahoo, yammer, yandex, wordpress, stripe.",
"required": true,
"type": "string",
"x-example": "amazon",
@ -1656,7 +1656,7 @@
},
{
"name": "queries",
"description": "Array of query strings.",
"description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/database#querying-documents).",
"required": false,
"type": "array",
"collectionFormat": "multi",
@ -1904,7 +1904,7 @@
"properties": {
"data": {
"type": "object",
"description": "Document data as JSON object.",
"description": "Document data as JSON object. Include only attribute and value pairs to be updated.",
"default": {},
"x-example": "{}"
},
@ -1934,7 +1934,7 @@
"consumes": ["application/json"],
"produces": [],
"tags": ["database"],
"description": "Delete a document by its unique ID. This endpoint deletes only the parent documents, its attributes and relations to other documents. Child documents **will not** be deleted.",
"description": "Delete a document by its unique ID.",
"responses": { "204": { "description": "No content" } },
"x-appwrite": {
"method": "deleteDocument",

View file

@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"version": "0.13.0",
"version": "0.13.4",
"title": "Appwrite",
"description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)",
"termsOfService": "https://appwrite.io/policy/terms",
@ -918,7 +918,7 @@
"parameters": [
{
"name": "provider",
"description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, vk, yahoo, yammer, yandex, wordpress, stripe.",
"description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, vk, zoom, yahoo, yammer, yandex, wordpress, stripe.",
"required": true,
"type": "string",
"x-example": "amazon",
@ -2788,7 +2788,7 @@
},
{
"name": "queries",
"description": "Array of query strings.",
"description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/database#querying-documents).",
"required": false,
"type": "array",
"collectionFormat": "multi",
@ -3036,7 +3036,7 @@
"properties": {
"data": {
"type": "object",
"description": "Document data as JSON object.",
"description": "Document data as JSON object. Include only attribute and value pairs to be updated.",
"default": {},
"x-example": "{}"
},
@ -3066,7 +3066,7 @@
"consumes": ["application/json"],
"produces": [],
"tags": ["database"],
"description": "Delete a document by its unique ID. This endpoint deletes only the parent documents, its attributes and relations to other documents. Child documents **will not** be deleted.",
"description": "Delete a document by its unique ID.",
"responses": { "204": { "description": "No content" } },
"x-appwrite": {
"method": "deleteDocument",
@ -3723,7 +3723,7 @@
},
"/functions/runtimes": {
"get": {
"summary": "List the currently active function runtimes.",
"summary": "List runtimes",
"operationId": "functionsListRuntimes",
"consumes": ["application/json"],
"produces": ["application/json"],
@ -10212,12 +10212,12 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "count"
},
"type": {
"type": "string",
"description": "Attribute type.",
"x-example": "string"
"x-example": "integer"
},
"status": {
"type": "string",
@ -10266,12 +10266,12 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "percentageCompleted"
},
"type": {
"type": "string",
"description": "Attribute type.",
"x-example": "string"
"x-example": "double"
},
"status": {
"type": "string",
@ -10320,12 +10320,12 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "isEnabled"
},
"type": {
"type": "string",
"description": "Attribute type.",
"x-example": "string"
"x-example": "boolean"
},
"status": {
"type": "string",
@ -10359,7 +10359,7 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "userEmail"
},
"type": {
"type": "string",
@ -10403,7 +10403,7 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "status"
},
"type": {
"type": "string",
@ -10453,7 +10453,7 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "ipAddress"
},
"type": {
"type": "string",
@ -10497,7 +10497,7 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "githubUrl"
},
"type": {
"type": "string",
@ -11924,6 +11924,16 @@
"description": "VK OAuth secret ID.",
"x-example": "djsgudsdsewe43434343dd34..."
},
"providerZoomAppid": {
"type": "string",
"description": "Zoom OAuth app ID.",
"x-example": "123247283472834787438"
},
"providerZoomSecret": {
"type": "string",
"description": "Zoom OAuth secret ID.",
"x-example": "djsgudsdsewe43434343dd34..."
},
"providerYahooAppid": {
"type": "string",
"description": "Yahoo OAuth app ID.",
@ -12124,6 +12134,8 @@
"providerTwitchSecret",
"providerVkAppid",
"providerVkSecret",
"providerZoomAppid",
"providerZoomSecret",
"providerYahooAppid",
"providerYahooSecret",
"providerYammerAppid",

View file

@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"version": "0.13.0",
"version": "0.13.4",
"title": "Appwrite",
"description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)",
"termsOfService": "https://appwrite.io/policy/terms",
@ -2414,7 +2414,7 @@
},
{
"name": "queries",
"description": "Array of query strings.",
"description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/database#querying-documents).",
"required": false,
"type": "array",
"collectionFormat": "multi",
@ -2662,7 +2662,7 @@
"properties": {
"data": {
"type": "object",
"description": "Document data as JSON object.",
"description": "Document data as JSON object. Include only attribute and value pairs to be updated.",
"default": {},
"x-example": "{}"
},
@ -2692,7 +2692,7 @@
"consumes": ["application/json"],
"produces": [],
"tags": ["database"],
"description": "Delete a document by its unique ID. This endpoint deletes only the parent documents, its attributes and relations to other documents. Child documents **will not** be deleted.",
"description": "Delete a document by its unique ID.",
"responses": { "204": { "description": "No content" } },
"x-appwrite": {
"method": "deleteDocument",
@ -3123,7 +3123,7 @@
},
"/functions/runtimes": {
"get": {
"summary": "List the currently active function runtimes.",
"summary": "List runtimes",
"operationId": "functionsListRuntimes",
"consumes": ["application/json"],
"produces": ["application/json"],
@ -7461,12 +7461,12 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "count"
},
"type": {
"type": "string",
"description": "Attribute type.",
"x-example": "string"
"x-example": "integer"
},
"status": {
"type": "string",
@ -7515,12 +7515,12 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "percentageCompleted"
},
"type": {
"type": "string",
"description": "Attribute type.",
"x-example": "string"
"x-example": "double"
},
"status": {
"type": "string",
@ -7569,12 +7569,12 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "isEnabled"
},
"type": {
"type": "string",
"description": "Attribute type.",
"x-example": "string"
"x-example": "boolean"
},
"status": {
"type": "string",
@ -7608,7 +7608,7 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "userEmail"
},
"type": {
"type": "string",
@ -7652,7 +7652,7 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "status"
},
"type": {
"type": "string",
@ -7702,7 +7702,7 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "ipAddress"
},
"type": {
"type": "string",
@ -7746,7 +7746,7 @@
"key": {
"type": "string",
"description": "Attribute Key.",
"x-example": "fullName"
"x-example": "githubUrl"
},
"type": {
"type": "string",

View file

@ -597,6 +597,15 @@ return [
'question' => '',
'filter' => ''
],
[
'name' => '_APP_EXECUTOR_HOST',
'description' => 'The host used by Appwrite to communicate with the function executor!',
'introduction' => '0.13.0',
'default' => 'http://appwrite-executor/v1',
'required' => false,
'question' => '',
'filter' => ''
],
[
'name' => '_APP_EXECUTOR_RUNTIME_NETWORK',
'description' => 'Deprecated with 0.14.0, use \'OPEN_RUNTIMES_NETWORK\' instead!',

View file

@ -273,8 +273,8 @@ App::get('/v1/account/sessions/oauth2/:provider')
$protocol = $request->getProtocol();
$callback = $protocol.'://'.$request->getHostname().'/v1/account/sessions/oauth2/callback/'.$provider.'/'.$project->getId();
$appId = $project->getAttribute('providers', [])[$provider.'Appid'] ?? '';
$appSecret = $project->getAttribute('providers', [])[$provider.'Secret'] ?? '{}';
$appId = $project->getAttribute('authProviders', [])[$provider.'Appid'] ?? '';
$appSecret = $project->getAttribute('authProviders', [])[$provider.'Secret'] ?? '{}';
if (!empty($appSecret) && isset($appSecret['version'])) {
$key = App::getEnv('_APP_OPENSSL_KEY_V' . $appSecret['version']);
@ -396,8 +396,8 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect')
$callback = $protocol . '://' . $request->getHostname() . '/v1/account/sessions/oauth2/callback/' . $provider . '/' . $project->getId();
$defaultState = ['success' => $project->getAttribute('url', ''), 'failure' => ''];
$validateURL = new URL();
$appId = $project->getAttribute('providers', [])[$provider.'Appid'] ?? '';
$appSecret = $project->getAttribute('providers', [])[$provider.'Secret'] ?? '{}';
$appId = $project->getAttribute('authProviders', [])[$provider.'Appid'] ?? '';
$appSecret = $project->getAttribute('authProviders', [])[$provider.'Secret'] ?? '{}';
if (!empty($appSecret) && isset($appSecret['version'])) {
$key = App::getEnv('_APP_OPENSSL_KEY_V' . $appSecret['version']);
@ -1677,8 +1677,8 @@ App::patch('/v1/account/sessions/:sessionId')
$provider = $session->getAttribute('provider');
$refreshToken = $session->getAttribute('providerRefreshToken');
$appId = $project->getAttribute('providers', [])[$provider.'Appid'] ?? '';
$appSecret = $project->getAttribute('providers', [])[$provider.'Secret'] ?? '{}';
$appId = $project->getAttribute('authProviders', [])[$provider.'Appid'] ?? '';
$appSecret = $project->getAttribute('authProviders', [])[$provider.'Secret'] ?? '{}';
$className = 'Appwrite\\Auth\\OAuth2\\'.\ucfirst($provider);

View file

@ -975,7 +975,7 @@ App::post('/v1/functions/:functionId/executions')
]);
/** Execute function */
$executor = new Executor();
$executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST'));
$executionResponse = [];
try {
$executionResponse = $executor->createExecution(

View file

@ -97,7 +97,7 @@ App::post('/v1/projects')
'legalTaxId' => $legalTaxId,
'services' => new stdClass(),
'platforms' => null,
'providers' => [],
'authProviders' => [],
'webhooks' => null,
'keys' => null,
'domains' => null,
@ -449,11 +449,11 @@ App::patch('/v1/projects/:projectId/oauth2')
throw new Exception('Project not found', 404, Exception::PROJECT_NOT_FOUND);
}
$providers = $project->getAttribute('providers', []);
$providers = $project->getAttribute('authProviders', []);
$providers[$provider . 'Appid'] = $appId;
$providers[$provider . 'Secret'] = $secret;
$project = $dbForConsole->updateDocument('projects', $project->getId(), $project->setAttribute('providers', $providers));
$project = $dbForConsole->updateDocument('projects', $project->getId(), $project->setAttribute('authProviders', $providers));
$response->dynamic($project, Response::MODEL_PROJECT);
});

View file

@ -128,6 +128,7 @@ services:
- _APP_FUNCTIONS_MEMORY_SWAP
- _APP_FUNCTIONS_RUNTIMES
- _APP_EXECUTOR_SECRET
- _APP_EXECUTOR_HOST
- _APP_LOGGING_PROVIDER
- _APP_LOGGING_CONFIG
- _APP_STATSD_HOST
@ -268,6 +269,7 @@ services:
- _APP_LOGGING_PROVIDER
- _APP_LOGGING_CONFIG
- _APP_EXECUTOR_SECRET
- _APP_EXECUTOR_HOST
appwrite-worker-database:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
@ -310,6 +312,7 @@ services:
- _APP_ENV
- _APP_OPENSSL_KEY_V1
- _APP_EXECUTOR_SECRET
- _APP_EXECUTOR_HOST
- _APP_REDIS_HOST
- _APP_REDIS_PORT
- _APP_REDIS_USER
@ -379,6 +382,7 @@ services:
- _APP_DB_PASS
- _APP_FUNCTIONS_TIMEOUT
- _APP_EXECUTOR_SECRET
- _APP_EXECUTOR_HOST
- _APP_USAGE_STATS
- DOCKERHUB_PULL_USERNAME
- DOCKERHUB_PULL_PASSWORD

View file

@ -31,9 +31,8 @@ class BuildsV1 extends Worker
return "builds";
}
public function init(): void
{
$this->executor = new Executor();
public function init(): void {
$this->executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST'));
}
public function run(): void

View file

@ -370,7 +370,7 @@ class DeletesV1 extends Worker
* Request executor to delete all deployment containers
*/
Console::info("Requesting executor to delete all deployment containers for function " . $functionId);
$executor = new Executor();
$executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST'));
foreach ($deploymentIds as $deploymentId) {
try {
$executor->deleteRuntime($projectId, $deploymentId);
@ -422,7 +422,7 @@ class DeletesV1 extends Worker
*/
Console::info("Requesting executor to delete deployment container for deployment " . $deploymentId);
try {
$executor = new Executor();
$executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST'));
$executor->deleteRuntime($projectId, $deploymentId);
} catch (Throwable $th) {
Console::error($th->getMessage());

View file

@ -33,7 +33,7 @@ class FunctionsV1 extends Worker
public function init(): void
{
$this->executor = new Executor();
$this->executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST'));
}
public function run(): void

View file

@ -71,7 +71,7 @@
}
],
"require-dev": {
"appwrite/sdk-generator": "0.18.2",
"appwrite/sdk-generator": "0.18.3",
"phpunit/phpunit": "9.5.10",
"swoole/ide-helper": "4.8.5",
"textalk/websocket": "1.5.5",

14
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "bca03b1d0b7dd312bc174e0a2973b015",
"content-hash": "e0de8d0bba618a46646cf3da1e06a652",
"packages": [
{
"name": "adhocore/jwt",
@ -3075,16 +3075,16 @@
},
{
"name": "appwrite/sdk-generator",
"version": "0.18.2",
"version": "0.18.3",
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator.git",
"reference": "9381507c1526da1c099eb2297e68374dec4e3793"
"reference": "96e2c9b0f350d4fa43ddff6334ef44908716c944"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/9381507c1526da1c099eb2297e68374dec4e3793",
"reference": "9381507c1526da1c099eb2297e68374dec4e3793",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/96e2c9b0f350d4fa43ddff6334ef44908716c944",
"reference": "96e2c9b0f350d4fa43ddff6334ef44908716c944",
"shasum": ""
},
"require": {
@ -3119,9 +3119,9 @@
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
"support": {
"issues": "https://github.com/appwrite/sdk-generator/issues",
"source": "https://github.com/appwrite/sdk-generator/tree/0.18.2"
"source": "https://github.com/appwrite/sdk-generator/tree/0.18.3"
},
"time": "2022-04-10T09:03:18+00:00"
"time": "2022-04-13T04:00:59+00:00"
},
{
"name": "composer/pcre",

View file

@ -7,8 +7,8 @@ x-logging: &x-logging
logging:
driver: 'json-file'
options:
max-file: 5
max-size: 10m
max-file: '5'
max-size: '10m'
version: '3'
@ -150,6 +150,7 @@ services:
- _APP_FUNCTIONS_MEMORY_SWAP
- _APP_FUNCTIONS_RUNTIMES
- _APP_EXECUTOR_SECRET
- _APP_EXECUTOR_HOST
- _APP_LOGGING_PROVIDER
- _APP_LOGGING_CONFIG
- _APP_STATSD_HOST
@ -306,6 +307,7 @@ services:
- _APP_LOGGING_PROVIDER
- _APP_LOGGING_CONFIG
- _APP_EXECUTOR_SECRET
- _APP_EXECUTOR_HOST
appwrite-worker-database:
entrypoint: worker-database
@ -355,6 +357,7 @@ services:
- _APP_ENV
- _APP_OPENSSL_KEY_V1
- _APP_EXECUTOR_SECRET
- _APP_EXECUTOR_HOST
- _APP_REDIS_HOST
- _APP_REDIS_PORT
- _APP_REDIS_USER
@ -429,6 +432,7 @@ services:
- _APP_DB_PASS
- _APP_FUNCTIONS_TIMEOUT
- _APP_EXECUTOR_SECRET
- _APP_EXECUTOR_HOST
- _APP_USAGE_STATS
- DOCKERHUB_PULL_USERNAME
- DOCKERHUB_PULL_PASSWORD

View file

@ -0,0 +1 @@
Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to "refresh" the access token.

View file

@ -236,7 +236,7 @@ class Project extends Model
}
$providers = Config::getParam('providers', []);
$providerValues = $document->getAttribute('providers', []);
$providerValues = $document->getAttribute('authProviders', []);
foreach ($providers as $key => $provider) {
if (!$provider['enabled']) {

View file

@ -6,7 +6,7 @@ use Exception;
use Utopia\App;
use Utopia\CLI\Console;
class Executor
class Executor
{
const METHOD_GET = 'GET';
const METHOD_POST = 'POST';
@ -26,8 +26,11 @@ class Executor
'content-type' => '',
];
public function __construct(string $endpoint = 'http://appwrite-executor/v1')
{
public function __construct(string $endpoint)
{
if (!filter_var($endpoint, FILTER_VALIDATE_URL)) {
throw new Exception('Unsupported endpoint');
}
$this->endpoint = $endpoint;
}

View file

@ -88,6 +88,7 @@ services:
- _APP_FUNCTIONS_CPUS
- _APP_FUNCTIONS_MEMORY
- _APP_FUNCTIONS_MEMORY_SWAP
- _APP_EXECUTOR_HOST
appwrite-worker-usage:
entrypoint: worker-usage
@ -193,6 +194,7 @@ services:
- _APP_DB_SCHEMA
- _APP_DB_USER
- _APP_DB_PASS
- _APP_EXECUTOR_HOST
appwrite-worker-certificates:
entrypoint: worker-certificates
@ -247,6 +249,7 @@ services:
- _APP_FUNCTIONS_CPUS
- _APP_FUNCTIONS_MEMORY
- _APP_FUNCTIONS_MEMORY_SWAP
- _APP_EXECUTOR_HOST
appwrite-worker-mails:
entrypoint: worker-mails
@ -294,6 +297,7 @@ services:
- _APP_LOGGING_PROVIDER
- _APP_LOGGING_CONFIG
- _APP_EXECUTOR_SECRET
- _APP_EXECUTOR_HOST
appwrite-schedule:
entrypoint: schedule