Giter VIP home page Giter VIP logo

nsacyber / hirs Goto Github PK

View Code? Open in Web Editor NEW
170.0 28.0 56.0 276.15 MB

Trusted Computing based services supporting TPM provisioning and supply chain validation concepts. #nsacyber

License: Other

Java 78.11% CSS 2.92% JavaScript 7.55% Shell 1.55% C++ 7.26% CMake 0.28% Makefile 0.05% Roff 0.04% XSLT 0.02% SCSS 0.05% C# 2.17%
trusted-platform-module trusted-computing supply-chain validation integrity provisioning

hirs's Introduction

Host Integrity at Runtime and Start-up (HIRS)

Attestation Certificate Authority (ACA) and TPM Provisioning with Trusted Computing-based Supply Chain Validation

The Host Integrity at Runtime and Start-up Attestation Certificate Authority is a Proof of Concept - Prototype intended to spur interest and adoption of the Trusted Platform Module (TPM). The ACA can be configured to enforce the Validation of Endorsement and Platform Credentials to illustrate a Supply Chain Validation capability. It's intended for testing and development purposes only and is not intended for production. The ACA's functionality supports the provisioning of the TPM 2.0 with an Attestation Identity Credential (AIC).

The ACA provides a “provisioner” application to be installed on all devices which will be requesting Attestation Credentials. The ACA is a web based server which processes Attestation Identity Requests. TPM Provisioning

Version 1.1 added support for the Platform Certificate v1.1 Specification. This allows entities that are part of the supply chain (System integrators and Value Added Resellers) the ability to create Delta Platform Certificate to compliment the Base Platform Certificate created by the Platform Manufacturer. See the Article on Base and Delta Platform Certificates for details.

Version 2.0 added support for the PC Client Reference Integrity Manifest (RIM) Specification to provide firmware validation capability to the HIRS ACA. This requires that the manufacturer of a device provide a digitally signed RIM "Bundle" for each device. The HIRS ACA has a new page for uploading and viewing RIM Bundles and a policy setting for requiring Firmware validation.

Version 2.2 introduces the HIRS_Provisioner.NET. The HIRS_Provisioner.NET is a C# implementation of the HIRS Provisioner designed to be a replacement for the HIRS_ProvisionerTPM2. The HIRS_Provisioner.NET can be packaged for Windows as well as most Linux distributions. This portability will support a wider set of scenarios and products. See the HIRS_Provisioner.NET README for details.

An ACA Docker image is now automatically created for each release. See the packages page for published ACA docker images.

To support the TCG RIM concept a new tools folder has been added to the HIRS project which contains a tcg_rim_tool command line application. The tcg_rim_tool can be used to create NISTIR 8060 compatible SWID tags that adhere to the TCG PC Client RIM specification. It also supports the ability to digitally sign the Base RIM file as the HIRS ACA will require a valid signature in order to upload any RIM file. See the tgc_rim_tool READ.md for more details.

Notice: Github Dicussions have been enabled for this repo. Please refer to the Dicussion entitled "HIRS development changes" for development and support notifications.

Features

  • TPM Provisioner
    • Requests an Attestation Identity Credential for the TPM from the ACA.
    • Takes ownership of TPM if not owned
    • Uses REST calls to complete the transaction with the ACA
    • Reads credentials from the TPM's NvRAM as part of the provisioning process.
    • Reads the device's hardware, network, firmware, and OS info for platform validation
  • Attestation Certificate Authority
    • Issues Attestation Identity Credentials to validated devices holding a TPM
    • Configures policies for enabling/disabling validation procedures
    • Performs TCG-based Supply Chain Validation of connecting clients
      • Optionally validates Endorsement and Platform Credentials
  • Endorsement Credential Certificate Chain Validation
  • Platform Credential Certificate Chain Validation
  • Attestation CA Dashboard
    • Displays all Validation Reports, Credentials, and Trust Chains
    • Enables ACA policy configuration for validation of Endorsement and Platform Credentials
    • Enables Import/Export of Certificate (Trust) Chains, Endorsement Credentials, and Platform Credentials
    • Optionally allows uploaded credentials to be used in validation for machines that have been reprovisioned by trusted parties since leaving the OEM
  • Firmware Integrity Validation
    • Checks that firmware and boot related file hashes match those provided by OEMs.
    • Validates the import of All RIM files imported to the ACA (insure all RIM files were signed by trusted sources)
    • Verifies that the firmware hashes captured by the TPMs Platform Configuration Registers (PCRs) match the firmware hashes obtained from the OEM(s).
    • Verifies TCG/UEFI boot variables (e.g. BIOS setup data) have not been altered (e.g secure boot).

