setupandconfiguration

package
v2.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package setupandconfiguration facilitiates communication with Intel® AMT devices to access and interact with the Setup and Configuration Service, which is the logic in Intel® AMT that responds to Setup and Configuration requests.

Index

Constants

View Source
const (
	AMT_SetupAndConfigurationService string = "AMT_SetupAndConfigurationService"
	CommitChanges                    string = "CommitChanges"
	Unprovision                      string = "Unprovision"
	SetMEBxPassword                  string = "SetMEBxPassword"
	GetUuid                          string = "GetUuid"
)
View Source
const (
	AdminControlMode  ProvisioningModeValue  = 1
	ClientControlMode ProvisioningModeValue  = 4
	PreProvisioning   ProvisioningStateValue = 0
	InProvisioning    ProvisioningStateValue = 1
	PostProvisioning  ProvisioningStateValue = 2
)

Variables

View Source
var PasswordModelToString = map[PasswordModelValue]string{
	CoupledPasswordModel:      "CoupledPasswordModel",
	SeparatePasswordModel:     "SeparatePasswordModel",
	SeparateHashPasswordModel: "SeparateHashPasswordModel",
}

PasswordModelToString is a map of PasswordModel values to their string representations

Functions

This section is empty.

Types

type Body

type Body struct {
	XMLName                xml.Name `xml:"Body"`
	GetResponse            SetupAndConfigurationServiceResponse
	EnumerateResponse      common.EnumerateResponse
	PullResponse           PullResponse
	GetUuid_OUTPUT         GetUuid_OUTPUT         `xml:"GetUuid_OUTPUT"`
	Unprovision_OUTPUT     Unprovision_OUTPUT     `xml:"Unprovision_OUTPUT"`
	CommitChanges_OUTPUT   CommitChanges_OUTPUT   `xml:"CommitChanges_OUTPUT"`
	SetMEBxPassword_OUTPUT SetMEBxPassword_OUTPUT `xml:"SetMEBxPassword_OUTPUT"`
}

Response Types

type CommitChanges_OUTPUT

type CommitChanges_OUTPUT struct {
	XMLName     xml.Name `xml:"CommitChanges_OUTPUT"`
	ReturnValue ReturnValue
}

ValueMap={0, 1, 38, 2057}

Values={PT_STATUS_SUCCESS, PT_STATUS_INTERNAL_ERROR, PT_STATUS_FLASH_WRITE_LIMIT_EXCEEDED, PT_STATUS_DATA_MISSING}

type EnabledState

type EnabledState int

EnabledState is an integer enumeration that indicates the enabled and disabled states of an element. It can also indicate the transitions between these requested states. For example, shutting down (value=4) and starting (value=10) are transient states between enabled and disabled.

const (
	EnabledStateUnknown EnabledState = iota
	EnabledStateOther
	EnabledStateEnabled
	EnabledStateDisabled
	EnabledStateShuttingDown
	EnabledStateNotApplicable
	EnabledStateEnabledButOffline
	EnabledStateInTest
	EnabledStateDeferred
	EnabledStateQuiesce
	EnabledStateStarting
)

func (EnabledState) String added in v2.2.4

func (e EnabledState) String() string

String returns the string representation of the EnabledState value

type GetUuid_OUTPUT

type GetUuid_OUTPUT struct {
	XMLName xml.Name `xml:"GetUuid_OUTPUT"`
	UUID    string   `xml:"UUID"`
}

UUID of the system. If the value is all FFh, the ID is not currently present in the system, but is settable. If the value is all 00h, the ID is not present in the system. Corresponds to the UUID field of the SMBIOS Type 1 structure

type MEBXPassword

type MEBXPassword struct {
	XMLName  xml.Name `xml:"h:SetMEBxPassword_INPUT"`
	H        string   `xml:"xmlns:h,attr"`
	Password string   `xml:"h:Password,omitempty"`
}

Password needs to be strong: Contain at least one of: upper-case, lower-case, digit and special character

MinLen=8, MaxLen=32

type PasswordModelValue

type PasswordModelValue int

PasswordModelValue is an enumeration value that determines the password model of Intel® AMT.

const (
	CoupledPasswordModel PasswordModelValue = iota
	SeparatePasswordModel
	SeparateHashPasswordModel
)

