[#192] Update TPM Provisioner docker images with latest PACCOR (#193)

* Updated TPM Docker images to use PACOR (v1.1.2r3) and TPM 2.0 Emulator
(v1332)

* Use updated TPM Provisioner docker images from Docker Hub.
This commit is contained in:
busaboy1340 2019-10-01 09:53:04 -04:00 committed by GitHub
parent 7ea30e3167
commit 75b9c2ddf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 77 deletions

View File

@ -5,7 +5,7 @@ RUN yum -y update && yum clean all
RUN yum install -y tpm2-tools libcurl procps-ng wget dbus python-requests && yum clean all
# Install PACCOR for Device Info Gathering
RUN mkdir paccor && pushd paccor && wget https://github.com/nsacyber/paccor/releases/download/v1.1.2r2/paccor-1.1.2-2.noarch.rpm && yum -y install paccor-*.rpm && popd
RUN mkdir paccor && pushd paccor && wget https://github.com/nsacyber/paccor/releases/download/v1.1.2r3/paccor-1.1.2-3.noarch.rpm && yum -y install paccor-*.rpm && popd
# Install Software TPM for Provisioning
RUN mkdir ibmtpm && pushd ibmtpm && wget https://downloads.sourceforge.net/project/ibmswtpm2/ibmtpm1119.tar.gz && tar -zxvf ibmtpm1119.tar.gz && cd src && make -j5 && popd
RUN mkdir ibmtpm && pushd ibmtpm && wget https://downloads.sourceforge.net/project/ibmswtpm2/ibmtpm1332.tar.gz && tar -zxvf ibmtpm1332.tar.gz && cd src && make -j5 && popd

View File

@ -8,7 +8,7 @@ RUN yum install -y java-1.8.0-openjdk wget util-linux chkconfig sed systemd gmp-
RUN mkdir tpm_module && pushd tpm_module && wget https://github.com/nsacyber/HIRS/releases/download/v1.0.4/tpm_module-1.0.4-1558547257.cedc93.x86_64.rpm && yum -y install tpm_module-*.rpm && popd
# Install PACCOR for Device Info Gathering
RUN mkdir paccor && pushd paccor && wget https://github.com/nsacyber/paccor/releases/download/v1.1.2r2/paccor-1.1.2-2.noarch.rpm && yum -y install paccor-*.rpm && popd
RUN mkdir paccor && pushd paccor && wget https://github.com/nsacyber/paccor/releases/download/v1.1.2r3/paccor-1.1.2-3.noarch.rpm && yum -y install paccor-*.rpm && popd
# Install Software TPM for Provisioning
RUN mkdir tpm_emulator && pushd tpm_emulator && wget https://phoenixnap.dl.sourceforge.net/project/ibmswtpm/tpm4769tar.gz && tar -xzvf tpm4769tar.gz && pushd libtpm && ./autogen && ./configure && make && popd && pushd tpm && make -f makefile-tpm && popd && popd

View File

@ -1,73 +0,0 @@
# Add delta components to be used to create the Delta certificate.
import sys
import json
import copy
import pprint
print("Creating SIDeltaCertB1.componentlist.json...")
try:
pc_dir = '/var/hirs/pc_generation/'
# Open the JSON file from the PBasetCertB certificate.
with open(pc_dir + "PBaseCertB.json", "r") as f:
# Load the info from the PBaseCertB certificate.
data = json.load(f)
print("The PBaseCertB.json info:")
pp = pprint.PrettyPrinter(indent=4)
pp.pprint(data)
# Get the components from the PBaseCertB certificate.
components = data['COMPONENTS']
# Initialize structures to work with.
componentDict = {}
componentDict["PLATFORM"] = data['PLATFORM']
componentDict['COMPONENTS'] = []
componentDict["PROPERTIES"] = data['PROPERTIES']
updatedComponetList = []
# Find "FAULTY" components to be removed; and change them to be good components.
for component in components:
if component['MODEL'].__contains__("-FAULTY"):
print("Found Faulty Component:")
pp.pprint(component)
# Change status to be "REMOVED".
print("Updated status to be REMOVED...")
component['STATUS'] = "REMOVED"
# Add to component list.
print("Adding component to list...")
updatedComponetList.append(component)
# Make copy of above component.
print("Created copy of component...")
tmpComponent = copy.copy(component)
# Change status to be "ADDED".
print("Updated status to be ADDED...")
tmpComponent['STATUS'] = "ADDED"
# Remove "-FAULTY" substring in the model.
tmpComponent['MODEL'] = tmpComponent['MODEL'].replace('-FAULTY', '')
print("Removed -FAULTY from component model...")
print("Adding this component to list: ")
pp.pprint(tmpComponent)
updatedComponetList.append(tmpComponent)
# Update the component dictionary.
componentDict['COMPONENTS'] = updatedComponetList
print("The component list for Delta Certificate generation:")
pp.pprint(componentDict)
# Write the new JSON file to be used in creating the delta certificate.
with open(pc_dir + "SIDeltaCertB1.componentlist.json", 'w') as outfile:
print("Writing " + pc_dir + "SIDeltaCertB1.componentlist.json...")
json.dump(componentDict, outfile)
except Exception as ex:
print "=== ERROR generating SIDeltaCertB1.componentlist.json ===: error({0})".format(ex.message)

View File

@ -18,7 +18,7 @@ try:
maxComponentsToFind = 2
numComponentsFound = 0
delComponent1AtIndex = 0
delComponent2AtINdex = 0
delComponent2AtIndex = 0
badComponent = '00030003'
pcDir = '/var/hirs/pc_generation/'
paccorComponentsFile = 'componentsFile'