Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
b7a1702
fix: replay review initiator and Record hook authority hardening
jeremi Dec 4, 2026
e57dd40
docs(casework): clarify recovery for retained pinned reviews
jeremi Dec 3, 2026
133eb46
docs(casework): clarify the retained initiator check
jeremi Dec 3, 2026
447f511
test(release): verify historical manifests with available source
jeremi Dec 3, 2026
38ba1bf
test(breg): cover rehearsal of a historical proposing hook
jeremi Dec 4, 2026
1d7566c
test(breg): keep predecessor hook coverage in the tooling lane
jeremi Dec 4, 2026
de4b969
fix(breg): restore rehearsal of predecessor hook bindings
jeremi Dec 4, 2026
717d38e
test(breg): admit hook HTTP boundary fixtures under current profiles
jeremi Dec 4, 2026
85992cd
fix(breg): bind the observer fixture to an independent hook profile
jeremi Dec 4, 2026
a0c112e
test(breg): cover proposing hook authority with plain Action grants
jeremi Dec 4, 2026
e9a64ee
fix(breg): admit open write grants for reserved hook profiles
jeremi Dec 4, 2026
e1d9a9c
test(breg): cover an undeclared notification binding in a numbered pr…
jeremi Dec 4, 2026
493cb5b
fix(breg): retain undeclared hook bindings in predecessor rehearsal
jeremi Dec 4, 2026
025a50a
test(breg): cover retained review recovery during upgrade
jeremi Dec 4, 2026
41b065c
fix(breg): fence recoverable reviews with legacy initiators
jeremi Dec 4, 2026
97bbb22
test(breg): pass ordinary membership authority to compiler fixtures
jeremi Dec 4, 2026
addf299
test(breg): cover retained terminal review status after upgrade
jeremi Dec 4, 2026
3f61a6d
fix(breg): preserve terminal review status across initiator upgrades
jeremi Dec 4, 2026
4030622
test(breg): scope the notification-only activation fixture
jeremi Dec 4, 2026
f4388e2
test(breg): cover status of a refused predecessor review
jeremi Dec 4, 2026
24f8317
fix(breg): preserve status of exact retained reviews after upgrade
jeremi Dec 4, 2026
340de37
docs(breg): clarify issuer reach for reserved hook profiles
jeremi Dec 4, 2026
10a2e8d
docs(breg): describe hook profile compilation and application
jeremi Dec 4, 2026
09b12e5
docs(breg): regenerate issuer access profile description
jeremi Dec 4, 2026
249ea64
docs(breg): record the accepted scope of proposing hook writes
jeremi Dec 4, 2026
1381a5a
test(breg): cover progress reads after a retained review refusal
jeremi Dec 4, 2026
159e5f1
fix(breg): preserve local review status when progress has ended
jeremi Dec 4, 2026
b926633
docs(breg): clarify issuer profile restrictions
jeremi Dec 4, 2026
5d2bc8b
chore(breg): bind the generated runtime schema digest
jeremi Dec 4, 2026
017227e
test(breg): cover predecessor cancellation after a retained refusal
jeremi Dec 4, 2026
07f1b5a
fix(breg): admit exact predecessor cancellations at upgrade
jeremi Dec 4, 2026
6e26054
test(breg): return a complete provider refusal in the cancellation fi…
jeremi Dec 4, 2026
8fe7237
test(breg): format the retained review regression fixtures
jeremi Dec 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2914,7 +2914,25 @@ jobs:
run: uv run --no-project --with PyYAML==6.0.2 python3 -m unittest release/scripts/test_check_gates_inventory.py

- name: Validate release manifest
run: uv run --no-project --with PyYAML==6.0.2 python3 release/scripts/registry-release validate-current
env:
RELEASE_MANIFEST_BASE_REF: ${{ needs.changes.outputs.archive_base_ref }}
RELEASE_MANIFEST_COMPARISON_REQUIRED: ${{ needs.changes.outputs.archive_comparison_required }}
shell: bash
run: |
set -euo pipefail
validate=(uv run --no-project --with PyYAML==6.0.2 python3 release/scripts/registry-release validate-current-ci)
if [[ "${RELEASE_MANIFEST_COMPARISON_REQUIRED}" == "true" ]]; then
if [[ -z "${RELEASE_MANIFEST_BASE_REF}" ]]; then
echo "Cannot validate the inherited release manifest: the event baseline is unavailable." >&2
exit 1
fi
"${validate[@]}" --base-ref "${RELEASE_MANIFEST_BASE_REF}"
elif [[ "${RELEASE_MANIFEST_COMPARISON_REQUIRED}" == "false" ]]; then
"${validate[@]}"
else
echo "The release manifest comparison policy is unavailable." >&2
exit 1
fi