Requirements

The HIRS Attestation Certificate Authority (ACA) currently supports installation on CentOS 7 instances only. To simlify installation a ACA Docker image is now automatically created for each release. Please refer to the Dicussion entitled "HIRS development changes" for work on OS migration and OS support.

The HIRS Provisioner supports 2.0. on Windows (10 and 11), Linux Centos 7, RHEL 7+ and derivatives (e.g. Rocky7+) as well as Ubuntu(18+).

Installation Instructions

For detailed instructions, see Installation notes.

Packages used for installation (e.g. HIRS_Provisioner*el7.noarch.rpm) can be found on the release page.

Installing the ACA

Simply run the command yum install HIRS_AttestationCA*el7.noarch.rpm when using an rpm package on Centos 7.

Installing the Provisioner

After enabling your TPM in BIOS/UEFI:

Select the package to install on you OS (windows, rpm, or deb) Follow the instruction from the HIRS_Provisioner.NET README

Usage

To kick off a provision on the client, run the command sudo tpm_aca_provision.

To see the results and interact with the ACA, go to the ACA Portal at https://ACAPortalAddress:ACAPortalPort/HIRS_AttestationCAPortal/portal/index.

Quick Links:

hirs's People

Contributors

apldev1 avatar apldev2 avatar apldev3 avatar apldev4 avatar busaboy1340 avatar chubtub avatar cyrus-dev avatar iadgovuser26 avatar iadgovuser29 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hirs's Issues

Need ability to delete Attestation Certificates on the ACA

Endorsement, Platform, and Trust Chain Certificates all have the ability to be deleted on the ACA portal. The Issued Attestation Certificates do not. When demonstrating the ACA is sometimes useful to delete the older Attestation Credentials when performing the demo multiple times. The Issued Attestation Certificates page should have a working icon for deleting issued attestation certificates.

Need support for Amazon Linux

Amazon AWS has a set of supported Amazon Machine Images (AMI). "Amazon Linux" is a commonly used AMI. Amazon Linux defines the OS version within the /etc/system-release file which ,as example, currently contains "Amazon Linux release 2 (Karoo)" for the Amazon Linux AMI.

Currently the HIRS RPMs are looking for similar files (e.g. /etc/rehat-release) but will not install properly on Amazon Linux. Adding a /etc/redhat-release file in the AWS instance will fix the problem for that install. To support Amazon linux a check for the /etc/system-release file should be put in the install scripts if /etc/redhat is not found.

Additional certificate fields to display.

Some new certificate fields to display:

  1. Certificate Version: not showing for Trust Chain or Endorsement Certificates
  2. Public Key Algorithm & Key Length (in bits) example: 2048 bit RSA
  3. Signature algorithm & Key Length: example sha256WithRSAEncryption,singaturelength (in bits)
  4. Key Usage
  5. Extended Key Usage
  6. Create an Issuer section
    a. Display Issuers Distinguished Name (currently labeled as Issuer)
    b. Authority Key Identifier (link to issuers subject key identifier)
    c. Authority Information Access (URL with link) option to donwload into the trust chain.

ACA Should Retrieve Uploaded EK Certificates for TPM 2.0 Provisioning

While working #25 it has been discovered that the ACA is not retrieving uploaded EK Certs during TPM 2.0 Provisioning. It will look for uploaded Platform Certificates, but the equivalent check for Endorsement Certificates is not performed. This should be fixed such that the TPM 2.0 Provisioning process behaves like the old TPM 1.2 Provisioning process.

