Documentation ¶
Index ¶
- Constants
- Variables
- func HasAccess(rdm *common.RouterDataModel, identityId string, serviceId string, cache *Cache) (*edge_ctrl_pb.DataState_ServicePolicy, error)
- type AllInListError
- type AnyInListError
- type Cache
- type Check
- type CheckError
- type DomainCheck
- type FailedValueError
- type MacCheck
- type MfaCheck
- type NoPoliciesError
- type OneInListError
- type OsCheck
- type PolicyAccessError
- type PolicyAccessErrors
- type ProcessCheck
- type Str
Constants ¶
const ( NoTimeout = int64(-1) PromptGracePeriod = 5 * time.Minute )
Variables ¶
var NilStateError = errors.New("posture state was nil")
var NotEqualError = errors.New("the values were not equal")
Functions ¶
func HasAccess ¶
func HasAccess(rdm *common.RouterDataModel, identityId string, serviceId string, cache *Cache) (*edge_ctrl_pb.DataState_ServicePolicy, error)
Types ¶
type AllInListError ¶
type AllInListError[V fmt.Stringer] struct { FailedValues []FailedValueError[V] GivenValues []V }
AllInListError indicates that a given array of expected values had one or more values that did not match/pass. GivenValues represents all values supplied to match the expected values. FailedValues represents all the expected values that did not pass.
func (*AllInListError[V]) Error ¶
func (e *AllInListError[V]) Error() string
type AnyInListError ¶
type AnyInListError[V fmt.Stringer] struct { FailedValues []FailedValueError[V] GivenValues []V }
AnyInListError represents the fact that zero expected values did not match/pass where at least one was required. GivenValues represents all values supplied to match the expected values. FailedValues represents all the expected values that did not pass.
func (*AnyInListError[V]) Error ¶
func (e *AnyInListError[V]) Error() string
type Cache ¶
type Cache struct { Os *edge_client_pb.PostureResponse_Os Domain *edge_client_pb.PostureResponse_Domain Macs *edge_client_pb.PostureResponse_Macs Unlocked *edge_client_pb.PostureResponse_Unlocked Woken *edge_client_pb.PostureResponse_Woken ProcessList *edge_client_pb.PostureResponse_ProcessList PassedMfaAt *time.Time }
type Check ¶
type Check interface {
Evaluate(state *Cache) *CheckError
}
func CtrlCheckToLogic ¶
func CtrlCheckToLogic(postureCheck *edge_ctrl_pb.DataState_PostureCheck) Check
type CheckError ¶
func EvaluatePostureCheck ¶
func EvaluatePostureCheck(postureCheck *edge_ctrl_pb.DataState_PostureCheck, cache *Cache) *CheckError
func (*CheckError) Error ¶
func (p *CheckError) Error() string
type DomainCheck ¶
type DomainCheck struct { *edge_ctrl_pb.DataState_PostureCheck *edge_ctrl_pb.DataState_PostureCheck_Domains }
func (*DomainCheck) Evaluate ¶
func (m *DomainCheck) Evaluate(state *Cache) *CheckError
type FailedValueError ¶
FailedValueError represents a complex object comparison that failed. If a simple comparison failure is needed (i.e. bool != bool, string != string) use an `error` instead.
func (*FailedValueError[V]) Error ¶
func (v *FailedValueError[V]) Error() string
func (*FailedValueError[V]) String ¶
func (v *FailedValueError[V]) String() string
type MacCheck ¶
type MacCheck struct { *edge_ctrl_pb.DataState_PostureCheck *edge_ctrl_pb.DataState_PostureCheck_Mac }
func (MacCheck) Evaluate ¶
func (m MacCheck) Evaluate(state *Cache) *CheckError
type MfaCheck ¶
type MfaCheck struct { *edge_ctrl_pb.DataState_PostureCheck *edge_ctrl_pb.DataState_PostureCheck_Mfa }
func (*MfaCheck) Evaluate ¶
func (m *MfaCheck) Evaluate(state *Cache) *CheckError
type NoPoliciesError ¶
type NoPoliciesError struct { }
func (*NoPoliciesError) Error ¶
func (e *NoPoliciesError) Error() string
type OneInListError ¶
OneInListError represents two arrays of values where one of the supplied GivenValues must be in the ValidValues. Used when a large cross join of values (i.e. mac address approve/deny lists) would be reported for every comparison.
func (*OneInListError[V]) Error ¶
func (e *OneInListError[V]) Error() string
type OsCheck ¶
type OsCheck struct { *edge_ctrl_pb.DataState_PostureCheck *edge_ctrl_pb.DataState_PostureCheck_OsList }
func (*OsCheck) Evaluate ¶
func (m *OsCheck) Evaluate(state *Cache) *CheckError
type PolicyAccessError ¶
func (*PolicyAccessError) Error ¶
func (p *PolicyAccessError) Error() string
type PolicyAccessErrors ¶
type PolicyAccessErrors []*PolicyAccessError
func IsPassing ¶
func IsPassing(accessPolicies *common.AccessPolicies, cache *Cache) (*edge_ctrl_pb.DataState_ServicePolicy, *PolicyAccessErrors)
func (*PolicyAccessErrors) Error ¶
func (pae *PolicyAccessErrors) Error() string
type ProcessCheck ¶
type ProcessCheck struct { *edge_ctrl_pb.DataState_PostureCheck *edge_ctrl_pb.DataState_PostureCheck_ProcessMulti }
func (*ProcessCheck) Evaluate ¶
func (p *ProcessCheck) Evaluate(cache *Cache) *CheckError