Documentation ¶
Index ¶
- Constants
- Variables
- func ParseDNSHost(host string) (*net.UDPAddr, error)
- type ANCApplyPolicyRequest
- type ANCAsset
- type ANCAssetTopicMessage
- type ANCClearPolicyRequest
- type ANCConfig
- type ANCConfigPropsProvider
- type ANCConfigSubscriber
- type ANCConfigTopic
- type ANCEndpoint
- type ANCKeyValue
- type ANCOperationStatus
- type ANCPolicy
- type ANCPolicyAction
- type ANCRest
- type ANCStatus
- type AccountActivateResponse
- type AccountCreateResponse
- type AccountState
- type AuthConfig
- type CallFinalizer
- type Controller
- type DNSConfig
- type EgressMatrix
- type EgressPolicy
- type EgressPolicyTopicMessage
- type EndpointAsset
- type EndpointAssetPropsProvider
- type EndpointAssetSubscriber
- type EndpointAssetTopic
- type Failure
- type FailureTopicMessage
- type FullResponse
- type GenericRESTCaller
- type GetEgressPoliciesResponse
- type GetSecurityGroupACLsResponse
- type GetSecurityGroupsResponse
- type GetVirtualNetworksResponse
- type Group
- type GroupTopicMessage
- type GroupType
- type Host
- type INETFamilyStrategy
- type Logger
- type MDM
- type MDMEndpoint
- type MDMEndpointType
- type MDMOSType
- type MDMPropsProvider
- type MDMRest
- type MDMSubscriber
- type MDMTopic
- type Message
- type NoResultCallFinalizer
- type NoResultResponse
- type OperationType
- type Policy
- type PolicyDownload
- type PolicyDownloadStatus
- type PolicyDownloadTopicMessage
- type Profile
- type ProfilerConfiguration
- type ProfilerConfigurationPropsProvider
- type ProfilerConfigurationRest
- type ProfilerConfigurationSubscriber
- type ProfilerConfigurationTopic
- type ProfilerTopicMessage
- type PubSub
- type PubSubEndpoint
- type PubSubPropsProvider
- type PubSubSubscriber
- type PxGridConfig
- func (c *PxGridConfig) AddHost(host string, controlPort int) *PxGridConfig
- func (c *PxGridConfig) SetAuth(username, password string) *PxGridConfig
- func (c *PxGridConfig) SetCA(ca *x509.CertPool) *PxGridConfig
- func (c *PxGridConfig) SetClientCertificate(cert *tls.Certificate) *PxGridConfig
- func (c *PxGridConfig) SetDNS(server string, family INETFamilyStrategy) *PxGridConfig
- func (c *PxGridConfig) SetDescription(desc string) *PxGridConfig
- func (c *PxGridConfig) SetInsecureTLS(insecure bool) *PxGridConfig
- func (c *PxGridConfig) SetLogger(logger Logger) *PxGridConfig
- func (c *PxGridConfig) SetNodeName(name string) *PxGridConfig
- type PxGridConsumer
- func (c *PxGridConsumer) ANCConfig() ANCConfig
- func (c *PxGridConsumer) AccessSecret(ctx context.Context, peerNodeName string) (string, error)
- func (c *PxGridConsumer) AccountActivate(ctx context.Context) (AccountActivateResponse, error)
- func (c *PxGridConsumer) AccountCreate(ctx context.Context) (AccountCreateResponse, error)
- func (c *PxGridConsumer) ClientTLSConfig() *tls.Config
- func (c *PxGridConsumer) Control() Controller
- func (c *PxGridConsumer) DialContext(ctx context.Context, network, addr string) (net.Conn, error)
- func (c *PxGridConsumer) EndpointAsset() EndpointAsset
- func (c *PxGridConsumer) MDM() MDM
- func (c *PxGridConsumer) ProfilerConfiguration() ProfilerConfiguration
- func (c *PxGridConsumer) PubSub(service string) PubSub
- func (c *PxGridConsumer) RESTRequest(ctx context.Context, fullURL string, payload any, ops RESTOptions) (*Response, error)
- func (c *PxGridConsumer) RadiusFailure() RadiusFailure
- func (c *PxGridConsumer) ServiceLookup(ctx context.Context, svc string) (ServiceLookupResponse, error)
- func (c *PxGridConsumer) SessionDirectory() SessionDirectory
- func (c *PxGridConsumer) SystemHealth() SystemHealth
- func (c *PxGridConsumer) TrustSec() TrustSec
- func (c *PxGridConsumer) TrustSecConfiguration() TrustSecConfiguration
- func (c *PxGridConsumer) TrustSecSXP() TrustSecSXP
- type PxGridService
- type RESTOptions
- type RadiusFailure
- type RadiusFailurePropsProvider
- type RadiusFailureRest
- type RadiusFailureSubscriber
- type RadiusFailureTopic
- type Request
- func (r *Request) NoAuth() *Request
- func (r *Request) Post(u string, payload interface{}) (*Response, error)
- func (r *Request) SetPassword(password string) *Request
- func (r *Request) SetResult(result interface{}) *Request
- func (r *Request) SetRootCAs(rootCAs *x509.CertPool) *Request
- func (r *Request) SetTLSConfig(tls *TLSConfig) *Request
- func (r *Request) SetUsername(username string) *Request
- type Response
- type SecurityGroup
- type SecurityGroupACL
- type SecurityGroupACLTopicMessage
- type SecurityGroupTopicMessage
- type SecurityGroupVNVlanTopicMessage
- type ServiceLookupResponse
- type ServiceNode
- type ServiceNodePicker
- type ServiceNodePickerFactory
- func IndexNodePicker(index ...int) ServiceNodePickerFactory
- func NameNodePicker(name ...string) ServiceNodePickerFactory
- func OrderedNodePicker() ServiceNodePickerFactory
- func PredicateNodePicker(predicate func(ServiceNode) bool) ServiceNodePickerFactory
- func RandomNodePicker() ServiceNodePickerFactory
- type ServiceNodeSlice
- type Session
- type SessionDirectory
- type SessionDirectoryPropsProvider
- type SessionDirectoryRest
- type SessionDirectorySubscriber
- type SessionDirectoryTopic
- type SessionState
- type SessionTopicMessage
- type Subscriber
- type Subscription
- type SupportedRESTCallDetails
- type SysHealth
- type SysPerformance
- type SystemHealth
- type SystemHealthPropsProvider
- type SystemHealthRest
- type TLSConfig
- type TrustSec
- type TrustSecConfiguration
- type TrustSecConfigurationPropsProvider
- type TrustSecConfigurationRequestFilter
- func WithEndTimestamp(endTimestamp string) TrustSecConfigurationRequestFilter
- func WithID(id string) TrustSecConfigurationRequestFilter
- func WithRecordCount(recordCount int) TrustSecConfigurationRequestFilter
- func WithStartIndex(startIndex int) TrustSecConfigurationRequestFilter
- func WithStartTimestamp(startTimestamp string) TrustSecConfigurationRequestFilter
- type TrustSecConfigurationRest
- type TrustSecConfigurationSubscriber
- type TrustSecConfigurationTopic
- type TrustSecEgressPoliciesRequestFilter
- func WithEgressPolicyEndTimestamp(endTimestamp string) TrustSecEgressPoliciesRequestFilter
- func WithEgressPolicyID(id string) TrustSecEgressPoliciesRequestFilter
- func WithEgressPolicyMatrixID(matrixID string) TrustSecEgressPoliciesRequestFilter
- func WithEgressPolicyRecordCount(recordCount int) TrustSecEgressPoliciesRequestFilter
- func WithEgressPolicyStartIndex(startIndex int) TrustSecEgressPoliciesRequestFilter
- func WithEgressPolicyStartTimestamp(startTimestamp string) TrustSecEgressPoliciesRequestFilter
- type TrustSecPropsProvider
- type TrustSecSXP
- type TrustSecSXPBinding
- type TrustSecSXPBindingTopicMessage
- type TrustSecSXPPropsProvider
- type TrustSecSXPRest
- type TrustSecSXPSubscriber
- type TrustSecSXPTopic
- type TrustSecSubscriber
- type TrustSecTopic
- type VirtualNetwork
- type VirtualNetworkTopicMessage
Constants ¶
View Source
const ( MDMEndpointTypeNonCompliant MDMEndpointType = "NON_COMPLIANT" MDMEndpointTypeRegistered MDMEndpointType = "REGISTERED" MDMEndpointTypeDisconnected MDMEndpointType = "DISCONNECTED" MDMOSTypeAndroid MDMOSType = "ANDROID" MDMOSTypeIOS MDMOSType = "IOS" MDMOSTypeWindows MDMOSType = "WINDOWS" MDMTopicEndpoint MDMTopic = "endpointTopic" MDMServiceName = "com.cisco.ise.mdm" )
View Source
const ( SessionStateAuthenticating SessionState = "AUTHENTICATING" SessionStateAuthenticated SessionState = "AUTHENTICATED" SessionStatePostured SessionState = "POSTURED" SessionStateStarted SessionState = "STARTED" SessionStateDisconnected SessionState = "DISCONNECTED" GroupTypeActiveDirectory GroupType = "ACTIVE_DIRECTORY" GroupTypeIdentity GroupType = "IDENTITY" GroupTypeExternal GroupType = "EXTERNAL" GroupTypeInterestingActiveDirectory GroupType = "INTERESTING_ACTIVE_DIRECTORY" SessionDirectoryTopicSession SessionDirectoryTopic = "sessionTopic" SessionDirectoryTopicSessionAll SessionDirectoryTopic = "sessionTopicAll" SessionDirectoryTopicGroup SessionDirectoryTopic = "groupTopic" SessionDirectoryServiceName = "com.cisco.ise.session" )
View Source
const ( PolicyDownloadStatusSuccess PolicyDownloadStatus = "SUCCESS" PolicyDownloadStatusFailure PolicyDownloadStatus = "FAILURE" TrustSecTopicPolicyDownload TrustSecTopic = "policyDownloadTopic" TrustSecServiceName = "com.cisco.ise.trustsec" )
View Source
const (
SystemHealthServiceName = "com.cisco.ise.system"
)
Variables ¶
View Source
var ( ErrNoHosts = errors.New("no hosts available") )
View Source
var ( ErrCreateForbidden = errors.New("create account forbidden") ErrCreateConflict = errors.New("create account conflict") )
View Source
var ( ErrPropertyNotFound = errors.New("property not found") ErrPropertyNotString = errors.New("property is not a string") ErrNoNodePicked = errors.New("no node picked") ErrNoNodes = errors.New("no nodes available") ErrNodeNotFound = errors.New("node not found") )
View Source
var DefaultINETFamilyStrategy = IPv46
View Source
var (
ErrInvalidInput = fmt.Errorf("invalid input")
)
Functions ¶
Types ¶
type ANCApplyPolicyRequest ¶
type ANCApplyPolicyRequest struct { Policy string `json:"policy"` MACAddress string `json:"macAddress"` NASIPAddress string `json:"nasIpAddress"` SessionID string `json:"sessionId,omitempty"` NASPortID string `json:"nasPortId,omitempty"` IPAddress string `json:"ipAddress,omitempty"` UserName string `json:"userName,omitempty"` }
type ANCAsset ¶
type ANCAsset struct { AssetId string `json:"assetId"` AssetName string `json:"assetName"` AssetIPAddress string `json:"assetIpAddress"` AssetMACAddress string `json:"assetMacAddress"` AssetVendor string `json:"assetVendor"` AssetProductID string `json:"assetProductId"` AssetSerialNumber string `json:"assetSerialNumber"` AssetDeviceType string `json:"assetDeviceType"` AssetSWRevision string `json:"assetSwRevision"` AssetHWRevision string `json:"assetHwRevision"` AssetProtocol string `json:"assetProtocol"` AssetCustomAttributes []ANCKeyValue `json:"assetCustomAttributes"` AssetConnectedLinks []ANCKeyValue `json:"assetConnectedLinks"` }
type ANCAssetTopicMessage ¶
type ANCAssetTopicMessage struct { OperationType OperationType `json:"opType"` Asset ANCAsset `json:"asset"` }
type ANCClearPolicyRequest ¶
type ANCConfig ¶
type ANCConfig interface { PxGridService Rest() ANCRest ANCConfigSubscriber Properties() ANCConfigPropsProvider }
func NewPxGridANCConfig ¶
func NewPxGridANCConfig(ctrl *PxGridConsumer) ANCConfig
type ANCConfigPropsProvider ¶
type ANCConfigSubscriber ¶
type ANCConfigSubscriber interface {
OnStatusTopic() Subscriber[ANCOperationStatus]
}
type ANCConfigTopic ¶
type ANCConfigTopic string
const ( ANCConfigTopicStatus ANCConfigTopic = "statusTopic" ANCConfigServiceName = "com.cisco.ise.config.anc" )
type ANCEndpoint ¶
type ANCKeyValue ¶
type ANCOperationStatus ¶
type ANCPolicy ¶
type ANCPolicy struct { Name string `json:"name"` Actions []ANCPolicyAction `json:"actions"` ID string `json:"id"` }
type ANCPolicyAction ¶
type ANCPolicyAction string
const ( ANCActionQuarantine ANCPolicyAction = "QUARANTINE" ANCActionShutdown ANCPolicyAction = "SHUT_DOWN" ANCActionPortBounce ANCPolicyAction = "PORT_BOUNCE" ANCActionReAuthenticate ANCPolicyAction = "RE_AUTHENTICATE" )
func (ANCPolicyAction) Valid ¶
func (a ANCPolicyAction) Valid() bool
type ANCRest ¶ added in v0.6.0
type ANCRest interface { GetPolicies() CallFinalizer[*[]ANCPolicy] GetPolicyByName(name string) CallFinalizer[*ANCPolicy] CreatePolicy(policy ANCPolicy) NoResultCallFinalizer DeletePolicyByName(name string) NoResultCallFinalizer GetEndpoints() CallFinalizer[*[]ANCEndpoint] GetEndpointPolicies() CallFinalizer[*[]ANCEndpoint] GetEndpointByMAC(mac string) CallFinalizer[*ANCEndpoint] GetEndpointByNasIPAddress(mac, nasIP string) CallFinalizer[*ANCEndpoint] ApplyEndpointByIPAddress(ip, policyName string) CallFinalizer[*ANCOperationStatus] ApplyEndpointByMACAddress(mac, policyName string) CallFinalizer[*ANCOperationStatus] ClearEndpointByIPAddress(ip, policyName string) CallFinalizer[*ANCOperationStatus] ClearEndpointByMACAddress(mac, policyName string) CallFinalizer[*ANCOperationStatus] ApplyEndpointPolicy(request ANCApplyPolicyRequest) CallFinalizer[*ANCOperationStatus] ClearEndpointPolicy(request ANCClearPolicyRequest) CallFinalizer[*ANCOperationStatus] GetOperationStatus(operationID string) CallFinalizer[*ANCOperationStatus] }
type AccountActivateResponse ¶
type AccountActivateResponse struct { AccountState AccountState `json:"accountState"` Version string `json:"version"` }
func (AccountActivateResponse) IsDisabled ¶
func (a AccountActivateResponse) IsDisabled() bool
func (AccountActivateResponse) IsEnabled ¶
func (a AccountActivateResponse) IsEnabled() bool
func (AccountActivateResponse) IsPending ¶
func (a AccountActivateResponse) IsPending() bool
type AccountCreateResponse ¶
type AccountState ¶
type AccountState string
const ( AccountStatePending AccountState = "PENDING" AccountStateDisabled AccountState = "DISABLED" AccountStateEnabled AccountState = "ENABLED" )
type AuthConfig ¶
type CallFinalizer ¶
type CallFinalizer[T any] interface { Do(ctx context.Context) (FullResponse[T], error) DoOnNode(ctx context.Context, node int) (FullResponse[T], error) DoOnNodeByName(ctx context.Context, nodeName string) (FullResponse[T], error) DoOnNodes(ctx context.Context, nodes ...int) (FullResponse[T], error) }
type Controller ¶
type Controller interface { RESTRequest(ctx context.Context, fullURL string, payload any, ops RESTOptions) (*Response, error) AccountCreate(ctx context.Context) (AccountCreateResponse, error) AccountActivate(ctx context.Context) (AccountActivateResponse, error) ServiceLookup(ctx context.Context, svc string) (ServiceLookupResponse, error) AccessSecret(ctx context.Context, peerNodeName string) (string, error) }
type DNSConfig ¶
type DNSConfig struct { Server string FamilyStrategy INETFamilyStrategy }
type EgressMatrix ¶
type EgressPolicy ¶
type EgressPolicy struct { ID string `json:"id"` Name string `json:"name"` MatrixId string `json:"matrixId"` Status string `json:"status"` Description string `json:"description"` SourceSecurityGroupID string `json:"sourceSecurityGroupId"` DestinationSecurityGroupID string `json:"destinationSecurityGroupId"` SGACLIDs []string `json:"sgaclIds"` Timestamp string `json:"timestamp"` }
type EgressPolicyTopicMessage ¶
type EgressPolicyTopicMessage struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` SourceSGTID string `json:"sourceSgtId"` SourceSGTName string `json:"sourceSgtName"` DestinationSGTID string `json:"destinationSgtId"` DestinationSGTName string `json:"destinationSgtName"` MatrixCellStatus string `json:"matrixCellStatus"` SGACLIDs []string `json:"sgaclIds"` DefaultRule string `json:"defaultRule"` Sequence int `json:"sequence"` Deleted bool `json:"deleted"` Timestamp string `json:"timestamp"` }
type EndpointAsset ¶
type EndpointAsset interface { PxGridService EndpointAssetSubscriber Properties() EndpointAssetPropsProvider }
func NewPxGridEndpointAsset ¶
func NewPxGridEndpointAsset(ctrl *PxGridConsumer) EndpointAsset
type EndpointAssetSubscriber ¶
type EndpointAssetSubscriber interface {
OnAssetTopic() Subscriber[ANCAssetTopicMessage]
}
type EndpointAssetTopic ¶
type EndpointAssetTopic string
const ( EndpointAssetTopicAsset EndpointAssetTopic = "assetTopic" EndpointAssetServiceName = "com.cisco.endpoint.asset" )
type Failure ¶
type Failure struct { ID string `json:"id"` Timestamp string `json:"timestamp"` FailureReason string `json:"failureReason"` UserName string `json:"userName"` ServerName string `json:"serverName"` CallingStationID string `json:"callingStationId"` AuditSessionID string `json:"auditSessionId"` NASIPAddress string `json:"nasIpAddress"` NASPortID string `json:"nasPortId"` NASPortType string `json:"nasPortType"` IPAddresses []string `json:"ipAddresses"` MACAddress string `json:"macAddress"` MessageCode int `json:"messageCode"` DestinationIPAddress string `json:"destinationIpAddress"` UserType string `json:"userType"` AccessService string `json:"accessService"` IdentityStore string `json:"identityStore"` IdentityGroup string `json:"identityGroup"` AuthenticationMethod string `json:"authenticationMethod"` AuthenticationProtocol string `json:"authenticationProtocol"` ServiceType string `json:"serviceType"` NetworkDeviceName string `json:"networkDeviceName"` DeviceType string `json:"deviceType"` Location string `json:"location"` SelectedAznProfiles string `json:"selectedAznProfiles"` PostureStatus string `json:"postureStatus"` CTSSecurityGroup string `json:"ctsSecurityGroup"` Response string `json:"response"` ResponseTime int `json:"responseTime"` ExecutionSteps string `json:"executionSteps"` CredentialCheck string `json:"credentialCheck"` EndpointProfile string `json:"endpointProfile"` MDMServerName string `json:"mdmServerName"` PolicySetName string `json:"policySetName"` AuthorizationRule string `json:"authorizationRule"` MSEResponseTime string `json:"mseResponseTime"` MSEServerName string `json:"mseServerName"` OriginalCallingStationID string `json:"originalCallingStationId"` }
type FailureTopicMessage ¶
type FullResponse ¶ added in v0.10.0
type GenericRESTCaller ¶ added in v0.7.0
type GetEgressPoliciesResponse ¶
type GetEgressPoliciesResponse struct { TotalCount int `json:"totalCount"` EgressPolicies []EgressPolicy `json:"egressPolicies"` DeletedEgressPolicies []EgressPolicy `json:"deletedEgressPolicies"` }
type GetSecurityGroupACLsResponse ¶
type GetSecurityGroupACLsResponse struct { TotalCount int `json:"totalCount"` SecurityGroupACLs []SecurityGroupACL `json:"securityGroupAcls"` DeleteSecurityGroupACLs []SecurityGroupACL `json:"deletedSecurityGroupAcls"` }
type GetSecurityGroupsResponse ¶
type GetSecurityGroupsResponse struct { TotalCount int `json:"totalCount"` SecurityGroups []SecurityGroup `json:"securityGroups"` DeletedSecurityGroups []SecurityGroup `json:"deletedSecurityGroups"` }
type GetVirtualNetworksResponse ¶
type GetVirtualNetworksResponse struct { TotalCount int `json:"totalCount"` VirtualNetworks []VirtualNetwork `json:"virtualNetworks"` DeletedVirtualNetworks []VirtualNetwork `json:"deletedVirtualNetworks"` }
type GroupTopicMessage ¶
type GroupTopicMessage struct {
UserGroups []Group `json:"userGroups"`
}
type INETFamilyStrategy ¶
type INETFamilyStrategy int
const ( IPUnknown INETFamilyStrategy = iota IPv4 IPv46 IPv64 IPv6 )
type Logger ¶
type Logger interface { Debug(msg string, args ...any) DebugContext(ctx context.Context, msg string, args ...any) Error(msg string, args ...any) ErrorContext(ctx context.Context, msg string, args ...any) Info(msg string, args ...any) InfoContext(ctx context.Context, msg string, args ...any) Warn(msg string, args ...any) WarnContext(ctx context.Context, msg string, args ...any) With(args ...any) Logger }
type MDM ¶
type MDM interface { PxGridService Rest() MDMRest MDMSubscriber Properties() MDMPropsProvider }
func NewPxGridMDM ¶
func NewPxGridMDM(ctrl *PxGridConsumer) MDM
type MDMEndpoint ¶
type MDMEndpoint struct { MACAddress string `json:"macAddress"` OSVersion string `json:"osVersion"` Registered bool `json:"registered"` Compliant bool `json:"compliant"` DiskEncrypted bool `json:"diskEncrypted"` JailBroken bool `json:"jailBroken"` PinLocked bool `json:"pinLocked"` Model string `json:"model"` Manufacturer string `json:"manufacturer"` IMEI string `json:"imei"` MEID string `json:"meid"` UDID string `json:"udid"` SerialNumber string `json:"serialNumber"` Location string `json:"location"` DeviceManager string `json:"deviceManager"` LastSyncTime string `json:"lastSyncTime"` }
type MDMEndpointType ¶
type MDMEndpointType string
type MDMPropsProvider ¶
type MDMRest ¶ added in v0.6.0
type MDMRest interface { GetEndpoints(filter *MDMEndpoint) CallFinalizer[*[]MDMEndpoint] GetEndpointByMacAddress(macAddress string) CallFinalizer[*MDMEndpoint] GetEndpointsByType(endpointType MDMEndpointType) CallFinalizer[*[]MDMEndpoint] GetEndpointsByOsType(osType MDMOSType) CallFinalizer[*[]MDMEndpoint] }
type MDMSubscriber ¶
type MDMSubscriber interface {
OnEndpointTopic() Subscriber[MDMEndpoint]
}
type NoResultCallFinalizer ¶
type NoResultCallFinalizer interface { Do(ctx context.Context) (NoResultResponse, error) DoOnNode(ctx context.Context, node int) (NoResultResponse, error) DoOnNodeByName(ctx context.Context, nodeName string) (NoResultResponse, error) DoOnNodes(ctx context.Context, nodes ...int) (NoResultResponse, error) }
type NoResultResponse ¶ added in v0.10.0
type NoResultResponse struct {
StatusCode int
}
type OperationType ¶
type OperationType string
const ( OperationTypeCreate OperationType = "CREATE" OperationTypeUpdate OperationType = "UPDATE" OperationTypeDelete OperationType = "DELETE" )
type Policy ¶
type Policy struct { SourceSGT int `json:"sourceSgt"` SourceSGTGenerationID string `json:"sourceSgtGenerationId"` DestinationSGT int `json:"destinationSgt"` DestinationSGTGenerationID string `json:"destinationSgtGenerationId"` SGACLName string `json:"sgaclName"` SGACLGenerationID string `json:"sgaclGenerationId"` }
type PolicyDownload ¶
type PolicyDownload struct { Timestamp string `json:"timestamp"` ServerName string `json:"serverName"` Status PolicyDownloadStatus `json:"status"` FailureReason string `json:"failureReason"` NASIPAddress string `json:"nasIpAddress"` MatrixName string `json:"matrixName"` RBACLSourceList string `json:"rbaclSourceList"` Policies []Policy `json:"policies"` }
type PolicyDownloadStatus ¶
type PolicyDownloadStatus string
type PolicyDownloadTopicMessage ¶
type PolicyDownloadTopicMessage struct {
PolicyDownloads []PolicyDownload `json:"policyDownloads"`
}
type ProfilerConfiguration ¶
type ProfilerConfiguration interface { PxGridService Rest() ProfilerConfigurationRest ProfilerConfigurationSubscriber Properties() ProfilerConfigurationPropsProvider }
func NewPxGridProfilerConfiguration ¶
func NewPxGridProfilerConfiguration(ctrl *PxGridConsumer) ProfilerConfiguration
type ProfilerConfigurationRest ¶ added in v0.6.0
type ProfilerConfigurationRest interface {
GetProfiles() CallFinalizer[*[]Profile]
}
type ProfilerConfigurationSubscriber ¶
type ProfilerConfigurationSubscriber interface {
OnTopic() Subscriber[ProfilerTopicMessage]
}
type ProfilerConfigurationTopic ¶
type ProfilerConfigurationTopic string
const ( ProfilerConfigurationTopicProfile ProfilerConfigurationTopic = "topic" ProfilerConfigurationServiceName = "com.cisco.ise.config.profiler" )
type ProfilerTopicMessage ¶
type ProfilerTopicMessage struct { OperationType OperationType `json:"operation"` Profile Profile `json:"profile"` }
type PubSub ¶
type PubSub interface { PxGridService PubSubSubscriber Properties() PubSubPropsProvider }
func NewPxGridPubSub ¶
func NewPxGridPubSub(ctrl *PxGridConsumer, svc string) PubSub
type PubSubEndpoint ¶
type PubSubEndpoint struct {
// contains filtered or unexported fields
}
func (*PubSubEndpoint) Close ¶
func (e *PubSubEndpoint) Close() error
func (*PubSubEndpoint) Disconnect ¶
func (e *PubSubEndpoint) Disconnect() error
type PubSubPropsProvider ¶
type PubSubSubscriber ¶
type PubSubSubscriber interface {
Subscribe(ctx context.Context, picker ServiceNodePickerFactory, topic string) (*stomp.Subscription, error)
}
type PxGridConfig ¶
type PxGridConfig struct { Hosts []Host Auth AuthConfig NodeName string Description string TLS TLSConfig DNS DNSConfig Logger Logger }
func NewPxGridConfig ¶
func NewPxGridConfig() *PxGridConfig
func (*PxGridConfig) AddHost ¶
func (c *PxGridConfig) AddHost(host string, controlPort int) *PxGridConfig
func (*PxGridConfig) SetAuth ¶
func (c *PxGridConfig) SetAuth(username, password string) *PxGridConfig
func (*PxGridConfig) SetCA ¶
func (c *PxGridConfig) SetCA(ca *x509.CertPool) *PxGridConfig
func (*PxGridConfig) SetClientCertificate ¶
func (c *PxGridConfig) SetClientCertificate(cert *tls.Certificate) *PxGridConfig
func (*PxGridConfig) SetDNS ¶
func (c *PxGridConfig) SetDNS(server string, family INETFamilyStrategy) *PxGridConfig
func (*PxGridConfig) SetDescription ¶
func (c *PxGridConfig) SetDescription(desc string) *PxGridConfig
func (*PxGridConfig) SetInsecureTLS ¶
func (c *PxGridConfig) SetInsecureTLS(insecure bool) *PxGridConfig
func (*PxGridConfig) SetLogger ¶
func (c *PxGridConfig) SetLogger(logger Logger) *PxGridConfig
func (*PxGridConfig) SetNodeName ¶
func (c *PxGridConfig) SetNodeName(name string) *PxGridConfig
type PxGridConsumer ¶
type PxGridConsumer struct {
// contains filtered or unexported fields
}
func NewPxGridConsumer ¶
func NewPxGridConsumer(cfg *PxGridConfig) (*PxGridConsumer, error)
func (*PxGridConsumer) ANCConfig ¶
func (c *PxGridConsumer) ANCConfig() ANCConfig
func (*PxGridConsumer) AccessSecret ¶
func (*PxGridConsumer) AccountActivate ¶
func (c *PxGridConsumer) AccountActivate(ctx context.Context) (AccountActivateResponse, error)
func (*PxGridConsumer) AccountCreate ¶
func (c *PxGridConsumer) AccountCreate(ctx context.Context) (AccountCreateResponse, error)
func (*PxGridConsumer) ClientTLSConfig ¶
func (c *PxGridConsumer) ClientTLSConfig() *tls.Config
func (*PxGridConsumer) Control ¶
func (c *PxGridConsumer) Control() Controller
func (*PxGridConsumer) DialContext ¶
func (*PxGridConsumer) EndpointAsset ¶
func (c *PxGridConsumer) EndpointAsset() EndpointAsset
func (*PxGridConsumer) MDM ¶
func (c *PxGridConsumer) MDM() MDM
func (*PxGridConsumer) ProfilerConfiguration ¶
func (c *PxGridConsumer) ProfilerConfiguration() ProfilerConfiguration
func (*PxGridConsumer) PubSub ¶
func (c *PxGridConsumer) PubSub(service string) PubSub
func (*PxGridConsumer) RESTRequest ¶
func (c *PxGridConsumer) RESTRequest(ctx context.Context, fullURL string, payload any, ops RESTOptions) (*Response, error)
func (*PxGridConsumer) RadiusFailure ¶
func (c *PxGridConsumer) RadiusFailure() RadiusFailure
func (*PxGridConsumer) ServiceLookup ¶
func (c *PxGridConsumer) ServiceLookup(ctx context.Context, svc string) (ServiceLookupResponse, error)
func (*PxGridConsumer) SessionDirectory ¶
func (c *PxGridConsumer) SessionDirectory() SessionDirectory
func (*PxGridConsumer) SystemHealth ¶
func (c *PxGridConsumer) SystemHealth() SystemHealth
func (*PxGridConsumer) TrustSec ¶
func (c *PxGridConsumer) TrustSec() TrustSec
func (*PxGridConsumer) TrustSecConfiguration ¶
func (c *PxGridConsumer) TrustSecConfiguration() TrustSecConfiguration
func (*PxGridConsumer) TrustSecSXP ¶
func (c *PxGridConsumer) TrustSecSXP() TrustSecSXP
type PxGridService ¶
type PxGridService interface { Name() string Nodes() []ServiceNode Lookup(ctx context.Context) error UpdateSecrets(ctx context.Context) error CheckNodes(ctx context.Context) error FindProperty(ctx context.Context, property string, nodePick ...ServiceNodePickerFactory) (any, error) FindNodeIndexByName(name string) (int, error) On(topicProperty string) Subscriber[any] GenericRESTCaller }
type RESTOptions ¶
type RESTOptions struct {
// contains filtered or unexported fields
}
type RadiusFailure ¶
type RadiusFailure interface { PxGridService Rest() RadiusFailureRest RadiusFailureSubscriber Properties() RadiusFailurePropsProvider }
func NewPxGridRadiusFailure ¶
func NewPxGridRadiusFailure(ctrl *PxGridConsumer) RadiusFailure
type RadiusFailureRest ¶ added in v0.6.0
type RadiusFailureSubscriber ¶
type RadiusFailureSubscriber interface {
OnFailureTopic() Subscriber[FailureTopicMessage]
}
type RadiusFailureTopic ¶
type RadiusFailureTopic string
const ( RadiusFailureTopicFailure RadiusFailureTopic = "failureTopic" RadiusFailureServiceName = "com.cisco.ise.radius" )
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
func (*Request) SetPassword ¶
SetPassword sets the password for the request.
func (*Request) SetRootCAs ¶
SetRootCAs sets the root CAs for the request.
func (*Request) SetTLSConfig ¶
SetTLSConfig sets the TLS configuration for the request.
func (*Request) SetUsername ¶
SetUsername sets the username for the request.
type SecurityGroup ¶
type SecurityGroupACL ¶
type SecurityGroupACL struct { ID string `json:"id"` IsDeleted bool `json:"isDeleted"` Name string `json:"name"` Description string `json:"description"` IPVersion string `json:"ipVersion"` ACL string `json:"acl"` ModelledContent any `json:"modelledContent"` GenerationID string `json:"generationId"` Timestamp string `json:"timestamp"` }
type SecurityGroupACLTopicMessage ¶
type SecurityGroupACLTopicMessage struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` IPVersion string `json:"ipVersion"` ACL string `json:"acl"` ModelledContent any `json:"modelledContent"` GenerationID string `json:"generationId"` IsReadOnly bool `json:"isReadOnly"` Sequence int `json:"sequence"` Deleted bool `json:"deleted"` Timestamp string `json:"timestamp"` }
type SecurityGroupTopicMessage ¶
type SecurityGroupTopicMessage struct { Sequence int `json:"sequence"` OperationType OperationType `json:"operation"` SecurityGroup SecurityGroup `json:"securityGroup"` }
type SecurityGroupVNVlanTopicMessage ¶
type SecurityGroupVNVlanTopicMessage any
type ServiceLookupResponse ¶
type ServiceLookupResponse struct {
Services []ServiceNode `json:"services"`
}
type ServiceNode ¶
type ServiceNodePicker ¶
type ServiceNodePicker interface {
PickNode() (*ServiceNode, bool, error)
}
type ServiceNodePickerFactory ¶
type ServiceNodePickerFactory func(ServiceNodeSlice) ServiceNodePicker
func IndexNodePicker ¶
func IndexNodePicker(index ...int) ServiceNodePickerFactory
func NameNodePicker ¶
func NameNodePicker(name ...string) ServiceNodePickerFactory
func OrderedNodePicker ¶
func OrderedNodePicker() ServiceNodePickerFactory
func PredicateNodePicker ¶
func PredicateNodePicker(predicate func(ServiceNode) bool) ServiceNodePickerFactory
func RandomNodePicker ¶
func RandomNodePicker() ServiceNodePickerFactory
type ServiceNodeSlice ¶
type ServiceNodeSlice []ServiceNode
func (ServiceNodeSlice) GetProperty ¶
func (s ServiceNodeSlice) GetProperty(name string) (any, error)
func (ServiceNodeSlice) GetPropertyString ¶
func (s ServiceNodeSlice) GetPropertyString(name string) (string, error)
type Session ¶
type Session struct { Timestamp string `json:"timestamp"` State SessionState `json:"state"` MacAddress string `json:"macAddress"` IPAddresses []string `json:"ipAddresses"` CallingStationID string `json:"callingStationId"` CalledStationID string `json:"calledStationId"` AuditSessionID string `json:"auditSessionId"` UserName string `json:"userName"` NasIPAddress string `json:"nasIpAddress"` NasPortID string `json:"nasPortId"` NasPortType string `json:"nasPortType"` NasIdentifier string `json:"nasIdentifier"` SelectedAuthzProfiles []string `json:"selectedAuthzProfiles"` PostureStatus string `json:"postureStatus"` EndpointProfile string `json:"endpointProfile"` EndpointOperatingSystem string `json:"endpointOperatingSystem"` CTSSecurityGroup string `json:"ctsSecurityGroup"` ADNormalizedUser string `json:"adNormalizedUser"` ADUserDomainName string `json:"adUserDomainName"` ADHostDomainName string `json:"adHostDomainName"` ADUserNetBiosName string `json:"adUserNetBiosName"` ADHostNetBiosName string `json:"adHostNetBiosName"` ADUserResolvedIdentities string `json:"adUserResolvedIdentities"` ADUserResolvedDNS string `json:"adUserResolvedDns"` ADHostResolvedIdentities string `json:"adHostResolvedIdentities"` ADHostResolvedDNS string `json:"adHostResolvedDns"` ADUserSamAccountName string `json:"adUserSamAccountName"` ADHostSamAccountName string `json:"adHostSamAccountName"` ADUserQualifiedName string `json:"adUserQualifiedName"` ADHostQualifiedName string `json:"adHostQualifiedName"` Providers []string `json:"providers"` EndpointCheckResult string `json:"endpointCheckResult"` EndpointCheckTime string `json:"endpointCheckTime"` IdentitySourcePortStart string `json:"identitySourcePortStart"` IdentitySourcePortEnd string `json:"identitySourcePortEnd"` IdentitySourcePortFirst string `json:"identitySourcePortFirst"` TerminalServerAgentID string `json:"terminalServerAgentId"` IsMachineAuthentication string `json:"isMachineAuthentication"` ServiceType string `json:"serviceType"` TunnelPrivateGroupID string `json:"tunnelPrivateGroupId"` AirespaceWlanID string `json:"airespaceWlanId"` NetworkDeviceProfileName string `json:"networkDeviceProfileName"` RadiusFlowType string `json:"radiusFlowType"` SSID string `json:"ssid"` ANCPolicy string `json:"ancPolicy"` MDMMacAddress string `json:"mdmMacAddress"` MDMOSVersion string `json:"mdmOsVersion"` MDMRegistered bool `json:"mdmRegistered"` MDMCompliant bool `json:"mdmCompliant"` MDMDiskEncrypted bool `json:"mdmDiskEncrypted"` MDMJailBroken bool `json:"mdmJailBroken"` MDMPinLocked bool `json:"mdmPinLocked"` MDMModel string `json:"mdmModel"` MDMManufacturer string `json:"mdmManufacturer"` MDMIMEI string `json:"mdmImei"` MDMMEID string `json:"mdmMeid"` MDMUDID string `json:"mdmUdid"` MDMSerialNumber string `json:"mdmSerialNumber"` MDMLocation string `json:"mdmLocation"` MDMDeviceManager string `json:"mdmDeviceManager"` MDMLastSyncTime string `json:"mdmLastSyncTime"` VirtualNetwork string `json:"virtualNetwork"` }
type SessionDirectory ¶
type SessionDirectory interface { PxGridService Rest() SessionDirectoryRest SessionDirectorySubscriber Properties() SessionDirectoryPropsProvider }
func NewPxGridSessionDirectory ¶
func NewPxGridSessionDirectory(ctrl *PxGridConsumer) SessionDirectory
type SessionDirectoryRest ¶ added in v0.6.0
type SessionDirectoryRest interface { GetSessions(startTimestamp string, filter any) CallFinalizer[*[]Session] GetSessionsForRecovery(startTimestamp, endTimestamp string) CallFinalizer[*[]Session] GetSessionByIPAddress(ipAddress string) CallFinalizer[*Session] GetSessionByMacAddress(macAddress string) CallFinalizer[*Session] GetUserGroups(filter any) CallFinalizer[*[]Group] GetUserGroupByUserName(userName string) CallFinalizer[*[]Group] }
type SessionDirectorySubscriber ¶
type SessionDirectorySubscriber interface { OnSessionTopic() Subscriber[SessionTopicMessage] OnSessionTopicAll() Subscriber[SessionTopicMessage] OnGroupTopic() Subscriber[GroupTopicMessage] }
type SessionDirectoryTopic ¶
type SessionDirectoryTopic string
type SessionState ¶
type SessionState string
type SessionTopicMessage ¶
type Subscriber ¶
type Subscriber[T any] interface { WithServiceNodePicker(picker ServiceNodePickerFactory) Subscriber[T] WithPubSubNodePicker(picker ServiceNodePickerFactory) Subscriber[T] WithExplicitPubSub(pubsub PubSub) Subscriber[T] Subscribe(ctx context.Context) (*Subscription[T], error) }
type Subscription ¶
func (*Subscription[T]) Read ¶
func (s *Subscription[T]) Read() (T, error)
type SysHealth ¶
type SysHealth struct { Timestamp string `json:"timestamp"` ServerName string `json:"serverName"` IOWait float64 `json:"ioWait"` CPUUsage float64 `json:"cpuUsage"` MemoryUsage float64 `json:"memoryUsage"` DiskUsageRoot float64 `json:"diskUsageRoot"` DiskUsageOpt float64 `json:"diskUsageOpt"` LoadAverage float64 `json:"loadAverage"` NetworkSent float64 `json:"networkSent"` NetworkReceived float64 `json:"networkReceived"` }
type SysPerformance ¶
type SystemHealth ¶
type SystemHealth interface { PxGridService Rest() SystemHealthRest Properties() SystemHealthPropsProvider }
func NewPxGridSystemHealth ¶
func NewPxGridSystemHealth(ctrl *PxGridConsumer) SystemHealth
type SystemHealthRest ¶ added in v0.6.0
type TLSConfig ¶
type TLSConfig struct { ClientCertificate *tls.Certificate InsecureTLS bool CA *x509.CertPool }
type TrustSec ¶
type TrustSec interface { PxGridService TrustSecSubscriber Properties() TrustSecPropsProvider }
func NewPxGridTrustSec ¶
func NewPxGridTrustSec(ctrl *PxGridConsumer) TrustSec
type TrustSecConfiguration ¶
type TrustSecConfiguration interface { PxGridService Rest() TrustSecConfigurationRest TrustSecConfigurationSubscriber Properties() TrustSecConfigurationPropsProvider }
func NewPxGridTrustSecConfiguration ¶
func NewPxGridTrustSecConfiguration(ctrl *PxGridConsumer) TrustSecConfiguration
type TrustSecConfigurationPropsProvider ¶
type TrustSecConfigurationPropsProvider interface { RestBaseURL() (string, error) WSPubsubService() (string, error) SecurityGroupTopic() (string, error) SecurityGroupACLTopic() (string, error) SecurityGroupVNVlanTopic() (string, error) VirtualNetworkTopic() (string, error) EgressPolicyTopic() (string, error) }
type TrustSecConfigurationRequestFilter ¶
type TrustSecConfigurationRequestFilter func(*trustSecConfigurationRequestFilter)
func WithEndTimestamp ¶
func WithEndTimestamp(endTimestamp string) TrustSecConfigurationRequestFilter
func WithID ¶
func WithID(id string) TrustSecConfigurationRequestFilter
func WithRecordCount ¶
func WithRecordCount(recordCount int) TrustSecConfigurationRequestFilter
func WithStartIndex ¶
func WithStartIndex(startIndex int) TrustSecConfigurationRequestFilter
func WithStartTimestamp ¶
func WithStartTimestamp(startTimestamp string) TrustSecConfigurationRequestFilter
type TrustSecConfigurationRest ¶ added in v0.6.0
type TrustSecConfigurationRest interface { GetSecurityGroups(filters ...TrustSecConfigurationRequestFilter) CallFinalizer[*GetSecurityGroupsResponse] GetSecurityGroupACLs(filters ...TrustSecConfigurationRequestFilter) CallFinalizer[*GetSecurityGroupACLsResponse] GetVirtualNetwork(filters ...TrustSecConfigurationRequestFilter) CallFinalizer[*GetVirtualNetworksResponse] GetEgressPolicies(filters ...TrustSecEgressPoliciesRequestFilter) CallFinalizer[*GetEgressPoliciesResponse] GetEgressMatrices() CallFinalizer[*[]EgressMatrix] }
type TrustSecConfigurationSubscriber ¶
type TrustSecConfigurationSubscriber interface { OnSecurityGroupTopic() Subscriber[SecurityGroupTopicMessage] OnSecurityGroupACLTopic() Subscriber[SecurityGroupACLTopicMessage] OnSecurityGroupVNVlanTopic() Subscriber[SecurityGroupVNVlanTopicMessage] OnVirtualNetworkTopic() Subscriber[VirtualNetworkTopicMessage] OnEgressPolicyTopic() Subscriber[EgressPolicyTopicMessage] }
type TrustSecConfigurationTopic ¶
type TrustSecConfigurationTopic string
const ( TrustSecConfigurationTopicSecurityGroup TrustSecConfigurationTopic = "securityGroupTopic" TrustSecConfigurationTopicSecurityGroupACL TrustSecConfigurationTopic = "securityGroupAclTopic" TrustSecConfigurationTopicSecurityGroupVNVlan TrustSecConfigurationTopic = "securityGroupVnVlanTopic" TrustSecConfigurationTopicVirtualNetwork TrustSecConfigurationTopic = "virtualnetworkTopic" TrustSecConfigurationTopicEgressPolicy TrustSecConfigurationTopic = "egressPolicyTopic" TrustSecConfigurationServiceName = "com.cisco.ise.config.trustsec" )
type TrustSecEgressPoliciesRequestFilter ¶
type TrustSecEgressPoliciesRequestFilter func(*trustSecEgressPoliciesRequestFilter)
func WithEgressPolicyEndTimestamp ¶
func WithEgressPolicyEndTimestamp(endTimestamp string) TrustSecEgressPoliciesRequestFilter
func WithEgressPolicyID ¶
func WithEgressPolicyID(id string) TrustSecEgressPoliciesRequestFilter
func WithEgressPolicyMatrixID ¶
func WithEgressPolicyMatrixID(matrixID string) TrustSecEgressPoliciesRequestFilter
func WithEgressPolicyRecordCount ¶
func WithEgressPolicyRecordCount(recordCount int) TrustSecEgressPoliciesRequestFilter
func WithEgressPolicyStartIndex ¶
func WithEgressPolicyStartIndex(startIndex int) TrustSecEgressPoliciesRequestFilter
func WithEgressPolicyStartTimestamp ¶
func WithEgressPolicyStartTimestamp(startTimestamp string) TrustSecEgressPoliciesRequestFilter
type TrustSecPropsProvider ¶
type TrustSecSXP ¶
type TrustSecSXP interface { PxGridService Rest() TrustSecSXPRest TrustSecSXPSubscriber Properties() TrustSecSXPPropsProvider }
func NewPxGridTrustSecSXP ¶
func NewPxGridTrustSecSXP(ctrl *PxGridConsumer) TrustSecSXP
type TrustSecSXPBinding ¶
type TrustSecSXPBindingTopicMessage ¶
type TrustSecSXPBindingTopicMessage struct { OperationType OperationType `json:"operation"` Binding TrustSecSXPBinding `json:"binding"` }
type TrustSecSXPRest ¶ added in v0.6.0
type TrustSecSXPRest interface {
GetBindings(filter any) CallFinalizer[*[]TrustSecSXPBinding]
}
type TrustSecSXPSubscriber ¶
type TrustSecSXPSubscriber interface {
OnBindingTopic() Subscriber[TrustSecSXPBindingTopicMessage]
}
type TrustSecSXPTopic ¶
type TrustSecSXPTopic string
const ( TrustSecSXPTopicBinding TrustSecSXPTopic = "bindingTopic" TrustSecSXPServiceName = "com.cisco.ise.sxp" )
type TrustSecSubscriber ¶
type TrustSecSubscriber interface {
OnPolicyDownloadTopic() Subscriber[PolicyDownloadTopicMessage]
}
type TrustSecTopic ¶
type TrustSecTopic string
type VirtualNetwork ¶
Source Files ¶
- call_finalizer.go
- config.go
- consumer.go
- control.go
- dns_utils.go
- logger.go
- pxservice.go
- pxservice_anc_config.go
- pxservice_endpoint_asset.go
- pxservice_mdm.go
- pxservice_profiler_config.go
- pxservice_pubsub.go
- pxservice_radius_failure.go
- pxservice_session_directory.go
- pxservice_system_health.go
- pxservice_trustsec.go
- pxservice_trustsec_config.go
- pxservice_trustsec_sxp.go
- service_node.go
- stomp_logger.go
- subscription.go
- transport.go
Click to show internal directories.
Click to hide internal directories.