Files
portal-api/.env.example
T
baodev0andClaude Opus 5.5 ea5697cb81 feat(security): argon2id password hashing and AES for SignRSA secrets
- Hash driver read from HASH_DRIVER (argon2id in production); bcrypt
  hashes still verify and are rehashed on successful admin/client login
  since the JWT guard and guard->validate() never rehash on their own.
- Client registration uses Hash::make instead of bcrypt(), which always
  forced bcrypt regardless of the configured driver.
- SignRSA now encrypts with Crypt (AES-256-CBC + HMAC, APP_KEY) instead
  of 3DES in ECB mode without IV. Legacy 3DES values are still readable
  via RSA_KEY/RSA_PUBLIC until `secrets:reencrypt` migrates them;
  RSA_PRIVATE is no longer used.
- LegacyPortalImporter stored module_vmware.password in plaintext; it is
  now encrypted, and a migration encrypts existing plaintext rows.

Deploy: php artisan migrate, then secrets:reencrypt --dry-run and
secrets:reencrypt; remove RSA_* from env once it exits 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 19:56:38 +07:00

91 lines
1.9 KiB
Bash

APP_NAME="Thế Giới Số"
APP_ENV=local
APP_KEY=
APP_PREVIOUS_KEYS=
HASH_DRIVER=argon2id
APP_DEBUG=false
APP_URL=https://dev.tgs.com.vn
APP_LOCALE=vi
LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=portal_dev
DB_USERNAME=portal_dev
DB_PASSWORD=
#Legacy SignRSA (3DES) — chỉ dùng để đọc dữ liệu cũ, gỡ sau khi chạy secrets:reencrypt
RSA_KEY=
RSA_PUBLIC=
RSA_PREVIOUS_KEY=
RSA_PREVIOUS_PUBLIC=
#Config VMware template default credential
VMWARE_TEMPLATE_PASSWORD=
#Config vCenter/ESXi TLS + jump host SSH verification (see config/vmware.php)
VCENTER_TLS_VERIFY=true
VCENTER_CA_BUNDLE=
VCENTER_SSH_KNOWN_HOSTS=
#Config Plesk API TLS verification (see config/services.php)
PLESK_TLS_VERIFY=true
PLESK_CA_BUNDLE=
BROADCAST_DRIVER=pusher
CACHE_DRIVER=redis
FILESYSTEM_DISK=public
QUEUE_CONNECTION=database
SESSION_DRIVER=file
SESSION_LIFETIME=240
MEMCACHED_HOST=127.0.0.1
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=
REDIS_PORT=6379
REDIS_CLIENT=predis
TELEGRAM_BOT_ID=
TELEGRAM_BOT_TOKEN=
MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=465
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=noreply@yourdomain.com
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=ap1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
VNPAY_TMN_CODE=
VNPAY_HASH_SECRET=
VNPAY_URL=https://sandbox.vnpayment.vn/paymentv2/vpcpay.html
VNPAY_RETURN_URL=https://api-agency.test/v1/transaction/return
VNPAY_API_URL=http://sandbox.vnpayment.vn/merchant_webapi/merchant.html
VNPAY_TRANSACTION_API=https://sandbox.vnpayment.vn/merchant_webapi/api/transaction
FRONTEND_URL=https://portal.test
# openssl rand -hex 32
CLIENT_API_ACCESS_KEY=
CLIENT_API_ACCESS_SECRET=
WMKS_HOST=10.10.10.120