Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/ddcc as default domain for non legacy api #79

Merged
merged 10 commits into from
Dec 3, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public ResponseEntity<List<TrustListDto>> downloadTrustListFilteredByCountryAndT
},
summary = "Returns a filtered list of trusted certificates. The provided search criteria are additive."
+ " It is possible to provide more than one value for each criteria. (Except for withFederation)",
tags = {"Trust Lists"},
tags = {"Trust Lists", "GDHCN"},
parameters = {
@Parameter(
in = ParameterIn.QUERY,
Expand Down Expand Up @@ -350,7 +350,7 @@ public ResponseEntity<List<TrustedCertificateTrustListDto>> downloadTrustListCer
@SecurityRequirement(name = OpenApiConfig.SECURITY_SCHEMA_DISTINGUISH_NAME)
},
summary = "Returns the list of trusted issuers filtered by criterias.",
tags = {"Trust List"},
tags = {"Trust List", "GDHCN"},
parameters = {
@Parameter(
in = ParameterIn.QUERY,
Expand Down Expand Up @@ -411,7 +411,7 @@ public ResponseEntity<List<TrustedIssuerDto>> getTrustedIssuersByCountry(
@SecurityRequirement(name = OpenApiConfig.SECURITY_SCHEMA_DISTINGUISH_NAME)
},
summary = "Returns the list of trusted issuers filtered by criterias.",
tags = {"Trust List"},
tags = {"Trust List", "GDHCN"},
parameters = {
@Parameter(
in = ParameterIn.QUERY,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public class TrustedCertificateController {
@SecurityRequirement(name = OpenApiConfig.SECURITY_SCHEMA_DISTINGUISH_NAME)
},
summary = "Uploads Trusted Certificate",
tags = {"Trusted Certificate"},
tags = {"Trusted Certificate", "GDHCN"},
requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
required = true,
description = "Request body with payload.",
Expand Down Expand Up @@ -146,8 +146,9 @@ public ResponseEntity<Void> postTrustedCertificate(
DgcMdc.put("payloadCertSubject", parser.getPayload().getSubject().toString());

try {
String domain = body.getDomain() == null ? "DDCC" : body.getDomain();
signerInformationService.addTrustedCertificate(parser.getPayload(), parser.getSigningCertificate(),
body.getCms(), countryCode, body.getKid(), body.getGroup(), body.getDomain(),
body.getCms(), countryCode, body.getKid(), body.getGroup(), domain,
body.getProperties());
} catch (SignerInformationService.SignerCertCheckException e) {
DgcMdc.put(MDC_VERIFICATION_ERROR_REASON, e.getReason().toString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public class TrustedReferenceController {
@SecurityRequirement(name = OpenApiConfig.SECURITY_SCHEMA_HASH),
@SecurityRequirement(name = OpenApiConfig.SECURITY_SCHEMA_DISTINGUISH_NAME)
},
tags = {"Trusted Reference"},
tags = {"Trusted Reference", "GDHCN"},
summary = "Upload a new trusted reference",
description = "Endpoint to upload a new trusted reference.",
requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
Expand Down Expand Up @@ -146,7 +146,7 @@ public ResponseEntity<Void> uploadTrustedReference(
@SecurityRequirement(name = OpenApiConfig.SECURITY_SCHEMA_HASH),
@SecurityRequirement(name = OpenApiConfig.SECURITY_SCHEMA_DISTINGUISH_NAME)
},
tags = {"Trusted Reference"},
tags = {"Trusted Reference", "GDHCN"},
summary = "Get a single trusted references",
responses = {
@ApiResponse(
Expand Down Expand Up @@ -190,7 +190,7 @@ public ResponseEntity<TrustedReferenceDto> getTrustedReference(
@SecurityRequirement(name = OpenApiConfig.SECURITY_SCHEMA_HASH),
@SecurityRequirement(name = OpenApiConfig.SECURITY_SCHEMA_DISTINGUISH_NAME)
},
tags = {"Trusted Reference"},
tags = {"Trusted Reference", "GDHCN"},
summary = "Delete a Trusted Reference",
requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
required = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public TrustedReferenceEntity addTrustedReference(
trustedReferenceEntity.setReferenceVersion(parsedTrustedEntity.getReferenceVersion());
trustedReferenceEntity.setContentType(parsedTrustedEntity.getContentType());
trustedReferenceEntity.setDomain(
parsedTrustedEntity.getDomain() == null ? "DCC" : parsedTrustedEntity.getDomain());
parsedTrustedEntity.getDomain() == null ? "DDCC" : parsedTrustedEntity.getDomain());
if (parsedTrustedEntity.getUuid() == null) {
trustedReferenceEntity.setUuid(UUID.randomUUID().toString());
}
Expand Down