Search in sources :

Example 1 with HostAttestation

use of com.intel.mtwilson.as.rest.HostAttestation in project OpenAttestation by OpenAttestation.

the class HostTrustBO method buildHostAttestation.

public HostAttestation buildHostAttestation(TblHosts tblHosts, TblSamlAssertion tblSamlAssertion) throws IOException {
    HostAttestation hostAttestation = new HostAttestation();
    //hostAttestation.setAikSha1(tblHosts.getAikSha1());
    //hostAttestation.setChallenge(tblHosts.getChallenge());
    hostAttestation.setHostName(tblHosts.getName());
    //hostAttestation.setHostUuid(tblHosts.getUuid_hex()); //.getHardwareUuid());
    hostAttestation.setId(UUID.valueOf(tblSamlAssertion.getAssertionUuid()));
    hostAttestation.setSaml(tblSamlAssertion.getSaml());
    //hostAttestation.setTrustReport(mapper.readValue(tblSamlAssertion.getTrustReport(), TrustReport.class));
    HostTrustStatus hostTrustStatus = new HostTrustStatus();
    hostTrustStatus.bios = tblSamlAssertion.getBiosTrust();
    hostTrustStatus.vmm = tblSamlAssertion.getVmmTrust();
    //hostTrustStatus.asset_tag = tblSamlAssertion.getAssetTagTrust();
    hostAttestation.setHostTrustResponse(new HostTrustResponse(new Hostname(tblHosts.getName()), hostTrustStatus));
    return hostAttestation;
}
Also used : HostAttestation(com.intel.mtwilson.as.rest.HostAttestation) Hostname(com.intel.mtwilson.util.net.Hostname)

Aggregations

HostAttestation (com.intel.mtwilson.as.rest.HostAttestation)1 Hostname (com.intel.mtwilson.util.net.Hostname)1