Class PolicyChunk
- Namespace
- Openshell.V1
- Assembly
- OpenShell.Sdk.dll
A proposed policy rule with rationale and approval status.
public sealed class PolicyChunk : IMessage<PolicyChunk>, IEquatable<PolicyChunk>, IDeepCloneable<PolicyChunk>, IBufferMessage, IMessage
- Inheritance
-
PolicyChunk
- Implements
-
IMessage<PolicyChunk>IDeepCloneable<PolicyChunk>IBufferMessageIMessage
- Inherited Members
Constructors
PolicyChunk()
public PolicyChunk()
PolicyChunk(PolicyChunk)
public PolicyChunk(PolicyChunk other)
Parameters
otherPolicyChunk
Fields
ApplicationErrorFieldNumber
Field number for the "application_error" field.
public const int ApplicationErrorFieldNumber = 19
Field Value
BinaryFieldNumber
Field number for the "binary" field.
public const int BinaryFieldNumber = 16
Field Value
CandidateEffectivePolicyFieldNumber
Field number for the "candidate_effective_policy" field.
public const int CandidateEffectivePolicyFieldNumber = 24
Field Value
CandidateEffectivePolicyHashFieldNumber
Field number for the "candidate_effective_policy_hash" field.
public const int CandidateEffectivePolicyHashFieldNumber = 22
Field Value
ConfidenceFieldNumber
Field number for the "confidence" field.
public const int ConfidenceFieldNumber = 7
Field Value
CreatedTimeFieldNumber
Field number for the "created_time" field.
public const int CreatedTimeFieldNumber = 109
Field Value
CurrentEffectivePolicyFieldNumber
Field number for the "current_effective_policy" field.
public const int CurrentEffectivePolicyFieldNumber = 23
Field Value
CurrentEffectivePolicyHashFieldNumber
Field number for the "current_effective_policy_hash" field.
public const int CurrentEffectivePolicyHashFieldNumber = 21
Field Value
DecidedTimeFieldNumber
Field number for the "decided_time" field.
public const int DecidedTimeFieldNumber = 110
Field Value
DenialSummaryIdsFieldNumber
Field number for the "denial_summary_ids" field.
public const int DenialSummaryIdsFieldNumber = 8
Field Value
FirstSeenTimeFieldNumber
Field number for the "first_seen_time" field.
public const int FirstSeenTimeFieldNumber = 114
Field Value
HitCountFieldNumber
Field number for the "hit_count" field.
public const int HitCountFieldNumber = 13
Field Value
IdFieldNumber
Field number for the "id" field.
public const int IdFieldNumber = 1
Field Value
LastSeenTimeFieldNumber
Field number for the "last_seen_time" field.
public const int LastSeenTimeFieldNumber = 115
Field Value
ProposedRuleFieldNumber
Field number for the "proposed_rule" field.
public const int ProposedRuleFieldNumber = 4
Field Value
RationaleFieldNumber
Field number for the "rationale" field.
public const int RationaleFieldNumber = 5
Field Value
RejectionReasonFieldNumber
Field number for the "rejection_reason" field.
public const int RejectionReasonFieldNumber = 18
Field Value
ReviewTokenFieldNumber
Field number for the "review_token" field.
public const int ReviewTokenFieldNumber = 20
Field Value
RuleNameFieldNumber
Field number for the "rule_name" field.
public const int RuleNameFieldNumber = 3
Field Value
SecurityNotesFieldNumber
Field number for the "security_notes" field.
public const int SecurityNotesFieldNumber = 6
Field Value
StageFieldNumber
Field number for the "stage" field.
public const int StageFieldNumber = 11
Field Value
StatusFieldNumber
Field number for the "status" field.
public const int StatusFieldNumber = 2
Field Value
SupersedesChunkIdFieldNumber
Field number for the "supersedes_chunk_id" field.
public const int SupersedesChunkIdFieldNumber = 12
Field Value
ValidationResultFieldNumber
Field number for the "validation_result" field.
public const int ValidationResultFieldNumber = 17
Field Value
Properties
ApplicationError
Gateway-side merge/application preflight failure. Kept separate from prover output and operator rejection so clients can explain why a prover-clean proposal is not currently applicable.
public string ApplicationError { get; set; }
Property Value
Binary
Binary path that triggered the denial (denormalized for display convenience).
public string Binary { get; set; }
Property Value
CandidateEffectivePolicy
public SandboxPolicy CandidateEffectivePolicy { get; set; }
Property Value
CandidateEffectivePolicyHash
public string CandidateEffectivePolicyHash { get; set; }
Property Value
Confidence
Analysis confidence (0.0-1.0). 0 for mechanistic mode.
public float Confidence { get; set; }
Property Value
CreatedTime
Time when this chunk was created.
public Timestamp CreatedTime { get; set; }
Property Value
- Timestamp
CurrentEffectivePolicy
Complete effective policies used for review. These contain policy configuration only; credential secret values are never materialized.
public SandboxPolicy CurrentEffectivePolicy { get; set; }
Property Value
CurrentEffectivePolicyHash
Deterministic hashes for compact candidate display and diagnostics.
public string CurrentEffectivePolicyHash { get; set; }
Property Value
DecidedTime
Time when the user approved or rejected the chunk. Absent if undecided.
public Timestamp DecidedTime { get; set; }
Property Value
- Timestamp
DenialSummaryIds
IDs of denial summaries that led to this chunk.
public RepeatedField<string> DenialSummaryIds { get; }
Property Value
- RepeatedField<string>
Descriptor
public static MessageDescriptor Descriptor { get; }
Property Value
- MessageDescriptor
FirstSeenTime
First time this endpoint was proposed.
public Timestamp FirstSeenTime { get; set; }
Property Value
- Timestamp
HitCount
How many times this endpoint has been seen across denial flush cycles.
public int HitCount { get; set; }
Property Value
Id
Unique chunk identifier.
public string Id { get; set; }
Property Value
LastSeenTime
Most recent time this endpoint was proposed again.
public Timestamp LastSeenTime { get; set; }
Property Value
- Timestamp
Parser
public static MessageParser<PolicyChunk> Parser { get; }
Property Value
- MessageParser<PolicyChunk>
ProposedRule
The proposed network policy rule.
public NetworkPolicyRule ProposedRule { get; set; }
Property Value
Rationale
Human-readable explanation of why this rule is proposed.
public string Rationale { get; set; }
Property Value
RejectionReason
Operator-supplied free-form text accompanying a rejection. Populated
when the reviewer rejects via RejectDraftChunkRequest.reason; surfaced
back to the in-sandbox agent so it can revise the proposal.
Empty for non-rejected chunks.
public string RejectionReason { get; set; }
Property Value
ReviewToken
Opaque digest binding review to the exact live inputs and complete effective candidate evaluated by the gateway.
public string ReviewToken { get; set; }
Property Value
RuleName
Proposed network_policies map key.
public string RuleName { get; set; }
Property Value
SecurityNotes
Security concerns flagged by analysis (empty if none).
public string SecurityNotes { get; set; }
Property Value
Stage
Recommendation stage: "initial" or "refined" (progressive L7 visibility).
public string Stage { get; set; }
Property Value
Status
Approval status: "pending", "approved", "rejected".
public string Status { get; set; }
Property Value
SupersedesChunkId
For stage="refined": the initial chunk this replaces.
public string SupersedesChunkId { get; set; }
Property Value
ValidationResult
Validation verdict from gateway-side static checks (prover output). Free-form summary string for human consumption in the inbox card. Empty until the prover has run for this chunk.
public string ValidationResult { get; set; }
Property Value
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 PolicyChunk Clone()
Returns
- PolicyChunk
A deep clone of this object.
Equals(PolicyChunk)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(PolicyChunk other)
Parameters
otherPolicyChunkAn 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(PolicyChunk)
Merges the given message into this one.
public void MergeFrom(PolicyChunk other)
Parameters
otherPolicyChunk
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.