Skip to content

Commit

Permalink
concord-server-db: pass secret salt as a base64 value (#694)
Browse files Browse the repository at this point in the history
  • Loading branch information
brig authored Dec 22, 2022
1 parent 7b174dd commit fcd31a8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,21 @@
</addColumn>
</changeSet>

<changeSet id="1981031" author="[email protected]">
<changeSet id="1981031" author="[email protected]" context="!codegen">
<validCheckSum>ANY</validCheckSum>
<addDefaultValue tableName="SECRETS" columnName="SECRET_SALT" defaultValue="${secretStoreSalt}"/>
<addDefaultValue tableName="SECRETS" columnName="SECRET_SALT" defaultValueComputed="decode('${secretStoreSalt}', 'base64')"/>
</changeSet>

<changeSet id="1981032" author="[email protected]">
<changeSet id="1981032" author="[email protected]" context="!codegen">
<validCheckSum>ANY</validCheckSum>
<addNotNullConstraint tableName="SECRETS" columnName="SECRET_SALT" defaultNullValue="${secretStoreSalt}"/>
<update tableName="SECRETS">
<column name="SECRET_SALT" valueComputed="decode('${secretStoreSalt}', 'base64')"/>
<where>SECRET_SALT is NULL</where>
</update>
</changeSet>

<changeSet id="1981033" author="[email protected]">
<addNotNullConstraint tableName="SECRETS" columnName="SECRET_SALT"/>
</changeSet>

</databaseChangeLog>
2 changes: 1 addition & 1 deletion server/dist/src/main/resources/concord-server.conf
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ concord-server {
# requires "CREATE EXTENSION" privileges
createExtensionAvailable = "true"

secretStoreSalt = "${secretStore.secretStoreSalt}"
secretStoreSalt = ${secretStore.secretStoreSalt}
}
}

Expand Down

0 comments on commit fcd31a8

Please sign in to comment.