hostbasedsetup

package
v2.17.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package hostbasedsetup facilitates communication with Intel® AMT devices to describe 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.

Index

Constants

View Source
const (
	IPSHostBasedSetupService string = "IPS_HostBasedSetupService"
	Setup                    string = "Setup"
	AdminSetup               string = "AdminSetup"
	AddNextCertInChain       string = "AddNextCertInChain"
	UpgradeClientToAdmin     string = "UpgradeClientToAdmin"
	ValueNotFound            string = "Value not found in map"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AddNextCertInChainInput added in v2.5.2

type AddNextCertInChainInput struct {
	XMLName           xml.Name `xml:"h:AddNextCertInChain_INPUT"`
	H                 string   `xml:"xmlns:h,attr"`
	NextCertificate   string   `xml:"h:NextCertificate"`
	IsLeafCertificate bool     `xml:"h:IsLeafCertificate"`
	IsRootCertificate bool     `xml:"h:IsRootCertificate"`
}

INPUT Request Types.

type AddNextCertInChainReturnValue added in v2.2.4

type AddNextCertInChainReturnValue int

AddNextCertInChainReturnValue is an enumeration value that indicates the status of the operation.

const (
	AddNextCertInChainReturnValueSuccess AddNextCertInChainReturnValue = iota
	AddNextCertInChainReturnValueInvalidParam
	AddNextCertInChainReturnValueInternalError
	AddNextCertInChainReturnValueInvalidState
	AddNextCertInChainReturnValueCertVerifyFailed
	AddNextCertInChainReturnValueCertChainLengthExceeded
)

func (AddNextCertInChainReturnValue) String added in v2.2.4

String returns a human-readable string representation of the ReturnValue enumeration.

type AddNextCertInChain_OUTPUT

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

OUTPUT Response Types.

type AdminPassEncryptionType

type AdminPassEncryptionType int

AdminPassEncryptionType is the encryption type for the network admin password.

const (
	AdminPassEncryptionTypeNone AdminPassEncryptionType = iota
	AdminPassEncryptionTypeOther
	AdminPassEncryptionTypeHTTPDigestMD5A1
)

func (AdminPassEncryptionType) String added in v2.2.4

func (a AdminPassEncryptionType) String() string

String returns a human-readable string representation of the AdminPassEncryptionType enumeration.

type AdminSetupInput added in v2.5.2

type AdminSetupInput struct {
	XMLName                    xml.Name `xml:"h:AdminSetup_INPUT"`
	H                          string   `xml:"xmlns:h,attr"`
	NetAdminPassEncryptionType int      `xml:"h:NetAdminPassEncryptionType"`
	NetworkAdminPassword       string   `xml:"h:NetworkAdminPassword"`
	McNonce                    string   `xml:"h:McNonce"`
	SigningAlgorithm           int      `xml:"h:SigningAlgorithm"`
	DigitalSignature           string   `xml:"h:DigitalSignature"`
}

INPUT Request Types.

type AdminSetupReturnValue added in v2.2.4

type AdminSetupReturnValue int

AdminSetupReturnValue is an enumeration value that indicates the status of the operation.

const (
	AdminSetupReturnValueSuccess AdminSetupReturnValue = iota
	AdminSetupReturnValueInternalError
	AdminSetupReturnValueInvalidState
	AdminSetupReturnValueInvalidParam

	AdminSetupReturnValueAuthFailed
	AdminSetupReturnValueFlashWriteLimitExceeded
)

func (AdminSetupReturnValue) String added in v2.2.4

func (a AdminSetupReturnValue) String() string

String returns a human-readable string representation of the ReturnValue enumeration.

type AdminSetup_OUTPUT

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

OUTPUT Response Types.

type AllowedControlModes

type AllowedControlModes int

AllowedControlModes is an array of values that indicates the allowed control modes for the Intel(r) AMT subsystem.

const (
	AllowedControlModesNotProvisioned AllowedControlModes = iota
	AllowedControlModesClient
	AllowedControlModesAdmin
)

func (AllowedControlModes) String added in v2.2.4

func (a AllowedControlModes) String() string

String returns a human-readable string representation of the AllowedControlModes enumeration.

type Body

type Body struct {
	XMLName                     xml.Name              `xml:"Body"`
	GetResponse                 HostBasedSetupService `xml:"IPS_HostBasedSetupService"`
	EnumerateResponse           common.EnumerateResponse
	PullResponse                PullResponse
	Setup_OUTPUT                Setup_OUTPUT                `xml:"Setup_OUTPUT"`
	AdminSetup_OUTPUT           AdminSetup_OUTPUT           `xml:"AdminSetup_OUTPUT"`
	AddNextCertInChain_OUTPUT   AddNextCertInChain_OUTPUT   `xml:"AddNextCertInChain_OUTPUT"`
	UpgradeClientToAdmin_OUTPUT UpgradeClientToAdmin_OUTPUT `xml:"UpgradeClientToAdmin_OUTPUT"`
}

OUTPUT Response Types.

type CertChainStatus

type CertChainStatus int

CertChainStatus is an enumeration value that indicates the status of "AddNextCertInChain" progress.

const (
	CertChainStatusNotStarted CertChainStatus = iota
	CertChainStatusChainInProgress
	CertChainStatusChainComplete
)

func (CertChainStatus) String added in v2.2.4

func (c CertChainStatus) String() string

String returns a human-readable string representation of the CertChainStatus enumeration.

type CurrentControlMode

type CurrentControlMode int

CurrentControlMode is an enumeration value that indicates the current control mode of the Intel(r) AMT subsystem after provisioning.

const (
	NotProvisioned CurrentControlMode = iota
	Client
	Admin
)

func (CurrentControlMode) String added in v2.2.4

func (c CurrentControlMode) String() string

String returns a human-readable string representation of the CurrentControlMode enumeration.

type HostBasedSetupService

type HostBasedSetupService struct {
	XMLName                 xml.Name `xml:"IPS_HostBasedSetupService"`
	ElementName             string
	SystemCreationClassName string
	SystemName              string
	CreationClassName       string
	Name                    string
	CurrentControlMode      CurrentControlMode
	AllowedControlModes     []AllowedControlModes
	ConfigurationNonce      string
	CertChainStatus         CertChainStatus
}

OUTPUT Response Types.

type PullResponse

type PullResponse struct {
	XMLName                    xml.Name                `xml:"PullResponse"`
	HostBasedSetupServiceItems []HostBasedSetupService `xml:"Items>IPS_HostBasedSetupService"`
}

OUTPUT Response Types.

type Response

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

OUTPUT Response Types.

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 Service

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

func NewHostBasedSetupServiceWithClient

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

NewHostBasedSetupService returns a new instance of the HostBasedSetupService struct.

func (Service) AddNextCertInChain

func (service Service) AddNextCertInChain(cert string, isLeaf, isRoot bool) (response Response, err error)

Add a certificate to the provisioning certificate chain, to be used by AdminSetup or UpgradeClientToAdmin methods.

func (Service) AdminSetup

func (service Service) AdminSetup(adminPassEncryptionType AdminPassEncryptionType, digestRealm, adminPassword, mcNonce string, signingAlgorithm SigningAlgorithm, digitalSignature string) (response Response, err error)

Setup Intel® AMT from the local host, resulting in Admin Setup Mode. Requires OS administrator rights, and moves Intel® AMT from "Pre Provisioned" state to "Post Provisioned" state. The control mode after this method is run will be "Admin".

func (Service) Enumerate

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

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

func (Service) Get

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

Get retrieves the representation of the instance.

func (Service) Pull

func (service 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) Setup

func (service Service) Setup(adminPassEncryptionType AdminPassEncryptionType, digestRealm, adminPassword string) (response Response, err error)

func (Service) UpgradeClientToAdmin

func (service Service) UpgradeClientToAdmin(mcNonce string, signingAlgorithm SigningAlgorithm, digitalSignature string) (response Response, err error)

Upgrade Intel® AMT from Client to Admin Control Mode.

type SetupInput added in v2.5.2

type SetupInput struct {
	XMLName                    xml.Name `xml:"h:Setup_INPUT"`
	H                          string   `xml:"xmlns:h,attr"`
	NetAdminPassEncryptionType int      `xml:"h:NetAdminPassEncryptionType"`
	NetworkAdminPassword       string   `xml:"h:NetworkAdminPassword"`
}

INPUT Request Types.

type SetupReturnValue added in v2.2.4

type SetupReturnValue int

SetupReturnValue is an enumeration value that indicates the status of the operation.

const (
	SetupReturnValueSuccess SetupReturnValue = iota
	SetupReturnValueInternalError
	SetupReturnValueInvalidState
	SetupReturnValueInvalidParam
	SetupReturnValueMethodDisabled
	SetupReturnValueAuthFailed
	SetupReturnValueFlashWriteLimitExceeded
)

func (SetupReturnValue) String added in v2.2.4

func (s SetupReturnValue) String() string

String returns a human-readable string representation of the ReturnValue enumeration.

type Setup_OUTPUT

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

OUTPUT Response Types.

type SigningAlgorithm

type SigningAlgorithm int

SigningAlgorithm is the algorithm used to sign the setup operation.

const (
	SigningAlgorithmNone SigningAlgorithm = iota
	SigningAlgorithmOther
	SigningAlgorithmRSASHA2256
)

func (SigningAlgorithm) String added in v2.2.4

func (s SigningAlgorithm) String() string

String returns a human-readable string representation of the SigningAlgorithm enumeration.

type UpgradeClientToAdminInput added in v2.5.2

type UpgradeClientToAdminInput struct {
	XMLName          xml.Name `xml:"h:UpgradeClientToAdmin_INPUT"`
	H                string   `xml:"xmlns:h,attr"`
	McNonce          string   `xml:"h:McNonce"`
	SigningAlgorithm int      `xml:"h:SigningAlgorithm"`
	DigitalSignature string   `xml:"h:DigitalSignature"`
}

INPUT Request Types.

type UpgradeClientToAdmin_OUTPUT

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

OUTPUT Response Types.

Jump to

Keyboard shortcuts

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