refactor: update sensitive information handling in configuration and logging

This commit is contained in:
Jean Gatto
2025-07-29 07:53:13 -03:00
parent 7cce0ed4f4
commit 34e4f22012
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -37,7 +37,7 @@ services:
- "1433:1433" - "1433:1433"
environment: environment:
- ACCEPT_EULA=Y - ACCEPT_EULA=Y
- MSSQL_SA_PASSWORD=pMA63033n6tF - MSSQL_SA_PASSWORD=${MSSQL_SA_PASSWORD}
- MSSQL_PID=Developer - MSSQL_PID=Developer
- MSSQL_COLLATION=Latin1_General_CI_AI - MSSQL_COLLATION=Latin1_General_CI_AI
networks: networks:
@@ -61,7 +61,7 @@ services:
shop-redis: shop-redis:
image: redis:latest image: redis:latest
container_name: shop-redis container_name: shop-redis
command: redis-server --requirepass pMA63033n6tF command: redis-server --requirepass ${REDIS_PASSWORD}
restart: always restart: always
expose: expose:
- 6379 - 6379
+2 -2
View File
@@ -10,9 +10,9 @@
} }
}, },
"ConnectionStrings": { "ConnectionStrings": {
"SqlConnection": "Server=shop-sql-server;Integrated Security=true;Initial Catalog=ShopContext;User Id=sa;Password=pMA63033n6tF;Trusted_Connection=False;TrustServerCertificate=True;", "SqlConnection": "Server=shop-sql-server;Integrated Security=true;Initial Catalog=ShopContext;User Id=sa;Password=;Trusted_Connection=False;TrustServerCertificate=True;",
"NoSqlConnection": "mongodb://shop-mongo-server", "NoSqlConnection": "mongodb://shop-mongo-server",
"CacheConnection": "shop-redis:6379,password=pMA63033n6tF,abortConnect=false" "CacheConnection": "shop-redis:6379,password=,abortConnect=false"
}, },
"CacheOptions": { "CacheOptions": {
"AbsoluteExpirationInHours": 2, "AbsoluteExpirationInHours": 2,
@@ -98,7 +98,7 @@ public sealed class NoSqlDbContext : IReadDbContext, ISynchronizeDb
var indexName = await collection.Indexes.CreateOneAsync(indexModel); var indexName = await collection.Indexes.CreateOneAsync(indexModel);
_logger.LogInformation("----- MongoDB: indexes successfully created - {indexName}", indexName); _logger.LogInformation("----- MongoDB: indexes successfully created - {IndexName}", indexName);
} }
private static List<string> GetCollectionNamesFromAssembly() => private static List<string> GetCollectionNamesFromAssembly() =>