From 3dfe01f45e00ecba7347ae14112a80859c31821c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Jaussoin?= Date: Thu, 19 Aug 2021 11:38:51 +0200 Subject: [PATCH] Allow the account creation admin API endpoint to set a specific domain if EVERYONE_IS_ADMIN is set to true Update the dependencies Bump the package version --- .../Api/Admin/AccountController.php | 4 +- flexiapi/composer.lock | 216 +++++++++++++----- flexiapi/composer.phar | Bin 2253070 -> 2256047 bytes .../api/documentation_markdown.blade.php | 4 +- flexiapi/tests/Feature/AccountApiTest.php | 31 +++ flexisip-account-manager.spec | 2 +- 6 files changed, 190 insertions(+), 67 deletions(-) diff --git a/flexiapi/app/Http/Controllers/Api/Admin/AccountController.php b/flexiapi/app/Http/Controllers/Api/Admin/AccountController.php index c713005..9cb05b9 100644 --- a/flexiapi/app/Http/Controllers/Api/Admin/AccountController.php +++ b/flexiapi/app/Http/Controllers/Api/Admin/AccountController.php @@ -101,9 +101,11 @@ class AccountController extends Controller $account->activated = $request->has('activated') ? (bool)$request->get('activated') : false; - $account->domain = config('app.sip_domain'); $account->ip_address = $request->ip(); $account->creation_time = Carbon::now(); + $account->domain = $request->has('domain') && config('app.everyone_is_admin') + ? $request->get('domain') + : config('app.sip_domain'); $account->user_agent = config('app.name'); if (!$request->has('activated') || !(bool)$request->get('activated')) { diff --git a/flexiapi/composer.lock b/flexiapi/composer.lock index 6f5147f..f15bf96 100644 --- a/flexiapi/composer.lock +++ b/flexiapi/composer.lock @@ -125,16 +125,16 @@ }, { "name": "brick/math", - "version": "0.9.2", + "version": "0.9.3", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "dff976c2f3487d42c1db75a3b180e2b9f0e72ce0" + "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/dff976c2f3487d42c1db75a3b180e2b9f0e72ce0", - "reference": "dff976c2f3487d42c1db75a3b180e2b9f0e72ce0", + "url": "https://api.github.com/repos/brick/math/zipball/ca57d18f028f84f777b2168cd1911b0dee2343ae", + "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae", "shasum": "" }, "require": { @@ -144,7 +144,7 @@ "require-dev": { "php-coveralls/php-coveralls": "^2.2", "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.0", - "vimeo/psalm": "4.3.2" + "vimeo/psalm": "4.9.2" }, "type": "library", "autoload": { @@ -169,15 +169,19 @@ ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.9.2" + "source": "https://github.com/brick/math/tree/0.9.3" }, "funding": [ + { + "url": "https://github.com/BenMorel", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/brick/math", "type": "tidelift" } ], - "time": "2021-01-20T22:51:39+00:00" + "time": "2021-08-15T20:50:18+00:00" }, { "name": "dasprid/enum", @@ -532,16 +536,16 @@ }, { "name": "endroid/qr-code", - "version": "4.2.1", + "version": "4.2.2", "source": { "type": "git", "url": "https://github.com/endroid/qr-code.git", - "reference": "4ef4c7815cf928392eecdb8cf7fd3ae45e6e3f59" + "reference": "53bfce79da95bf082484301fecbc1d77a3907f78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/endroid/qr-code/zipball/4ef4c7815cf928392eecdb8cf7fd3ae45e6e3f59", - "reference": "4ef4c7815cf928392eecdb8cf7fd3ae45e6e3f59", + "url": "https://api.github.com/repos/endroid/qr-code/zipball/53bfce79da95bf082484301fecbc1d77a3907f78", + "reference": "53bfce79da95bf082484301fecbc1d77a3907f78", "shasum": "" }, "require": { @@ -592,7 +596,7 @@ ], "support": { "issues": "https://github.com/endroid/qr-code/issues", - "source": "https://github.com/endroid/qr-code/tree/4.2.1" + "source": "https://github.com/endroid/qr-code/tree/4.2.2" }, "funding": [ { @@ -600,7 +604,7 @@ "type": "github" } ], - "time": "2021-07-03T10:50:07+00:00" + "time": "2021-08-16T22:08:35+00:00" }, { "name": "erusev/parsedown", @@ -979,16 +983,16 @@ }, { "name": "laravel/framework", - "version": "v8.53.0", + "version": "v8.55.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "4b2e3e7317da82dd9f5b88d477abd93444748b43" + "reference": "997e2aa23e9103137715018ae926c52f8a1703f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/4b2e3e7317da82dd9f5b88d477abd93444748b43", - "reference": "4b2e3e7317da82dd9f5b88d477abd93444748b43", + "url": "https://api.github.com/repos/laravel/framework/zipball/997e2aa23e9103137715018ae926c52f8a1703f2", + "reference": "997e2aa23e9103137715018ae926c52f8a1703f2", "shasum": "" }, "require": { @@ -1061,7 +1065,7 @@ "illuminate/view": "self.version" }, "require-dev": { - "aws/aws-sdk-php": "^3.186.4", + "aws/aws-sdk-php": "^3.189.0", "doctrine/dbal": "^2.6|^3.0", "filp/whoops": "^2.8", "guzzlehttp/guzzle": "^6.5.5|^7.0.1", @@ -1074,7 +1078,7 @@ "symfony/cache": "^5.1.4" }, "suggest": { - "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.186.4).", + "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.189.0).", "brianium/paratest": "Required to run tests in parallel (^6.0).", "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6|^3.0).", "ext-ftp": "Required to use the Flysystem FTP driver.", @@ -1143,7 +1147,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2021-08-03T14:36:33+00:00" + "time": "2021-08-17T14:13:34+00:00" }, { "name": "laravel/tinker", @@ -1388,16 +1392,16 @@ }, { "name": "league/flysystem", - "version": "1.1.4", + "version": "1.1.5", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "f3ad69181b8afed2c9edf7be5a2918144ff4ea32" + "reference": "18634df356bfd4119fe3d6156bdb990c414c14ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/f3ad69181b8afed2c9edf7be5a2918144ff4ea32", - "reference": "f3ad69181b8afed2c9edf7be5a2918144ff4ea32", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/18634df356bfd4119fe3d6156bdb990c414c14ea", + "reference": "18634df356bfd4119fe3d6156bdb990c414c14ea", "shasum": "" }, "require": { @@ -1470,7 +1474,7 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/1.1.4" + "source": "https://github.com/thephpleague/flysystem/tree/1.1.5" }, "funding": [ { @@ -1478,7 +1482,7 @@ "type": "other" } ], - "time": "2021-06-23T21:56:05+00:00" + "time": "2021-08-17T13:49:42+00:00" }, { "name": "league/mime-type-detection", @@ -2390,20 +2394,21 @@ }, { "name": "ramsey/collection", - "version": "1.1.4", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/ramsey/collection.git", - "reference": "ab2237657ad99667a5143e32ba2683c8029563d4" + "reference": "eaca1dc1054ddd10cbd83c1461907bee6fb528fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/collection/zipball/ab2237657ad99667a5143e32ba2683c8029563d4", - "reference": "ab2237657ad99667a5143e32ba2683c8029563d4", + "url": "https://api.github.com/repos/ramsey/collection/zipball/eaca1dc1054ddd10cbd83c1461907bee6fb528fa", + "reference": "eaca1dc1054ddd10cbd83c1461907bee6fb528fa", "shasum": "" }, "require": { - "php": "^7.2 || ^8" + "php": "^7.3 || ^8", + "symfony/polyfill-php81": "^1.23" }, "require-dev": { "captainhook/captainhook": "^5.3", @@ -2413,6 +2418,7 @@ "hamcrest/hamcrest-php": "^2", "jangregor/phpstan-prophecy": "^0.8", "mockery/mockery": "^1.3", + "phpspec/prophecy-phpunit": "^2.0", "phpstan/extension-installer": "^1", "phpstan/phpstan": "^0.12.32", "phpstan/phpstan-mockery": "^0.12.5", @@ -2440,7 +2446,7 @@ "homepage": "https://benramsey.com" } ], - "description": "A PHP 7.2+ library for representing and manipulating collections.", + "description": "A PHP library for representing and manipulating collections.", "keywords": [ "array", "collection", @@ -2451,7 +2457,7 @@ ], "support": { "issues": "https://github.com/ramsey/collection/issues", - "source": "https://github.com/ramsey/collection/tree/1.1.4" + "source": "https://github.com/ramsey/collection/tree/1.2.1" }, "funding": [ { @@ -2463,20 +2469,20 @@ "type": "tidelift" } ], - "time": "2021-07-30T00:58:27+00:00" + "time": "2021-08-06T03:41:06+00:00" }, { "name": "ramsey/uuid", - "version": "4.1.1", + "version": "4.2.1", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "cd4032040a750077205918c86049aa0f43d22947" + "reference": "fe665a03df4f056aa65af552a96e1976df8c8dae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/cd4032040a750077205918c86049aa0f43d22947", - "reference": "cd4032040a750077205918c86049aa0f43d22947", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/fe665a03df4f056aa65af552a96e1976df8c8dae", + "reference": "fe665a03df4f056aa65af552a96e1976df8c8dae", "shasum": "" }, "require": { @@ -2490,26 +2496,26 @@ "rhumsaa/uuid": "self.version" }, "require-dev": { - "codeception/aspect-mock": "^3", - "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7.0", + "captainhook/captainhook": "^5.10", + "captainhook/plugin-composer": "^5.3", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "doctrine/annotations": "^1.8", - "goaop/framework": "^2", + "ergebnis/composer-normalize": "^2.15", "mockery/mockery": "^1.3", "moontoast/math": "^1.1", "paragonie/random-lib": "^2", + "php-mock/php-mock": "^2.2", "php-mock/php-mock-mockery": "^1.3", - "php-mock/php-mock-phpunit": "^2.5", "php-parallel-lint/php-parallel-lint": "^1.1", - "phpbench/phpbench": "^0.17.1", + "phpbench/phpbench": "^1.0", "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^0.12", "phpstan/phpstan-mockery": "^0.12", "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^8.5", - "psy/psysh": "^0.10.0", - "slevomat/coding-standard": "^6.0", + "phpunit/phpunit": "^8.5 || ^9", + "slevomat/coding-standard": "^7.0", "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "3.9.4" + "vimeo/psalm": "^4.9" }, "suggest": { "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", @@ -2522,7 +2528,10 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev" + "dev-main": "4.x-dev" + }, + "captainhook": { + "force-install": true } }, "autoload": { @@ -2538,7 +2547,6 @@ "MIT" ], "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", - "homepage": "https://github.com/ramsey/uuid", "keywords": [ "guid", "identifier", @@ -2546,16 +2554,19 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "rss": "https://github.com/ramsey/uuid/releases.atom", - "source": "https://github.com/ramsey/uuid" + "source": "https://github.com/ramsey/uuid/tree/4.2.1" }, "funding": [ { "url": "https://github.com/ramsey", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ramsey/uuid", + "type": "tidelift" } ], - "time": "2020-08-18T17:17:46+00:00" + "time": "2021-08-11T01:06:55+00:00" }, { "name": "swiftmailer/swiftmailer", @@ -4233,6 +4244,85 @@ ], "time": "2021-07-28T13:41:28+00:00" }, + { + "name": "symfony/polyfill-php81", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "e66119f3de95efc359483f810c4c3e6436279436" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/e66119f3de95efc359483f810c4c3e6436279436", + "reference": "e66119f3de95efc359483f810c4c3e6436279436", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php81\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php81/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-21T13:25:03+00:00" + }, { "name": "symfony/process", "version": "v5.3.4", @@ -5296,16 +5386,16 @@ }, { "name": "facade/ignition", - "version": "2.11.2", + "version": "2.11.4", "source": { "type": "git", "url": "https://github.com/facade/ignition.git", - "reference": "7c4e7a7da184cd00c7ce6eacc590200bb9672de7" + "reference": "1b8d83c5dac7c5ee8429daf284ce3f19b1d17ea2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/ignition/zipball/7c4e7a7da184cd00c7ce6eacc590200bb9672de7", - "reference": "7c4e7a7da184cd00c7ce6eacc590200bb9672de7", + "url": "https://api.github.com/repos/facade/ignition/zipball/1b8d83c5dac7c5ee8429daf284ce3f19b1d17ea2", + "reference": "1b8d83c5dac7c5ee8429daf284ce3f19b1d17ea2", "shasum": "" }, "require": { @@ -5368,7 +5458,7 @@ "issues": "https://github.com/facade/ignition/issues", "source": "https://github.com/facade/ignition" }, - "time": "2021-07-20T14:01:22+00:00" + "time": "2021-08-17T11:45:33+00:00" }, { "name": "facade/ignition-contracts", @@ -5797,16 +5887,16 @@ }, { "name": "nunomaduro/collision", - "version": "v5.6.0", + "version": "v5.8.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "0122ac6b03c75279ef78d1c0ad49725dfc52a8d2" + "reference": "0c3c393462eada1233513664e2d22bb9f69ca393" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/0122ac6b03c75279ef78d1c0ad49725dfc52a8d2", - "reference": "0122ac6b03c75279ef78d1c0ad49725dfc52a8d2", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/0c3c393462eada1233513664e2d22bb9f69ca393", + "reference": "0c3c393462eada1233513664e2d22bb9f69ca393", "shasum": "" }, "require": { @@ -5818,7 +5908,7 @@ "require-dev": { "brianium/paratest": "^6.1", "fideloper/proxy": "^4.4.1", - "friendsofphp/php-cs-fixer": "^2.17.3", + "friendsofphp/php-cs-fixer": "^3.0", "fruitcake/laravel-cors": "^2.0.3", "laravel/framework": "^8.0 || ^9.0", "nunomaduro/larastan": "^0.6.2", @@ -5881,7 +5971,7 @@ "type": "patreon" } ], - "time": "2021-07-26T20:39:06+00:00" + "time": "2021-08-13T14:23:01+00:00" }, { "name": "phar-io/manifest", diff --git a/flexiapi/composer.phar b/flexiapi/composer.phar index 0108ce7ded9a3997bcfaa32f320a038d1a0ba9e6..48916931bb810c52d1c5098402660adc89bdfd3c 100755 GIT binary patch delta 10393 zcmbt32Ut{By3;ERLmg&lcZPuhrK41-QWXRRI|>5~Fgm~pg9wUX@1PvzBx)3liOEKz zN%rL?W);lFHPx6+vTNJKB+pIRSU0h*=AC=~kz{wD+4p^q@0;)U-2Xp+Z}-~!<_7-Z za~t?aGDI#l-S?`rD|x)S{zKPMmX{Un0$Xz0U16_4lNw?Bb8wMQvO*-CKgd?nl-R8FLX z+FTwl{=>eHsq$(UP(IWJh#Fi#uY=C>RTt2&B8bO3Hc5B}F@;)G?y9Do0$g~!v2V>Q zM|M{eRdlCo9z_HSc)Xx3zW3207e6Fb1<;56TH@ZPw&W1GerU4FTWwDR=WuZQ`J0Pr z6hBnS&^8rlen^!|Z^lS?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zYBWYyMUY<_$|qGB!tkPAt#?=adMzKn-bwlxx3%i>^`%ucwJoM5KVwsqajBnojej8L z+uYJrYpVD4SCIdtGT&o$_|$(}IP6%gv+NSJ>B!?u9vAYslE;la?&R?x566qz^Z`Hc u+2x)GEP2~%&$Sk=mFcn5XXYB;b^PJ??mL!WT#8#W7DZ+=CL=jF`F{Yb-o8Wt diff --git a/flexiapi/resources/views/api/documentation_markdown.blade.php b/flexiapi/resources/views/api/documentation_markdown.blade.php index 2dced3d..18d70d0 100644 --- a/flexiapi/resources/views/api/documentation_markdown.blade.php +++ b/flexiapi/resources/views/api/documentation_markdown.blade.php @@ -165,7 +165,7 @@ JSON parameters: * `username` unique username, minimum 6 characters * `password` required minimum 6 characters * `algorithm` required, values can be `SHA-256` or `MD5` -* `domain` **not configurable** the value is enforced to the default registration domain set in the global configuration +* `domain` **not configurable except during test deployments** the value is enforced to the default registration domain set in the global configuration * `activated` optional, a boolean, set to `false` by default * `admin` optional, a boolean, set to `false` by default, create an admin account * `phone` optional, a phone number, set a phone number to the account @@ -190,7 +190,7 @@ Deactivate an account. When an account is having an available `confirmation_key` it can be provisioned using the two following URL. -Those two URL are not API endpoints, they are not located under `/api`. +Those two URL are **not API endpoints**, they are not located under `/api`. ### `VISIT /provisioning/` Return the provisioning information available in the liblinphone configuration file (if correctly configured). diff --git a/flexiapi/tests/Feature/AccountApiTest.php b/flexiapi/tests/Feature/AccountApiTest.php index 875bfde..e808041 100644 --- a/flexiapi/tests/Feature/AccountApiTest.php +++ b/flexiapi/tests/Feature/AccountApiTest.php @@ -114,6 +114,37 @@ class AccountApiTest extends TestCase $this->assertFalse(empty($response1['confirmation_key'])); } + public function testDomainInTestDeployment() + { + $configDomain = 'testdomain.com'; + config()->set('app.everyone_is_admin', true); + config()->set('app.sip_domain', 'anotherdomain.com'); + + $admin = Admin::factory()->create(); + $password = $admin->account->passwords()->first(); + $username = 'foobar'; + + $response0 = $this->generateFirstResponse($password); + $response1 = $this->generateSecondResponse($password, $response0) + ->json($this->method, $this->route, [ + 'username' => $username, + 'domain' => $configDomain, + 'algorithm' => 'SHA-256', + 'password' => '123456', + ]); + + $response1 + ->assertStatus(200) + ->assertJson([ + 'id' => 2, + 'username' => $username, + 'domain' => $configDomain, + 'activated' => false + ]); + + $this->assertFalse(empty($response1['confirmation_key'])); + } + public function testUsernameNoDomain() { $admin = Admin::factory()->create(); diff --git a/flexisip-account-manager.spec b/flexisip-account-manager.spec index 1828494..ac9bff8 100644 --- a/flexisip-account-manager.spec +++ b/flexisip-account-manager.spec @@ -8,7 +8,7 @@ #%define _datadir %{_datarootdir} #%define _docdir %{_datadir}/doc -%define build_number 96 +%define build_number 97 %define var_dir /var/opt/belledonne-communications %define opt_dir /opt/belledonne-communications/share/flexisip-account-manager