Error reading version in ACA Log

Multiple occurances of a Version Error appear in the AttestationCA.log file:

2018-09-04 14:28:36 [hirs.utils.VersionHelper.getVersion] WARN  : Error reading version
java.lang.IllegalArgumentException: resource VERSION not found.
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145) ~[guava-18.0.jar:?]
        at com.google.common.io.Resources.getResource(Resources.java:197) ~[guava-18.0.jar:?]
        at hirs.utils.VersionHelper.getFileContents(VersionHelper.java:53) ~[HIRS_Utils-1.0.1-SNAPSHOT.jar:?]
        at hirs.utils.VersionHelper.getVersion(VersionHelper.java:42) [HIRS_Utils-1.0.1-SNAPSHOT.jar:?]
        at hirs.utils.VersionHelper.getVersion(VersionHelper.java:29) [HIRS_Utils-1.0.1-SNAPSHOT.jar:?]
        at hirs.data.persist.DeviceInfoReport.<init>(DeviceInfoReport.java:145) [HIRS_Utils-1.0.1-SNAPSHOT.jar:?]
        at hirs.attestationca.AbstractAttestationCertificateAuthority.parseDeviceInfo(AbstractAttestationCertificateAuthority.java:593) [AbstractAttestationCertificateAuthority.class:?]
        at hirs.attestationca.AbstractAttestationCertificateAuthority.processDeviceInfo(AbstractAttestationCertificateAuthority.java:654) [AbstractAttestationCertificateAuthority.class:?]
        at hirs.attestationca.AbstractAttestationCertificateAuthority.doSupplyChainValidation(AbstractAttestationCertificateAuthority.java:432) [AbstractAttestationCertificateAuthority.class:?]
        at hirs.attestationca.AbstractAttestationCertificateAuthority.processIdentityClaimTpm2(AbstractAttestationCertificateAuthority.java:387) [AbstractAttestationCertificateAuthority.class:?]
        at hirs.attestationca.rest.RestfulAttestationCertificateAuthority.processIdentityClaimTpm2(RestfulAttestationCertificateAuthority.java:93) [RestfulAttestationCertificateAuthority.class:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_171]

ACA Import Trust Chain CA Certificates needs to support ECC based certificates.

Even though the current version of the ACA only supports RSA public key based EK certs, TPM manufacturers can use Ecc keys to sign RSA public keys within an EK certs. Specifically Nuvoton_TPM_Root_CA_2110.cer is an ECC based certificate which is used to validate some Nuvoton produced RSA based EK certs.

EK cert:
Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (2048 bit)
Signature Algorithm: ecdsa-with-SHA256

The ACA should be able to upload an Ecc based intermediate or root Trust Chain CA Certificate. Furthermore the ACA should be able to validate and use the ECC based certs to validate the Certificate chain of any EK certificate.

Add in Null Checks for Certificate

In HIRS_Utils we have the Certificate class in charge of parsing Certificates of all varieties. There is a small problem in that they come in as a byte array that has no guarantees of being of having all the required fields in a parsable format.

The entire Certificate class hierarchy should be scanned for locations where this assumption is made and null checks introduced appropriately. Required fields may need to throw an error.

Issue comes out of merge request #16

PlatformSerial optional field in Subject Alternative Name

PlatformSerial is defined as an optional value in the Subject Alternative Name. Most platforms should have the information that goes into this value available. If they don't, then the platform certificate might not include the value.

Field Name RFC 5280 Type Value Field Status
Subject Alternative Name GeneralName
directoryName
PlatformManufacturerStr
PlatformModel
PlatformVersion
PlatformSerial (optional)
PlatformManufacturerId (optional)
MUST
critical/non-critical
(depending on subject)

The specification says:

During certificate validation, the Privacy-CA MUST check that the platform manufacturer, model, version, serial numbers, and manufacturer ID are acceptable.

Currently, if the ACA finds that the value is not present in the certificate, then it throw a null error.

