From d7ade70b5c26f4b2936ad864e0c00e07e1658cac Mon Sep 17 00:00:00 2001 From: Cyrus <24922493+cyrus-dev@users.noreply.github.com> Date: Thu, 22 Oct 2020 13:32:30 -0400 Subject: [PATCH 1/6] This branch takes the validated status of a failed event log matching from the bios measurements on the client and displays what failed on the support RIM page and the fail validation icon, if log mismatch, links to a bios measurments page that displays the events that didn't match next to baseline. --- .../SupplyChainValidationServiceImpl.java | 6 +- ...eferenceManifestDetailsPageController.java | 340 ++++++++++++------ .../main/webapp/WEB-INF/jsp/rim-details.jsp | 65 +++- .../java/hirs/tpm/eventlog/TpmPcrEvent.java | 17 + 4 files changed, 325 insertions(+), 103 deletions(-) diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/service/SupplyChainValidationServiceImpl.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/service/SupplyChainValidationServiceImpl.java index 3d30cbe4..5ac909f5 100644 --- a/HIRS_AttestationCA/src/main/java/hirs/attestationca/service/SupplyChainValidationServiceImpl.java +++ b/HIRS_AttestationCA/src/main/java/hirs/attestationca/service/SupplyChainValidationServiceImpl.java @@ -332,6 +332,7 @@ public class SupplyChainValidationServiceImpl implements SupplyChainValidationSe AppraisalStatus fwStatus = null; String manufacturer = device.getDeviceInfo() .getHardwareInfo().getManufacturer(); + ReferenceManifest validationObject = null; ReferenceManifest baseReferenceManifest = null; ReferenceManifest supportReferenceManifest = null; ReferenceManifest measurement = null; @@ -343,6 +344,7 @@ public class SupplyChainValidationServiceImpl implements SupplyChainValidationSe measurement = BiosMeasurements.select(referenceManifestManager) .byManufacturer(manufacturer).includeArchived().getRIM(); + validationObject = baseReferenceManifest; String failedString = ""; if (baseReferenceManifest == null) { failedString = "Base Reference Integrity Manifest%n"; @@ -401,6 +403,7 @@ public class SupplyChainValidationServiceImpl implements SupplyChainValidationSe } else { StringBuilder sb = pcrPolicy.validatePcrs(storedPcrs); if (sb.length() > 0) { + validationObject = supportReferenceManifest; level = Level.ERROR; fwStatus = new AppraisalStatus(FAIL, sb.toString()); } else { @@ -436,6 +439,7 @@ public class SupplyChainValidationServiceImpl implements SupplyChainValidationSe if (!tpmPcrEvents.isEmpty()) { StringBuilder sb = new StringBuilder(); + validationObject = measurement; for (TpmPcrEvent tpe : tpmPcrEvents) { sb.append(String.format("Event %s - %s%n", tpe.getEventNumber(), @@ -458,7 +462,7 @@ public class SupplyChainValidationServiceImpl implements SupplyChainValidationSe } return buildValidationRecord(SupplyChainValidation.ValidationType.FIRMWARE, - fwStatus.getAppStatus(), fwStatus.getMessage(), baseReferenceManifest, level); + fwStatus.getAppStatus(), fwStatus.getMessage(), validationObject, level); } /** diff --git a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ReferenceManifestDetailsPageController.java b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ReferenceManifestDetailsPageController.java index 19e0df39..b620fa44 100644 --- a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ReferenceManifestDetailsPageController.java +++ b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ReferenceManifestDetailsPageController.java @@ -1,6 +1,7 @@ package hirs.attestationca.portal.page.controllers; import hirs.data.persist.BaseReferenceManifest; +import hirs.data.persist.BiosMeasurements; import hirs.data.persist.ReferenceManifest; import hirs.data.persist.SupportReferenceManifest; import hirs.data.persist.SwidResource; @@ -17,10 +18,13 @@ import java.security.NoSuchAlgorithmException; import java.security.cert.CertificateException; import java.util.Arrays; import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.ArrayList; +import java.util.Map; import java.util.UUID; +import hirs.tpm.eventlog.TpmPcrEvent; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -113,117 +117,253 @@ public class ReferenceManifestDetailsPageController * @throws NoSuchAlgorithmException If an unknown Algorithm is encountered. * @throws CertificateException if a certificate doesn't parse. */ - public static HashMap getRimDetailInfo(final UUID uuid, - final ReferenceManifestManager referenceManifestManager) throws IOException, + private HashMap getRimDetailInfo( + final UUID uuid, + final ReferenceManifestManager referenceManifestManager) throws IOException, CertificateException, NoSuchAlgorithmException { HashMap data = new HashMap<>(); - ReferenceManifest rim = BaseReferenceManifest - .select(referenceManifestManager) + BaseReferenceManifest bRim = BaseReferenceManifest.select(referenceManifestManager) .byEntityId(uuid).getRIM(); - if (rim instanceof BaseReferenceManifest) { - BaseReferenceManifest bRim = (BaseReferenceManifest) rim; - // Software Identity - data.put("swidName", bRim.getSwidName()); - data.put("swidVersion", bRim.getSwidVersion()); - data.put("swidTagVersion", bRim.getSwidTagVersion()); - if (bRim.isSwidCorpus() == 1) { - data.put("swidCorpus", "True"); - } else { - data.put("swidCorpus", "False"); - } - if (bRim.isSwidPatch() == 1) { - data.put("swidPatch", "True"); - } else { - data.put("swidPatch", "False"); - } - if (bRim.isSwidSupplemental() == 1) { - data.put("swidSupplemental", "True"); - } else { - data.put("swidSupplemental", "False"); - } - data.put("swidTagId", rim.getTagId()); - // Entity - data.put("entityName", bRim.getEntityName()); - data.put("entityRegId", bRim.getEntityRegId()); - data.put("entityRole", bRim.getEntityRole()); - data.put("entityThumbprint", bRim.getEntityThumbprint()); - // Link - data.put("linkHref", bRim.getLinkHref()); - data.put("linkRel", bRim.getLinkRel()); - data.put("supportRimId", ""); - data.put("supportRimTagId", ""); - data.put("platformManufacturer", bRim.getPlatformManufacturer()); - data.put("platformManufacturerId", bRim.getPlatformManufacturerId()); - data.put("platformModel", bRim.getPlatformModel()); - data.put("platformVersion", bRim.getPlatformVersion()); - data.put("payloadType", bRim.getPayloadType()); - data.put("colloquialVersion", bRim.getColloquialVersion()); - data.put("edition", bRim.getEdition()); - data.put("product", bRim.getProduct()); - data.put("revision", bRim.getRevision()); - data.put("bindingSpec", bRim.getBindingSpec()); - data.put("bindingSpecVersion", bRim.getBindingSpecVersion()); - data.put("pcUriGlobal", bRim.getPcURIGlobal()); - data.put("pcUriLocal", bRim.getPcURILocal()); - data.put("rimLinkHash", bRim.getRimLinkHash()); - data.put("rimType", bRim.getRimType()); + if (bRim != null) { + data.putAll(getBaseRimInfo(bRim, referenceManifestManager)); + } - List resources = bRim.parseResource(); - TCGEventLog logProcessor = null; - ReferenceManifest support = null; + SupportReferenceManifest sRim = SupportReferenceManifest.select(referenceManifestManager) + .byEntityId(uuid).getRIM(); - if (bRim.getAssociatedRim() == null) { - support = SupportReferenceManifest.select(referenceManifestManager) - .byManufacturer(bRim.getPlatformManufacturer()) - .getRIM(); - if (support != null) { - bRim.setAssociatedRim(support.getId()); - logProcessor = new TCGEventLog(support.getRimBytes()); - } - } - // going to have to pull the filename and grab that from the DB - // to get the id to make the link - for (SwidResource swidRes : resources) { - if (support != null && swidRes.getName() - .equals(support.getFileName())) { - swidRes.setPcrValues(Arrays.asList( - logProcessor.getExpectedPCRValues())); - break; - } else { - swidRes.setPcrValues(new ArrayList<>()); - } - } + if (sRim != null) { + data.putAll(getSupportRimInfo(sRim, referenceManifestManager)); + } - data.put("associatedRim", bRim.getAssociatedRim()); - data.put("swidFiles", resources); - } else { - SupportReferenceManifest sRim = SupportReferenceManifest - .select(referenceManifestManager) - .byEntityId(uuid).getRIM(); + BiosMeasurements bios = BiosMeasurements.select(referenceManifestManager) + .byEntityId(uuid).getRIM(); - if (sRim.getAssociatedRim() == null) { - ReferenceManifest baseRim = BaseReferenceManifest.select(referenceManifestManager) - .byManufacturer(sRim.getPlatformManufacturer()).getRIM(); - if (baseRim != null) { - sRim.setAssociatedRim(baseRim.getId()); - try { - referenceManifestManager.update(sRim); - } catch (DBManagerException ex) { - LOGGER.error("Failed to update Support RIM", ex); - } - } - } - data.put("baseRim", sRim.getTagId()); - data.put("associatedRim", sRim.getAssociatedRim()); - data.put("rimType", sRim.getRimType()); - data.put("tagId", sRim.getTagId()); - - TCGEventLog logProcessor = new TCGEventLog(sRim.getRimBytes()); - data.put("events", logProcessor.getEventList()); + if (bios != null) { + data.putAll(getMeasurementsRimInfo(bios, referenceManifestManager)); } return data; } + + /** + * This method takes the place of an entire class for a string builder. + * Gathers all information and returns it for displays. + * + * @param baseRim established ReferenceManifest Type. + * @param referenceManifestManager the reference manifest manager. + * @return mapping of the RIM information from the database. + * @throws java.io.IOException error for reading file bytes. + * @throws NoSuchAlgorithmException If an unknown Algorithm is encountered. + * @throws CertificateException if a certificate doesn't parse. + */ + private HashMap getBaseRimInfo( + final BaseReferenceManifest baseRim, + final ReferenceManifestManager referenceManifestManager) + throws IOException, CertificateException, NoSuchAlgorithmException { + HashMap data = new HashMap<>(); + + // Software Identity + data.put("swidName", baseRim.getSwidName()); + data.put("swidVersion", baseRim.getSwidVersion()); + data.put("swidTagVersion", baseRim.getSwidTagVersion()); + if (baseRim.isSwidCorpus() == 1) { + data.put("swidCorpus", "True"); + } else { + data.put("swidCorpus", "False"); + } + if (baseRim.isSwidPatch() == 1) { + data.put("swidPatch", "True"); + } else { + data.put("swidPatch", "False"); + } + if (baseRim.isSwidSupplemental() == 1) { + data.put("swidSupplemental", "True"); + } else { + data.put("swidSupplemental", "False"); + } + data.put("swidTagId", baseRim.getTagId()); + // Entity + data.put("entityName", baseRim.getEntityName()); + data.put("entityRegId", baseRim.getEntityRegId()); + data.put("entityRole", baseRim.getEntityRole()); + data.put("entityThumbprint", baseRim.getEntityThumbprint()); + // Link + data.put("linkHref", baseRim.getLinkHref()); + data.put("linkRel", baseRim.getLinkRel()); + data.put("supportRimId", ""); + data.put("supportRimTagId", ""); + data.put("platformManufacturer", baseRim.getPlatformManufacturer()); + data.put("platformManufacturerId", baseRim.getPlatformManufacturerId()); + data.put("platformModel", baseRim.getPlatformModel()); + data.put("platformVersion", baseRim.getPlatformVersion()); + data.put("payloadType", baseRim.getPayloadType()); + data.put("colloquialVersion", baseRim.getColloquialVersion()); + data.put("edition", baseRim.getEdition()); + data.put("product", baseRim.getProduct()); + data.put("revision", baseRim.getRevision()); + data.put("bindingSpec", baseRim.getBindingSpec()); + data.put("bindingSpecVersion", baseRim.getBindingSpecVersion()); + data.put("pcUriGlobal", baseRim.getPcURIGlobal()); + data.put("pcUriLocal", baseRim.getPcURILocal()); + data.put("rimLinkHash", baseRim.getRimLinkHash()); + data.put("rimType", baseRim.getRimType()); + + List resources = baseRim.parseResource(); + TCGEventLog logProcessor = null; + ReferenceManifest support = null; + + if (baseRim.getAssociatedRim() == null) { + support = SupportReferenceManifest.select(referenceManifestManager) + .byManufacturer(baseRim.getPlatformManufacturer()) + .getRIM(); + if (support != null) { + baseRim.setAssociatedRim(support.getId()); + logProcessor = new TCGEventLog(support.getRimBytes()); + } + } + // going to have to pull the filename and grab that from the DB + // to get the id to make the link + for (SwidResource swidRes : resources) { + if (support != null && swidRes.getName() + .equals(support.getFileName())) { + swidRes.setPcrValues(Arrays.asList( + logProcessor.getExpectedPCRValues())); + break; + } else { + swidRes.setPcrValues(new ArrayList<>()); + } + } + + data.put("associatedRim", baseRim.getAssociatedRim()); + data.put("swidFiles", resources); + + return data; + } + + /** + * This method takes the place of an entire class for a string builder. + * Gathers all information and returns it for displays. + * + * @param support established ReferenceManifest Type. + * @param referenceManifestManager the reference manifest manager. + * @return mapping of the RIM information from the database. + * @throws java.io.IOException error for reading file bytes. + * @throws NoSuchAlgorithmException If an unknown Algorithm is encountered. + * @throws CertificateException if a certificate doesn't parse. + */ + private HashMap getSupportRimInfo( + final SupportReferenceManifest support, + final ReferenceManifestManager referenceManifestManager) + throws IOException, CertificateException, NoSuchAlgorithmException { + HashMap data = new HashMap<>(); + + if (support.getAssociatedRim() == null) { + ReferenceManifest baseRim = BaseReferenceManifest.select(referenceManifestManager) + .byManufacturer(support.getPlatformManufacturer()).getRIM(); + if (baseRim != null) { + support.setAssociatedRim(baseRim.getId()); + try { + referenceManifestManager.update(support); + } catch (DBManagerException ex) { + LOGGER.error("Failed to update Support RIM", ex); + } + } + } + data.put("baseRim", support.getTagId()); + data.put("associatedRim", support.getAssociatedRim()); + data.put("rimType", support.getRimType()); + data.put("tagId", support.getTagId()); + + TCGEventLog logProcessor = new TCGEventLog(support.getRimBytes()); + BiosMeasurements measurements = BiosMeasurements.select(referenceManifestManager) + .byManufacturer(support.getPlatformManufacturer()).getRIM(); + + LinkedList tpmPcrEvents = new LinkedList<>(); + TCGEventLog measurementsProcess; + if (measurements != null) { + measurementsProcess = new TCGEventLog((measurements.getRimBytes())); + for (TpmPcrEvent tpe : logProcessor.getEventList()) { + if (!tpe.eventCompare( + measurementsProcess.getEventByNumber( + tpe.getEventNumber()))) { + tpe.setError(true); + } + tpmPcrEvents.add(tpe); + } + } + + data.put("events", tpmPcrEvents); + + return data; + } + + /** + * This method takes the place of an entire class for a string builder. + * Gathers all information and returns it for displays. + * + * @param measurements established ReferenceManifest Type. + * @param referenceManifestManager the reference manifest manager. + * @return mapping of the RIM information from the database. + * @throws java.io.IOException error for reading file bytes. + * @throws NoSuchAlgorithmException If an unknown Algorithm is encountered. + * @throws CertificateException if a certificate doesn't parse. + */ + private HashMap getMeasurementsRimInfo( + final BiosMeasurements measurements, + final ReferenceManifestManager referenceManifestManager) + throws IOException, CertificateException, NoSuchAlgorithmException { + HashMap data = new HashMap<>(); + LinkedList supportEvents = new LinkedList<>(); + LinkedList livelogEvents = new LinkedList<>(); + + data.put("supportFilename", "Blank"); + data.put("supportId", ""); + data.put("tagId", measurements.getTagId()); + data.put("baseId", ""); + + data.put("rimType", measurements.getRimType()); + TCGEventLog supportLog = null; + SupportReferenceManifest support = SupportReferenceManifest + .select(referenceManifestManager) + .byManufacturer(measurements + .getPlatformManufacturer()).getRIM(); + + if (support != null) { + supportLog = new TCGEventLog(support.getRimBytes()); + data.put("supportFilename", support.getFileName()); + data.put("supportId", support.getId()); + } + + BaseReferenceManifest base = BaseReferenceManifest + .select(referenceManifestManager) + .byManufacturer(measurements + .getPlatformManufacturer()).getRIM(); + + if (base != null) { + data.put("baseId", base.getId()); + } + + TCGEventLog measurementLog = new TCGEventLog(measurements.getRimBytes()); + if (supportLog != null) { + TpmPcrEvent measurementEvent; + for (TpmPcrEvent tpe : supportLog.getEventList()) { + measurementEvent = measurementLog.getEventByNumber(tpe.getEventNumber()); + if (!tpe.eventCompare(measurementEvent)) { + supportEvents.add(tpe); + livelogEvents.add(measurementEvent); + } + } + } + + data.put("supportEvents", supportEvents); + data.put("livelogEvents", livelogEvents); + + for (Map.Entry entry : data.entrySet()) { + LOGGER.error(String.format("%s -> %s", entry.getKey(), + String.valueOf(entry.getValue()))); + } + return data; + } } diff --git a/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/rim-details.jsp b/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/rim-details.jsp index 21ae4324..675872bf 100644 --- a/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/rim-details.jsp +++ b/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/rim-details.jsp @@ -51,7 +51,14 @@ - + + + + + + + + ${count} PCR${event.getPcrIndex()} ${event.getEventTypeStr()} @@ -66,6 +73,60 @@
${initialData.events.size()} entries
+ +
+
+
Base/Support
+
+ + + + + + +
+
+
+
+
+
Support
+ + +
+
Event#: + ${sEvent.getEventNumber()}
+ PCR Index: + ${sEvent.getPcrIndex()}
+ Digest: + ${sEvent.getEventDigestStr()}
+ Content: + ${sEvent.getEventContentStr()}
+
+
+
+
+
+
Client Log
+ + +
+
Event#: + ${lEvent.getEventNumber()}
+ PCR Index: + ${lEvent.getPcrIndex()}
+ Digest: + ${lEvent.getEventDigestStr()}
+ Content: + ${lEvent.getEventContentStr()}
+
+
+
+
+
+
+
Software Identity
@@ -275,7 +336,7 @@ } } } - window.onload = function() { + window.onload = function () { // Constant retrieved from server-side via JSP var maxRows = 11; diff --git a/HIRS_Utils/src/main/java/hirs/tpm/eventlog/TpmPcrEvent.java b/HIRS_Utils/src/main/java/hirs/tpm/eventlog/TpmPcrEvent.java index d7fe1539..ca2d5098 100644 --- a/HIRS_Utils/src/main/java/hirs/tpm/eventlog/TpmPcrEvent.java +++ b/HIRS_Utils/src/main/java/hirs/tpm/eventlog/TpmPcrEvent.java @@ -104,6 +104,7 @@ public class TpmPcrEvent { private byte[] eventDataSha256hash; private EvPostCode evPostCode; private int eventNumber; + private boolean error = false; /** * Constructor. @@ -733,6 +734,22 @@ public class TpmPcrEvent { return true; } + /** + * Getter for error. + * @return there + */ + public boolean isError() { + return error; + } + + /** + * Setter for error. + * @param error parameter + */ + public void setError(final boolean error) { + this.error = error; + } + /** * Human readable string representing the contents of the Event Log. * From 2ef00cd5d6eadfdee8529ba843f777d1d399be50 Mon Sep 17 00:00:00 2001 From: Cyrus <24922493+cyrus-dev@users.noreply.github.com> Date: Fri, 23 Oct 2020 08:37:41 -0400 Subject: [PATCH 2/6] Cleaned up css/html code for a cleaner and easier display layout --- .../main/webapp/WEB-INF/jsp/rim-details.jsp | 86 +++++++++++-------- .../src/main/webapp/common/rim_details.css | 23 +++++ 2 files changed, 74 insertions(+), 35 deletions(-) diff --git a/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/rim-details.jsp b/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/rim-details.jsp index 675872bf..01854654 100644 --- a/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/rim-details.jsp +++ b/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/rim-details.jsp @@ -89,41 +89,57 @@

-
-
-
Support
- - -
-
Event#: - ${sEvent.getEventNumber()}
- PCR Index: - ${sEvent.getPcrIndex()}
- Digest: - ${sEvent.getEventDigestStr()}
- Content: - ${sEvent.getEventContentStr()}
-
-
-
-
-
-
Client Log
- - -
-
Event#: - ${lEvent.getEventNumber()}
- PCR Index: - ${lEvent.getPcrIndex()}
- Digest: - ${lEvent.getEventDigestStr()}
- Content: - ${lEvent.getEventContentStr()}
-
-
-
-
+
+
+
Support
+ + +
+
+
Event#:
+
${sEvent.getEventNumber()}
+
+
+
PCR Index:
+
${sEvent.getPcrIndex()}
+
+
+
Digest:
+
${sEvent.getEventDigestStr()}
+
+
+
Content:
+
${sEvent.getEventContentStr()}
+
+
+
+
+
+
+
Client Log
+ + +
+
+
Event#:
+
${lEvent.getEventNumber()}
+
+
+
PCR Index:
+
${lEvent.getPcrIndex()}
+
+
+
Digest:
+
${lEvent.getEventDigestStr()}
+
+
+
Content:
+
${lEvent.getEventContentStr()}
+
+
+
+
+
diff --git a/HIRS_AttestationCAPortal/src/main/webapp/common/rim_details.css b/HIRS_AttestationCAPortal/src/main/webapp/common/rim_details.css index ed7c6e70..6ab98770 100644 --- a/HIRS_AttestationCAPortal/src/main/webapp/common/rim_details.css +++ b/HIRS_AttestationCAPortal/src/main/webapp/common/rim_details.css @@ -52,4 +52,27 @@ .pcrCell { max-width: 50px; +} + +.event-element { + padding: 15px; + display: flex; + flex-direction: column; +} + +.event-data { + display: flex; + flex: 1 +} + +.event-data:first-child { + background: lightgray; +} + +.data-label { + flex: 1 +} + +.data-value { + flex: 5 } \ No newline at end of file From 70c4d5aeff00df7be938492ff0c32fbefe8eeca0 Mon Sep 17 00:00:00 2001 From: Cyrus <24922493+cyrus-dev@users.noreply.github.com> Date: Fri, 23 Oct 2020 11:50:45 -0400 Subject: [PATCH 3/6] Updated margins for log matching --- .../src/main/webapp/WEB-INF/jsp/rim-details.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/rim-details.jsp b/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/rim-details.jsp index 01854654..e472ceb2 100644 --- a/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/rim-details.jsp +++ b/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/rim-details.jsp @@ -89,7 +89,7 @@
-
+
Support
From eed8e94c2960b46644bba7ccda710257ccf43cfc Mon Sep 17 00:00:00 2001 From: Cyrus <24922493+cyrus-dev@users.noreply.github.com> Date: Mon, 26 Oct 2020 07:56:24 -0400 Subject: [PATCH 4/6] Some html tweaks were made to the display and search functionality of the RIM event log page. --- .../src/main/webapp/WEB-INF/jsp/rim-details.jsp | 2 +- .../src/main/webapp/common/rim_details.css | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/rim-details.jsp b/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/rim-details.jsp index e472ceb2..f82e478c 100644 --- a/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/rim-details.jsp +++ b/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/rim-details.jsp @@ -330,7 +330,7 @@ // Loop through all table rows, and hide those who don't match the search query for (i = 0; i < tr.length; i++) { - txtFound = false; + txtFound = true; tds = tr[i].getElementsByTagName("td"); for (j = 0; j < tds.length; j++) { td = tds[j]; diff --git a/HIRS_AttestationCAPortal/src/main/webapp/common/rim_details.css b/HIRS_AttestationCAPortal/src/main/webapp/common/rim_details.css index 6ab98770..7a619651 100644 --- a/HIRS_AttestationCAPortal/src/main/webapp/common/rim_details.css +++ b/HIRS_AttestationCAPortal/src/main/webapp/common/rim_details.css @@ -9,7 +9,8 @@ #tableDivTag { padding-top: 5px; padding-left: 125px; - padding-right: 150px; + padding-bottom: 15px; + margin-right: 125px; overflow-y: scroll; } From b2bf3013fc75afec1b90e4681f004c7e9fa990eb Mon Sep 17 00:00:00 2001 From: Cyrus <24922493+cyrus-dev@users.noreply.github.com> Date: Thu, 5 Nov 2020 13:36:35 -0500 Subject: [PATCH 5/6] Git merge didn't update the refactor of BiosMeasurement to EventLogMeasurements --- .../ReferenceManifestDetailsPageController.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ReferenceManifestDetailsPageController.java b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ReferenceManifestDetailsPageController.java index b620fa44..7a4e91e4 100644 --- a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ReferenceManifestDetailsPageController.java +++ b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ReferenceManifestDetailsPageController.java @@ -1,7 +1,7 @@ package hirs.attestationca.portal.page.controllers; import hirs.data.persist.BaseReferenceManifest; -import hirs.data.persist.BiosMeasurements; +import hirs.data.persist.EventLogMeasurements; import hirs.data.persist.ReferenceManifest; import hirs.data.persist.SupportReferenceManifest; import hirs.data.persist.SwidResource; @@ -137,7 +137,7 @@ public class ReferenceManifestDetailsPageController data.putAll(getSupportRimInfo(sRim, referenceManifestManager)); } - BiosMeasurements bios = BiosMeasurements.select(referenceManifestManager) + EventLogMeasurements bios = EventLogMeasurements.select(referenceManifestManager) .byEntityId(uuid).getRIM(); if (bios != null) { @@ -277,7 +277,7 @@ public class ReferenceManifestDetailsPageController data.put("tagId", support.getTagId()); TCGEventLog logProcessor = new TCGEventLog(support.getRimBytes()); - BiosMeasurements measurements = BiosMeasurements.select(referenceManifestManager) + EventLogMeasurements measurements = EventLogMeasurements.select(referenceManifestManager) .byManufacturer(support.getPlatformManufacturer()).getRIM(); LinkedList tpmPcrEvents = new LinkedList<>(); @@ -311,7 +311,7 @@ public class ReferenceManifestDetailsPageController * @throws CertificateException if a certificate doesn't parse. */ private HashMap getMeasurementsRimInfo( - final BiosMeasurements measurements, + final EventLogMeasurements measurements, final ReferenceManifestManager referenceManifestManager) throws IOException, CertificateException, NoSuchAlgorithmException { HashMap data = new HashMap<>(); From e152ba1a3333b90313d21c35a58ac7a7852c1d8f Mon Sep 17 00:00:00 2001 From: Cyrus <24922493+cyrus-dev@users.noreply.github.com> Date: Fri, 6 Nov 2020 11:26:38 -0500 Subject: [PATCH 6/6] Updated the indenting for the coloring of mismatched log entries. --- .../src/main/webapp/WEB-INF/jsp/rim-details.jsp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/rim-details.jsp b/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/rim-details.jsp index c23fecfb..189c22c4 100644 --- a/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/rim-details.jsp +++ b/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/rim-details.jsp @@ -60,11 +60,11 @@ - - + + - - + + ${count} PCR${event.getPcrIndex()} ${event.getEventTypeStr()}