Table of Contents

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>
IBufferMessage
IMessage
Inherited Members

Constructors

PolicyChunk()

public PolicyChunk()

PolicyChunk(PolicyChunk)

public PolicyChunk(PolicyChunk other)

Parameters

other PolicyChunk

Fields

ApplicationErrorFieldNumber

Field number for the "application_error" field.

public const int ApplicationErrorFieldNumber = 19

Field Value

int

BinaryFieldNumber

Field number for the "binary" field.

public const int BinaryFieldNumber = 16

Field Value

int

CandidateEffectivePolicyFieldNumber

Field number for the "candidate_effective_policy" field.

public const int CandidateEffectivePolicyFieldNumber = 24

Field Value

int

CandidateEffectivePolicyHashFieldNumber

Field number for the "candidate_effective_policy_hash" field.

public const int CandidateEffectivePolicyHashFieldNumber = 22

Field Value

int

ConfidenceFieldNumber

Field number for the "confidence" field.

public const int ConfidenceFieldNumber = 7

Field Value

int

CreatedTimeFieldNumber

Field number for the "created_time" field.

public const int CreatedTimeFieldNumber = 109

Field Value

int

CurrentEffectivePolicyFieldNumber

Field number for the "current_effective_policy" field.

public const int CurrentEffectivePolicyFieldNumber = 23

Field Value

int

CurrentEffectivePolicyHashFieldNumber

Field number for the "current_effective_policy_hash" field.

public const int CurrentEffectivePolicyHashFieldNumber = 21

Field Value

int

DecidedTimeFieldNumber

Field number for the "decided_time" field.

public const int DecidedTimeFieldNumber = 110

Field Value

int

DenialSummaryIdsFieldNumber

Field number for the "denial_summary_ids" field.

public const int DenialSummaryIdsFieldNumber = 8

Field Value

int

FirstSeenTimeFieldNumber

Field number for the "first_seen_time" field.

public const int FirstSeenTimeFieldNumber = 114

Field Value

int

HitCountFieldNumber

Field number for the "hit_count" field.

public const int HitCountFieldNumber = 13

Field Value

int

IdFieldNumber

Field number for the "id" field.

public const int IdFieldNumber = 1

Field Value

int

LastSeenTimeFieldNumber

Field number for the "last_seen_time" field.

public const int LastSeenTimeFieldNumber = 115

Field Value

int

ProposedRuleFieldNumber

Field number for the "proposed_rule" field.

public const int ProposedRuleFieldNumber = 4

Field Value

int

RationaleFieldNumber

Field number for the "rationale" field.

public const int RationaleFieldNumber = 5

Field Value

int

RejectionReasonFieldNumber

Field number for the "rejection_reason" field.

public const int RejectionReasonFieldNumber = 18

Field Value

int

ReviewTokenFieldNumber

Field number for the "review_token" field.

public const int ReviewTokenFieldNumber = 20

Field Value

int

RuleNameFieldNumber

Field number for the "rule_name" field.

public const int RuleNameFieldNumber = 3

Field Value

int

SecurityNotesFieldNumber

Field number for the "security_notes" field.

public const int SecurityNotesFieldNumber = 6

Field Value

int

StageFieldNumber

Field number for the "stage" field.

public const int StageFieldNumber = 11

Field Value

int

StatusFieldNumber

Field number for the "status" field.

public const int StatusFieldNumber = 2

Field Value

int

SupersedesChunkIdFieldNumber

Field number for the "supersedes_chunk_id" field.

public const int SupersedesChunkIdFieldNumber = 12

Field Value

int

ValidationResultFieldNumber

Field number for the "validation_result" field.

public const int ValidationResultFieldNumber = 17

Field Value

int

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

string

Binary

Binary path that triggered the denial (denormalized for display convenience).

public string Binary { get; set; }

Property Value

string

CandidateEffectivePolicy

public SandboxPolicy CandidateEffectivePolicy { get; set; }

Property Value

SandboxPolicy

CandidateEffectivePolicyHash

public string CandidateEffectivePolicyHash { get; set; }

Property Value

string

Confidence

Analysis confidence (0.0-1.0). 0 for mechanistic mode.

public float Confidence { get; set; }

Property Value

float

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

SandboxPolicy

CurrentEffectivePolicyHash

Deterministic hashes for compact candidate display and diagnostics.

public string CurrentEffectivePolicyHash { get; set; }

Property Value

string

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

int

Id

Unique chunk identifier.

public string Id { get; set; }

Property Value

string

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

NetworkPolicyRule

Rationale

Human-readable explanation of why this rule is proposed.

public string Rationale { get; set; }

Property Value

string

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

string

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

string

RuleName

Proposed network_policies map key.

public string RuleName { get; set; }

Property Value

string

SecurityNotes

Security concerns flagged by analysis (empty if none).

public string SecurityNotes { get; set; }

Property Value

string

Stage

Recommendation stage: "initial" or "refined" (progressive L7 visibility).

public string Stage { get; set; }

Property Value

string

Status

Approval status: "pending", "approved", "rejected".

public string Status { get; set; }

Property Value

string

SupersedesChunkId

For stage="refined": the initial chunk this replaces.

public string SupersedesChunkId { get; set; }

Property Value

string

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

string

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

other PolicyChunk

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object other)

Parameters

other object

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

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

input CodedInputStream

Remarks

See the user guide for precise merge semantics.

MergeFrom(PolicyChunk)

Merges the given message into this one.

public void MergeFrom(PolicyChunk other)

Parameters

other PolicyChunk

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

output CodedOutputStream

Coded output stream to write the data to. Must not be null.