Since the value is optional, the appraisal should fail only if the value is not the same in the device info and the certificate. If neither have a platform serial number, appraisal should continue.

Additional certificate fields to display (Part 2)

These are additional fields that weren't included in issue #43:

  1. CRL distribution Points: (include URL with link)
  2. Certificate Policies: label exists, data seems to be missing
  3. Certificate Practice Statements (URL which links to CPS document if present)
  4. Basic Contraints

Made in error

Create incremental release 1.0.3

Release 1.0.3 will have several updates:

  • Added a User's Guide document for the ACA and TPM provisioner(s)
  • Added several certificate display fields
  • Cleaned up some error logs
  • Put in a check for ResourceMgr or TPM2-Abmrd for the TPM2 provisioner
  • PACCOR is now a dependency for the TPM Provisioner

log4cplus error printed during provisioning.

When provisioning a tpm2 log4cplus prints an initialization error

TPM 2.0 detected.
log4cplus:ERROR No appenders could be found for logger (root).
log4cplus:ERROR Please initialize the log4cplus system properly.--> Provisioning
----> Collecting endorsement credential from TPM
----> Creating attestation key
----> Collecting platform credential from TPM
...

NullPointerException possible while checking component serial and revision

new DERUTF8String(component.getComponentSerial().getString().trim()),

new DERUTF8String(component.getComponentRevision().getString().trim()),

Both component.getComponentSerial() and component.getComponentRevision() can return null. The call to getString() in any of the referenced lines will cause a NullPointerException on the server. This results in a 500 error for the client.

new DERUTF8String(component.getComponentManufacturer().getString().trim()),

new DERUTF8String(component.getComponentModel().getString().trim()),

Component manufacturer and model are required fields, and should not return null. Making the assumption that the object will never be null could lead to the vague 500 error described above.

I suggest adding additional null checking for the referenced code.

EKCert processing fails when EKCert has extra bytes in allocated memory when stored in NvRAM

Currently the provisioner and ACA expect the EKcert to be on TPM's NvRAM with no leading or trailing bytes within the space allocated for the EKcert storage. In one case the EKcert had several trailing bytes which caused the following events to occur:

  1. The TPM2 provisioner pulled the entire memory allocated for EKcert which included extra bytes of non used data appended to the EKcert.
  2. The TP2 provisioner sent the entire blob to the ACA, but the ACA failed to parse the EKcert. The ACA sent back a 500 error to the provisioner.
  3. When the EKcert was edited to remove the trailing bytes and uploaded to the ACA it had no effect on the process. The ACA did not search for a stored EKcert when the EKcert sent failed.

Suggested improvements:

  1. Update the ACA to process the length parameter of all sent certs (including the platform cert) and trim off any extra data.
  2. If the ACA fails to process the EKcert the ACA should log an error and send back an error to the provisioner indicating the EKCert was malformed and could not be processed.

Improve ACA/Provisioner RESTful Exception Handling

The ACA presently sends nondescript 500 error messages to the client Provisioners when an error occurs during the provisioning process. These messages should be made more descriptive and parsed by the Provisioners appropriately to provide more helpful feedback to the user for troubleshooting.

Cache Downloaded Dependencies in TPM 2.0 Provisioner Build

Presently, both Gradle and the packaging scripts for the TPM 2.0 Provisioner perform a simple delete of the build directory anytime you attempt to build or package this particular subproject. This creates an issue in environments where Internet service is spotty due to the deletion of downloaded external dependencies.

While these dependencies cannot be removed, we can avoid deleting them to at least "cache" the dependencies.

Both the building and packaging scripts should be updated to prevent deletion of these external dependencies so as to prevent having to redownload them everytime the package requires packaging or a Gradle build.

Combine Packaging and System Tests into One Travis Test Phase

Presently, the Travis CI pipeline has two separate stages for Packaging and System Tests. Since part of the System Tests involves packaging on the CentOS platform, we can and should combine the two. Ideally this will result in the System Tests occurring while we test packaging on the Ubuntu platform. Thus we maintain packaging tests on both main development platforms while simultaneously supporting systems tests, which run in the CentOS7 environment.

