-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into ib/misc-security
- Loading branch information
Showing
11 changed files
with
200 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
server/db/src/main/resources/com/walmartlabs/concord/server/db/v2.21.0.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<databaseChangeLog | ||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.3.xsd"> | ||
|
||
<changeSet id="2210000" author="ybrigo@gmail.com"> | ||
<dropNotNullConstraint tableName="API_KEYS" columnName="USER_ID"/> | ||
</changeSet> | ||
|
||
<changeSet id="2210010" author="ybrigo@gmail.com"> | ||
<dropIndex tableName="API_KEYS " indexName="IDX_API_KEYS_NAME_USER"/> | ||
|
||
<sql> | ||
create unique index IDX_API_KEYS_NAME_USER_NULL on API_KEYS (KEY_NAME) where USER_ID is null | ||
</sql> | ||
<sql> | ||
create unique index IDX_API_KEYS_NAME_USER_NOT_NULL on API_KEYS (KEY_NAME, USER_ID) where USER_ID is not null | ||
</sql> | ||
</changeSet> | ||
|
||
<changeSet id="2210020" author="ybrigo@gmail.com" runInTransaction="false" context="!codegen"> | ||
<validCheckSum>ANY</validCheckSum> | ||
|
||
<preConditions onFail="MARK_RAN"> | ||
<sqlCheck expectedResult="0"> | ||
select count(key_id) | ||
from API_KEYS | ||
where KEY_NAME = 'concordAgentKey_autogenerated'; | ||
</sqlCheck> | ||
<!-- concordAgentUserId='d4f123c1-f8d4-40b2-8a12-b8947b9ce2d8' --> | ||
<sqlCheck expectedResult="0"> | ||
select count(key_id) | ||
from API_KEYS | ||
where USER_ID = 'd4f123c1-f8d4-40b2-8a12-b8947b9ce2d8'; | ||
</sqlCheck> | ||
</preConditions> | ||
|
||
<customChange class="com.walmartlabs.concord.server.liquibase.ext.ApiTokenCreator"> | ||
<param name="keyName" value="concordAgentKey_autogenerated"/> | ||
<!-- values from concord-server.conf --> | ||
<param name="token" value="${defaultAgentToken}"/> | ||
<param name="skip" value="${skipAgentTokenGeneration}"/> | ||
</customChange> | ||
</changeSet> | ||
|
||
</databaseChangeLog> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.