Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
474faae
feat: new X-Road 8 theme
ovidijusnortal Oct 1, 2025
4c0613b
feat: new X-Road 8 theme
ovidijusnortal Oct 17, 2025
73be915
 This is a combination of 3 commits.
ovidijusnortal Oct 1, 2025
774b1f1
feat: new X-Road 8 theme
ovidijusnortal Oct 16, 2025
a5c1a1f
feat: new X-Road 8 theme
ovidijusnortal Oct 16, 2025
83ae1d8
feat: new X-Road 8 theme
ovidijusnortal Oct 17, 2025
8d468e9
feat: new X-Road 8 theme
ovidijusnortal Oct 17, 2025
3a78a75
feat: new X-Road 8 theme
ovidijusnortal Oct 17, 2025
dd2d83a
feat: new X-Road 8 theme
ovidijusnortal Oct 17, 2025
d927693
feat: new X-Road 8 theme
ovidijusnortal Oct 17, 2025
ccaf642
feat: new X-Road 8 theme
ovidijusnortal Oct 17, 2025
795bca3
Merge remote-tracking branch 'origin/develop-8.x' into XRDDEV-2917
ricardas-buc Oct 17, 2025
d61239c
chore: checkstyle fix
ricardas-buc Oct 17, 2025
692763d
feat(CS): new X-Road 8 theme
ovidijusnortal Oct 17, 2025
8bca5b9
feat(CS): new X-Road 8 theme
ovidijusnortal Oct 17, 2025
90ff621
feat(CS): new X-Road 8 theme
ovidijusnortal Oct 19, 2025
267a83e
feat(CS): new X-Road 8 theme
ovidijusnortal Oct 19, 2025
474610c
feat(CS): new X-Road 8 theme
ovidijusnortal Oct 20, 2025
7d41afb
feat(CS): new X-Road 8 theme
ovidijusnortal Oct 20, 2025
1a1d76b
feat(CS): new X-Road 8 theme
ovidijusnortal Oct 20, 2025
d9d7697
feat(CS): new X-Road 8 theme
ovidijusnortal Oct 21, 2025
e99d152
feat(CS): new X-Road 8 theme
ovidijusnortal Oct 21, 2025
b406383
feat(CS): new X-Road 8 theme
ovidijusnortal Oct 21, 2025
fb48668
chore: fix xpath selectors and add extra test markers in DOM
ricardas-buc Oct 21, 2025
d2ea1eb
Merge remote-tracking branch 'origin/XRDDEV-2917' into XRDDEV-2917
ricardas-buc Oct 21, 2025
1ae2ff3
chore: disable failing tests
ricardas-buc Oct 21, 2025
5cf8f50
feat(CS): new X-Road 8 theme
ovidijusnortal Oct 21, 2025
8b0427e
feat(SS): new X-Road 8 theme
ovidijusnortal Oct 21, 2025
12db7f4
feat(CS): new X-Road 8 theme
ovidijusnortal Oct 21, 2025
c05cc34
feat(CS): new X-Road 8 theme
ovidijusnortal Oct 21, 2025
2317e36
feat(CS): new X-Road 8 theme
ovidijusnortal Oct 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
@Accessors(chain = true)
public class CertificateAuthority {
private Integer id;
private Integer certificationServiceId;
private CertificateDetails caCertificate;
private List<OcspResponder> ocspResponders;
private Instant createdAt;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* The MIT License
*
* Copyright (c) 2019- Nordic Institute for Interoperability Solutions (NIIS)
* Copyright (c) 2018 Estonian Information System Authority (RIA),
* Nordic Institute for Interoperability Solutions (NIIS), Population Register Centre (VRK)
* Copyright (c) 2015-2017 Estonian Information System Authority (RIA), Population Register Centre (VRK)
* <p>
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* <p>
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* <p>
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

package org.niis.xroad.cs.admin.api.dto;

import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
public class OcspResponderCertificateDetails extends CertificateDetails {

private Integer certificationServiceId;
private Integer intermediateCaId;

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
*/
package org.niis.xroad.cs.admin.api.service;

import org.niis.xroad.cs.admin.api.dto.CertificateDetails;
import org.niis.xroad.cs.admin.api.dto.OcspResponder;
import org.niis.xroad.cs.admin.api.dto.OcspResponderCertificateDetails;
import org.niis.xroad.cs.admin.api.dto.OcspResponderRequest;

public interface OcspRespondersService {
CertificateDetails getOcspResponderCertificateDetails(Integer id);
OcspResponderCertificateDetails getOcspResponderCertificateDetails(Integer id);

OcspResponder update(OcspResponderRequest updateRequest);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public class CaInfoConverter {
public CertificateAuthority toCertificateAuthority(CaInfoEntity caInfo) {
return new CertificateAuthority()
.setId(caInfo.getId())
.setCertificationServiceId(caInfo.getApprovedCa() == null ? null : caInfo.getApprovedCa().getId())
.setCaCertificate(certConverter.toCertificateDetails(caInfo.getCert()))
.setOcspResponders(caInfo.getOcspInfos().stream()
.map(ocspResponderConverter::toModel)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@
import lombok.RequiredArgsConstructor;
import org.niis.xroad.common.core.exception.XrdRuntimeException;
import org.niis.xroad.cs.admin.api.dto.CertificateDetails;
import org.niis.xroad.cs.admin.api.dto.OcspResponderCertificateDetails;
import org.niis.xroad.cs.admin.api.dto.SecurityServerAuthenticationCertificateDetails;
import org.niis.xroad.cs.admin.core.entity.AuthCertEntity;
import org.niis.xroad.cs.admin.core.entity.OcspInfoEntity;
import org.springframework.stereotype.Component;

import java.io.IOException;
Expand Down Expand Up @@ -70,6 +72,19 @@ public CertificateDetails toCertificateDetails(final byte[] cert) {
}
}

public OcspResponderCertificateDetails toCertificateDetails(final OcspInfoEntity ocspInfo) {
if (ocspInfo.getCert() == null) {
return null;
}
try {
OcspResponderCertificateDetails certificateDetails = new OcspResponderCertificateDetails();
populateCertificateDetails(certificateDetails, ocspInfo.getCert());
return certificateDetails;
} catch (Exception e) {
throw XrdRuntimeException.systemException(e);
}
}

public CertificateDetails toCertificateDetails(final X509Certificate certificate) {
try {
var certificateDetails = new CertificateDetails();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
package org.niis.xroad.cs.admin.core.repository;

import org.niis.xroad.cs.admin.core.entity.ApprovedCaEntity;
import org.niis.xroad.cs.admin.core.entity.CaInfoEntity;

public interface ApprovedCaRepository extends GenericRepository<ApprovedCaEntity, Integer> {
import java.util.Optional;

public interface ApprovedCaRepository extends GenericRepository<ApprovedCaEntity, Integer> {
Optional<Integer> findApprovedCaIdByCaId(CaInfoEntity caInfoEntity);
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,14 @@
import jakarta.transaction.Transactional;
import lombok.RequiredArgsConstructor;
import org.niis.xroad.common.exception.NotFoundException;
import org.niis.xroad.cs.admin.api.dto.CertificateDetails;
import org.niis.xroad.cs.admin.api.dto.OcspResponder;
import org.niis.xroad.cs.admin.api.dto.OcspResponderCertificateDetails;
import org.niis.xroad.cs.admin.api.dto.OcspResponderRequest;
import org.niis.xroad.cs.admin.api.service.OcspRespondersService;
import org.niis.xroad.cs.admin.core.converter.CertificateConverter;
import org.niis.xroad.cs.admin.core.converter.OcspResponderConverter;
import org.niis.xroad.cs.admin.core.entity.OcspInfoEntity;
import org.niis.xroad.cs.admin.core.repository.ApprovedCaRepository;
import org.niis.xroad.cs.admin.core.repository.OcspInfoRepository;
import org.niis.xroad.cs.admin.core.validation.UrlValidator;
import org.niis.xroad.restapi.config.audit.AuditDataHelper;
Expand All @@ -55,20 +56,35 @@
@RequiredArgsConstructor
public class OcspRespondersServiceImpl implements OcspRespondersService {
private final OcspInfoRepository ocspInfoRepository;
private final ApprovedCaRepository approvedCaRepository;
private final CertificateConverter certConverter;
private final OcspResponderConverter ocspResponderConverter;

private final AuditDataHelper auditDataHelper;
private final UrlValidator urlValidator;

@Override
public CertificateDetails getOcspResponderCertificateDetails(Integer id) {
public OcspResponderCertificateDetails getOcspResponderCertificateDetails(Integer id) {
return ocspInfoRepository.findById(id)
.map(OcspInfoEntity::getCert)
.map(certConverter::toCertificateDetails)
.filter(ocsp -> ocsp.getCert() != null)
.map(ocsp -> attachCaIds(ocsp, certConverter.toCertificateDetails(ocsp)))
.orElseThrow(() -> new NotFoundException(OCSP_RESPONDER_NOT_FOUND.build()));
}

private OcspResponderCertificateDetails attachCaIds(final OcspInfoEntity ocspInfo,
final OcspResponderCertificateDetails certificateDetails) {
if (ocspInfo.getCaInfo().getApprovedCa() == null) {
certificateDetails.setCertificationServiceId(
approvedCaRepository.findApprovedCaIdByCaId(ocspInfo.getCaInfo()).orElse(null)
);
} else {
certificateDetails.setIntermediateCaId(ocspInfo.getCaInfo().getId());
certificateDetails.setCertificationServiceId(ocspInfo.getCaInfo().getApprovedCa().getId());
}

return certificateDetails;
}

private OcspInfoEntity get(Integer id) {
return ocspInfoRepository.findById(id)
.orElseThrow(() -> new NotFoundException(OCSP_RESPONDER_NOT_FOUND.build()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.niis.xroad.cs.admin.core.converter.CertificateConverter;
import org.niis.xroad.cs.admin.core.converter.KeyUsageConverter;
import org.niis.xroad.cs.admin.core.entity.ApprovedTsaEntity;
import org.niis.xroad.cs.admin.core.repository.ApprovedCaRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
Expand All @@ -51,7 +52,7 @@
import static org.niis.xroad.cs.admin.api.dto.KeyUsageEnum.NON_REPUDIATION;

@ActiveProfiles("test")
@SpringBootTest(classes = {ApprovedTsaMapperImpl.class, CertificateConverter.class, KeyUsageConverter.class})
@SpringBootTest(classes = {ApprovedTsaMapperImpl.class, CertificateConverter.class, KeyUsageConverter.class, ApprovedCaRepository.class})
class ApprovedTsaMapperTest {

private static final int ID = 123;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ class OcspRespondersServiceImplTest {
@Mock
private OcspInfoRepository ocspInfoRepository;
@Mock
private ApprovedCaRepository approvedCaRepository;
@Mock
private AuditDataHelper auditDataHelper;
@Mock
private UrlValidator urlValidator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,19 @@
import org.mapstruct.MappingConstants;
import org.niis.xroad.cs.admin.api.converter.GenericMapper;
import org.niis.xroad.cs.admin.api.dto.CertificateDetails;
import org.niis.xroad.cs.admin.api.dto.OcspResponderCertificateDetails;
import org.niis.xroad.cs.admin.api.dto.SecurityServerAuthenticationCertificateDetails;
import org.niis.xroad.cs.openapi.model.CertificateDetailsDto;
import org.niis.xroad.cs.openapi.model.OcspResponderCertificateDetailsDto;
import org.niis.xroad.cs.openapi.model.SecurityServerAuthenticationCertificateDetailsDto;

@Mapper(componentModel = MappingConstants.ComponentModel.SPRING)
public interface CertificateDetailsDtoConverter extends GenericMapper {

CertificateDetailsDto convert(CertificateDetails certificateDetails);

OcspResponderCertificateDetailsDto convert(OcspResponderCertificateDetails certificateDetails);

SecurityServerAuthenticationCertificateDetailsDto convert(SecurityServerAuthenticationCertificateDetails certificateDetails);

}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import org.niis.xroad.cs.admin.rest.api.converter.CertificateDetailsDtoConverter;
import org.niis.xroad.cs.admin.rest.api.converter.OcspResponderDtoConverter;
import org.niis.xroad.cs.openapi.OcspRespondersApi;
import org.niis.xroad.cs.openapi.model.CertificateDetailsDto;
import org.niis.xroad.cs.openapi.model.OcspResponderCertificateDetailsDto;
import org.niis.xroad.cs.openapi.model.OcspResponderDto;
import org.niis.xroad.restapi.config.audit.AuditEventMethod;
import org.niis.xroad.restapi.config.audit.RestApiAuditEvent;
Expand Down Expand Up @@ -91,7 +91,7 @@ public ResponseEntity<OcspResponderDto> updateOcspResponder(Integer id, String u

@Override
@PreAuthorize("hasAuthority('VIEW_APPROVED_CA_DETAILS')")
public ResponseEntity<CertificateDetailsDto> getOcspRespondersCertificate(Integer id) {
public ResponseEntity<OcspResponderCertificateDetailsDto> getOcspRespondersCertificate(Integer id) {
return ok(certificateDetailsDtoConverter.convert(ocspRespondersService.getOcspResponderCertificateDetails(id)));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,16 @@
package org.niis.xroad.cs.admin.jpa.repository;

import org.niis.xroad.cs.admin.core.entity.ApprovedCaEntity;
import org.niis.xroad.cs.admin.core.entity.CaInfoEntity;
import org.niis.xroad.cs.admin.core.repository.ApprovedCaRepository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.Optional;

@Repository
public interface JpaApprovedCaRepository extends JpaRepository<ApprovedCaEntity, Integer>, ApprovedCaRepository {

@Query("select aca.id FROM ApprovedCaEntity aca WHERE aca.caInfo = :caInfoEntity")
Optional<Integer> findApprovedCaIdByCaId(CaInfoEntity caInfoEntity);
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import com.nortal.test.asserts.Assertion;
import com.nortal.test.asserts.AssertionOperation;
import io.cucumber.java.en.Step;
import org.niis.xroad.cs.openapi.model.CertificateDetailsDto;
import org.niis.xroad.cs.openapi.model.OcspResponderCertificateDetailsDto;
import org.niis.xroad.cs.openapi.model.OcspResponderDto;
import org.niis.xroad.cs.test.api.FeignOcspRespondersApi;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down Expand Up @@ -75,7 +75,7 @@ public void updateOcspResponderUrl() {
public void ocspResponderUrlAndCertificateIsUpdated() throws Exception {
Integer ocspResponderId = getRequiredStepData(OCSP_RESPONDER_ID);

final ResponseEntity<CertificateDetailsDto> certificateResponse = ocspRespondersApi
final ResponseEntity<OcspResponderCertificateDetailsDto> certificateResponse = ocspRespondersApi
.getOcspRespondersCertificate(ocspResponderId);

getKeyOldOcspResponderCertHash = certificateResponse.getBody().getHash();
Expand All @@ -100,7 +100,7 @@ public void ocspResponderUrlAndCertificateIsUpdated() throws Exception {
public void theOCSPResponderCertificateWasUpdated() {
Integer ocspResponderId = getRequiredStepData(OCSP_RESPONDER_ID);

final ResponseEntity<CertificateDetailsDto> certificateResponse = ocspRespondersApi
final ResponseEntity<OcspResponderCertificateDetailsDto> certificateResponse = ocspRespondersApi
.getOcspRespondersCertificate(ocspResponderId);

validate(certificateResponse)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public void membersAreSelected(final DataTable identifiers) {
identifiers.asList()
.forEach(identifier -> globalGroupDetailsPage.getAddMembersDialogObj().rowCheckbox(identifier)
.$("i")
.shouldHave(cssClass("mdi-checkbox-marked")));
.shouldHave(cssClass("check_box")));
}

@Step("user filters selectable members list with query: {string}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
import static com.codeborne.selenide.Condition.focused;
import static com.codeborne.selenide.Condition.text;
import static com.codeborne.selenide.Condition.visible;
import static org.niis.xroad.common.test.ui.utils.VuetifyHelper.vCheckbox;
import static org.niis.xroad.common.test.ui.utils.VuetifyHelper.vSwitch;
import static org.niis.xroad.common.test.ui.utils.VuetifyHelper.vTextField;
import static org.niis.xroad.cs.test.ui.constants.Constants.getSecurityServerId;
import static org.niis.xroad.cs.test.ui.glue.BaseUiStepDefs.StepDataKey.MANAGEMENT_REQUEST_ID;
Expand Down Expand Up @@ -89,7 +89,7 @@ private void userIsAbleToSortByFieldAndOrder(String name, String defaultOrder) {
}

private String orderDirectionClass(final boolean descending) {
return descending ? "mdi-arrow-down" : "mdi-arrow-up";
return descending ? "arrow_downward" : "arrow_upward";
}

@Step("the user clicks on search icon")
Expand Down Expand Up @@ -228,7 +228,6 @@ public void userIsAbleToDeclineManagementRequestInRow(String securityServerCode,
commonPageObj.dialog.btnCancel().shouldBe(Condition.enabled);
commonPageObj.dialog.btnSave().shouldBe(Condition.enabled).click();


commonPageObj.snackBar.success().shouldBe(visible);
commonPageObj.snackBar.btnClose().click();
}
Expand Down Expand Up @@ -257,17 +256,17 @@ public void managementRequestsTableShouldBeVisible() {

@Step("the option to show only pending requests is selected")
public void showOnlyPendingRequestsIsSelected() {
vCheckbox(managementRequestsPageObj.showOnlyPendingRequests()).shouldBeChecked();
vSwitch(managementRequestsPageObj.showOnlyPendingRequests()).shouldBeOn();
}

@Step("the option to show only pending requests is not selected")
public void showOnlyPendingRequestsIsNotSelected() {
vCheckbox(managementRequestsPageObj.showOnlyPendingRequests()).shouldBeUnchecked();
vSwitch(managementRequestsPageObj.showOnlyPendingRequests()).shouldBeOff();
}

@Step("the user clicks the checkbox to show only pending requests")
public void showOnlyPendingRequestsIsClicked() {
vCheckbox(managementRequestsPageObj.showOnlyPendingRequests()).click();
vSwitch(managementRequestsPageObj.showOnlyPendingRequests()).click();
}

@Step("the user can not see the Approve, Decline actions for requests that have already been processed")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void subsystemIsAdded(String subsystemCode, String subsystemName) {

@Step("Subsystem with code: {string} and status: {string} is listed")
public void subsystemIsShown(String subsystemCode, String subsystemStatus) {
memberSubsystemsPageObj.listSubsystemsRowOf(subsystemCode, subsystemStatus).shouldBe(Condition.visible);
memberSubsystemsPageObj.listSubsystemsRowOf(subsystemCode, null, subsystemStatus).shouldBe(Condition.visible);
}

@Step("Subsystem with code: {string}, name: {string} and status: {string} is listed")
Expand Down Expand Up @@ -104,6 +104,6 @@ public void subsystemIsRenamed(String subsystemCode, String newName) {

@Step("Subsystem with code: {string} not listed any more")
public void subsystemIsNotShown(String subsystemCode) {
memberSubsystemsPageObj.listSubsystemsRowOf(subsystemCode).shouldNotBe(Condition.visible);
memberSubsystemsPageObj.listSubsystemsRowOf(subsystemCode, null, null).shouldNotBe(Condition.visible);
}
}
Loading
Loading