Skip to content

Commit 2ba8ac0

Browse files
author
claudfuen
committed
fix: use alphanumeric password instead of hexadecimal
- Use upper/lower/numeric (a-z, A-Z, 0-9) for better entropy - Still avoids special characters that cause shell escaping issues - More secure than hexadecimal-only passwords
1 parent c69e27e commit 2ba8ac0

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

apps/infra/modules/database.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@ import { CommonConfig, NetworkOutputs } from "../types";
66
export function createDatabase(config: CommonConfig, network: NetworkOutputs) {
77
const { commonTags } = config;
88

9-
// Generate a secure random password for the database (hexadecimal only - no special chars)
9+
// Generate a secure random password for the database (alphanumeric only - no special chars)
1010
const dbPassword = new random.RandomPassword("pathfinder-db-password", {
1111
length: 32,
1212
special: false,
13-
upper: false,
14-
lower: false,
15-
numeric: false,
16-
// Use only hexadecimal characters (0-9, a-f)
17-
overrideSpecial: "0123456789abcdef",
13+
upper: true,
14+
lower: true,
15+
numeric: true,
16+
// No override needed - upper/lower/numeric gives us alphanumeric
1817
});
1918

2019
// Create AWS Secret for database credentials (will be populated after RDS instance is created)

0 commit comments

Comments
 (0)