mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-03-23 20:45:19 +00:00
Try only setting tagId if not null
This commit is contained in:
parent
1d1302951a
commit
f28f75be58
@ -54,6 +54,8 @@ if [ "$test" = "5" ] || [ "$test" = "all" ]; then
|
|||||||
setPolicyEkPcFw
|
setPolicyEkPcFw
|
||||||
provisionTpm2 "fail"
|
provisionTpm2 "fail"
|
||||||
fi
|
fi
|
||||||
|
writeToLogs "Now using appsettings with hardware information"
|
||||||
|
setAppsettings --paccor-output-file /ci_test/hw.json --event-log-file /ci_test/binary_bios_measurements --linux-dmi
|
||||||
if [ "$test" = "6" ] || [ "$test" = "all" ]; then
|
if [ "$test" = "6" ] || [ "$test" = "all" ]; then
|
||||||
writeToLogs "### ACA POLICY TEST 6: Test PC Validation Policy with valid PC with no Attribute Check ###"
|
writeToLogs "### ACA POLICY TEST 6: Test PC Validation Policy with valid PC with no Attribute Check ###"
|
||||||
clearAcaDb
|
clearAcaDb
|
||||||
@ -65,13 +67,11 @@ if [ "$test" = "6" ] || [ "$test" = "all" ]; then
|
|||||||
fi
|
fi
|
||||||
if [ "$test" = "7" ] || [ "$test" = "all" ]; then
|
if [ "$test" = "7" ] || [ "$test" = "all" ]; then
|
||||||
writeToLogs "### ACA POLICY TEST 7: Test PC Validation Policy with valid PC with Attribute Check ###"
|
writeToLogs "### ACA POLICY TEST 7: Test PC Validation Policy with valid PC with Attribute Check ###"
|
||||||
writeToLogs "Now using appsettings with hardware information"
|
|
||||||
clearAcaDb
|
clearAcaDb
|
||||||
resetTpmForNewTest
|
resetTpmForNewTest
|
||||||
setPolicyEkPc
|
setPolicyEkPc
|
||||||
uploadTrustedCerts
|
uploadTrustedCerts
|
||||||
setPlatformCerts -p "laptop" -t "default"
|
setPlatformCerts -p "laptop" -t "default"
|
||||||
setAppsettings --paccor-output-file /ci_test/hw.json --event-log-file /ci_test/binary_bios_measurements --linux-dmi
|
|
||||||
provisionTpm2 "pass"
|
provisionTpm2 "pass"
|
||||||
fi
|
fi
|
||||||
if [ "$test" = "8" ] || [ "$test" = "all" ]; then
|
if [ "$test" = "8" ] || [ "$test" = "all" ]; then
|
||||||
|
@ -490,23 +490,20 @@ public class IdentityClaimProcessor extends AbstractProcessor {
|
|||||||
.getBaseByManufacturerModel(dv.getHw().getManufacturer(),
|
.getBaseByManufacturerModel(dv.getHw().getManufacturer(),
|
||||||
dv.getHw().getProductName());
|
dv.getHw().getProductName());
|
||||||
measurements = temp;
|
measurements = temp;
|
||||||
if (tagId != null && !tagId.isEmpty()) {
|
|
||||||
measurements.setTagId(tagId);
|
|
||||||
}
|
|
||||||
measurements.setPlatformManufacturer(dv.getHw().getManufacturer());
|
measurements.setPlatformManufacturer(dv.getHw().getManufacturer());
|
||||||
measurements.setPlatformModel(dv.getHw().getProductName());
|
measurements.setPlatformModel(dv.getHw().getProductName());
|
||||||
measurements.setTagId(tagId);
|
if (tagId != null && !tagId.trim().isEmpty()) {
|
||||||
|
measurements.setTagId(tagId);
|
||||||
|
}
|
||||||
measurements.setDeviceName(dv.getNw().getHostname());
|
measurements.setDeviceName(dv.getNw().getHostname());
|
||||||
measurements.archive();
|
measurements.archive();
|
||||||
|
|
||||||
|
this.referenceManifestRepository.save(measurements);
|
||||||
|
|
||||||
for (BaseReferenceManifest baseRim : baseRims) {
|
for (BaseReferenceManifest baseRim : baseRims) {
|
||||||
if (baseRim != null) {
|
if (baseRim != null) {
|
||||||
// pull the base versions of the swidtag and rimel and set the
|
// pull the base versions of the swidtag and rimel and set the
|
||||||
// event log hash for use during provision
|
// event log hash for use during provision
|
||||||
if ((tagId == null || tagId.trim().isEmpty()) && !baseRim.getTagId().isEmpty()) {
|
|
||||||
tagId = baseRim.getTagId();
|
|
||||||
measurements.setTagId(tagId);
|
|
||||||
}
|
|
||||||
SupportReferenceManifest sBaseRim = referenceManifestRepository
|
SupportReferenceManifest sBaseRim = referenceManifestRepository
|
||||||
.getSupportRimEntityById(baseRim.getAssociatedRim());
|
.getSupportRimEntityById(baseRim.getAssociatedRim());
|
||||||
baseRim.setEventLogHash(temp.getHexDecHash());
|
baseRim.setEventLogHash(temp.getHexDecHash());
|
||||||
@ -515,8 +512,6 @@ public class IdentityClaimProcessor extends AbstractProcessor {
|
|||||||
referenceManifestRepository.save(sBaseRim);
|
referenceManifestRepository.save(sBaseRim);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.referenceManifestRepository.save(measurements);
|
|
||||||
} catch (IOException ioEx) {
|
} catch (IOException ioEx) {
|
||||||
log.error(ioEx);
|
log.error(ioEx);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user