public ClientAccessRulesExecutionStatus Run(ClientAccessRulesEvaluationContext context) { RulesEvaluator rulesEvaluator = new RulesEvaluator(context); rulesEvaluator.Run(); return(ClientAccessRulesExecutionStatus.Success); }
public override bool Evaluate(RulesEvaluationContext baseContext) { ClientAccessRulesEvaluationContext clientAccessRulesEvaluationContext = (ClientAccessRulesEvaluationContext)baseContext; ClientAccessProtocol protocol = clientAccessRulesEvaluationContext.Protocol; return(this.ProtocolList.Contains(protocol)); }
public override bool Evaluate(RulesEvaluationContext baseContext) { ClientAccessRulesEvaluationContext clientAccessRulesEvaluationContext = (ClientAccessRulesEvaluationContext)baseContext; ClientAccessAuthenticationMethod authenticationType = clientAccessRulesEvaluationContext.AuthenticationType; return(this.AuthenticationTypeList.Contains(authenticationType)); }
public override bool Evaluate(RulesEvaluationContext baseContext) { ClientAccessRulesEvaluationContext clientAccessRulesEvaluationContext = (ClientAccessRulesEvaluationContext)baseContext; IPAddress discoveredValue = clientAccessRulesEvaluationContext.RemoteEndpoint.Address; return(this.TargetIpRanges.Any((IPRange target) => target.Contains(discoveredValue))); }
public override bool Evaluate(RulesEvaluationContext baseContext) { ClientAccessRulesEvaluationContext clientAccessRulesEvaluationContext = (ClientAccessRulesEvaluationContext)baseContext; string username = clientAccessRulesEvaluationContext.UserName; return(this.RegexPatterns.Any((Regex target) => target.IsMatch(username))); }
protected override ExecutionControl OnExecute(RulesEvaluationContext baseContext) { ClientAccessRulesEvaluationContext clientAccessRulesEvaluationContext = (ClientAccessRulesEvaluationContext)baseContext; if (clientAccessRulesEvaluationContext.WhatIf) { clientAccessRulesEvaluationContext.WhatIfActionDelegate(clientAccessRulesEvaluationContext.CurrentRule, ClientAccessRulesAction.AllowAccess); return(ExecutionControl.Execute); } return(ExecutionControl.SkipAll); }
public override bool Evaluate(RulesEvaluationContext baseContext) { ClientAccessRulesEvaluationContext clientAccessRulesEvaluationContext = (ClientAccessRulesEvaluationContext)baseContext; if (clientAccessRulesEvaluationContext.UserSchema != null && clientAccessRulesEvaluationContext.User != null) { try { QueryParser queryParser = new QueryParser(this.UserRecipientFilter, clientAccessRulesEvaluationContext.UserSchema, QueryParser.Capabilities.All, null, new QueryParser.ConvertValueFromStringDelegate(QueryParserUtils.ConvertValueFromString)); return(OpathFilterEvaluator.FilterMatches(queryParser.ParseTree, clientAccessRulesEvaluationContext.User)); } catch (ParsingException ex) { ExTraceGlobals.ClientAccessRulesTracer.TraceDebug(0L, string.Format("Unexpected exception: {0}", ex.ToString())); } catch (DataSourceOperationException ex2) { ExTraceGlobals.ClientAccessRulesTracer.TraceDebug(0L, string.Format("Missing information in property bag to process Monad Filter rule", ex2.ToString())); } return(false); } return(false); }
protected override object OnGetValue(RulesEvaluationContext baseContext) { ClientAccessRulesEvaluationContext clientAccessRulesEvaluationContext = (ClientAccessRulesEvaluationContext)baseContext; return(clientAccessRulesEvaluationContext.Protocol); }
protected override object OnGetValue(RulesEvaluationContext baseContext) { ClientAccessRulesEvaluationContext clientAccessRulesEvaluationContext = (ClientAccessRulesEvaluationContext)baseContext; return(clientAccessRulesEvaluationContext.RemoteEndpoint.Address); }
protected override object OnGetValue(RulesEvaluationContext baseContext) { ClientAccessRulesEvaluationContext clientAccessRulesEvaluationContext = (ClientAccessRulesEvaluationContext)baseContext; return(clientAccessRulesEvaluationContext.AuthenticationType); }