Skip to content

Commit

Permalink
Add UUID and Domain to TrustedIssuer (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
f11h authored Mar 29, 2022
1 parent 2be957c commit 300ebc1
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,19 @@ public class TrustedIssuerEntity {
* Signature of the TrustAnchor.
*/
@Column(name = "signature", nullable = false, length = 6000)
String signature;
private String signature;

/**
* UUID of the TrustedIssuer.
*/
@Column(name = "uuid", nullable = false, length = 36)
private String uuid;

/**
* Domain the TrustedIssuer is assigned to (currently only "DCC").
*/
@Column(name = "domain", nullable = false, length = 10)
private String domain;

public enum UrlType {
HTTP,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class TrustedIssuerDto {
private String keyStorageType;

@Schema(example = "o53CbAa77LyIMFc5Gz+B2Jc275Gdg/SdLayw7gx0GrTcinR95zfTLr8nNHgJMYlX3rD8Y11zB/Osyt0 ..."
+ " W+VIrYRGSEmgjGy2EwzvA5nVhsaA+/udnmbyQw9LjAOQ==")
+ " W+VIrYRGSEmgjGy2EwzvA5nVhsaA+/udnmbyQw9LjAOQ==")
private String signature;

@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX")
Expand All @@ -58,6 +58,9 @@ public class TrustedIssuerDto {
@Schema(example = "Example Service")
private String name;

@Schema(example = "DCC")
private String domain;

@Schema(example = "e4d04ee1-2bfe-4e8c-ab82-0d2b1d223712")
private String uuid;

Expand Down
1 change: 1 addition & 0 deletions src/main/resources/db/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
<include file="db/changelog/add-certificate-roles-table-pk.xml"/>
<include file="db/changelog/add-trusted-issuer-table.xml"/>
<include file="db/changelog/alter-signer-information-for-deletion.xml"/>
<include file="db/changelog/add-uuid-and-domain-for-trusted-issuer.xml"/>
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?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-4.3.xsd"
objectQuotingStrategy="QUOTE_ONLY_RESERVED_WORDS">
<changeSet id="add-uuid-and-domain-for-trusted-issuer" author="f11h">
<addColumn tableName="trusted_issuer">
<column name="uuid" type="VARCHAR(36)">
<constraints unique="true"/>
</column>
<column defaultValue="DCC" name="domain" type="VARCHAR(10)"/>
</addColumn>
</changeSet>

</databaseChangeLog>

0 comments on commit 300ebc1

Please sign in to comment.