func (PasswordModelValue) String added in v2.2.4

func (p PasswordModelValue) String() string

String returns the string representation of the PasswordModel value

type ProvisioningMode

type ProvisioningMode struct {
	XMLName          xml.Name              `xml:"h:Unprovision_INPUT"`
	H                string                `xml:"xmlns:h,attr"`
	ProvisioningMode ProvisioningModeValue `xml:"h:ProvisioningMode,omitempty"`
}

Indicates the provisioning mode (Enterprise , Small Business or Remote Connectivity) the device will enter following successful completion of the command. Starting from Release 6.0 only effective value is ProvisioningModeEnterprise

ValueMap={0, 1, 2, 3}

Values={ProvisioningModeCurrent, ProvisioningModeEnterprise, ProvisioningModeSmallBusiness, ProvisioningRemoteConnectivity}

type ProvisioningModeValue

type ProvisioningModeValue int

ProvisioningModeValue is a Read-Only enumeration value that determines the behavior of Intel® AMT when it is deployed. Starting from Release 7.0, this enumeration indicates whether AMT is deployed in "Admin control mode" or "Client control mode". In "Admin" mode, AMT functionality is on the same level of previous releases. In "Client" mode functionality is limited or requires user consent.

func (ProvisioningModeValue) String added in v2.2.4

func (p ProvisioningModeValue) String() string

String returns the string representation of the ProvisioningMode value

type ProvisioningStateValue

type ProvisioningStateValue int

ProvisioningStateValue is an enumeration value that indicates the state of the Intel® AMT subsystem in the provisioning process"Pre" - the setup operation has not started."In" - the setup operation is in progress."Post" - Intel® AMT is configured.

func (ProvisioningStateValue) String added in v2.2.4

func (p ProvisioningStateValue) String() string

String returns the string representation of the ProvisioningState value

type PullResponse

type PullResponse struct {
	XMLName                           xml.Name                               `xml:"PullResponse"`
	SetupAndConfigurationServiceItems []SetupAndConfigurationServiceResponse `xml:"Items>AMT_SetupAndConfigurationService"`
}

Response Types

type RequestedState

type RequestedState int

RequestedState is an integer enumeration that indicates the last requested or desired state for the element, irrespective of the mechanism through which it was requested. The actual state of the element is represented by EnabledState. This property is provided to compare the last requested and current enabled or disabled states. Note that when EnabledState is set to 5 ("Not Applicable"), then this property has no meaning. Refer to the EnabledState property description for explanations of the values in the RequestedState enumeration.

const (
	RequestedStateEnabled RequestedState = iota + 2
	RequestedStateDisabled
	RequestedStateShutDown
	RequestedStateNoChange
	RequestedStateOffline
	RequestedStateTest
	RequestedStateDeferred
	RequestedStateQuiesce
	RequestedStateReboot
	RequestedStateReset
	RequestedStateNotApplicable
	RequestedStateUnknown RequestedState = 0
)

func (RequestedState) String added in v2.2.4

func (r RequestedState) String() string

String returns the string representation of the RequestedState value

type Response

type Response struct {
	*client.Message
	XMLName xml.Name       `xml:"Envelope"`
	Header  message.Header `xml:"Header"`
	Body    Body           `xml:"Body"`
}

Response Types

func (*Response) DecodeUUID

func (w *Response) DecodeUUID() (amtUuid string, err error)

DecodeUUID formats the returned AMT base64 encoded UUID into a human readable UUID

func (*Response) JSON

func (r *Response) JSON() string

JSON marshals the type into JSON format

func (*Response) YAML

func (r *Response) YAML() string

YAML marshals the type into YAML format

type ReturnValue added in v2.2.4

type ReturnValue int

ReturnValue is a 32-bit unsigned integer. It is used to indicate the success or failure of a method. A ReturnValue of zero indicates success. A non-zero value indicates failure. The specific values for ReturnValue are defined in the method description.

const (
	ReturnValueSuccess                 ReturnValue = 0
	ReturnValueInternalError           ReturnValue = 1
	ReturnValueNotPermitted            ReturnValue = 16
	ReturnValueInvalidParameter        ReturnValue = 36
	ReturnValueFlashWriteLimitExceeded ReturnValue = 38
	ReturnValueInvalidPassword         ReturnValue = 2054
	ReturnValueBlockingComponent       ReturnValue = 2076
)

