Documentation ¶
Overview ¶
Package remoteaccess facilitiates communication with Intel® AMT devices to access and configure Remote Access Policy Applies to MPS, Remote Access Policy Rules, and Remote Access Service.
Remote Access Policy Applies To MPS: This class associates a Management Presence Server with a Remote Access Policy rule. When a Policy Rule is triggered, the Intel® AMT subsystem will attempt to connect to the MpServers associated with the triggered policy in the order by which the associations were created. This order is indicated in the OrderOfAccess field where lower numbers indicate a higher priority.
Remote Access Policy Rule: Represents a Remote Access policy. The policy defines a condition that will trigger the establishment of a tunnel between the Intel® AMT subsystem and a remote MpServer. The policy also defines parameters for the connection such as TunnelLifeTime in seconds.
Remote Access Service: Represents the Remote Access Service in the Intel® AMT subsystem.
Index ¶
- Constants
- type AddMpServerRequest
- type AddMpServerResponse
- type AddRemoteAccessPolicyRuleResponse
- type Body
- type MPSType
- type MPServerAuthMethod
- type MPServerInfoFormat
- type ManagedElement
- type ManagedElementResponse
- type MpServer
- type PolicyAppliesToMPS
- func (policyAppliesToMPS PolicyAppliesToMPS) Delete(handle string) (response Response, err error)
- func (policyAppliesToMPS PolicyAppliesToMPS) Enumerate() (response Response, err error)
- func (policyAppliesToMPS PolicyAppliesToMPS) Get() (response Response, err error)
- func (policyAppliesToMPS PolicyAppliesToMPS) Pull(enumerationContext string) (response Response, err error)
- func (policyAppliesToMPS PolicyAppliesToMPS) Put(remoteAccessPolicyAppliesToMPS *RemoteAccessPolicyAppliesToMPSRequest) (response Response, err error)
- type PolicyDecisionStrategy
- type PolicyRule
- func (policyRule PolicyRule) Delete(handle string) (response Response, err error)
- func (policyRule PolicyRule) Enumerate() (response Response, err error)
- func (policyRule PolicyRule) Get() (response Response, err error)
- func (policyRule PolicyRule) Pull(enumerationContext string) (response Response, err error)
- func (policyRule PolicyRule) Put(remoteAccessPolicyRule RemoteAccessPolicyRuleRequest) (response Response, err error)
- type PolicyRuleResponse
- type PolicySet
- type PolicySetResponse
- type PullResponse
- type ReferenceParameters
- type ReferenceParametersResponse
- type RemoteAccessPolicyAppliesToMPSRequest
- type RemoteAccessPolicyAppliesToMPSResponse
- type RemoteAccessPolicyRuleRequest
- type RemoteAccessPolicyRuleResponse
- type RemoteAccessPolicyRuleSelector
- type RemoteAccessServiceResponse
- type Response
- type ReturnValue
- type Selector
- type SelectorResponse
- type SelectorSet
- type SelectorSetResponse
- type Service
- func (service Service) AddMPS(mpServer AddMpServerRequest) (response Response, err error)
- func (service Service) AddRemoteAccessPolicyRule(remoteAccessPolicyRule RemoteAccessPolicyRuleRequest, name string) (response Response, err error)
- func (service Service) Enumerate() (response Response, err error)
- func (service Service) Get() (response Response, err error)
- func (service Service) Pull(enumerationContext string) (response Response, err error)
- type Trigger
Constants ¶
const ( AMTRemoteAccessPolicyAppliesToMPS string = "AMT_RemoteAccessPolicyAppliesToMPS" AMTRemoteAccessPolicyRule string = "AMT_RemoteAccessPolicyRule" AMTRemoteAccessService string = "AMT_RemoteAccessService" AddMps string = "AddMpServer" AddRemoteAccessPolicyRule string = "AddRemoteAccessPolicyRule" ValueNotFound string = "Value not found in map" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddMpServerRequest ¶
type AddMpServerRequest struct { XMLName xml.Name `xml:"h:AddMpServer_INPUT"` H string `xml:"xmlns:h,attr"` AccessInfo string `xml:"h:AccessInfo"` // A string holding the IP address or FQDN of the server InfoFormat MPServerInfoFormat `xml:"h:InfoFormat"` // An enumerated integer describing the format and interpretation of the AccessInfo property. Port int `xml:"h:Port"` // The port to be used to establish a tunnel with the MPS. AuthMethod MPServerAuthMethod `xml:"h:AuthMethod"` // Authentication method to be used when the Intel® AMT subsystem opens a tunnel to the MpServer Username string `xml:"h:Username,omitempty"` // A Username to be used for the connection with the MPS if Username-Pwd authentication is used. Limited to 16 alphanumeric characters Password string `xml:"h:Password,omitempty"` // A Password to be used for the connection with the MPS if Username-Pwd authentication is used. Limited to 16 characters CommonName string `xml:"h:CN"` // A common name used when AccessInfo is an IP address. Certificate string `xml:"h:Certificate,omitempty"` // A reference to a certificate. Required if AuthMethod is set to mutual authentication }
INPUTS Request Types.
type AddMpServerResponse ¶
type AddMpServerResponse struct { XMLName xml.Name `xml:"AddMpServer_OUTPUT"` MpServer MpServer `xml:"MpServer"` // A reference to the created MPS if the operation succeeded. ReturnValue ReturnValue `xml:"ReturnValue,omitempty"` }
OUTPUTS Response Types.
type AddRemoteAccessPolicyRuleResponse ¶
type AddRemoteAccessPolicyRuleResponse struct { XMLName xml.Name `xml:"AddRemoteAccessPolicyRule_OUTPUT"` PolicyRuleResponse PolicyRuleResponse `xml:"PolicyRule"` ReturnValue ReturnValue `xml:"ReturnValue"` // ValueMap={0, 1, 36, 38, 2058} Values={PT_STATUS_SUCCESS, PT_STATUS_INTERNAL_ERROR, PT_STATUS_INVALID_PARAMETER, PT_STATUS_FLASH_WRITE_LIMIT_EXCEEDED, PT_STATUS_DUPLICATE} }
OUTPUTS Response Types.
type Body ¶
type Body struct { XMLName xml.Name `xml:"Body"` RemoteAccessServiceGetResponse RemoteAccessServiceResponse RemoteAccessPolicyRuleGetResponse RemoteAccessPolicyRuleResponse RemoteAccessPolicyAppliesToMPSGetResponse RemoteAccessPolicyAppliesToMPSResponse EnumerateResponse common.EnumerateResponse PullResponse PullResponse AddMpServerResponse AddMpServerResponse AddRemotePolicyRuleResponse AddRemoteAccessPolicyRuleResponse }
OUTPUTS Response Types.
type MPSType ¶
type MPSType int
This field indicates if the MpServer is to be used inside or outside of the organization, or both. Default is outside (0).
ValueMap={0, 1, 2}
Values={External MPS, Internal MPS, Both}.
type MPServerAuthMethod ¶
type MPServerAuthMethod int
Authentication method to be used when the Intel® AMT subsystem opens a tunnel to the MpServer
ValueMap={1, 2}
Values={Mutual Authentication, Username Password Authentication}.
const ( MutualAuthentication MPServerAuthMethod = 1 UsernamePasswordAuthentication MPServerAuthMethod = 2 )
type MPServerInfoFormat ¶
type MPServerInfoFormat int
An enumerated integer describing the format and interpretation of the AccessInfo property.
ValueMap={3, 4, 201}
Values={IPv4 Address, IPv6 Address, FQDN}.
const ( IPv4Address MPServerInfoFormat = 3 IPv6Address MPServerInfoFormat = 4 FQDN MPServerInfoFormat = 201 )
type ManagedElement ¶
type ManagedElement struct { Address string `xml:"b:Address"` B string `xml:"xmlns:b,attr"` ReferenceParameters ReferenceParameters `xml:"b:ReferenceParameters"` }
INPUTS Request Types.
type ManagedElementResponse ¶
type ManagedElementResponse struct { XMLName xml.Name `xml:"ManagedElement"` Address string `xml:"Address"` ReferenceParameters ReferenceParametersResponse `xml:"ReferenceParameters"` }
OUTPUTS Response Types.
type MpServer ¶
type MpServer struct { XMLName xml.Name `xml:"MpServer"` Address string `xml:"Address"` ReferenceParameters ReferenceParametersResponse `xml:"ReferenceParameters"` }
OUTPUTS Response Types.
type PolicyAppliesToMPS ¶
type PolicyAppliesToMPS struct {
// contains filtered or unexported fields
}
func NewRemoteAccessPolicyAppliesToMPSWithClient ¶
func NewRemoteAccessPolicyAppliesToMPSWithClient(wsmanMessageCreator *message.WSManMessageCreator, client client.WSMan) PolicyAppliesToMPS
NewRemoteAccessPolicyAppliesToMPSWithClient instantiates a new PolicyAppliesToMPS.
func (PolicyAppliesToMPS) Delete ¶
func (policyAppliesToMPS PolicyAppliesToMPS) Delete(handle string) (response Response, err error)
Delete removes a the specified instance.
func (PolicyAppliesToMPS) Enumerate ¶
func (policyAppliesToMPS PolicyAppliesToMPS) Enumerate() (response Response, err error)
Enumerate returns an enumeration context which is used in a subsequent Pull call.
func (PolicyAppliesToMPS) Get ¶
func (policyAppliesToMPS PolicyAppliesToMPS) Get() (response Response, err error)
Get retrieves the representation of the instance.
func (PolicyAppliesToMPS) Pull ¶
func (policyAppliesToMPS PolicyAppliesToMPS) 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 (PolicyAppliesToMPS) Put ¶
func (policyAppliesToMPS PolicyAppliesToMPS) Put(remoteAccessPolicyAppliesToMPS *RemoteAccessPolicyAppliesToMPSRequest) (response Response, err error)
Put will change properties of the selected instance.
type PolicyDecisionStrategy ¶
type PolicyDecisionStrategy int // First Matching:1 | All:2
Property Types.
const ( PolicyDecisionStrategyFirstMatching PolicyDecisionStrategy = 1 PolicyDecisionStrategyAll PolicyDecisionStrategy = 2 )
type PolicyRule ¶
type PolicyRule struct {
// contains filtered or unexported fields
}
func NewPolicyRuleWithClient ¶
func NewPolicyRuleWithClient(wsmanMessageCreator *message.WSManMessageCreator, clientPolicy client.WSMan) PolicyRule
NewPolicyRuleWithClient instantiates a new PolicyRule.
func (PolicyRule) Delete ¶
func (policyRule PolicyRule) Delete(handle string) (response Response, err error)
Delete removes a the specified instance.
func (PolicyRule) Enumerate ¶
func (policyRule PolicyRule) Enumerate() (response Response, err error)
Enumerate returns an enumeration context which is used in a subsequent Pull call.
func (PolicyRule) Get ¶
func (policyRule PolicyRule) Get() (response Response, err error)
Get retrieves the representation of the instance.
func (PolicyRule) Pull ¶
func (policyRule PolicyRule) 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 (PolicyRule) Put ¶
func (policyRule PolicyRule) Put(remoteAccessPolicyRule RemoteAccessPolicyRuleRequest) (response Response, err error)
Put will change properties of the selected instance.
type PolicyRuleResponse ¶
type PolicyRuleResponse struct { XMLName xml.Name `xml:"PolicyRule"` Address string `xml:"Address"` ReferenceParameters ReferenceParametersResponse `xml:"ReferenceParameters"` }
OUTPUTS Response Types.
type PolicySet ¶
type PolicySet struct { Address string `xml:"b:Address"` B string `xml:"xmlns:b,attr"` ReferenceParameters ReferenceParameters `xml:"b:ReferenceParameters"` }
INPUTS Request Types.
type PolicySetResponse ¶
type PolicySetResponse struct { XMLName xml.Name `xml:"PolicySet"` Address string `xml:"Address"` ReferenceParameters ReferenceParametersResponse `xml:"ReferenceParameters"` }
OUTPUTS Response Types.
type PullResponse ¶
type PullResponse struct { XMLName xml.Name `xml:"PullResponse"` RemoteAccessItems []RemoteAccessServiceResponse `xml:"Items>AMT_RemoteAccessService"` RemotePolicyRuleItems []RemoteAccessPolicyRuleResponse `xml:"Items>AMT_RemoteAccessPolicyRule"` PolicyAppliesItems []RemoteAccessPolicyAppliesToMPSResponse `xml:"Items>AMT_RemoteAccessPolicyAppliesToMPS"` }
OUTPUTS Response Types.
type ReferenceParameters ¶
type ReferenceParameters struct { ResourceURI string `xml:"c:ResourceURI"` C string `xml:"xmlns:c,attr"` SelectorSet SelectorSet `xml:"c:SelectorSet"` }
INPUTS Request Types.
type ReferenceParametersResponse ¶
type ReferenceParametersResponse struct { XMLName xml.Name `xml:"ReferenceParameters"` ResourceURI string `xml:"ResourceURI"` SelectorSet SelectorSetResponse `xml:"SelectorSet"` }
OUTPUTS Response Types.
type RemoteAccessPolicyAppliesToMPSRequest ¶
type RemoteAccessPolicyAppliesToMPSRequest struct { XMLName xml.Name `xml:"h:AMT_RemoteAccessPolicyAppliesToMPS"` H string `xml:"xmlns:h,attr"` ManagedElement ManagedElement `xml:"h:ManagedElement"` // The MpServer to which the policy applies. OrderOfAccess int `xml:"h:OrderOfAccess"` // This field indicates in what order will the Intel® AMT subsystem attempt to connect to the referenced MpServer when the referenced Remote Access policy is triggered. MPSType MPSType `xml:"h:MpsType"` // This field indicates if the MpServer is to be used inside or outside of the organization, or both. Default is outside (0). PolicySet PolicySet `xml:"h:PolicySet"` // The Remote Access policy rule that is currently applied to the MpServer. }
INPUTS Request Types.
type RemoteAccessPolicyAppliesToMPSResponse ¶
type RemoteAccessPolicyAppliesToMPSResponse struct { XMLName xml.Name `xml:"AMT_RemoteAccessPolicyAppliesToMPS"` ManagedElement ManagedElementResponse `xml:"ManagedElement"` // The MpServer to which the policy applies. MpsType MPSType `xml:"MpsType"` // This field indicates if the MpServer is to be used inside or outside of the organization, or both. Default is outside (0). OrderOfAccess int `xml:"OrderOfAccess"` // This field indicates in what order will the Intel® AMT subsystem attempt to connect to the referenced MpServer when the referenced Remote Access policy is triggered. PolicySet PolicySetResponse `xml:"PolicySet"` // The Remote Access policy rule that is currently applied to the MpServer. }
OUTPUTS Response Types.
type RemoteAccessPolicyRuleRequest ¶
type RemoteAccessPolicyRuleRequest struct { XMLName xml.Name `xml:"h:AddRemoteAccessPolicyRule_INPUT"` H string `xml:"xmlns:h,attr"` Trigger Trigger `xml:"h:Trigger"` // The event that will trigger the establishment of the remote connection to the MpServer. TunnelLifeTime int `xml:"h:TunnelLifeTime"` // Defines the tunnel lifetime in seconds, 0 means no lifetime- the tunnel should stay open until it is closed by CloseRemoteAccessConnection or when a different policy with higher priority needs to be processed. ExtendedData string `xml:"h:ExtendedData"` // Data associated with the policy, up to 32 bytes. The data should be in a network order. The extended data for a policy with a periodic trigger contains first a periodic type and after that the data for that type. For periodic type 0 [Interval - The CIRA connection will be established every fixed number of seconds] - the data should include a uint32 value that indicates the time period in seconds between tunnel establishments. For periodic type 1 [Daily - The CIRA connection will be established every day in a specific pre-defined time (hour and minutes)] - the data should include two uint32 values which define the wanted hour of the day and minutes of that hour. For the other triggers extended data is not defined and not needed. The length and data should be zero. }
INPUTS Request Types.
type RemoteAccessPolicyRuleResponse ¶
type RemoteAccessPolicyRuleResponse struct { XMLName xml.Name `xml:"AMT_RemoteAccessPolicyRule"` CreationClassName string `xml:"CreationClassName,omitempty"` // CreationClassName indicates the name of the class or the subclass 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. 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. ExtendedData string `xml:"ExtendedData,omitempty"` // Data associated with the policy, up to 32 bytes. The data should be in a network order. The extended data for a policy with a periodic trigger contains first a periodic type and after that the data for that type. For periodic type 0 [Interval - The CIRA connection will be established every fixed number of seconds] - the data should include a uint32 value that indicates the time period in seconds between tunnel establishments. For periodic type 1 [Daily - The CIRA connection will be established every day in a specific pre-defined time (hour and minutes)] - the data should include two uint32 values which define the wanted hour of the day and minutes of that hour. For the other triggers extended data is not defined and not needed. The length and data should be zero. PolicyRuleName string `xml:"PolicyRuleName,omitempty"` // A user-friendly name of this PolicyRule. In Intel AMT Release 6.0 and later releases value is "%s %d" where %s is the policy type ("User Initiated" / "Alert" / "Periodic") and %d is the policy handle SystemCreationClassName string `xml:"SystemCreationClassName,omitempty"` // The scoping System's CreationClassName. SystemName string `xml:"SystemName,omitempty"` // The scoping System's Name. Trigger Trigger `xml:"Trigger"` // The event that will trigger the establishment of the remote connection to the MpServer. TunnelLifeTime int `xml:"TunnelLifeTime"` // Defines the tunnel lifetime in seconds, 0 means no lifetime- the tunnel should stay open until it is closed by CloseRemoteAccessConnection or when a different policy with higher priority needs to be processed. }
OUTPUTS Response Types.
type RemoteAccessPolicyRuleSelector ¶
Property Types.
type RemoteAccessServiceResponse ¶
type RemoteAccessServiceResponse struct { XMLName xml.Name `xml:"AMT_RemoteAccessService"` 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. 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. 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. SystemCreationClassName string `xml:"SystemCreationClassName,omitempty"` // The CreationClassName of the scoping System. SystemName string `xml:"SystemName,omitempty"` // The Name of the scoping System. IsRemoteTunnelConnected bool `xml:"IsRemoteTunnelConnected,omitempty"` // Reflects the connection status of the remote tunnel. Supported starting from Intel CSME 17. RemoteTunnelKeepAliveTimeout int `xml:"RemoteTunnelKeepAliveTimeout,omitempty"` // Reflects the keep-alive timeout value of the remote tunnel (in seconds). Supported starting from Intel CSME 17. }
OUTPUTS Response Types.
type Response ¶
type Response struct { *client.Message XMLName xml.Name `xml:"Envelope"` Header message.Header `xml:"Header"` Body Body `xml:"Body"` }
OUTPUTS Response Types.
type ReturnValue ¶ added in v2.2.4
type ReturnValue int
ReturnValue is an integer enumeration that indicates the completion status of the method. A value of 0 indicates success. A non-zero value indicates an error.
const ( ReturnValueSuccess ReturnValue = 0 ReturnValueInternalError ReturnValue = 1 ReturnValueNotPermitted ReturnValue = 16 ReturnValueMaxLimitReached ReturnValue = 23 ReturnValueInvalidParameter ReturnValue = 36 ReturnValueFlashWriteLimitExceeded ReturnValue = 38 ReturnValueDuplicate ReturnValue = 2058 )
func (ReturnValue) String ¶ added in v2.2.4
func (r ReturnValue) String() string
String returns the string representation of the ReturnValue value.
type SelectorResponse ¶
type SelectorResponse struct { XMLName xml.Name `xml:"Selector"` Name string `xml:"Name,attr"` Text string `xml:",chardata"` }
OUTPUTS Response Types.
type SelectorSet ¶
type SelectorSet struct {
Selectors []Selector `xml:"c:Selector"`
}
INPUTS Request Types.
type SelectorSetResponse ¶
type SelectorSetResponse struct { XMLName xml.Name `xml:"SelectorSet"` Selectors []SelectorResponse `xml:"Selector"` }
OUTPUTS Response Types.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewRemoteAccessServiceWithClient ¶
func NewRemoteAccessServiceWithClient(wsmanMessageCreator *message.WSManMessageCreator, client client.WSMan) Service
NewRemoteAccessServiceWithClient instantiates a new Service.
func (Service) AddMPS ¶
func (service Service) AddMPS(mpServer AddMpServerRequest) (response Response, err error)
AddMPS adds a Management Presence Server to the Intel® AMT subsystem. Creates an AMT_ManagementPresenceRemoteSAP instance and an AMT_RemoteAccessCredentialContext association to a credential. This credential may be an existing AMT_PublicKeyCertificate instance (if the created MPS is configured to use mutual authentication). If the created MpServer is configured to use username password authentication, an AMT_MPSUsernamePassword instance is created and used as the associated credential.
func (Service) AddRemoteAccessPolicyRule ¶
func (service Service) AddRemoteAccessPolicyRule(remoteAccessPolicyRule RemoteAccessPolicyRuleRequest, name string) (response Response, err error)
AddRemoteAccessPolicyRule adds a Remote Access policy to the Intel® AMT subsystem. The policy defines an event that will trigger an establishment of a tunnel between AMT and a pre-configured MPS. Creates an AMT_RemoteAccessPolicyRule instance and associates it to a given list of AMT_ManagementPresenceRemoteSAP instances with AMT_PolicySetAppliesToElement association instances. Returns an XML string representing the WS-Management message to be sent to the Intel® AMT subsystem.
func (Service) Enumerate ¶
Enumerate returns an enumeration context which is used in a subsequent Pull call.