Class L7DenyRule
- Namespace
- Openshell.Sandbox.V1
- Assembly
- OpenShell.Sdk.dll
An L7 deny rule that blocks specific requests. Mirrors L7Allow — same fields, same matching semantics, inverted effect. Deny rules are evaluated after allow rules and take precedence.
public sealed class L7DenyRule : IMessage<L7DenyRule>, IEquatable<L7DenyRule>, IDeepCloneable<L7DenyRule>, IBufferMessage, IMessage
- Inheritance
-
L7DenyRule
- Implements
-
IMessage<L7DenyRule>IDeepCloneable<L7DenyRule>IBufferMessageIMessage
- Inherited Members
Constructors
L7DenyRule()
public L7DenyRule()
L7DenyRule(L7DenyRule)
public L7DenyRule(L7DenyRule other)
Parameters
otherL7DenyRule
Fields
CommandFieldNumber
Field number for the "command" field.
public const int CommandFieldNumber = 3
Field Value
FieldsFieldNumber
Field number for the "fields" field.
public const int FieldsFieldNumber = 7
Field Value
MethodFieldNumber
Field number for the "method" field.
public const int MethodFieldNumber = 1
Field Value
OperationNameFieldNumber
Field number for the "operation_name" field.
public const int OperationNameFieldNumber = 6
Field Value
OperationTypeFieldNumber
Field number for the "operation_type" field.
public const int OperationTypeFieldNumber = 5
Field Value
ParamsFieldNumber
Field number for the "params" field.
public const int ParamsFieldNumber = 9
Field Value
PathFieldNumber
Field number for the "path" field.
public const int PathFieldNumber = 2
Field Value
QueryFieldNumber
Field number for the "query" field.
public const int QueryFieldNumber = 4
Field Value
Properties
Command
SQL command (SQL): SELECT, INSERT, etc. or "*" for any.
public string Command { get; set; }
Property Value
Descriptor
public static MessageDescriptor Descriptor { get; }
Property Value
- MessageDescriptor
Fields
GraphQL root field globs. Deny rules match when any selected root field matches any configured glob.
public RepeatedField<string> Fields { get; }
Property Value
- RepeatedField<string>
Method
Protocol method: HTTP method (REST/WebSocket), JSON-RPC method name, or "*" for any when supported by the protocol.
public string Method { get; set; }
Property Value
OperationName
GraphQL operation name glob. "*" matches any operation name.
public string OperationName { get; set; }
Property Value
OperationType
GraphQL operation type: "query", "mutation", "subscription", or "*" for any.
public string OperationType { get; set; }
Property Value
Params
MCP params matcher map. Currently only params.name is supported for tools/call filtering. Generic protocol "json-rpc" rejects params matchers.
public MapField<string, L7QueryMatcher> Params { get; }
Property Value
- MapField<string, L7QueryMatcher>
Parser
public static MessageParser<L7DenyRule> Parser { get; }
Property Value
- MessageParser<L7DenyRule>
Path
URL path glob pattern (REST): "/repos//pulls//reviews", "**" for any.
public string Path { get; set; }
Property Value
Query
Query parameter matcher map (REST). Same semantics as L7Allow.query.
public MapField<string, L7QueryMatcher> Query { get; }
Property Value
- MapField<string, L7QueryMatcher>
Methods
CalculateSize()
Calculates the size of this message in Protocol Buffer wire format, in bytes.
public int CalculateSize()
Returns
- int
The number of bytes required to write this message to a coded output stream.
Clone()
Creates a deep clone of this object.
public L7DenyRule Clone()
Returns
- L7DenyRule
A deep clone of this object.
Equals(L7DenyRule)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(L7DenyRule other)
Parameters
otherL7DenyRuleAn object to compare with this object.
Returns
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object other)
Parameters
otherobject
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
MergeFrom(CodedInputStream)
Merges the data from the specified coded input stream with the current message.
public void MergeFrom(CodedInputStream input)
Parameters
inputCodedInputStream
Remarks
See the user guide for precise merge semantics.
MergeFrom(L7DenyRule)
Merges the given message into this one.
public void MergeFrom(L7DenyRule other)
Parameters
otherL7DenyRule
Remarks
See the user guide for precise merge semantics.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
WriteTo(CodedOutputStream)
Writes the data to the given coded output stream.
public void WriteTo(CodedOutputStream output)
Parameters
outputCodedOutputStreamCoded output stream to write the data to. Must not be null.