HIRS_Utils PersistenceConfiguration Should Avoid Magic Strings

PersistenceConfiguration in HIRS_Utils subproject should avoid using magic Strings for Spring Bean Names. If anyone references one and it changes, then their code will break unnecessarily. A small refactor should be done to ensure they could reference a dedicated, statically defined String, that if an update occurs, they will also receive the update.

"Import Baseline" Removes PCR Entries

The "Import Baseline" (for TPM Whitelist or Blacklist) feature is removing one or more PCR entries during import. The baseline has all 24 PCR values (0-23) before performing the import. It appears random as to which PCR(s) is/are being deleted from the TPM baseline.

TPM2 Provisioner Should Check for Resourcemgr or TPM2-Abrmd

Presently, the TPM 2.0 Provisioner relies on having the TPM2-Abrmd running, or for much older versions of the TPM2 Software Stack, the Resourcemgr daemon is required. Either way, a check should be added in at the start of provisioning to ensure that either of these daemons are running, otherwise we should abort the provisioning process and alert the user.

TPM Provisioning is missing final status

Some status has been inadvertently removed from the hirs-provision process
This is what is currently displayed from a tpm_aca_provision:

TPM 1.2 detected.
--> Configuring provisioner
----> Deleting existing key store
----> Downloading truststore
--> Provisioning
----> Removing old provisioner scripts, if any
----> Provisioning TPM

An what used to be displayed

TPM 1.2 detected.
--> Configuring provisioner
----> Deleting existing key store
----> Downloading truststore
--> Provisioning
----> Provisioning TPM
----> Collecting Device Information
----> Got Endorsement Credential from TPM
----> Sending Attestation Identity Credential Request
----> Attestation Identity Provisioning succeeded 
----> TPM successfully Provisioned

Update Travis CI to Test Packaging of RPM and DEB

It was recently discovered that package.ubuntu.sh was broken due to an update to the project build structure a week or two ago. In light of this fact, it seems like it would be a good idea to update Travis CI to include packaging of the RPM and DEB as part of the build process to ensure this doesn't happen again in the future.

Dockerize TPM 1.2 Provisioner

With the recent closure of #46 and the ongoing work in #67, an effort should be made to bring the old TPM 1.2 Provisioner in line with the ACA and TPM 2.0 Provisioner insofar as systems tests are concerned. The initial step is to make the TPM 1.2 Provisioner able to be run from within a Docker container. This ticket will track work towards that end.

Incorrect dependencies for hirs-provisioner-tpm2 RPM

HIRS_ProvisionerTPM2/CMakeLists.txt claims the Ubuntu deb package depends on libcurl4-openssl-dev; it should actually depend on libcurl3 which provides libcurl.so.4. The former package depends on the later, so it would install the right package, but it is preferable to only require what is needed.

Allow for Packaging of Individual Subprojects

At the moment, the packaging scripts build all of the subprojects with no fine grain selection of packages allowed. Subprojects that are packaged into RPMs or DEBs should receive their own individualized package script that can be called from the current master packaging script to still allow for building all at one time if desired without precluding the ability to individually package subprojects.

This is would be helpful as we move forward with the Integration Testing work via Docker, because Docker will be using a shared volume among all of the Docker Containers spawned with Docker Compose. Each of these containers should be able to individually package their target subproject without stepping on the toes of the other containers also using the same Shared Volume.

Update IMA baselines to be able to match measurements solely based on hashes

IMA baselines are typically used to match measurement records against baseline records using both their paths and hashes. In certain cases, it is useful to be able to match IMA measurements solely based on their hashes and not filenames. ImaAcceptableRecordBaseline and its subclasses should be updated to include a containsHashes which performs this operation.

SELinux Policy Issues with HIRS ACA on CentOS 7

