Skip to content

Commit 733e9b8

Browse files
author
DKravtsov
committed
Added possibility to encrypt api key token inside db, updated composer dependencies, docs.
1 parent 68aca05 commit 733e9b8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+3683
-2114
lines changed

.env

+16-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ WEB_PORT_SSL=443
2424
# XDEBUG_CONFIG possible values: main|osx. Use main value for Linux and Windows, osx value for MacOS.
2525
XDEBUG_CONFIG=main
2626
# Sometimes we need to use different xdebug versions, list of versions can be found here - https://pecl.php.net/package/xdebug
27-
XDEBUG_VERSION=3.3.1
27+
XDEBUG_VERSION=3.3.2
2828
# MySQL version, recommend values: 8.2|8.1|8.0
2929
MYSQL_VERSION=8.2
3030
# MySQL INNODB_USE_NATIVE_AIO possible values: 1|0. Set to 0 when AIO interface is not supported on OSX. https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_use_native_aio
@@ -85,6 +85,21 @@ JWT_TOKEN_TTL=3600
8585
CORS_ALLOW_ORIGIN='^https?://localhost(:[0-9]+)?$'
8686
###< nelmio/cors-bundle ###
8787

88+
###> Api-key options ###
89+
# Attention: Changing values will lead that existing api key tokens will not work. You'll need to create new tokens.
90+
# Possible values: 1|0. Use value 1 when you want to have encrypted api-key tokens using open ssl inside db.
91+
API_KEY_TOKEN_OPEN_SSL_ENCRYPT=1
92+
# Possible values: md5|sha1|sha256|sha512 (https://www.php.net/manual/en/function.hash-algos.php). Used when API_KEY_TOKEN_OPEN_SSL_ENCRYPT set to 1.
93+
API_KEY_TOKEN_HASH_ALGO=sha256
94+
###< Api-key options ###
95+
96+
###> Open ssl options ###
97+
# Attention: Changing values will lead that existing encrypted api key tokens will not work. You'll need to create new tokens.
98+
OPEN_SSL_ALGORITHM=aes-128-gcm
99+
# Set proper ssl key value for your project. It is recommended to have another value for your prod environment and save the value in the secret place.
100+
OPEN_SSL_KEY=systemsdk
101+
###< Open ssl options ###
102+
88103
# how many failure attempts for lock account, 0 - off
89104
LOCK_USER_ON_LOGIN_FAILURE_ATTEMPTS=0
90105

.idea/codeception.xml

+7-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/htdocs.iml

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/php.xml

+312-306
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/phpspec.xml

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/phpunit.xml

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ endif
393393
phpinsights: ## Runs Php Insights analysis tool
394394
ifeq ($(INSIDE_DOCKER_CONTAINER), 1)
395395
@echo "\033[32mRunning PHP Insights\033[39m"
396-
@php -d error_reporting=0 ./vendor/bin/phpinsights analyse --no-interaction --min-quality=95 --min-complexity=85 --min-architecture=100 --min-style=100
396+
@php -d error_reporting=0 ./vendor/bin/phpinsights analyse --no-interaction --min-quality=95 --min-complexity=84 --min-architecture=100 --min-style=100
397397
else
398398
@make exec cmd="make phpinsights"
399399
endif

composer.json

+9-8
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"Elasticsearch"
1515
],
1616
"homepage": "https://github.com/systemsdk/docker-symfony-api",
17-
"version": "v2.1.0",
17+
"version": "v2.2.0",
1818
"license": "MIT",
1919
"authors": [
2020
{
@@ -38,22 +38,23 @@
3838
"ext-json": "*",
3939
"ext-mbstring": "*",
4040
"ext-hash": "*",
41+
"ext-openssl": "*",
4142
"ext-pdo": "*",
4243
"ext-pdo_mysql": "*",
4344
"beberlei/doctrineextensions": "^1.5",
44-
"doctrine/doctrine-bundle": "^2.11",
45+
"doctrine/doctrine-bundle": "^2.12",
4546
"doctrine/doctrine-migrations-bundle": "^3.3",
4647
"doctrine/orm": "^2.19",
4748
"dukecity/command-scheduler-bundle": "^5.0",
4849
"elasticsearch/elasticsearch": "^7.17",
4950
"gedmo/doctrine-extensions": "^3.15",
50-
"lexik/jwt-authentication-bundle": "^2.20",
51-
"mark-gerarts/automapper-plus-bundle": "^1.4",
51+
"lexik/jwt-authentication-bundle": "^2.21",
52+
"mark-gerarts/automapper-plus-bundle": "^1.5",
5253
"matomo/device-detector": "^6.3",
5354
"matthiasnoback/symfony-console-form": "^5.3",
54-
"nelmio/api-doc-bundle": "^4.20",
55+
"nelmio/api-doc-bundle": "^4.26",
5556
"nelmio/cors-bundle": "^2.4",
56-
"phpdocumentor/reflection-docblock": "^5.3",
57+
"phpdocumentor/reflection-docblock": "^5.4",
5758
"ramsey/uuid-doctrine": "^2.0",
5859
"symfony/amqp-messenger": "6.4.*",
5960
"symfony/asset": "6.4.*",
@@ -95,12 +96,12 @@
9596
},
9697
"require-dev": {
9798
"bamarni/composer-bin-plugin": "^1.8",
98-
"doctrine/doctrine-fixtures-bundle": "^3.5",
99+
"doctrine/doctrine-fixtures-bundle": "^3.6",
99100
"systemsdk/easy-log-bundle": "2.0.*",
100101
"roave/security-advisories": "dev-latest",
101102
"symfony/browser-kit": "6.4.*",
102103
"symfony/debug-bundle": "6.4.*",
103-
"symfony/maker-bundle": "^1.55",
104+
"symfony/maker-bundle": "^1.59",
104105
"symfony/requirements-checker": "^2.0",
105106
"symfony/stopwatch": "6.4.*",
106107
"symfony/var-dumper": "6.4.*",

0 commit comments

Comments
 (0)