Skip to content

Commit

Permalink
Added possibility to encrypt api key token inside db, updated compose…
Browse files Browse the repository at this point in the history
…r dependencies, docs.
  • Loading branch information
DKravtsov committed May 3, 2024
1 parent 68aca05 commit 27c5048
Show file tree
Hide file tree
Showing 47 changed files with 3,677 additions and 2,114 deletions.
17 changes: 16 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ WEB_PORT_SSL=443
# XDEBUG_CONFIG possible values: main|osx. Use main value for Linux and Windows, osx value for MacOS.
XDEBUG_CONFIG=main
# Sometimes we need to use different xdebug versions, list of versions can be found here - https://pecl.php.net/package/xdebug
XDEBUG_VERSION=3.3.1
XDEBUG_VERSION=3.3.2
# MySQL version, recommend values: 8.2|8.1|8.0
MYSQL_VERSION=8.2
# 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
Expand Down Expand Up @@ -85,6 +85,21 @@ JWT_TOKEN_TTL=3600
CORS_ALLOW_ORIGIN='^https?://localhost(:[0-9]+)?$'
###< nelmio/cors-bundle ###

###> Api-key options ###
# Attention: Changing values will lead that existing api key tokens will not work. You'll need to create new tokens.
# Possible values: 1|0. Use value 1 when you want to have encrypted api-key tokens using open ssl inside db.
API_KEY_TOKEN_OPEN_SSL_ENCRYPT=1
# 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.
API_KEY_TOKEN_HASH_ALGO=sha256
###< Api-key options ###

###> Open ssl options ###
# Attention: Changing values will lead that existing encrypted api key tokens will not work. You'll need to create new tokens.
OPEN_SSL_ALGORITHM=aes-128-gcm
# 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.
OPEN_SSL_KEY=systemsdk
###< Open ssl options ###

# how many failure attempts for lock account, 0 - off
LOCK_USER_ON_LOGIN_FAILURE_ATTEMPTS=0

Expand Down
8 changes: 7 additions & 1 deletion .idea/codeception.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/htdocs.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

618 changes: 312 additions & 306 deletions .idea/php.xml

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions .idea/phpspec.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .idea/phpunit.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ endif
phpinsights: ## Runs Php Insights analysis tool
ifeq ($(INSIDE_DOCKER_CONTAINER), 1)
@echo "\033[32mRunning PHP Insights\033[39m"
@php -d error_reporting=0 ./vendor/bin/phpinsights analyse --no-interaction --min-quality=95 --min-complexity=85 --min-architecture=100 --min-style=100
@php -d error_reporting=0 ./vendor/bin/phpinsights analyse --no-interaction --min-quality=95 --min-complexity=84 --min-architecture=100 --min-style=100
else
@make exec cmd="make phpinsights"
endif
Expand Down
17 changes: 9 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"Elasticsearch"
],
"homepage": "https://github.com/systemsdk/docker-symfony-api",
"version": "v2.1.0",
"version": "v2.2.0",
"license": "MIT",
"authors": [
{
Expand All @@ -38,22 +38,23 @@
"ext-json": "*",
"ext-mbstring": "*",
"ext-hash": "*",
"ext-openssl": "*",
"ext-pdo": "*",
"ext-pdo_mysql": "*",
"beberlei/doctrineextensions": "^1.5",
"doctrine/doctrine-bundle": "^2.11",
"doctrine/doctrine-bundle": "^2.12",
"doctrine/doctrine-migrations-bundle": "^3.3",
"doctrine/orm": "^2.19",
"dukecity/command-scheduler-bundle": "^5.0",
"elasticsearch/elasticsearch": "^7.17",
"gedmo/doctrine-extensions": "^3.15",
"lexik/jwt-authentication-bundle": "^2.20",
"mark-gerarts/automapper-plus-bundle": "^1.4",
"lexik/jwt-authentication-bundle": "^2.21",
"mark-gerarts/automapper-plus-bundle": "^1.5",
"matomo/device-detector": "^6.3",
"matthiasnoback/symfony-console-form": "^5.3",
"nelmio/api-doc-bundle": "^4.20",
"nelmio/api-doc-bundle": "^4.26",
"nelmio/cors-bundle": "^2.4",
"phpdocumentor/reflection-docblock": "^5.3",
"phpdocumentor/reflection-docblock": "^5.4",
"ramsey/uuid-doctrine": "^2.0",
"symfony/amqp-messenger": "6.4.*",
"symfony/asset": "6.4.*",
Expand Down Expand Up @@ -95,12 +96,12 @@
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8",
"doctrine/doctrine-fixtures-bundle": "^3.5",
"doctrine/doctrine-fixtures-bundle": "^3.6",
"systemsdk/easy-log-bundle": "2.0.*",
"roave/security-advisories": "dev-latest",
"symfony/browser-kit": "6.4.*",
"symfony/debug-bundle": "6.4.*",
"symfony/maker-bundle": "^1.55",
"symfony/maker-bundle": "^1.59",
"symfony/requirements-checker": "^2.0",
"symfony/stopwatch": "6.4.*",
"symfony/var-dumper": "6.4.*",
Expand Down
Loading

0 comments on commit 27c5048

Please sign in to comment.