Skip to content

Commit

Permalink
Fix sqlserver password env variable and make stronger
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuomo Ala-Vannesluoma committed Aug 15, 2023
1 parent bcbf49d commit 9d857d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nflow-engine/src/main/resources/nflow-engine.properties
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ nflow.db.postgresql.password=nflow
nflow.db.sqlserver.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
nflow.db.sqlserver.url=jdbc:sqlserver://localhost;databaseName=nflow;TrustServerCertificate=true
nflow.db.sqlserver.user=nflow
nflow.db.sqlserver.password=nFlow42%
nflow.db.sqlserver.password=FC8%1knw

nflow.db.db2.driver=com.ibm.db2.jcc.DB2Driver
nflow.db.db2.url=jdbc:db2://localhost:50000/nflow
Expand Down
4 changes: 2 additions & 2 deletions scripts/setup-db-sqlserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ case $DB_VERSION in
;;
esac

$tool run --pull=always --rm --name mssql -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=passWord1%' --publish 1433:1433 --detach mcr.microsoft.com/mssql/server:$DB_VERSION
$tool run --pull=always --rm --name mssql -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=passWord1%' --publish 1433:1433 --detach mcr.microsoft.com/mssql/server:$DB_VERSION

fgrep -m1 'Recovery is complete' <(timeout 240 $tool logs -f mssql 2>&1)

sqlcmd="$tool exec -t mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P passWord1% -e -x"
$sqlcmd -Q "create database nflow"
$sqlcmd -d nflow -Q "create login [nflow] with password='nFlow42%', default_database=[nflow]"
$sqlcmd -d nflow -Q "create login [nflow] with password='FC8%1knw', default_database=[nflow]"
$sqlcmd -d nflow -Q "create user [nflow] for login [nflow] with default_schema=[nflow]"
$sqlcmd -d nflow -Q "create schema nflow authorization nflow"
$sqlcmd -d nflow -Q "grant connect to [nflow]"
Expand Down

0 comments on commit 9d857d5

Please sign in to comment.