After installing ACA on a CentOS 7 system, navigating to the ACA Portal URL (https://:8443/HIRS_AttestationCAPortal/) displayed a blank page. Looking in the tomcat logs, shows:
192.168.103.1 - - [16/Oct/2018:19:04:20 +0000] "GET /HIRS_AttestationCAPortal HTTP/1.1" 404 -
SELinux was blocking the connection from tomcat to mysqld, indicated in the audit logs by: node=server22.simp.test type=AVC msg=audit(1539714234.510:4782): avc: denied { name_connect } for pid=12058 comm="java" dest=3306 scontext=system_u:system_r:tomcat_t:s0 tcontext=system_u:object_r:mysqld_port_t:s0 tclass=tcp_socket
Could you add a SELinux policy to the RPM to enable this out of the box?

Systems Tests not Reporting Failure Correctly

Per the result of the Travis-Ci job here: https://travis-ci.org/nsacyber/HIRS/jobs/485543350

We can see from the above job that the systems tests do not currently detect when they have failed. Some additional logic may need added to run-system-tests.sh to detect if the systems-tests have failed and then exit with a non-zero error code in order to indicate to Travis-Ci that something went wrong.

Otherwise, the run-system-tests.sh ends with a call to docker-compose down, which is almost always guaranteed to return successfully, thus Travis will then the Systems Tests passed.

ACA Should display the Platform Certificate Holder

The Platform Certificate page does not currently display the holder information (EK certificate info). The holder is defined as:

 Holder ::= SEQUENCE {
     baseCertificateID   [0] IssuerSerial OPTIONAL,
            -- the issuer and serial number of
            -- the holder's Public Key Certificate
     entityName          [1] GeneralNames OPTIONAL,
            -- the name of the claimant or role
     objectDigestInfo    [2] ObjectDigestInfo OPTIONAL
            -- used to directly authenticate the
            -- holder, for example, an executable
 }

 IssuerSerial ::= SEQUENCE {
     issuer     GeneralNames,
     serial     CertificateSerialNumber,
     issuerUID  UniqueIdentifier OPTIONAL
 }

The baseCertificateID should be displayed with a hyperlink to the EK cert page (if it exists). Per the Platform Certificaate specification, "the BaseCertificateID choice MUST be used." As such, the entityName and objectDigestInfo optional entries, valid for attribute certificates in general, are never found in Platform Certificates.

Platform Cert component validation tooltip does display details about unmatched components

When the platform certificate processing has detected that a component did not match the device the ACA Validation report page shows an error symbol with a tooltip that provides a generic error such as "There are unmatched components" . It would be beneficial to display information about the component that failed. Listing the failed components Manufacturer and Model would suffice.

Create GeneralName Helper/Parser Class

Per @iadgovuser19 in Merge Request #16

Something that has a lot of room for improvement is how we deal with the GeneralName. The GeneralName can be any one of many, many types. We could/should run the getType() function to see what type of name it is before trying to parse it. It should always be an X500Name type (option '4'), because that is what the "issuer" field in an X.509v3 certificate is, which is what should be replicated into the holder of a Platform Certificate. Then, when we do the getName(), we know that the returning type can be cast as an X500Name. It is very tempting to immediately do a toString() to the X500Name, but this is not the best idea. An X500Name is a complex structure, and is subject to different interpretations when trying to read it as a string. We are using BouncyCastle when getting the string representation of the X500Name in the holder, but we are using the java.security representation when doing the same to the issuer field. Although these have always returned the same string in the past, there is no guarantee that they will always be the same. They should however be an identical ASN.1 structure, but that structure includes both SEQUENCEs (ordered sets) and SETs (not-necessarily-ordered sets). Two "identical" X500Name structures could theoretically be different sequences of bytes, with different string representations. We can either hope that this will never be different, or guarantee that we validate the similarity properly.

As a result of this, perhaps we should make some type of small Helper class in HIRS_Utils that can be employed around the rest of the HIRS subprojects as needed.

Add systems tests for HIRS Provisioner TPM 2.0

Work done in Issue #46 "Setup Integration Tests in Travis CI" , should provide a set of Docker files and images for performing integration test for HIRS_ProvisionerTPM2 with the ACA.

This tasks ports the existing test to Travis using the containers set up in Issue 46.

Optimize Travis CI Build

The Travis CI build is currently building/testing everything in about 13 minutes. This could be optimized if the subprojects are built/tested in parallel and a pre-built Docker image is provided to the test environments to prevent having to build a new Docker image on every test job.

Checksytle build issue in HIRS_ProvisionerTpm2

When building HIRS_ProvisionerTpm2 off of the master branch a make error occurs:

includes: -Iinclude/
Platform:Native
8/10 files checked 82% done
Checking src/Tpm2ToolsUtils.cpp ...
Defines:
Undefines:
Includes: -Iinclude/
Platform:Native
[src/Tpm2ToolsUtils.cpp:61] -> [src/Tpm2ToolsUtils.cpp:66]: (style) Local variable oor shadows outer variable
9/10 files checked 90% done
Checking src/Utils.cpp ...
Defines:
Undefines:
Includes: -Iinclude/
Platform:Native
[src/Utils.cpp:86] -> [src/Utils.cpp:89]: (style) Local variable ss shadows outer variable
10/10 files checked 100% done
make[2]: *** [bin/hirs-provisioner-tpm2] Error 1
make[1]: *** [CMakeFiles/hirs-provisioner-tpm2.dir/all] Error 2
make: *** [all] Error 2

Create a Users Guide for the ACA Portal and TPM provisioner

The HIRS ACA lacks a simple user guide for the ACA and TPM provisioner applications. Document should cover:

  • Trusted Computing Based Supply Chain Validation Concepts background
  • ACA Portal usage
  • TPM 1.2 and TPM 2.0 provisioner command line applications
  • Links to the installation and setup guides
  • An appendix on TPM Provisioning details

Document should be placed in https://github.com/nsacyber/HIRS/tree/master/HIRS_AttestationCAPortal/src/main/webapp/docs for access via the portal under the help tab.

Fix TPMSecurityAssertions Parsing in EndorsementCredential

As discovered when working on #23 and referenced in MR #26, there is a bug in the EndorsementCredential class regarding parsing of the TPMSecurityAssertions class. The parser doesn't take into account the complete structure of the TPMSecurityAssertions object as defined in TCG EK Credential Profile For TPM Family 2.0; Level 0 (pg. 19).

Specifically, it makes assumptions about the presence of default values and strictly defines where certain fields should be as a result.

The parser should be made slightly more flexible to handle the lack of default values and populate them accordingly. Additionally, it should handle the other fields more flexibly but still in keeping with the specification.

Setup Basic Travis CI Build

A CI server should be put in place to at least run Unit Tests for the HIRS project. Travis CI appears to have the lowest barrier to entry and easily integrates with GitHub.

This task is meant to set up a rudimentary Travis CI build.

Integrate System Tests with Dockerized TPM 1.2 Provisioner

With the completion of #71 and merging of #77 imminent, we'll need to wrap up work on the System Testing by getting the TPM 1.2 Provisioner Docker image to run the system tests to ensure that everything is running properly.

Already seems to run fine locally, so this may only be a couple line update to get the Python System Tests to run.

Setup Integration Tests in Travis CI

Presently we have Style Checking, Static Analysis, Unit Testing and Project Packaging covered/performed by Travis CI to hedge against regressions. Travis CI still needs updated to perform some level of Integration Tests to ensure that at the very minimum it's guaranteed that Provisioning service is always functioning in supported environments between the ACA and the 1.2 and 2.0 Provisioners.

An initial glimpse suggests Docker Compose may be a useful tool to accomplish this.

ACA provsioning Platform Attributes pass when platform cert not found.

When testing the platform validation process found a condition where the Platform Cert wasn't loaded but the Attributes seemed to pass.

Another condition where this possible is if the Platform cert was loaded but the signature was invalid (e.g. the Platform Certs Trust Chain is missing) then this case could be possible. The error indicated by hovering over the Platform cert red circle indicated that "cant validate a platform cert without a trust store".

Proposed solution: Platform Attributes should not pass if the Platform Certificate is invalid. This implies that the EK certificate needs to be valid as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.