320 lines
13 KiB
C++
320 lines
13 KiB
C++
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (C) 2003 Intel Corporation
|
|
//
|
|
// File: IPS_HostBasedSetupService.h
|
|
//
|
|
// Contents: Describes the Host Based Setup Service, which is the logic in Intel(R) AMT that responds to setup requests initiated from the host using OS Administrator credentials. Also provides a method to upgrade to Admin Control mode that can be initiated remotely.
|
|
//
|
|
// This file was automatically generated from IPS_HostBasedSetupService.mof, version: 8.0.0
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
#ifndef IPS_HOSTBASEDSETUPSERVICE_H
|
|
#define IPS_HOSTBASEDSETUPSERVICE_H 1
|
|
#include "CIM_SecurityService.h"
|
|
namespace Intel
|
|
{
|
|
namespace Manageability
|
|
{
|
|
namespace Cim
|
|
{
|
|
namespace Typed
|
|
{
|
|
// Describes the Host Based Setup Service, which is the logic in Intel(R) AMT that responds to setup requests initiated from the host using OS Administrator credentials. Also provides a method to upgrade to Admin Control mode that can be initiated remotely.
|
|
class CIMFRAMEWORK_API IPS_HostBasedSetupService : public CIM_SecurityService
|
|
{
|
|
public:
|
|
|
|
//Default constructor
|
|
IPS_HostBasedSetupService()
|
|
: CIM_SecurityService(NULL, CLASS_NAME, CLASS_NS, CLASS_NS_PREFIX, CLASS_URI)
|
|
{
|
|
if(_classMetaData.size() == 0)
|
|
{
|
|
CIM_SecurityService::SetMetaData(_classMetaData);
|
|
CimBase::SetMetaData(_classMetaData, _metadata, 4);
|
|
}
|
|
}
|
|
|
|
//constructor which receives WSMan client
|
|
IPS_HostBasedSetupService(ICimWsmanClient *client)
|
|
: CIM_SecurityService(client, CLASS_NAME, CLASS_NS, CLASS_NS_PREFIX, CLASS_URI)
|
|
{
|
|
if(_classMetaData.size() == 0)
|
|
{
|
|
CIM_SecurityService::SetMetaData(_classMetaData);
|
|
CimBase::SetMetaData(_classMetaData, _metadata, 4);
|
|
}
|
|
}
|
|
|
|
//Destructor
|
|
virtual ~IPS_HostBasedSetupService(){}
|
|
|
|
// The "type" information for the object. Gettors only.
|
|
virtual const string& ResourceURI() const { return CLASS_URI; }
|
|
static const string& ClassResourceURI() { return CLASS_URI; }
|
|
virtual const string& XmlNamespace() const { return CLASS_NS; }
|
|
virtual const string& XmlPrefix() const { return CLASS_NS_PREFIX; }
|
|
virtual const string& ObjectType() const { return CLASS_NAME; }
|
|
static const string& ClassObjectType() { return CLASS_NAME; }
|
|
|
|
// Class representing IPS_HostBasedSetupService keys
|
|
class CimKeys : public CIM_SecurityService::CimKeys
|
|
{
|
|
public:
|
|
};
|
|
|
|
// class fields declarations
|
|
|
|
// Optional, An enumeration value that indicates the control mode of the Intel(R) AMT subsystem after provisioning. This property is read-only
|
|
const unsigned char CurrentControlMode() const;
|
|
|
|
// Optional, An enumeration value that indicates the control mode of the Intel(R) AMT subsystem after provisioning. This property is read-only
|
|
void CurrentControlMode(const unsigned char &value);
|
|
|
|
// Is true if the field CurrentControlMode exists in the current object, otherwise is false.
|
|
bool CurrentControlModeExists() const;
|
|
|
|
// Remove CurrentControlMode field.
|
|
void RemoveCurrentControlMode();
|
|
|
|
// Optional, An array of values that indicates which control modes this machine is allowed to be in. This property is read-only. "Client" can only be removed using the "DisableClientControlMode" method.
|
|
const vector<unsigned char> AllowedControlModes() const;
|
|
|
|
// Optional, An array of values that indicates which control modes this machine is allowed to be in. This property is read-only. "Client" can only be removed using the "DisableClientControlMode" method.
|
|
void AllowedControlModes(const vector<unsigned char> &value);
|
|
|
|
// Is true if the field AllowedControlModes exists in the current object, otherwise is false.
|
|
bool AllowedControlModesExists() const;
|
|
|
|
// Remove AllowedControlModes field.
|
|
void RemoveAllowedControlModes();
|
|
|
|
// Optional, Nonce value randomly generated by Intel(R) AMT, used as input to the Setup APIs. This value will be regenerated following an unprovision event and after a successful setup.It may also be regenerated following ME resets.
|
|
const Base64 ConfigurationNonce() const;
|
|
|
|
// Optional, Nonce value randomly generated by Intel(R) AMT, used as input to the Setup APIs. This value will be regenerated following an unprovision event and after a successful setup.It may also be regenerated following ME resets.
|
|
void ConfigurationNonce(const Base64 &value);
|
|
|
|
// Is true if the field ConfigurationNonce exists in the current object, otherwise is false.
|
|
bool ConfigurationNonceExists() const;
|
|
|
|
// Remove ConfigurationNonce field.
|
|
void RemoveConfigurationNonce();
|
|
|
|
// Optional, Status of "AddNextCertInChain" progress. This property is read-only.
|
|
const unsigned char CertChainStatus() const;
|
|
|
|
// Optional, Status of "AddNextCertInChain" progress. This property is read-only.
|
|
void CertChainStatus(const unsigned char &value);
|
|
|
|
// Is true if the field CertChainStatus exists in the current object, otherwise is false.
|
|
bool CertChainStatusExists() const;
|
|
|
|
// Remove CertChainStatus field.
|
|
void RemoveCertChainStatus();
|
|
|
|
//Input parameter for function Setup
|
|
class CIMFRAMEWORK_API Setup_INPUT : public CimParam
|
|
{
|
|
public:
|
|
// Class Constructor
|
|
Setup_INPUT() : CimParam() {}
|
|
|
|
// Class Destructor
|
|
~Setup_INPUT(){}
|
|
|
|
// Required, The encryption type of the network admin password. Only HTTP-MD5 is supported. The values are the same as the CIM_Account.UserPasswordEncryptionAlgorithm field
|
|
// Legal values:
|
|
// None: 0
|
|
// Other: 1
|
|
// HTTP Digest MD5(A1): 2
|
|
// DMTF Reserved: ..
|
|
void NetAdminPassEncryptionType(const unsigned short value);
|
|
|
|
// Required, New network admin password to be set by this command, encrypted using the encryption type algorithm
|
|
void NetworkAdminPassword(const HexBinary &value);
|
|
|
|
// Optional, A random nonce value generated by the configuration agent.Required if the digital signature is provided.needs to be concatenated after the configuration nonce and signed together with the attached certificate's private key
|
|
void McNonce(const Base64 &value);
|
|
|
|
// Optional, The certificate used to sign the setup operation. If the digital signature is provided, Intel(R) AMT will only validate the format of the certificate and that it was used to sign the nonces. If the operation is successful it will save the certificate hash in the corresponding provisioning record
|
|
void Certificate(const Base64 &value);
|
|
|
|
// Optional, The signing algorithm used to sign the setup operation.
|
|
// Legal values:
|
|
// None: 0
|
|
// Other: 1
|
|
// RSA_SHA-2_256: 2
|
|
// DMTF Reserved: ..
|
|
void SigningAlgorithm(const unsigned short value);
|
|
|
|
// Optional, A digital signature of the ConfigurationNonce and the McNonce concatenated. If this information is provided, AMT will validate the signature before accepting the command.
|
|
void DigitalSignature(const Base64 &value);
|
|
|
|
const VectorFieldData GetAllFields() const;
|
|
private:
|
|
static const CimFieldAttribute _metadata[];
|
|
};
|
|
|
|
// Setup Intel(R) AMT from local host. This function requires OS administrator rights, and moves Intel(R) AMT from "Pre Provisioned" state to "Post Provisioned" state. The control mode after this method is run will be "Client". This method also allows the configuring agent to sign the setup operation with a certificate. The certificate hash will be kept in the corresponding provisioning record
|
|
virtual unsigned int Setup(const Setup_INPUT &input);
|
|
|
|
//Input parameter for function AddNextCertInChain
|
|
class CIMFRAMEWORK_API AddNextCertInChain_INPUT : public CimParam
|
|
{
|
|
public:
|
|
// Class Constructor
|
|
AddNextCertInChain_INPUT() : CimParam() {}
|
|
|
|
// Class Destructor
|
|
~AddNextCertInChain_INPUT(){}
|
|
|
|
// Required, The next certificate to add to the chain
|
|
void NextCertificate(const Base64 &value);
|
|
|
|
// Optional, true, when the current certificate is leaf certificate
|
|
void IsLeafCertificate(const bool value);
|
|
|
|
// Optional, true, when the current certificate is root. Marks end of the certificate chain
|
|
void IsRootCertificate(const bool value);
|
|
|
|
const VectorFieldData GetAllFields() const;
|
|
private:
|
|
static const CimFieldAttribute _metadata[];
|
|
};
|
|
|
|
// Add a certificate to the provisioning certificate chain, to be used by AdminSetup or UpgradeClientToAdmin methods.
|
|
virtual unsigned int AddNextCertInChain(const AddNextCertInChain_INPUT &input);
|
|
|
|
//Input parameter for function AdminSetup
|
|
class CIMFRAMEWORK_API AdminSetup_INPUT : public CimParam
|
|
{
|
|
public:
|
|
// Class Constructor
|
|
AdminSetup_INPUT() : CimParam() {}
|
|
|
|
// Class Destructor
|
|
~AdminSetup_INPUT(){}
|
|
|
|
// Required, The encryption type of the network admin password. Only HTTP-MD5 is supported. The values are the same as the CIM_Account.UserPasswordEncryptionAlgorithm field
|
|
// Legal values:
|
|
// None: 0
|
|
// Other: 1
|
|
// HTTP Digest MD5(A1): 2
|
|
// DMTF Reserved: ..
|
|
void NetAdminPassEncryptionType(const unsigned short value);
|
|
|
|
// Required, New network admin password to be set by this command, encrypted using the encryption type algorithm
|
|
void NetworkAdminPassword(const HexBinary &value);
|
|
|
|
// Optional, A random nonce value generated by the configuration agent.Required if the digital signature is provided.needs to be concatenated after the configuration nonce and signed together with the attached certificate's private key
|
|
void McNonce(const Base64 &value);
|
|
|
|
// Optional, The signing algorithm used to sign the setup operation.
|
|
// Legal values:
|
|
// None: 0
|
|
// Other: 1
|
|
// RSA_SHA-2_256: 2
|
|
// DMTF Reserved: ..
|
|
void SigningAlgorithm(const unsigned short value);
|
|
|
|
// Optional, A digital signature of the ConfigurationNonce and the McNonce concatenated. If this information is provided, AMT will validate the signature before accepting the command.
|
|
void DigitalSignature(const Base64 &value);
|
|
|
|
const VectorFieldData GetAllFields() const;
|
|
private:
|
|
static const CimFieldAttribute _metadata[];
|
|
};
|
|
|
|
// Setup Intel(R) AMT from the local host, resulting in Admin Setup Mode. Requires OS administrator rights, and moves Intel(R) AMT from "Pre Provisioned" state to "Post Provisioned" state. The control mode after this method is run will be "Admin".
|
|
virtual unsigned int AdminSetup(const AdminSetup_INPUT &input);
|
|
|
|
//Input parameter for function UpgradeClientToAdmin
|
|
class CIMFRAMEWORK_API UpgradeClientToAdmin_INPUT : public CimParam
|
|
{
|
|
public:
|
|
// Class Constructor
|
|
UpgradeClientToAdmin_INPUT() : CimParam() {}
|
|
|
|
// Class Destructor
|
|
~UpgradeClientToAdmin_INPUT(){}
|
|
|
|
// Optional, A random nonce value generated by the configuration agent.Required if the digital signature is provided.needs to be concatenated after the configuration nonce and signed together with the attached certificate's private key
|
|
void McNonce(const Base64 &value);
|
|
|
|
// Optional, The signing algorithm used to sign the setup operation.
|
|
// Legal values:
|
|
// None: 0
|
|
// Other: 1
|
|
// RSA_SHA-2_256: 2
|
|
// DMTF Reserved: ..
|
|
void SigningAlgorithm(const unsigned short value);
|
|
|
|
// Optional, A digital signature of the ConfigurationNonce and the McNonce concatenated.If this information is provided, AMT will validate the signature before accepting the command.
|
|
void DigitalSignature(const Base64 &value);
|
|
|
|
const VectorFieldData GetAllFields() const;
|
|
private:
|
|
static const CimFieldAttribute _metadata[];
|
|
};
|
|
|
|
// Upgrade Intel(R) AMT from Client to Admin Control Mode. Requires AMT administrator rights, and that the machine has been previously provisioned in Client control mode.
|
|
virtual unsigned int UpgradeClientToAdmin(const UpgradeClientToAdmin_INPUT &input);
|
|
|
|
// Do not allow provisioning the machine in Client Control mode.
|
|
virtual unsigned int DisableClientControlMode();
|
|
|
|
// Function used by the factory
|
|
static CimBase *CreateFromCimObject(const CimObject &object);
|
|
|
|
static vector<shared_ptr<IPS_HostBasedSetupService> > Enumerate(ICimWsmanClient *client, const CimKeys &keys = CimKeys()) ;
|
|
|
|
// Overloaded delete which supplies the internal resourceURI
|
|
static void Delete(ICimWsmanClient *client, const CimKeys &keys = CimKeys()) ;
|
|
|
|
using CimBase::Delete;
|
|
|
|
protected:
|
|
// Protected constructor to be used by derived classes
|
|
IPS_HostBasedSetupService(ICimWsmanClient *client, const string &class_name,
|
|
const string &class_ns, const string &prefix, const string &uri): CIM_SecurityService(client, class_name, class_ns, prefix, uri)
|
|
{
|
|
if(_classMetaData.size() == 0)
|
|
{
|
|
CIM_SecurityService::SetMetaData(_classMetaData);
|
|
CimBase::SetMetaData(_classMetaData, _metadata, 4);
|
|
}
|
|
}
|
|
// Protected constructor which receives CimObject
|
|
IPS_HostBasedSetupService(const CimObject &object)
|
|
: CIM_SecurityService(object)
|
|
{
|
|
if(_classMetaData.size() == 0)
|
|
{
|
|
CIM_SecurityService::SetMetaData(_classMetaData);
|
|
CimBase::SetMetaData(_classMetaData, _metadata, 4);
|
|
}
|
|
}
|
|
// Called by derived classes
|
|
void SetMetaData(vector<CimFieldAttribute>& childMetaData)
|
|
{
|
|
CIM_SecurityService::SetMetaData(childMetaData);
|
|
CimBase::SetMetaData(childMetaData, _metadata, 4);
|
|
}
|
|
const vector<CimFieldAttribute> &GetMetaData() const;
|
|
private:
|
|
static const CimFieldAttribute _metadata[];
|
|
static const string CLASS_NAME;
|
|
static const string CLASS_URI;
|
|
static const string CLASS_NS;
|
|
static const string CLASS_NS_PREFIX;
|
|
static vector<CimFieldAttribute> _classMetaData;
|
|
};
|
|
|
|
} // close namespace Typed
|
|
} // close namespace Cim
|
|
} // close namespace Manageability
|
|
} // close namespace Intel
|
|
#endif // IPS_HOSTBASEDSETUPSERVICE_H
|