func (ReturnValue) String added in v2.2.4

func (r ReturnValue) String() string

String returns the string representation of the ReturnValue value

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewSetupAndConfigurationServiceWithClient

func NewSetupAndConfigurationServiceWithClient(wsmanMessageCreator *message.WSManMessageCreator, client client.WSMan) Service

NewSetupAndConfigurationServiceWithClient instantiates a new Service

func (Service) CommitChanges

func (s Service) CommitChanges() (response Response, err error)

CommitChanges saves pending configuration commands made to the Intel® AMT device. Completes configuration when in "IN-provisioning" state. This routine commits pending configuration commands which are dependent on an internal restart sequence or a cumulative validity check.

Failure to execute this command prevents the pending configurations (which are not stored in flash memory) to take effect. Operations (or situations such as a power loss) that immediately change flash memory depend on a call to CommitChanges()to refresh the internal Firmware state.

Note:

1. If TLS is enabled, RSA Key and Certificate must be configured in order to work properly with the changes being committed.

2. If DHCP is enabled, host-name must be set.

3. If mutual authentication is configured, then at least one trusted root certificate must exist.

4. When using TLS mutual authentication, the user must first configure the Intel AMT system time.

5. If in EnterpriseMode Provisioning, then caller must update the internal clock and change the PRNG.

Since committing changes may cause an internal restart sequence, remote applications should allow sufficient time for Intel AMT to reload before issuing the next command.

ValueMap={0, 1, 38, 2057}

Values={PT_STATUS_SUCCESS, PT_STATUS_INTERNAL_ERROR, PT_STATUS_FLASH_WRITE_LIMIT_EXCEEDED, PT_STATUS_DATA_MISSING}

func (Service) Enumerate

func (s Service) Enumerate() (response Response, err error)

Enumerate returns an enumeration context which is used in a subsequent Pull call

func (Service) Get

func (s Service) Get() (response Response, err error)

Gets the representation of the instance

func (Service) GetUuid

func (s Service) GetUuid() (response Response, err error)

GetUuid gets the AMT UUID from the device.

The returned value is in base64 format. DecodeUUID can be used to format this value into a human readable UUID

ValueMap={0, 1}

Values={PT_STATUS_SUCCESS, PT_STATUS_INTERNAL_ERROR}

func (Service) Pull

func (s Service) Pull(enumerationContext string) (response Response, err error)

Pull returns the instances of this class. An enumeration context provided by the Enumerate call is used as input.

func (Service) Put

func (s Service) Put(setupAndConfigurationService SetupAndConfigurationServiceRequest) (response Response, err error)

Put will change properties of the selected instance

func (Service) SetMEBXPassword

func (s Service) SetMEBXPassword(password string) (response Response, err error)

SetMEBXPassword changes the ME Bios extension password. It allows a remote caller to change the ME access password for the BIOS extension screen. This call succeeds depending on the password policy rule defined in MEBx (BIOS extension):

"Default Password Only" - Method succeeds only when the current password is still the default value and only in PKI provisioning.

"During Setup and Configuration" - Method succeeds only during provisioning, regardless of provisioning method or previous password value.

"ANYTIME" - Method will always succeed. (i.e. even when configured).

Note: API is blocked in client control mode

ValueMap={0, 1, 16, 2054}

Values={PT_STATUS_SUCCESS, PT_STATUS_INTERNAL_ERROR, PT_STATUS_NOT_PERMITTED, PT_STATUS_INVALID_PASSWORD}

func (Service) Unprovision

func (s Service) Unprovision(provisioningMode ProvisioningModeValue) (response Response, err error)

Unprovision unconfigures and deactivates the Intel® AMT device. The device will need to be re-provisioned after this command before being able to use AMT features.

In Client Control Mode, call will succeed even if auditor is blocking the operation.

ValueMap={0, 1, 16, 36, 2076}

Values={PT_STATUS_SUCCESS, PT_STATUS_INTERNAL_ERROR, PT_STATUS_NOT_PERMITTED, PT_STATUS_INVALID_PARAMETER, PT_STATUS_BLOCKING_COMPONENT}