- name: Validate release docsets
run: uv run --no-project --with PyYAML==6.0.2 python3 release/scripts/registry-release validate-docsets
Expand Down
10 changes: 5 additions & 5 deletions clients/typescript/generated/casework.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Generated for Stack version 0.52.0, client version 0.52.0.
// Source SHA-256 195bfdca62f16e84447145617876a65a104e70f4d96b3b3aa1c6a682be591041
// Source SHA-256 52dca49e0603c08eacea7a1324f26ac5b876c3aea2d1fb8ed3c673d7d166d109
// Unconstrained JSON /components/schemas/ReviewHistoryEntry/properties/detail
// Unconstrained JSON /components/schemas/ReviewPolicy/properties/displaySchema
// Unconstrained JSON /components/schemas/ReviewPolicy/properties/resultSchema
Expand Down Expand Up @@ -53,7 +53,7 @@ export type Schema_InputDecisionKind = (({ "outcome": (string); "publicReason"?:
export type Schema_InputDirectoryMember = ({ "displayName"?: (string | null); "issuer": (string); "subject": (string) })
export type Schema_InputDirectoryTargetPurpose = ("assignment" | "absence-person" | "absence-cover") & (string)
export type Schema_InputHolidaySetDocument = ({ "dates": (Array<(string)>); "holidaySet": (string); "revision": (number) })
export type Schema_InputHumanIdentity = ({ "issuer": (string); "subject": (string) })
export type Schema_InputHumanIdentity = ({ "issuer": (string); "principalClaim": (string); "subject": (string) })
export type Schema_InputIssuerPrincipal = ({ "issuer": (string); "subject": (string) })
export type Schema_InputPolicySelection = ({ "digest"?: Schema_InputContentDigest; "id": (string); "version"?: (string) })
export type Schema_InputReviewAskWant = (({ "kind": "answer" & (string) }) | ({ "kind": "document" & (string) }) | ({ "form": (string); "kind": "form" & (string) }))
Expand Down Expand Up @@ -174,7 +174,7 @@ export type Schema_ReviewPolicyClosure = ({ "clocks"?: (Array<(string)>); "conte
export type Schema_ReviewPolicyClosureList = (Array<Schema_ReviewPolicyClosure>)
export type Schema_ReviewPolicyDependencies = ({ "accessProfiles": (Array<Schema_AccessProfile>); "calendars": (Array<Schema_CalendarPolicy>); "clocks": (Array<Schema_ClockPolicy>); "contextProvider": (Schema_ReviewContextProviderPolicy | (null)); "inbox": Schema_InboxPolicy; "queues": (Array<Schema_QueuePolicy>); "taskTemplates": (Array<Schema_TaskTemplate>); "teams": (Array<Schema_TeamPolicy>); "trustedProducers": (Array<Schema_ReviewProducerPolicy>) })
export type Schema_ReviewPolicyIdentity = ({ "digest": Schema_Digest; "id": Schema_LocalId; "version": (string) })
export type Schema_ReviewProducerPolicy = ({ "completion"?: (Schema_ReviewCompletionDestinationPolicy | (null)); "id": Schema_LocalId; "initiatorProfile"?: (string | null); "issuer": Schema_Url; "profile": (string); "readsAsks"?: (boolean); "retention": Schema_ProducerRetention; "reviewPolicies": (Array<(string)>); "sourceNamespaces": (Array<(string)>); "subject": (string); "trustedInitiatorIssuer"?: Schema_Url })
export type Schema_ReviewProducerPolicy = ({ "completion"?: (Schema_ReviewCompletionDestinationPolicy | (null)); "id": Schema_LocalId; "initiatorProfile"?: (string | null); "issuer": Schema_Url; "profile": (string); "readsAsks"?: (boolean); "retention": Schema_ProducerRetention; "reviewPolicies": (Array<(string)>); "sourceNamespaces": (Array<(string)>); "subject": (string); "trustedInitiatorIssuer"?: Schema_Url; "trustedInitiatorPrincipalClaim"?: (string | null) })
export type Schema_ReviewProgressCode = (string)
export type Schema_ReviewPublicReasonRule = ("required" | "optional" | "none") & (string)
export type Schema_ReviewPurpose = ("approval" | "answer") & (string)
Expand Down Expand Up @@ -342,7 +342,7 @@ const rules: Record<string, unknown> = Object.fromEntries([
["/components/schemas/InputDirectoryMember", JSON.parse("{\"additionalProperties\":false,\"properties\":{\"displayName\":{\"type\":[\"string\",\"null\"]},\"issuer\":{\"type\":\"string\"},\"subject\":{\"type\":\"string\"}},\"required\":[\"issuer\",\"subject\"],\"type\":\"object\"}")],
["/components/schemas/InputDirectoryTargetPurpose", JSON.parse("{\"enum\":[\"assignment\",\"absence-person\",\"absence-cover\"],\"type\":\"string\"}")],
["/components/schemas/InputHolidaySetDocument", JSON.parse("{\"additionalProperties\":false,\"properties\":{\"dates\":{\"items\":{\"type\":\"string\"},\"type\":\"array\"},\"holidaySet\":{\"type\":\"string\"},\"revision\":{\"minimum\":0,\"type\":\"integer\"}},\"required\":[\"holidaySet\",\"revision\",\"dates\"],\"type\":\"object\"}")],
["/components/schemas/InputHumanIdentity", JSON.parse("{\"additionalProperties\":false,\"properties\":{\"issuer\":{\"type\":\"string\"},\"subject\":{\"type\":\"string\"}},\"required\":[\"issuer\",\"subject\"],\"type\":\"object\"}")],
["/components/schemas/InputHumanIdentity", JSON.parse("{\"additionalProperties\":false,\"properties\":{\"issuer\":{\"type\":\"string\"},\"principalClaim\":{\"type\":\"string\"},\"subject\":{\"type\":\"string\"}},\"required\":[\"issuer\",\"principalClaim\",\"subject\"],\"type\":\"object\"}")],
["/components/schemas/InputIssuerPrincipal", JSON.parse("{\"additionalProperties\":false,\"properties\":{\"issuer\":{\"type\":\"string\"},\"subject\":{\"type\":\"string\"}},\"required\":[\"issuer\",\"subject\"],\"type\":\"object\"}")],
["/components/schemas/InputPolicySelection", JSON.parse("{\"additionalProperties\":false,\"dependentRequired\":{\"digest\":[\"version\"],\"version\":[\"digest\"]},\"properties\":{\"digest\":{\"$ref\":\"/components/schemas/InputContentDigest\"},\"id\":{\"type\":\"string\"},\"version\":{\"type\":\"string\"}},\"required\":[\"id\"],\"type\":\"object\"}")],
["/components/schemas/InputReviewAskWant", JSON.parse("{\"oneOf\":[{\"additionalProperties\":false,\"properties\":{\"kind\":{\"const\":\"answer\",\"type\":\"string\"}},\"required\":[\"kind\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"kind\":{\"const\":\"document\",\"type\":\"string\"}},\"required\":[\"kind\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"form\":{\"pattern\":\"^[a-z][a-z0-9_-]{0,63}$\",\"type\":\"string\"},\"kind\":{\"const\":\"form\",\"type\":\"string\"}},\"required\":[\"kind\",\"form\"],\"type\":\"object\"}]}")],
Expand Down Expand Up @@ -459,7 +459,7 @@ const rules: Record<string, unknown> = Object.fromEntries([
["/components/schemas/ReviewPolicyClosureList", JSON.parse("{\"items\":{\"$ref\":\"/components/schemas/ReviewPolicyClosure\"},\"type\":\"array\"}")],
["/components/schemas/ReviewPolicyDependencies", JSON.parse("{\"additionalProperties\":false,\"properties\":{\"accessProfiles\":{\"items\":{\"$ref\":\"/components/schemas/AccessProfile\"},\"type\":\"array\"},\"calendars\":{\"items\":{\"$ref\":\"/components/schemas/CalendarPolicy\"},\"type\":\"array\"},\"clocks\":{\"items\":{\"$ref\":\"/components/schemas/ClockPolicy\"},\"type\":\"array\"},\"contextProvider\":{\"anyOf\":[{\"$ref\":\"/components/schemas/ReviewContextProviderPolicy\"},{\"type\":\"null\"}]},\"inbox\":{\"$ref\":\"/components/schemas/InboxPolicy\"},\"queues\":{\"items\":{\"$ref\":\"/components/schemas/QueuePolicy\"},\"type\":\"array\"},\"taskTemplates\":{\"items\":{\"$ref\":\"/components/schemas/TaskTemplate\"},\"type\":\"array\"},\"teams\":{\"items\":{\"$ref\":\"/components/schemas/TeamPolicy\"},\"type\":\"array\"},\"trustedProducers\":{\"items\":{\"$ref\":\"/components/schemas/ReviewProducerPolicy\"},\"type\":\"array\"}},\"required\":[\"accessProfiles\",\"queues\",\"teams\",\"clocks\",\"calendars\",\"contextProvider\",\"taskTemplates\",\"trustedProducers\",\"inbox\"],\"type\":\"object\"}")],
["/components/schemas/ReviewPolicyIdentity", JSON.parse("{\"additionalProperties\":false,\"properties\":{\"digest\":{\"$ref\":\"/components/schemas/Digest\"},\"id\":{\"$ref\":\"/components/schemas/LocalId\"},\"version\":{\"type\":\"string\"}},\"required\":[\"id\",\"version\",\"digest\"],\"type\":\"object\"}")],
["/components/schemas/ReviewProducerPolicy", JSON.parse("{\"additionalProperties\":false,\"properties\":{\"completion\":{\"anyOf\":[{\"$ref\":\"/components/schemas/ReviewCompletionDestinationPolicy\"},{\"type\":\"null\"}]},\"id\":{\"$ref\":\"/components/schemas/LocalId\"},\"initiatorProfile\":{\"type\":[\"string\",\"null\"]},\"issuer\":{\"$ref\":\"/components/schemas/Url\"},\"profile\":{\"type\":\"string\"},\"readsAsks\":{\"type\":\"boolean\"},\"retention\":{\"$ref\":\"/components/schemas/ProducerRetention\"},\"reviewPolicies\":{\"items\":{\"type\":\"string\"},\"type\":\"array\"},\"sourceNamespaces\":{\"items\":{\"type\":\"string\"},\"type\":\"array\"},\"subject\":{\"type\":\"string\"},\"trustedInitiatorIssuer\":{\"$ref\":\"/components/schemas/Url\"}},\"required\":[\"id\",\"profile\",\"issuer\",\"subject\",\"sourceNamespaces\",\"reviewPolicies\",\"retention\"],\"type\":\"object\"}")],
["/components/schemas/ReviewProducerPolicy", JSON.parse("{\"additionalProperties\":false,\"properties\":{\"completion\":{\"anyOf\":[{\"$ref\":\"/components/schemas/ReviewCompletionDestinationPolicy\"},{\"type\":\"null\"}]},\"id\":{\"$ref\":\"/components/schemas/LocalId\"},\"initiatorProfile\":{\"type\":[\"string\",\"null\"]},\"issuer\":{\"$ref\":\"/components/schemas/Url\"},\"profile\":{\"type\":\"string\"},\"readsAsks\":{\"type\":\"boolean\"},\"retention\":{\"$ref\":\"/components/schemas/ProducerRetention\"},\"reviewPolicies\":{\"items\":{\"type\":\"string\"},\"type\":\"array\"},\"sourceNamespaces\":{\"items\":{\"type\":\"string\"},\"type\":\"array\"},\"subject\":{\"type\":\"string\"},\"trustedInitiatorIssuer\":{\"$ref\":\"/components/schemas/Url\"},\"trustedInitiatorPrincipalClaim\":{\"type\":[\"string\",\"null\"]}},\"required\":[\"id\",\"profile\",\"issuer\",\"subject\",\"sourceNamespaces\",\"reviewPolicies\",\"retention\"],\"type\":\"object\"}")],
["/components/schemas/ReviewProgressCode", JSON.parse("{\"maxLength\":64,\"minLength\":1,\"pattern\":\"^[a-z][a-z0-9_-]{0,63}$\",\"type\":\"string\"}")],
["/components/schemas/ReviewPublicReasonRule", JSON.parse("{\"enum\":[\"required\",\"optional\",\"none\"],\"type\":\"string\"}")],
["/components/schemas/ReviewPurpose", JSON.parse("{\"enum\":[\"approval\",\"answer\"],\"type\":\"string\"}")],
Expand Down
5 changes: 3 additions & 2 deletions crates/registry-breg/src/api/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ impl VerifiedRequestClaims {
})
}

/// Restrict the access profiles this caller may reach to those named on the
/// verifying issuer entry. `None` reaches every profile in the package.
/// Restrict profile reachability to those named on the verifying issuer
/// entry. `None` imposes no issuer-specific restriction.
#[must_use]
pub(crate) fn with_reachable_profiles(mut self, profiles: Option<BTreeSet<String>>) -> Self {
self.reachable_profiles = profiles;
Expand Down Expand Up @@ -871,6 +871,7 @@ mod tests {
fn authenticated_context_preserves_identity_values_larger_than_review_protocol_bounds() {
let identity = registry_review_client::HumanIdentity {
issuer: format!("https://identity.example/{}", "i".repeat(300)),
principal_claim: "sub".to_owned(),
subject: "s".repeat(300),
};
let claims = VerifiedRequestClaims::authenticated(
Expand Down
102 changes: 102 additions & 0 deletions crates/registry-breg/src/api/tests/immediate_action_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use registry_platform_httputil::FetchUrlPolicy;
use registry_platform_oidc::{ClaimNames, JwksFetcher, JwksFetcherConfig};
use registry_platform_testing::{oidc_verifier_config, MockIdp};
use std::time::{Duration, Instant};
use tower::ServiceExt;
use zeroize::Zeroizing;

const PROJECT: &str = r#"
Expand Down Expand Up @@ -99,6 +100,107 @@ fn compiled() -> Arc<CompiledRegistry> {
)
}

#[tokio::test]
async fn internal_hook_profile_is_excluded_from_action_invoke_http_authority() {
let mut project = parse_project_yaml(PROJECT.as_bytes()).expect("action fixture parses");
project.package = Some(crate::contract::PackageIdentitySource {
source_revision: "action-admission-hook-fixture".to_owned(),
});
project.entities[0].hooks.push(
serde_json::from_value(json!({
"id": "case-created",
"phase": "after",
"trigger": "created",
"principal": "hook-worker",
"projection": ["label"],
"handler": {"type": "url", "destinationId": "case-events"}
}))
.expect("hook declaration parses"),
);
project.access_profiles.push(
serde_json::from_value(json!({
"id": "hook-worker",
"principalClaim": "registry_principal",
"requiredScopes": "unrestricted",
"permissions": {"actions": [{
"action": "rename-case",
"operations": ["invoke"],
"targets": [{
"recordType": "case",
"rowBoundaries": "unrestricted"
}],
"results": ["renamed"]
}]}
}))
.expect("hook profile parses"),
);
let registry = Arc::new(
compile_project(&project, &[], CompileProfile::Authoring).expect("hook project compiles"),
);
let service = Arc::new(service_for(Arc::clone(&registry), true));
let route = registry
.actions()
.routes
.iter()
.find(|route| route.kind == ActionRouteKind::Invoke)
.expect("Invoke route compiles");
let idp = MockIdp::start().await;
let audience = "urn:example:breg";
let mut verifier = oidc_verifier_config(idp.issuer(), vec![audience.to_owned()]);
verifier.allowed_clients = vec!["agent-client".to_owned()];
let authenticator = Arc::new(
RegistryAuthenticator::new(
&registry,
verifier,
Arc::new(JwksFetcher::new_with_fetch_url_policy(
idp.jwks_uri(),
JwksFetcherConfig::defaults(),
FetchUrlPolicy::https_or_loopback(),
)),
AuthorityClaimConfig::new("registry_principal", Some("registry_purpose".to_owned())),
)
.expect("omitted issuer profile list is valid"),
);
let app = crate::api::authenticated_router(service, authenticator);
let send = |token: String, profile: &str| {
let request = axum::http::Request::builder()
.method("POST")
.uri(format!("{}?accessProfile={profile}", route.path))
.header(axum::http::header::AUTHORIZATION, format!("Bearer {token}"))
.body(Body::empty())
.expect("Action request builds");
app.clone().oneshot(request)
};

let ordinary = idp.mint_token(json!({
"aud": audience,
"sub": "ordinary-registrar",
"azp": "agent-client",
"registry_principal": "00000000-0000-4000-8000-000000000001",
"registry_purpose": "case-management",
"regions": ["north"],
"scope": "case.rename"
}));
// An admitted caller reaches input validation before any mutation.
let admitted = send(ordinary, "registrar").await.expect("router responds");
assert_eq!(admitted.status(), StatusCode::UNSUPPORTED_MEDIA_TYPE);

let hook = idp.mint_token(json!({
"aud": audience,
"sub": "hook-caller",
"azp": "agent-client",
"registry_principal": "00000000-0000-4000-8000-000000000002",
"scope": "hook.invoke"
}));
let denied = send(hook, "hook-worker").await.expect("router responds");
assert_eq!(denied.status(), StatusCode::FORBIDDEN);
let body = to_bytes(denied.into_body(), 4096)
.await
.expect("read refusal");
let problem: Value = serde_json::from_slice(&body).expect("problem response");
assert_eq!(problem["code"], "profile.not-authorized");
}

fn task_action_registry() -> Arc<CompiledRegistry> {
let mut project = parse_project_yaml(PROJECT.as_bytes()).unwrap();
project.access_profiles.push(serde_json::from_value(json!({
Expand Down
Loading
Loading