type SetMEBxPassword_OUTPUT

type SetMEBxPassword_OUTPUT struct {
	XMLName     xml.Name `xml:"SetMEBxPassword_OUTPUT"`
	ReturnValue ReturnValue
}

ValueMap={0, 1, 16, 2054}

Values={PT_STATUS_SUCCESS, PT_STATUS_INTERNAL_ERROR, PT_STATUS_NOT_PERMITTED, PT_STATUS_INVALID_PASSWORD}

type SetupAndConfigurationServiceRequest

type SetupAndConfigurationServiceRequest struct {
	XMLName                       xml.Name               `xml:"h:AMT_SetupAndConfigurationService"`
	H                             string                 `xml:"xmlns:h,attr"`
	RequestedState                RequestedState         `xml:"h:RequestedState,omitempty"`                // RequestedState is an integer enumeration that indicates the last requested or desired state for the element, irrespective of the mechanism through which it was requested.
	EnabledState                  EnabledState           `xml:"h:EnabledState,omitempty"`                  // EnabledState is an integer enumeration that indicates the enabled and disabled states of an element.
	ElementName                   string                 `xml:"h:ElementName,omitempty"`                   // A user-friendly name for the object. This property allows each instance to define a user-friendly name in addition to its key properties, identity data, and description information. Note that the Name property of ManagedSystemElement is also defined as a user-friendly name. But, it is often subclassed to be a Key. It is not reasonable that the same property can convey both identity and a user-friendly name, without inconsistencies. Where Name exists and is not a Key (such as for instances of LogicalDevice), the same information can be present in both the Name and ElementName properties. Note that if there is an associated instance of CIM_EnabledLogicalElementCapabilities, restrictions on this properties may exist as defined in ElementNameMask and MaxElementNameLen properties defined in that class.
	SystemCreationClassName       string                 `xml:"h:SystemCreationClassName,omitempty"`       // The CreationClassName of the scoping System.
	SystemName                    string                 `xml:"h:SystemName,omitempty"`                    // The Name of the scoping System.
	CreationClassName             string                 `xml:"h:CreationClassName,omitempty"`             // CreationClassName indicates the name of the class or the subclass that is used in the creation of an instance. When used with the other key properties of this class, this property allows all instances of this class and its subclasses to be uniquely identified.
	Name                          string                 `xml:"h:Name,omitempty"`                          // The Name property uniquely identifies the Service and provides an indication of the functionality that is managed. This functionality is described in more detail in the Description property of the object.
	ProvisioningMode              ProvisioningModeValue  `xml:"h:ProvisioningMode,omitempty"`              // A Read-Only enumeration value that determines the behavior of Intel® AMT when it is deployed.
	ProvisioningState             ProvisioningStateValue `xml:"h:ProvisioningState,omitempty"`             // An enumeration value that indicates the state of the Intel® AMT subsystem in the provisioning process"Pre" - the setup operation has not started."In" - the setup operation is in progress."Post" - Intel® AMT is configured.
	ZeroTouchConfigurationEnabled bool                   `xml:"h:ZeroTouchConfigurationEnabled,omitempty"` // Indicates if Zero Touch Configuration (Remote Configuration) is enabled or disabled. This property affects only enterprise mode. It can be modified while in SMB mode
	ProvisioningServerOTP         string                 `xml:"h:ProvisioningServerOTP,omitempty"`         // A optional binary data value containing 8-32 characters,that represents a one-time password (OTP), used to authenticate the Intel® AMT to the configuration server. This property can be retrieved only in IN Provisioning state, nevertheless, it is settable also in POST provisioning state.
	ConfigurationServerFQDN       string                 `xml:"h:ConfigurationServerFQDN,omitempty"`       // The FQDN of the configuration server.
	PasswordModel                 PasswordModelValue     `xml:"h:PasswordModel,omitempty"`                 // An enumeration value that determines the password model of Intel® AMT.
	DhcpDNSSuffix                 string                 `xml:"h:DhcpDNSSuffix,omitempty"`                 // Domain name received from DHCP
	TrustedDNSSuffix              string                 `xml:"h:TrustedDNSSuffix,omitempty"`              // Trusted domain name configured in MEBX
}

Request Types

type SetupAndConfigurationServiceResponse

type SetupAndConfigurationServiceResponse struct {
	XMLName                       xml.Name               `xml:"AMT_SetupAndConfigurationService"`
	RequestedState                RequestedState         `xml:"RequestedState,omitempty"`                // RequestedState is an integer enumeration that indicates the last requested or desired state for the element, irrespective of the mechanism through which it was requested.
	EnabledState                  EnabledState           `xml:"EnabledState,omitempty"`                  // EnabledState is an integer enumeration that indicates the enabled and disabled states of an element.
	ElementName                   string                 `xml:"ElementName,omitempty"`                   // A user-friendly name for the object. This property allows each instance to define a user-friendly name in addition to its key properties, identity data, and description information. Note that the Name property of ManagedSystemElement is also defined as a user-friendly name. But, it is often subclassed to be a Key. It is not reasonable that the same property can convey both identity and a user-friendly name, without inconsistencies. Where Name exists and is not a Key (such as for instances of LogicalDevice), the same information can be present in both the Name and ElementName properties. Note that if there is an associated instance of CIM_EnabledLogicalElementCapabilities, restrictions on this properties may exist as defined in ElementNameMask and MaxElementNameLen properties defined in that class.
	SystemCreationClassName       string                 `xml:"SystemCreationClassName,omitempty"`       // The CreationClassName of the scoping System.
	SystemName                    string                 `xml:"SystemName,omitempty"`                    // The Name of the scoping System.
	CreationClassName             string                 `xml:"CreationClassName,omitempty"`             // CreationClassName indicates the name of the class or the subclass that is used in the creation of an instance. When used with the other key properties of this class, this property allows all instances of this class and its subclasses to be uniquely identified.
	Name                          string                 `xml:"Name,omitempty"`                          // The Name property uniquely identifies the Service and provides an indication of the functionality that is managed. This functionality is described in more detail in the Description property of the object.
	ProvisioningMode              ProvisioningModeValue  `xml:"ProvisioningMode,omitempty"`              // A Read-Only enumeration value that determines the behavior of Intel® AMT when it is deployed.
	ProvisioningState             ProvisioningStateValue `xml:"ProvisioningState,omitempty"`             // An enumeration value that indicates the state of the Intel® AMT subsystem in the provisioning process"Pre" - the setup operation has not started."In" - the setup operation is in progress."Post" - Intel® AMT is configured.
	ZeroTouchConfigurationEnabled bool                   `xml:"ZeroTouchConfigurationEnabled,omitempty"` // Indicates if Zero Touch Configuration (Remote Configuration) is enabled or disabled. This property affects only enterprise mode. It can be modified while in SMB mode
	ProvisioningServerOTP         string                 `xml:"ProvisioningServerOTP,omitempty"`         // A optional binary data value containing 8-32 characters,that represents a one-time password (OTP), used to authenticate the Intel® AMT to the configuration server. This property can be retrieved only in IN Provisioning state, nevertheless, it is settable also in POST provisioning state.
	ConfigurationServerFQDN       string                 `xml:"ConfigurationServerFQDN,omitempty"`       // The FQDN of the configuration server.
	PasswordModel                 PasswordModelValue     `xml:"PasswordModel,omitempty"`                 // An enumeration value that determines the password model of Intel® AMT.
	DhcpDNSSuffix                 string                 `xml:"DhcpDNSSuffix,omitempty"`                 // Domain name received from DHCP
	TrustedDNSSuffix              string                 `xml:"TrustedDNSSuffix,omitempty"`              // Trusted domain name configured in MEBX
}

Response Types

type Unprovision_OUTPUT

type Unprovision_OUTPUT struct {
	XMLName     xml.Name `xml:"Unprovision_OUTPUT"`
	ReturnValue ReturnValue
}

ValueMap={0, 1, 16, 36, 2076}

Values={PT_STATUS_SUCCESS, PT_STATUS_INTERNAL_ERROR, PT_STATUS_NOT_PERMITTED, PT_STATUS_INVALID_PARAMETER, PT_STATUS_BLOCKING_COMPONENT}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL