AIFACTORY-FEAT-061: SecretBrokerService: complete delivery¶
Generated from the architecture model
This page is rendered from model/**/*.yaml by tools/docs_model during mkdocs build. Edit the YAML, not this page; hand-written design lives on the linked service, platform and plane pages.
A design artefact, not a tracker
This backlog is generated from model/backlog/ and validated against the architecture model. No work item exists in any tracker, and no item carries a date, an estimate or an assignee (ADR-0029).
Epic Governance (PF-12) · Increment I1 Generate a microservice · State elaborated · Route backend-developer · Build order 76 of 185 (Factory code)
SecretBrokerService is the service of bounded context BC-40 (Secret Broker). Short-lived, scoped credential issuance against secret references — agents, tools, sandboxes, the model gateway and source connectors request a capability, policy validates, the broker obtains the credential from Key Vault or a token exchange, injects it with an expiry and records the issuance; raw long-lived secrets never reach prompts, workers or sandboxes (BC-40, original design §46). Its own repository is ConnectSoft.AI.SoftwareFactory.SecretBrokerService.
| Delivers | SecretBrokerService (complete) |
| Stubs | — |
| Realizes | adrs: ADR-0015, ADR-0019 |
| Requirements | FR-05, FUX-01, NFR-01, NFR-02, XL-10, XL-13 |
| Depends on | — |
| Sources | model/services/governance/SecretBrokerService.yaml |
Scenarios to trace (13, catalog): SCN-SecretBrokerService-001 ✓, SCN-SecretBrokerService-002 ✓, SCN-SecretBrokerService-003 ✓, SCN-SecretBrokerService-004 ✓, SCN-SecretBrokerService-005 ✓, SCN-SecretBrokerService-006 ✓, SCN-SecretBrokerService-007 ✓, SCN-SecretBrokerService-008 ✓, SCN-SecretBrokerService-009 ✓, SCN-SecretBrokerService-010 ✓, SCN-SecretBrokerService-011 ✓, SCN-SecretBrokerService-012 ✓, SCN-SecretBrokerService-013 ✓
AIFACTORY-US-070: SecretBrokerService serves its scope end to end¶
behavior · persona platform-admin
As a platform admin, I want every credential a run, a tool, a sandbox, the model gateway or a connector uses issued for one use from a reference I registered, short-lived, bound to its lease and never visible as a value, so that no long-lived secret reaches a prompt, a worker, a sandbox or a tool result and one revocation ends every credential that came from a reference.
This is the integration PBI of the feature: it proves on a deployed instance that SecretBrokerService is the one place of bounded context BC-40 where a Factory service obtains a credential. A reference names a secret held in Azure Key Vault, or an identity that can be exchanged for a token, with its kind, owner, allowed purposes, maximum lifetime and rotation period; the value is never in the store of the service. A subject receives an issuance: one short-lived credential for one purpose and one narrowed scope, delivered once over the authenticated gRPC channel, recorded as metadata only and ended at its expiry, with its lease or by a revocation. In this increment the callers are services, not people. Each presents a workload token that holds the service scope naming SecretBrokerService and forwards the tenant of its work; such a token carries no tenant claim, and the forwarded tenant is read only under that service scope (ADR-0015). ToolAdapterService reaches a secret for a tool call and presents the tool invocation and the sandbox lease it acts for, and ModelRouterService, IntegrationService, KnowledgeIngestionService, McpServerRegistryService and ConnectorRegistryService ask for the credentials of their own calls; this feature adds no caller and keeps no list of callers, because the policy decision of each issuance says which subject may use which reference for which purpose. The proof of this PBI is the hand-over of the first outcome through the deployed service, and its criteria state only what a deployed instance can prove; what the repository suites of AIFACTORY-US-951 to AIFACTORY-US-960 prove is not proven again here. The suite registers one reference of the fixture tenant through the REST route of the deployed instance, with a Platform admin token whose audience is the one of the Governance gateway, issued by the authorization server of the acceptance environment; a person reaches that route through GovernanceHost, which fronts the service from I1 (D127), and this feature builds no direct public route. A workload shaped like ToolAdapterService then asks for a credential of that reference twice for the purpose tool-call, in the order in which that service brokers a call (AIFACTORY-US-605 of feature tool-adapter-service): first for an invocation of an attempt before any sandbox is leased, with the invocation, its run and its attempt in the subject, and then for a second invocation of the same attempt that also names the sandbox lease opened in between. It receives the fixture secret of the vault of the environment each time as its own issuance. The fixture then publishes the release of the sandbox lease, which revokes the issuance that names it, and the expiry of the lease of the attempt, which revokes the other. A workload that forwards another tenant is answered NOT_FOUND over the real channel, a redelivered event changes nothing, the revocation of the reference is announced once, the state stands after a restart, and no log record, activity, metric, outbox record or row of the deployed instance holds the fixture secret (ADR-0019). The policy decisions of the hand-over are given by the PolicyEngineService of the acceptance environment: each issuance asks Policy.Decide with the action kind credential-issuance and the purpose tool-call, which the platform bundle of feature policy-engine-service allows, so the first outcome issues its credentials under the real policy (D127). Each issuance leaves exactly one audit entry, the one AuditService records from CredentialIssued, and the service submits no evidence record of its own for it (D126, D135).
Acceptance criteria
| AC1 | Given the container image that the pipeline of the repository published (AIFACTORY-US-951), deployed in the acceptance environment with its secret references vault-access and messaging-transport, when the instance starts against secret-broker-sql, the Key Vault and the identity authority of that environment, then its readiness turns ready and the hand-over suite of this PBI calls that instance over the network and no in-process host; the scaffold, the hosted surface, tenancy, the vault binding and telemetry are proven by AIFACTORY-US-951, AIFACTORY-US-952 and AIFACTORY-US-953 and are not proven again here (ADR-0028, model/services/governance/SecretBrokerService.yaml). |
| AC2 | Given a reference registered through SecretBrokerService/RegisterSecretReference on the deployed instance and a workload with the service scope, when it calls SecretBrokerService/SecretBroker.Issue twice for the purpose tool-call, first for an invocation of an attempt with its run and no sandbox lease and then for a second invocation of the same attempt that names a sandbox lease, then each reply carries the fixture secret of the vault of the environment, two SecretBrokerService/Issuance rows are Issued with an expiry not above maxTtlSeconds of the reference, only the second with a sandbox lease in its subject, each naming the decision of PolicyEngineService/Policy.Decide that answered allow for the action kind credential-issuance and the purpose tool-call, and the subscriber of the fixture receives exactly one SecretBrokerService/CredentialIssued per issuance in the run event envelope, none of which carries a value, and no evidence record of the broker for either issuance (ADR-0019). |
| AC3 | Given the two issuances of AC2, when the fixture publishes ToolAdapterService/SandboxReleased for the sandbox lease on the deployed transport, then the issuance that names the lease is Revoked and the other stays Issued; when the fixture then publishes RunControlService/LeaseExpired for the lease of the attempt, then the other is Revoked as well, and exactly one SecretBrokerService/CredentialRevoked per issuance is received; and when SecretBrokerService/SecretBroker.Revoke is then called for one of them, it is acknowledged and no second event is published. |
| AC4 | Given the reference of AC2 on the deployed instance and workload tokens issued by the authorization server of the acceptance environment, when a workload that forwards another tenant calls SecretBrokerService/SecretBroker.Issue with the identifier of that reference, a workload whose token lacks the service scope calls it, and the fixture delivers the ToolAdapterService/SandboxReleased of AC3 a second time on the deployed transport, then the first is answered NOT_FOUND over the real channel and no credential is delivered, the second is refused by the token validation of the deployed instance, and the redelivery changes no row and publishes no second SecretBrokerService/CredentialRevoked; the refusals themselves are owned by AC1 of AIFACTORY-US-953, AC2 of AIFACTORY-US-952 and AC3 of AIFACTORY-US-955 and the deduplication by AC3 of AIFACTORY-US-956, and none is enumerated again here (ADR-0015). |
| AC5 | Given the state of AC2 to AC4 and the reference then revoked through SecretBrokerService/RevokeSecretReference on the deployed instance, when the subscriber of the fixture is read and the instance is restarted, then exactly one SecretBrokerService/SecretReferenceRevoked was received, every SecretBrokerService/SecretReference and SecretBrokerService/Issuance row stands as before the restart with the reference still revoked, no operation delivers a credential again for an existing issuance, and a scan of the log records, activities, metrics, outbox records and rows of the instance for the fixture secret finds it in none; the refusal of a later issue from the revoked reference is owned by AC3 of AIFACTORY-US-958 (ADR-0019). |
| Traces: services | SecretBrokerService |
| Traces: aggregates | SecretBrokerService/SecretReference, SecretBrokerService/Issuance |
| Traces: apis | SecretBrokerService/RegisterSecretReference, SecretBrokerService/RevokeSecretReference, SecretBrokerService/SecretBroker.Issue, SecretBrokerService/SecretBroker.Revoke, PolicyEngineService/Policy.Decide |
| Traces: events | SecretBrokerService/CredentialIssued, SecretBrokerService/CredentialRevoked, SecretBrokerService/SecretReferenceRevoked, ToolAdapterService/SandboxReleased, RunControlService/LeaseExpired |
| Traces: descriptors | run-event-envelope-v1, policy-decision-request-v1 |
| Traces: adrs | ADR-0015, ADR-0019, ADR-0028 |
| Traces: requirements | FR-05, NFR-01, NFR-02 |
| Relates: nfrs | NFR-01 |
| Depends on | AIFACTORY-US-951, AIFACTORY-US-952, AIFACTORY-US-953, AIFACTORY-US-954, AIFACTORY-US-955, AIFACTORY-US-956, AIFACTORY-US-957, AIFACTORY-US-958, AIFACTORY-US-959, AIFACTORY-US-960, feature:component-base-template-factory-profile, feature:component-base-template-findings, feature:contracts-package, feature:tool-adapter-service, feature:run-control-service, feature:policy-engine-service |
| Sources | model/services/governance/SecretBrokerService.yaml, model/backlog/features/governance.yaml, docs/planes/trust-operations/governance/services/secret-broker-service/index.md, docs/planes/trust-operations/governance/security.md#secret-custody, docs/architecture/adr/0028-one-repository-and-deployable-per-service.md |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-3831 Hand-over fixture of the first outcome for the deployed secret broker |
fixture | The acceptance suite holds one secret with a marker value in the Key Vault of the acceptance environment, a Platform admin user token of the fixture tenant with the audience of the Governance gateway and the scope factory.secrets.admin from the authorization server of the environment, a workload identity shaped like ToolAdapterService and one that forwards another tenant, each with a token of that authorization server that holds the service scope naming SecretBrokerService, a workload token without that scope, subjects of two tool invocations of one attempt of one run, the first without and the second with a sandbox lease, the address of the PolicyEngineService of the acceptance environment with its platform bundle active, a subscriber on the five topics of the secret-broker profile of the deployed transport that records every delivered envelope, publishers of SandboxReleased and LeaseExpired built from the pinned contracts package that can deliver an event a second time, a step that restarts the deployed instance and waits for its readiness, and a scan of the log records, activities, metrics, outbox records and rows of the instance for the marker value, so that AC2 to AC5 of AIFACTORY-US-070 run against the deployed service and the deployed PolicyEngineService without ToolAdapterService or RunControlService. | ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-TASK-756 Verify secret-broker-service-serves-its-scope by running the declared command |
verification | Run dotnet build -c Release and dotnet test -c Release --no-build in the pipeline of the repository, and dotnet test -c Release --filter "Category=Acceptance&Feature=SecretHandOver" against the deployed service; a run that discovers no test and a zero-match filter count as failures; the run against the deployed instance proves AC1 to AC5 of AIFACTORY-US-070, that is the readiness of the deployed image, two issuances of one reference through SecretBrokerService/SecretBroker.Issue each with its own delivery, the first without and the second with a sandbox lease, the second revoked by the release of its sandbox lease and the first by the expiry of the lease of its attempt, NOT_FOUND over the real channel for the workload of another tenant, the token validation of the deployed instance, the redelivered event without a second effect, the one SecretReferenceRevoked, the state after a restart and the scan for the marker value; the thirteen scenarios SCN-SecretBrokerService-001 to SCN-SecretBrokerService-013 are proven by the suites of AIFACTORY-US-954 to AIFACTORY-US-960. |
ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-US-951: SecretBrokerService repository: scaffolded from the base template with the Factory profile, with the SecretReference and Issuance aggregates and the store secret-broker-sql¶
enabling
SecretBrokerService has its own repository, ConnectSoft.AI.SoftwareFactory.SecretBrokerService, its own deployable and its own relational store (ADR-0028). The repository is created and scaffolded in I0 by AIFACTORY-TASK-108 of feature repository-and-pipeline-conventions (D140), by the steps of its repository checklist, and this feature starts from that scaffold; its first commit is the unchanged output of dotnet new connectsoft-base -n ConnectSoft.AI.SoftwareFactory.SecretBrokerService --UseFactoryProfile true, generated from the template package at the version the gate of feature component-base-template-factory-profile published, with the messaging service name secret-broker, the default of OrleansMessaging:ServiceName in the model. Token validation, the scope chain with its 401, 403 and 404 answers, the tenant row filter, health, readiness and the telemetry wiring come from the profile and are not written again; the repository pins the contracts package, from which it takes the run event envelope, the topic constants and the event types. On that scaffold this PBI builds the domain model and the relational store and delivers no behaviour of an operation. The aggregate SecretReference holds the eleven fields of the model: referenceId, tenantId, kind, vaultRef, ownerKind, ownerId, allowedPurposes, maxTtlSeconds, rotationDays, the optional lastRotatedAt and revoked, with the enum SecretKind and its eight values. The aggregate Issuance holds issuanceId, tenantId, referenceId, subject, purpose, scope, policyDecisionId, state, issuedAt, expiresAt and the optional revokedAt, with the enum IssuanceState. The model lists no transition table for either aggregate, so the state changes are the ones its commands, its enum and its invariants give. A reference is registered with revoked false, a rotation sets lastRotatedAt and replaces vaultRef and leaves the reference usable, and a revocation sets revoked and is final: no command clears it and a revoked reference is neither rotated nor issued from. An issuance is created Issued and leaves that state once, to Expired when its expiry passed or to Revoked with revokedAt; nothing leaves Expired or Revoked. The invariants hold in the aggregates: neither has a member that can hold a secret value, an issuance is created only for a purpose in allowedPurposes of its reference, with a policy decision and with an expiry not later than issuedAt plus maxTtlSeconds, and never from a revoked reference. The store secret-broker-sql receives the three tables of the model, SecretReferences, RotationReceipts and Issuances, with their columns, foreign keys and the indexes IX_SecretRefs_Owner, IX_Issuances_Reference_State and IX_Issuances_Expiry, under the tenant row filter of the profile. The key of SecretReferences is a correction of the model on which this PBI is built and which is reported to the owner. The model keys the table by ReferenceId alone, while a tool descriptor names a secret dependency by one identifier that each tenant registers for itself; a registration that collides with a reference of another tenant could then only be answered by confirming that the other exists, against the rule that a resource of another tenant is not found (ADR-0015 amendment D113), and RegisterSecretReference lists 409 for a collision. The primary key is therefore TenantId and ReferenceId, and the foreign keys of RotationReceipts and Issuances carry both columns. The correction belongs in model/services/governance/SecretBrokerService.yaml, from which the data definition page of the service is generated, so that the page, the data model and the migration agree; until that page is regenerated from the corrected model, this PBI cites it for columns and indexes only and states the key here. Issuances rows are issuance metadata only and are kept for the period the model states for them as audit evidence; no sweep of this delivery deletes one.
Acceptance criteria
| AC1 | Given the repository created and scaffolded in I0 by AIFACTORY-TASK-108 of feature repository-and-pipeline-conventions, whose first commit is the unchanged output of dotnet new connectsoft-base -n ConnectSoft.AI.SoftwareFactory.SecretBrokerService --UseFactoryProfile true from the template package at its published version with the messaging service name secret-broker, when the pipeline of the repository runs with the work of this feature, then the solution builds, the generated tests pass with complete reports and a container image is published (ADR-0028). |
| AC2 | Given the aggregate SecretBrokerService/SecretReference, when it is registered, rotated and revoked, then registration leaves revoked false, a rotation sets lastRotatedAt and the new vaultRef, and a revocation sets revoked; a rotation and an issuance from a revoked reference are refused with the reference unchanged, a second revocation changes nothing, and no member of the aggregate can hold a secret value (model/services/governance/SecretBrokerService.yaml). |
| AC3 | Given the aggregate SecretBrokerService/Issuance, when it is created and then expired or revoked, then it moves from Issued to Expired or from Issued to Revoked with revokedAt and every other pair of states is refused; a creation for a purpose outside allowedPurposes of its reference, without a policy decision or with an expiry later than issuedAt plus maxTtlSeconds is refused and writes nothing (model/services/governance/SecretBrokerService.yaml). |
| AC4 | Given an empty secret-broker-sql, when the migrations run, then SecretReferences, RotationReceipts and Issuances exist with the columns and indexes of docs/planes/trust-operations/governance/services/secret-broker-service/ddl.md, the primary key of SecretReferences is TenantId and ReferenceId and the foreign keys of RotationReceipts and Issuances carry both columns, which is the correction of the key of the model reported under ADR-0015 amendment D113, two tenants hold a reference of the same identifier as two rows, rows of two tenants read under the scope of one tenant return only the rows of that tenant, and no table has a column that holds a secret value (ADR-0015). |
| Traces: services | SecretBrokerService |
| Traces: aggregates | SecretBrokerService/SecretReference, SecretBrokerService/Issuance |
| Traces: adrs | ADR-0015, ADR-0028 |
| Traces: requirements | NFR-01 |
| Depends on | feature:component-base-template-factory-profile, feature:component-base-template-findings, feature:contracts-package, feature:repository-and-pipeline-conventions |
| Sources | model/services/governance/SecretBrokerService.yaml, docs/planes/trust-operations/governance/services/secret-broker-service/ddl.md, docs/planes/trust-operations/governance/services/secret-broker-service/index.md#data-model-and-storage, docs/architecture/adr/0028-one-repository-and-deployable-per-service.md |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-109 Domain model: the SecretReference and Issuance aggregates with SecretKind, IssuanceState and their state changes |
implementation | The aggregates SecretReference and Issuance with the fields and the enums SecretKind and IssuanceState of model/services/governance/SecretBrokerService.yaml; a reference is registered, rotated and revoked, and a revoked reference refuses a rotation and an issuance; an issuance moves from Issued to Expired or to Revoked and nowhere else; the purpose, the policy decision and the expiry bound are checked at creation; neither aggregate has a member for a secret value; unit tests cover every state change, every refused pair and every invariant the aggregates can enforce. | ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-TASK-110 Persistence in secret-broker-sql: migrations and mappings of SecretReferences, RotationReceipts and Issuances |
migration | Migrations and mappings of the three tables of the model with their columns and the indexes IX_SecretRefs_Owner, IX_Issuances_Reference_State and IX_Issuances_Expiry; the primary key of SecretReferences is TenantId and ReferenceId and the foreign keys of RotationReceipts and Issuances carry both columns, the correction of the key of model/services/governance/SecretBrokerService.yaml reported under ADR-0015 amendment D113, so the data definition page is cited for columns and indexes only until it is regenerated; every mapping carries the tenant row filter of the Factory profile and no column holds a secret value; mapping tests run against an isolated test database, never a shared one. | ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-TASK-3832 Verify the scaffold, the aggregates and the store of SecretBrokerService |
verification | Run dotnet build -c Release and dotnet test -c Release --filter "Category=Unit\|Category=Mapping" in the pipeline of the repository; a zero-match filter counts as a failure; the tests prove AC1 to AC4 of AIFACTORY-US-951: the unchanged scaffold with the Factory profile, the state changes and the refused pairs of both aggregates, the three tables with their indexes, the key by tenant and reference identifier and the tenant row filter against an isolated database, and the absence of a column for a secret value. |
ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-US-952: SecretBrokerService host: five REST routes and three gRPC methods behind scope policies, messaging with the five events of the model and the audit evidence event, and two hosted workers¶
enabling
This PBI hosts the surface of the service and delivers the behaviour of no operation. The service descriptor file of the repository lists the eight operations as the model does. The REST operations are ListSecretReferences, RegisterSecretReference, RotateSecret and RevokeSecretReference under the scope factory.secrets.admin and ListRunIssuances under factory.runs.read; RegisterSecretReference and RotateSecret are of class production and idempotent on the Idempotency-Key header, RevokeSecretReference is of class production with natural idempotency, and the two lists are reads. The internal gRPC methods of the service SecretBroker are Issue and Revoke, of class shared-write, and Verify, of class external, none of them streaming. The contract test of the profile compares the hosted endpoints with that file in both directions. Each REST route sits behind the policy of its scope: a call without a token is answered 401, a valid user token without the scope is answered 403, and the audience a user token must carry is the one of the Governance gateway that fronts the service from I1 (D127), because a user token has one audience and a gateway forwards it unchanged (ADR-0015). A workload token carries service scopes and never satisfies a REST scope policy. Each gRPC method requires a workload token that holds the service scope naming SecretBrokerService: a call without a workload identity is refused with UNAUTHENTICATED and a token without that scope with PERMISSION_DENIED, and the tenant a workload forwards is read only under that scope. The answers the model does not list for an operation are given by the host and reported to the owner as codes the model omits: 401 for a missing token, 400 for a body that fails validation or a call to RegisterSecretReference or RotateSecret without its key header, 409 on RotateSecret for a key reused with another input and for a revoked reference, and 503 while a required dependency does not answer. The OpenAPI document and the proto fix the messages. The model names execution-scope-v1 as the request of the three methods and as the reply of Issue, and ack-v1 as the reply of Revoke and Verify. The schema of execution-scope-v1 holds the trusted scope and has no member for a reference, a subject, a purpose, a narrowed scope, a lifetime, an issuance or a credential, so the proto carries the scope in the shape of that schema and adds those members as fields of the request and of the reply of Issue beside it. The schema also requires projectId, while a reference belongs to no project and a caller forwards a project only where its work has one, a provider or a pool credential having none, so projectId is optional in the proto. Both differences are stated by a contract test and reported as corrections of the descriptor rows of the model. Only the reply of Issue has a field that can hold a credential. Messaging follows the Orleans profile of the base template: the outbox writer enlists in the unit of work of a command, a handler and a worker step, and the dispatcher of the secret-broker messaging profile publishes the five events of the model in the run event envelope of the pinned contracts package, each on the topic the model names. The sixth declared event is the audit evidence event AuditEvidenceSubmitted on audit.evidence.v1.evidence-submitted, with the event type and the topic constant of the contracts package, so that the sink of the pinned audit library writes an audit-evidence-v1 record to the outbox of the service in the transaction of a command (D115). The inbox registers three of the four consumed events of the model with deduplication on the event id: RunCancelled and LeaseExpired of RunControlService and SandboxReleased of ToolAdapterService. The fourth, DeletionOrderIssued of RetentionResidencyService, is not registered: its handler is built in I4 with that service. The two workers are hosted with their modelled triggers: ExpirySweeper every minute with a fixed retry of three attempts thirty seconds apart, the idempotency key issuanceId and at most four parallel executions partitioned by tenant, and RotationScheduler daily at five with a fixed retry of two attempts six hundred seconds apart, the idempotency key of reference and day and at most two parallel executions partitioned by tenant. What each operation, handler and worker does is delivered by AIFACTORY-US-954 to AIFACTORY-US-960.
Acceptance criteria
| AC1 | Given the service descriptor file and the hosted surface, when the contract test of the profile runs, then exactly the routes of SecretBrokerService/ListSecretReferences, SecretBrokerService/RegisterSecretReference, SecretBrokerService/RotateSecret, SecretBrokerService/RevokeSecretReference and SecretBrokerService/ListRunIssuances and the methods SecretBrokerService/SecretBroker.Issue, SecretBrokerService/SecretBroker.Revoke and SecretBrokerService/SecretBroker.Verify are hosted with the scope, the side-effect class and the idempotency rule of model/services/governance/SecretBrokerService.yaml, and the test fails on an endpoint the file does not name and on an operation without an endpoint. |
| AC2 | Given each REST route called without a token, with a valid user token that lacks the scope of the route and with a user token of another audience, and each gRPC method called without a workload identity and with a workload token that lacks the service scope, when the call arrives, then it is answered 401, 403, 401, UNAUTHENTICATED and PERMISSION_DENIED respectively before any handler runs, and nothing is read or written (ADR-0015). |
| AC3 | Given a command that changes a SecretBrokerService/SecretReference and is rolled back and one that commits, when the outbox of the secret-broker messaging profile is read, then the first left no record and the second left its record in the transaction of the change, and the dispatcher publishes it in the run event envelope on the topic the model names for the event; the OrleansMessaging section declares the five events of the model and the audit evidence event AuditEvidenceSubmitted on audit.evidence.v1.evidence-submitted with its route to the Audit service, an audit-evidence-v1 record written through the sink of the audit library in the transaction of a command leaves the outbox on that topic, and a publish of a message the section does not declare is refused (ADR-0014, ADR-0012). |
| AC4 | Given fixture publishers of the three subscribed events built from the pinned contracts package, when the same event id is delivered twice or the schedule of ExpirySweeper or of RotationScheduler fires twice under one idempotency key, then the handler or the worker runs once, a handler that keeps failing is retried with backoff and never applied twice, and an event of RetentionResidencyService reaches no handler (model/services/governance/SecretBrokerService.yaml). |
| AC5 | Given the golden files of the proto and of the OpenAPI document, when the contract test compares the scope members of the three gRPC requests with docs/reference/schemas/execution-scope.schema.json, then they are equal in name and type, the test lists every difference, that is projectId, which the schema requires and the proto leaves optional, and the members the schema does not have, the reference, the subject, the purpose, the narrowed scope, the lifetime, the issuance and the credential, only the reply of SecretBrokerService/SecretBroker.Issue has a field that can hold a credential, and a change of either side fails the test. |
| Traces: services | SecretBrokerService |
| Traces: aggregates | SecretBrokerService/SecretReference, SecretBrokerService/Issuance |
| Traces: apis | SecretBrokerService/ListSecretReferences, SecretBrokerService/RegisterSecretReference, SecretBrokerService/RotateSecret, SecretBrokerService/RevokeSecretReference, SecretBrokerService/ListRunIssuances, SecretBrokerService/SecretBroker.Issue, SecretBrokerService/SecretBroker.Revoke, SecretBrokerService/SecretBroker.Verify |
| Traces: events | SecretBrokerService/SecretReferenceRegistered, SecretBrokerService/SecretRotated, SecretBrokerService/SecretReferenceRevoked, SecretBrokerService/CredentialIssued, SecretBrokerService/CredentialRevoked |
| Traces: descriptors | execution-scope-v1, ack-v1, audit-evidence-v1, run-event-envelope-v1 |
| Traces: adrs | ADR-0012, ADR-0014, ADR-0015, ADR-0028 |
| Depends on | AIFACTORY-US-951, feature:component-base-template-factory-profile, feature:contracts-package, feature:component-audit-factory-evidence |
| Sources | model/services/governance/SecretBrokerService.yaml, docs/reference/schemas/execution-scope.schema.json, docs/planes/trust-operations/governance/services/secret-broker-service/index.md#apis, docs/planes/trust-operations/governance/services/secret-broker-service/index.md#messages, docs/planes/trust-operations/governance/services/secret-broker-service/index.md#workers-and-jobs |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-111 Contract and hosting of the surface: service descriptor, OpenAPI document and proto of the 5 REST and 3 gRPC operations behind their scope policies |
contract | The service descriptor file lists ListSecretReferences, RegisterSecretReference, RotateSecret, RevokeSecretReference, ListRunIssuances and SecretBroker.Issue, SecretBroker.Revoke and SecretBroker.Verify with scope, side-effect class, idempotency and response codes as model/services/governance/SecretBrokerService.yaml does; the five routes are hosted behind the policies of factory.secrets.admin and factory.runs.read with problem responses, the Idempotency-Key filter of RegisterSecretReference and RotateSecret and the audience of the Governance gateway for user tokens; the three methods are hosted behind the workload policy of the service scope; the OpenAPI document and the proto fix the messages by golden files, the proto carrying the scope in the shape of execution-scope-v1 with projectId optional although the schema requires it and, as fields beside it, the reference, the subject, the purpose, the narrowed scope, the lifetime, the issuance and, in the reply of Issue alone, the credential; the contract test compares the scope members with docs/reference/schemas/execution-scope.schema.json and lists every difference, the optional projectId and every member the schema does not have; the behaviour of each operation is delivered by AIFACTORY-US-954 to AIFACTORY-US-960, not here. | ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-TASK-112 Messaging skeleton: outbox and inbox wiring of the secret-broker profile for the 5 events of the model, the audit evidence event and 3 consumed events |
implementation | The outbox writer enlists in the unit of work of a command, a handler and a worker step, and the dispatcher of the secret-broker messaging profile publishes SecretReferenceRegistered, SecretRotated, SecretReferenceRevoked, CredentialIssued and CredentialRevoked in the run event envelope of the pinned contracts package, each declared with its topic and route under PublishedEvents of the OrleansMessaging section; the section declares a sixth published event, AuditEvidenceSubmitted on audit.evidence.v1.evidence-submitted, with the event type and the topic constant of the pinned contracts package and its route to AuditService, so that the sink of the pinned audit library writes audit-evidence-v1 records to the outbox of the service without an undeclared publish; the inbox registers RunCancelled and LeaseExpired of RunControlService and SandboxReleased of ToolAdapterService with deduplication on the event id; DeletionOrderIssued of RetentionResidencyService is not subscribed, its handler being built in I4 with that service; what each handler does is delivered by AIFACTORY-US-956. | ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-TASK-113 Worker hosting skeleton: schedules, retry policies and partitioning of ExpirySweeper and RotationScheduler |
implementation | ExpirySweeper is hosted on the schedule */1 * * * * with a fixed retry of three attempts thirty seconds apart, the idempotency key issuanceId and at most four parallel executions partitioned by tenant; RotationScheduler is hosted on the schedule 0 5 * * * with a fixed retry of two attempts six hundred seconds apart, the idempotency key of reference and day and at most two parallel executions partitioned by tenant; a duplicate trigger has no second effect; what each worker does is delivered by AIFACTORY-US-956 and AIFACTORY-US-957. | ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-TASK-3833 Verify the hosted surface, the messaging profile and the hosted workers of SecretBrokerService |
verification | Run dotnet build -c Release and dotnet test -c Release --filter "Category=Acceptance&Feature=HostingSurface"; a zero-match filter counts as a failure; the tests prove AC1 to AC5 of AIFACTORY-US-952: the surface compared with the service descriptor in both directions, the 401, 403, UNAUTHENTICATED and PERMISSION_DENIED answers of every operation, the outbox record committed and rolled back with its change, the six declared entries of the OrleansMessaging section with the audit evidence event among them, an evidence record that leaves the outbox on audit.evidence.v1.evidence-submitted, the refused undeclared publish, the deduplicated inbox under fixture publishers of the three subscribed events, the duplicate worker trigger, and the golden files compared with docs/reference/schemas/execution-scope.schema.json with the complete list of differences, the optional projectId and the members the schema does not have. |
ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-US-953: SecretBrokerService filters every query by tenant, answers a foreign reference as not found, binds Azure Key Vault as its one vault and keeps every secret value out of telemetry¶
enabling
SecretBrokerService is the custodian of every credential of the Factory, and the model classifies its data as restricted, so isolation, the binding of the vault and the silence of its telemetry are deliverables of their own. Tenant isolation is the row filter of the profile: every query on SecretReferences, RotationReceipts and Issuances carries the tenant of the trusted scope, so a reference, a receipt or an issuance of another tenant is invisible. A request that addresses one by identifier is answered 404, over gRPC the status NOT_FOUND, the same answer as for an identifier that does not exist, and nothing in the answer confirms that it exists; a caller that receives NOT_FOUND for an attempt takes the failure class permanent (ADR-0015). A reference belongs to its tenant and to no project, and factory.secrets.admin is a scope of the tenant-wide Platform admin role, so the reference operations know no project boundary. An issuance names its project in its subject when the caller forwards one, and the read of the issuances of a run admits a user token with the role Operator or Observer in that project, with an Observer role assigned at the tenant or with the Platform admin role: these are the three roles the model lists for the service, at the two levels at which ADR-0015 assigns Observer. Another role of the project, Requester or Reviewer for example, and no role in it are answered 403, because a missing right inside the own tenant is never answered as not found. The vault is the one the model binds: the store secrets, Azure Key Vault, which is also the external dependency of the service for secret values, key operations and token exchange. The service reaches it through one vault port with one adapter and builds no second vault, no local secret store and no cache of values. A value is held in memory only for the duration of one issuance, between the read from the vault and the reply, and no type other than the adapter and the handler of Issue can see one; an architecture test fails when another type references the vault client or when a persisted, logged or published type gains a member that could hold a value. vaultRef is a secret reference: it is stored, it selects the vault object, and it leaves the service in no response, event, log record or metric. The two secrets of the model reach the service as secret references and never as values in the repository or in configuration: vault-access, the workload identity with which the service reads the vault, and messaging-transport; their rotation periods are the ones the model states and are applied by the platform, not by this service. The service is unready while a reference cannot be resolved, and readiness names each required dependency that does not answer: the store, Key Vault, PolicyEngineService and the identity platform, all of which the model marks required and fail-fast. When Key Vault does not answer, the service fails closed as the model describes: a new issuance is refused with UNAVAILABLE and the failure class transient, the refusal is counted, issuances that were delivered keep working until their expiry, and nothing is retried by the service. Telemetry follows the Factory conventions through the single enrichment registration of the pinned observability libraries. The four instruments of the model are created through the instrument helper: connectsoft.factory.secrets.issuances with the dimensions tenant, kind, purpose and outcome, counting issuances and refusals, connectsoft.factory.secrets.live_issuances with tenant and kind, connectsoft.factory.secrets.rotation_due with tenant, and connectsoft.factory.secrets.issue_latency with kind, on which the objective of the model for the issuance, two hundred milliseconds at the 95th percentile, is read. Metrics carry tenant and, where the call names one, project by default; activities and log records carry tenant and project, and run, step and attempt when the subject of an issuance names them. No secret value, no credential and no vaultRef reaches a metric, an activity or a log record: the reference identifier and the issuance identifier stand in their place (ADR-0019).
Acceptance criteria
| AC1 | Given references and issuances of two tenants, when a caller of the first tenant addresses a reference of the second through SecretBrokerService/RotateSecret, SecretBrokerService/RevokeSecretReference, SecretBrokerService/SecretBroker.Issue or SecretBrokerService/SecretBroker.Verify, or an issuance of the second through SecretBrokerService/SecretBroker.Revoke, then the answer is 404 over REST and NOT_FOUND over gRPC, byte for byte the answer for an identifier that does not exist, no list of the first tenant ever holds a row of the second, and nothing of the second tenant changes (ADR-0015). |
| AC2 | Given the solution, when the architecture test runs, then the vault adapter is the only type that references the Key Vault client, no persisted, logged or published type has a member that can hold a secret value, and a start with a second vault provider or a local secret store configured is refused with the setting named, so that the store secrets of model/services/governance/SecretBrokerService.yaml is the one vault of the service. |
| AC3 | Given a start without a resolvable secret reference for vault-access or for messaging-transport, when readiness is probed, then the service is unready and names the missing reference; given Key Vault, PolicyEngineService or the identity platform does not answer, then readiness names that dependency; and neither the configuration of the repository nor any log record holds a secret value (model/services/governance/SecretBrokerService.yaml). |
| AC4 | Given fixture secrets that carry a marker value and a run that registers, issues, verifies, rotates, revokes and lists with debug logging on and with one failing vault call, when the collected metrics, activities, log records, outbox records and rows are scanned, then none holds the marker or a vaultRef, the metrics carry their modelled dimensions with tenant, and the activities and log records of an issuance whose subject names a run carry run, step and attempt (ADR-0019). |
| AC5 | Given Key Vault stops answering, when SecretBrokerService/SecretBroker.Issue is called, then it is refused with UNAVAILABLE and the failure class transient, connectsoft.factory.secrets.issuances counts the refusal by its outcome, no SecretBrokerService/Issuance row and no event is written, the service does not retry, issuances delivered before stay Issued until their expiry, and after the vault answers again the next call issues (docs/planes/trust-operations/governance/security.md). |
| Traces: services | SecretBrokerService |
| Traces: aggregates | SecretBrokerService/SecretReference, SecretBrokerService/Issuance |
| Traces: apis | SecretBrokerService/RotateSecret, SecretBrokerService/RevokeSecretReference, SecretBrokerService/SecretBroker.Issue, SecretBrokerService/SecretBroker.Revoke, SecretBrokerService/SecretBroker.Verify |
| Traces: adrs | ADR-0015, ADR-0019 |
| Traces: requirements | NFR-01, NFR-02 |
| Relates: nfrs | NFR-01 |
| Depends on | AIFACTORY-US-951, AIFACTORY-US-952, feature:component-base-template-factory-profile, feature:component-observability-factory-conventions |
| Sources | model/services/governance/SecretBrokerService.yaml, model/stores.yaml, docs/architecture/adr/0015-factory-tenancy-under-canonical-adr-0100.md, docs/architecture/data-governance.md#logging-and-telemetry, docs/planes/trust-operations/governance/security.md#secret-custody, docs/planes/trust-operations/governance/services/secret-broker-service/index.md#failure-and-recovery, docs/planes/trust-operations/governance/services/secret-broker-service/index.md#metrics-and-observability |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-114 Security, tenancy, vault binding and telemetry of SecretBrokerService |
implementation | Every query of the three tables runs under the tenant row filter of the Factory profile, so a reference or an issuance of another tenant is answered 404 and NOT_FOUND exactly as an unknown one; the one vault port has one adapter for Azure Key Vault, the store secrets of the model, and a start with a second vault provider or a local secret store configured is refused; a value lives in memory between the vault read and the reply of Issue only, and an architecture test fails on any other type that references the vault client or can hold a value; vaultRef leaves the service in no response, event, log record or metric; vault-access and messaging-transport are read as secret references and a missing reference keeps the service unready; readiness names the store, Key Vault, PolicyEngineService and the identity platform; a vault that does not answer refuses an issuance with UNAVAILABLE and the failure class transient without a retry; the instruments connectsoft.factory.secrets.issuances, connectsoft.factory.secrets.live_issuances, connectsoft.factory.secrets.rotation_due and connectsoft.factory.secrets.issue_latency are created through the instrument helper with their modelled dimensions. | ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-TASK-3834 Two-tenant fixture with user and workload tokens, a fake vault with marker secrets, policy and identity fakes and a telemetry collector |
fixture | The acceptance suite holds two tenants with two projects each, user tokens of the Governance gateway audience with and without factory.secrets.admin and factory.runs.read, with the role Operator, with the role Observer and with the role Reviewer in one project, with an Observer role assigned at the tenant and with the Platform admin role, workload tokens with and without the service scope naming SecretBrokerService, a fake vault behind the vault port that holds secrets with a marker value in several versions, exchanges a token for an exchangeable identity, records every read and can stop answering, a fake of PolicyEngineService that answers each of the four outcomes of policy-decision-v1, can refuse a request with INVALID_ARGUMENT, records its requests and can stop answering, references of every purpose and of the kind SandboxToken, subjects of a tool invocation with its run and its attempt, without and with a sandbox lease, and of the purpose sandbox with a sandbox lease, a fake of the identity platform that validates a subject, revokes a token and can stop answering, fixture publishers of RunCancelled, LeaseExpired and SandboxReleased built from the pinned contracts package, a clock the suite moves, and an in-memory collector of metrics, activities, log records and outbox records; the fixture serves the suites of AIFACTORY-US-953 to AIFACTORY-US-960. | ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-TASK-3835 Verify tenancy, the vault binding, secret references and telemetry of SecretBrokerService |
verification | Run dotnet test -c Release --filter "Category=Acceptance&Feature=TenancyVaultAndTelemetry" and the architecture tests; a zero-match filter counts as a failure; the tests prove AC1 to AC5 of AIFACTORY-US-953: 404 and NOT_FOUND for a foreign reference and a foreign issuance equal to the answer for an unknown one, the single vault adapter and the refused second vault, the unready start without a secret reference and the named dependency, the scan of metrics, activities, log records, outbox records and rows for the marker value and for a vaultRef, and the fail-closed refusal of SecretBrokerService/SecretBroker.Issue with UNAVAILABLE while the fake vault does not answer. |
ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-US-954: Register a secret reference with its owner, purposes, lifetime and rotation period, and list the references of a tenant without any value¶
behavior
A caller whose token carries the scope factory.secrets.admin, the Platform admin of a tenant, registers a reference through SecretBrokerService/RegisterSecretReference with an Idempotency-Key. The body names the referenceId under which connections, deployments, pools and hosts will address the secret, the kind out of the eight values of SecretKind, the vaultRef that identifies the secret or key in Azure Key Vault or the identity that can be exchanged for a token, the owner as ownerKind (connection, model-deployment, compute-pool, host or webhook-scheme) and ownerId, the allowedPurposes out of source-sync, tool-call, model-invoke, sandbox, delivery and handshake, the maxTtlSeconds and the rotationDays. The tenant comes from the trusted scope and never from the body (ADR-0015). A body without maxTtlSeconds takes Governance:Secrets:DefaultMaxTtlSeconds, the default maximum lifetime of the model, except for a reference of kind SandboxToken, which takes Governance:Secrets:SandboxTokenTtlSeconds, the lifetime the model binds to the sandbox lease, so that a sandbox token registered without a lifetime can reach it; rotationDays is an input of the owner of the secret and is never defaulted. The body has no member for a secret value and an unknown member is refused, so a value cannot be posted to the service, and the registration reads nothing from the vault: whether the reference resolves is what SecretBroker.Verify answers (AIFACTORY-US-959). The service writes the SecretReference with revoked false and no lastRotatedAt together with its SecretReferenceRegistered outbox record in one transaction and answers 201 with the metadata of the reference. A repeated call under the same key and the same body returns the same result and writes nothing; the same key with another body is refused with 409, and so is a referenceId that the tenant already holds. A body that fails validation, an unknown kind, owner kind or purpose among it, or a call without the key header is refused with 400, a code the model omits and AIFACTORY-US-952 reports; a caller without the scope is refused with 403; no refusal writes or publishes anything. The same caller lists the references of the tenant through SecretBrokerService/ListSecretReferences and receives, in pages, what the model names: kind, owner, purposes, maxTtlSeconds, rotationDays, lastRotatedAt, whether a rotation is due, whether the reference is revoked, and the number of its issuances that are Issued. The list never returns a value or a vaultRef, and no reference of another tenant appears in it. SecretReferenceRegistered carries referenceId, tenantId, kind, ownerKind and ownerId and is published on secret-broker.references.v1.secret-reference-registered; AuditService records it as evidence and StudioBff refreshes its view, each in its own suite. The closed action list of audit-evidence-v1 names no value for a registration, so the service submits no evidence record of its own for it and the event is the evidence of the act; the missing value is reported to the owner. A person reaches these routes through GovernanceHost, which fronts the service from I1 (D127), so the first references of the first outcome are registered through the gateway; no direct route is built, and the suites call the routes with tokens of the gateway audience.
Acceptance criteria
| AC1 | Given a caller with factory.secrets.admin and a valid body with an Idempotency-Key, when SecretBrokerService/RegisterSecretReference is called, then the response is 201 with the metadata of the reference, the SecretBrokerService/SecretReference exists in the tenant of the trusted scope with revoked false, maxTtlSeconds from the body, without one from Governance:Secrets:DefaultMaxTtlSeconds and for a reference of kind SandboxToken from Governance:Secrets:SandboxTokenTtlSeconds, and the SecretBrokerService/SecretReferenceRegistered outbox record was written in the same transaction; the fake vault recorded no read (SCN-SecretBrokerService-002). |
| AC2 | Given the same call repeated with the same key and body, then the same result is returned and no second row or outbox record exists; given the same key with another body or a referenceId the tenant already holds, the response is 409; given a body with a member for a value, an unknown kind, owner kind or purpose, no rotationDays or no key header, the response is 400; given a caller without the scope, the response is 403; and no refusal of SecretBrokerService/RegisterSecretReference writes or publishes anything (SCN-SecretBrokerService-002, ADR-0014). |
| AC3 | Given references of two tenants, some rotated, one revoked and one with two Issued issuances, when SecretBrokerService/ListSecretReferences is called by a caller with factory.secrets.admin, then the response is 200 with only the references of the tenant of the caller, each with kind, owner, purposes, maxTtlSeconds, rotationDays, lastRotatedAt, the due flag, revoked and its count of Issued issuances, and without a value or a vaultRef; a caller without the scope is answered 403 and nothing is written (SCN-SecretBrokerService-001, ADR-0015). |
| AC4 | Given a registered reference, when the outbox dispatcher publishes SecretBrokerService/SecretReferenceRegistered on secret-broker.references.v1.secret-reference-registered, then the event is sent in the run event envelope with referenceId, tenantId, kind, ownerKind and ownerId and without vaultRef, and a transport outage is retried with backoff so the event is neither lost nor duplicated under its event id (SCN-SecretBrokerService-009, ADR-0012). |
| Traces: services | SecretBrokerService |
| Traces: aggregates | SecretBrokerService/SecretReference |
| Traces: apis | SecretBrokerService/RegisterSecretReference, SecretBrokerService/ListSecretReferences |
| Traces: events | SecretBrokerService/SecretReferenceRegistered |
| Traces: descriptors | run-event-envelope-v1 |
| Traces: adrs | ADR-0012, ADR-0014, ADR-0015 |
| Traces: requirements | FUX-01, NFR-01 |
| Traces: scenarios | SCN-SecretBrokerService-001, SCN-SecretBrokerService-002, SCN-SecretBrokerService-009 |
| Depends on | AIFACTORY-US-951, AIFACTORY-US-952, AIFACTORY-US-953 |
| Sources | model/services/governance/SecretBrokerService.yaml, model/scenarios/SecretBrokerService.yaml, docs/planes/trust-operations/governance/services/secret-broker-service/index.md#apis |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-3836 RegisterSecretReference with the idempotency key, the closed body and the SecretReferenceRegistered outbox record |
implementation | The operation takes the tenant from the trusted scope, validates the body against the closed shape (referenceId, kind, vaultRef, ownerKind, ownerId, allowedPurposes, maxTtlSeconds, rotationDays; no member for a value, unknown members refused), takes Governance:Secrets:DefaultMaxTtlSeconds when maxTtlSeconds is absent, or Governance:Secrets:SandboxTokenTtlSeconds for a reference of kind SandboxToken, and never defaults rotationDays, reads nothing from the vault, writes the SecretReference and its SecretReferenceRegistered outbox record in one transaction and answers 201; the same key with the same body returns the first result, the same key with another body and an existing referenceId of the tenant answer 409, an invalid body and a missing key header answer 400, a missing scope answers 403, and no refusal writes anything. | ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-TASK-3837 ListSecretReferences read model with the rotation flag and the count of Issued issuances |
implementation | The read returns the references of the tenant of the caller in pages with kind, owner, purposes, maxTtlSeconds, rotationDays, lastRotatedAt, the due flag computed from lastRotatedAt and rotationDays, revoked and the count of Issued issuances read through IX_Issuances_Reference_State; the response type has no member for a value or a vaultRef; the query runs under the tenant row filter and writes nothing. | ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-TASK-3838 Verify the registration and the list of secret references through the acceptance suite |
verification | Run dotnet test -c Release --filter "Category=Acceptance&(Scenario=SCN-SecretBrokerService-001\|Scenario=SCN-SecretBrokerService-002\|Scenario=SCN-SecretBrokerService-009)"; a zero-match filter counts as a failure; the tests prove AC1 to AC4 of AIFACTORY-US-954 with the fixture of AIFACTORY-TASK-3834: the 201 with the row and its outbox record in one transaction and no vault read, the lifetime taken from the body, from the default and from the sandbox token setting, the idempotent repeat, the 409, 400 and 403 refusals, the list of one tenant without a value or a vaultRef, and the publication and payload of SecretReferenceRegistered with a transport outage; consumer handling is proven by the suites of AuditService and StudioBff. |
ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-US-955: Issue a short-lived, scoped credential for one subject and one purpose after a policy decision, delivered once and recorded as metadata only¶
behavior
A Factory service calls SecretBrokerService/SecretBroker.Issue with a workload token that holds the service scope naming SecretBrokerService and forwards the tenant of its work, and the project and the run where it has them. The request names the reference, the subject, the purpose, the narrowed scope and the lifetime it asks for. The subject is the workload identity of the caller together with what it acts for: the run and the attempt, the invocation and the sandbox lease. The model makes none of these members mandatory, and which of them a purpose needs follows from what ends the issuance. A tool call reaches a secret through ToolAdapterService alone. That service asks the broker before it leases a sandbox and leases none for a read-class native tool, whose sandbox kind is None (AIFACTORY-US-605 of feature tool-adapter-service). A request for the purpose tool-call therefore names the tool invocation and the run and the attempt it belongs to, the attempt whose lease RunControlService holds, and carries the sandbox lease as an optional member that is recorded in the subject when the invocation already has one; a tool-call request without an invocation, its run or its attempt is refused with INVALID_ARGUMENT. A request for the purpose sandbox, which a reference of kind SandboxToken serves, names the sandbox lease and is refused with INVALID_ARGUMENT without it. Each such issuance has an end besides its lifetime: one whose subject names a sandbox lease ends with SandboxReleased for that lease, and one without it ends with LeaseExpired for its attempt, with RunCancelled for its run, with SecretBroker.Revoke or at its expiry (AIFACTORY-US-956). Callers that hold a policy decision for their own call pass its identifier, which is kept with the subject. The service loads the reference under the tenant row filter: an unknown reference and a reference of another tenant are both answered NOT_FOUND (ADR-0015). A revoked reference is refused with FAILED_PRECONDITION, a purpose outside allowedPurposes and a subject whose workload identity is not the one of the validated token with PERMISSION_DENIED, and a lifetime above maxTtlSeconds of the reference with INVALID_ARGUMENT naming the limit. A request without a lifetime takes maxTtlSeconds; a reference of kind SandboxToken takes Governance:Secrets:SandboxTokenTtlSeconds, the lifetime of a sandbox token bound to its lease, never above maxTtlSeconds. The service then asks PolicyEngineService/Policy.Decide whether this subject may use this reference for this purpose, once per issuance, with a policy-decision-request-v1 whose action has the kind credential-issuance, the reference as target and the purpose of the request in purpose (D127). The platform bundle allows the purposes tool-call and sandbox, and an issuance that no rule allows is denied, because an action no rule matches is denied (D127). The service issues only when the outcome is allow, as the invariant of the aggregate requires; every other outcome is refused with PERMISSION_DENIED and the decision identifier. The service decides no approval and waits for none: whether the call that needs the credential requires an approval was decided by the policy decision of that call before the caller came here. The model admits an issuance for the outcome Allow only, so this delivery refuses allow-with-constraints, allow-with-approval, deny and prohibited alike, which fails closed. An answer of Policy.Decide that is neither a decision nor UNAVAILABLE is treated as no decision: the call is refused with FAILED_PRECONDITION and the failure class permanent, the refusal is counted by its outcome, the vault is not read and nothing is written. Only then is the credential obtained: the value of the vault object that vaultRef names is read from Azure Key Vault, or the identity that vaultRef names is exchanged for a token at the identity platform. In one transaction the service writes the Issuance in state Issued with subject, purpose, scope, policyDecisionId of its own decision, issuedAt and expiresAt, and the CredentialIssued outbox record; after the commit the reply carries the credential, the issuance identifier and the expiry. An issuance leaves exactly one audit entry, the one AuditService records from CredentialIssued, which names the policy decision that allowed it; the broker submits no evidence record of its own for an issuance (D126, D135), as for a registration, a rotation and a revocation, whose event is likewise the evidence of the act. The credential is delivered exactly once: it is in no row, no event, no evidence record, no log record and no metric, a failed commit discards it and fails the call, and no operation returns it again. A repeated request is therefore a new issuance with its own decision; an issuance whose reply was lost stays Issued until its expiry or its revocation and is never re-delivered. When PolicyEngineService, Key Vault or the identity platform does not answer, the call fails fast with UNAVAILABLE and the failure class transient, nothing is written and the service does not retry; without a decision no credential issues. connectsoft.factory.secrets.issuances counts every issuance and every refusal by tenant, kind, purpose and outcome, connectsoft.factory.secrets.live_issuances rises, and connectsoft.factory.secrets.issue_latency records the call. CredentialIssued carries issuanceId, tenantId, referenceId, purpose, the optional runId, expiresAt and policyDecisionId, metadata only, and is published on secret-broker.issuances.v1.credential-issued; AuditService, its one consumer, handles it in its own suite.
Acceptance criteria
| AC1 | Given a registered reference, a workload with the service scope whose subject names its own identity and a decision of allow from PolicyEngineService/Policy.Decide, when SecretBrokerService/SecretBroker.Issue is called for an allowed purpose, among them the purpose tool-call with an invocation, its run and its attempt and without a sandbox lease, the same with a sandbox lease, and the purpose sandbox with a sandbox lease, then the reply carries the credential read from the vault, the issuance identifier and an expiry not above maxTtlSeconds, the SecretBrokerService/Issuance is Issued with subject, purpose, scope and the policyDecisionId of that decision, its subject holding a sandbox lease only when the request named one, the request of the decision carried the action kind credential-issuance and the purpose, the SecretBrokerService/CredentialIssued outbox record was written in the same transaction without the credential, and the service wrote no evidence record of its own for the issuance (SCN-SecretBrokerService-006, ADR-0014). |
| AC2 | Given an issuance was delivered, when the same request is sent again, then a second SecretBrokerService/Issuance with its own decision exists and no operation of the service returns the credential of the first again; given the commit of an issuance fails, then the call fails, nothing is delivered and no row exists; given the reply is lost, then the issuance stays Issued until its expiry and is never re-delivered (SCN-SecretBrokerService-006). |
| AC3 | Given a call to SecretBrokerService/SecretBroker.Issue without a workload identity, with a token that lacks the service scope, with a subject that names another workload identity, for a purpose outside allowedPurposes, with a decision other than allow, with a lifetime above maxTtlSeconds, for the purpose tool-call without an invocation, its run or its attempt, for the purpose sandbox without a sandbox lease, for an unknown reference or one of another tenant, or for a revoked reference, when it arrives, then it is refused with UNAUTHENTICATED, PERMISSION_DENIED four times, INVALID_ARGUMENT three times, NOT_FOUND and FAILED_PRECONDITION respectively, no credential is read from the vault after a refusal by policy, no row or event is written, and connectsoft.factory.secrets.issuances counts the refusal (SCN-SecretBrokerService-006, ADR-0015). |
| AC4 | Given PolicyEngineService/Policy.Decide, Key Vault or the identity platform does not answer, when SecretBrokerService/SecretBroker.Issue is called, then it fails fast with UNAVAILABLE and the failure class transient, the fakes record one call and no repetition by the service, and no SecretBrokerService/Issuance or outbox record exists; given PolicyEngineService/Policy.Decide refuses the request with a status that is neither a decision nor UNAVAILABLE, then the call is refused with FAILED_PRECONDITION and the failure class permanent, connectsoft.factory.secrets.issuances counts the refusal by its outcome, the fake vault recorded no read and nothing is written; and given the decision answers deny for a purpose no rule allows, such as delivery under the platform bundle alone, then the call is refused with PERMISSION_DENIED and the decision identifier (SCN-SecretBrokerService-006, docs/planes/trust-operations/governance/security.md). |
| AC5 | Given an issuance was committed, when the outbox dispatcher publishes SecretBrokerService/CredentialIssued on secret-broker.issuances.v1.credential-issued, then the event is sent in the run event envelope with issuanceId, tenantId, referenceId, purpose, expiresAt, policyDecisionId and, for a subject that names a run, runId, it holds no credential and no vaultRef, and a transport outage is retried with backoff so the event is neither lost nor duplicated under its event id (SCN-SecretBrokerService-012, ADR-0012). |
| Traces: services | SecretBrokerService, PolicyEngineService |
| Traces: aggregates | SecretBrokerService/SecretReference, SecretBrokerService/Issuance |
| Traces: apis | SecretBrokerService/SecretBroker.Issue, PolicyEngineService/Policy.Decide |
| Traces: events | SecretBrokerService/CredentialIssued |
| Traces: descriptors | execution-scope-v1, policy-decision-request-v1, policy-decision-v1, run-event-envelope-v1 |
| Traces: adrs | ADR-0012, ADR-0014, ADR-0015, ADR-0019 |
| Traces: requirements | FR-05, NFR-02 |
| Traces: scenarios | SCN-SecretBrokerService-006, SCN-SecretBrokerService-012 |
| Relates: nfrs | NFR-02 |
| Depends on | AIFACTORY-US-951, AIFACTORY-US-952, AIFACTORY-US-953, AIFACTORY-US-954, feature:policy-engine-service, feature:contracts-package |
| Sources | model/services/governance/SecretBrokerService.yaml, model/scenarios/SecretBrokerService.yaml, docs/reference/schemas/policy-decision.schema.json, docs/reference/schemas/policy-decision-request.schema.json, docs/planes/trust-operations/governance/services/secret-broker-service/index.md#context-and-boundaries, docs/planes/trust-operations/governance/security.md#fail-closed |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-3839 Policy client port and the decision request of an issuance |
contract | A typed gRPC client of Policy.Decide behind one port; the request is a policy-decision-request-v1 document whose subject is the workload identity of the caller with the forwarded tenant and project and whose action has the kind credential-issuance, the reference as target and the purpose of the issuance in purpose, as docs/reference/schemas/policy-decision-request.schema.json fixes it (D127); a golden file fixes the request; the port returns the outcome and the decision identifier, maps a dependency that does not answer to the failure class transient and maps an answer that is neither a decision nor UNAVAILABLE to no decision with the failure class permanent; only the outcome allow admits an issuance and every other outcome is refused. | ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-TASK-3840 SecretBroker.Issue with the subject, purpose and lifetime checks, the decision, the vault read or token exchange and the single delivery |
implementation | The method validates the request, loads the reference under the tenant row filter, refuses a revoked reference, a purpose outside allowedPurposes, a foreign workload identity in the subject, a lifetime above maxTtlSeconds, a tool-call purpose without an invocation, its run and its attempt and a sandbox purpose without a sandbox lease, records the sandbox lease of a tool-call request in the subject when the request names one, takes Governance:Secrets:SandboxTokenTtlSeconds for a reference of kind SandboxToken, asks the policy port once, refuses with FAILED_PRECONDITION and the failure class permanent and without a vault read when the port returns no decision, reads the value from Azure Key Vault through the vault port or exchanges the identity at the identity platform, writes the Issuance in state Issued and its CredentialIssued outbox record with policyDecisionId in one transaction and no evidence record of its own (D126, D135), and returns the credential, the issuance identifier and the expiry once; the credential is held in memory until the reply and written nowhere; a failed commit discards it; a dependency that does not answer fails the call with UNAVAILABLE without a retry; the three instruments of the hot path are recorded. | ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-TASK-3841 Verify the issuance, its refusals and its event through the acceptance suite |
verification | Run dotnet test -c Release --filter "Category=Acceptance&(Scenario=SCN-SecretBrokerService-006\|Scenario=SCN-SecretBrokerService-012)"; a zero-match filter counts as a failure; the tests prove AC1 to AC5 of AIFACTORY-US-955 with the fakes of AIFACTORY-TASK-3834: the delivered credential with the Issued row and the CredentialIssued record in one transaction and no evidence record of the broker, the decision request with the kind credential-issuance and the purpose, the tool-call issuance without and with a sandbox lease and the sandbox issuance with one, the second issuance for a repeated request and no re-delivery, each refusal of AC3 with its status and no vault read after a refusal by policy, UNAVAILABLE without a retry while the policy fake, the fake vault or the identity fake does not answer, FAILED_PRECONDITION without a vault read when the policy fake refuses the request with a status that is no decision, PERMISSION_DENIED for a purpose the policy denies, and the publication and payload of CredentialIssued with policyDecisionId under a transport outage; consumer handling is proven by the suite of AuditService. |
ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-US-956: Revoke an issuance on request, when its run is cancelled, when its lease expires or its sandbox is released, and mark it expired at the end of its lifetime¶
behavior
An issuance never outlives its lease or its lifetime, and this PBI delivers every way it ends. The first is the request of a caller. A service with a workload token that holds the service scope calls SecretBrokerService/SecretBroker.Revoke with the issuance identifier and a reason, because the lease ended, the work was cancelled or an incident occurred; the last is the case of a credential that a redaction detector found in a tool result, where ToolAdapterService revokes at once. The service moves the Issuance from Issued to Revoked with revokedAt and writes the CredentialRevoked outbox record in the same transaction, connectsoft.factory.secrets.live_issuances falls, and the reply is ack-v1. Where the provider supports it, the credential is then withdrawn at the provider: a token obtained by exchange is revoked at the identity platform, while a value read from the vault cannot be withdrawn for one issuance and ends with its expiry or with a rotation. A provider that does not answer does not undo the revocation: the record stays Revoked, the failed withdrawal is logged and counted, and the bounded lifetime ends the credential at expiresAt at the latest. A revocation of an issuance that is already Revoked or Expired is acknowledged and changes nothing; an unknown issuance and an issuance of another tenant are answered NOT_FOUND (ADR-0015), a call without a workload identity UNAUTHENTICATED, a token without the service scope PERMISSION_DENIED and a request without an issuance identifier INVALID_ARGUMENT. The second way is the end of what the issuance was bound to, announced by an event and applied by an inbox handler, each idempotent on the event id. RevokeRunIssuances handles RunCancelled of RunControlService and revokes every Issued issuance whose subject names the run. RevokeLeaseIssuances handles LeaseExpired and revokes the Issued issuances whose subject names the attempt of the expired lease. RevokeSandboxIssuances handles SandboxReleased of ToolAdapterService and revokes the Issued issuances whose subject names the released sandbox lease. A tool-call issuance made before a sandbox was leased names no sandbox lease and is therefore never matched by SandboxReleased: it ends with LeaseExpired for its attempt, with RunCancelled for its run, with a call of the method or at its expiry. ToolAdapterService issues before it leases (AIFACTORY-US-605 of feature tool-adapter-service), so RevokeSandboxIssuances matches only the issuances made while a lease of the attempt was already open and those of the purpose sandbox; this, and the absence of a consumed event for the regular end of an attempt, after which such an issuance lives until ToolAdapterService revokes it or it expires, are reported to the owner. Each handler acts inside the tenant of the envelope and revokes with the same transaction and event as the method; an event that matches no Issued issuance changes nothing, and a handler that keeps failing is retried by the inbox and never applied twice. The third way is the lifetime. ExpirySweeper, hosted by AIFACTORY-US-952 every minute, selects through IX_Issuances_Expiry the Issued issuances whose expiresAt has passed and, in one transaction per issuance under the idempotency key issuanceId, moves it to Expired and writes the CredentialRevoked outbox record with issuanceId, tenantId and the reason expired, because the worker row of the model lists that event as the output of the sweeper; the state stays Expired and revokedAt stays empty. connectsoft.factory.secrets.live_issuances falls, and the worker then asks the provider to withdraw the credential where it supports that: a token obtained by exchange is revoked at the identity platform, and a provider that does not answer leaves the issuance Expired, with the failed withdrawal logged and counted. The summary of the event in the model says it announces a revocation before expiry, which contradicts the worker row. This delivery follows the worker row, so that an expiry leaves evidence in AuditService, which consumes the event, and the contradiction is reported to the owner as a correction of the model. The model also names a finding for a leaked credential and a handler ExecuteDeletionOrder: the finding has no modelled path from this service to the Audit service, which is reported, and the deletion-order handler is built in I4 with RetentionResidencyService and is not registered here. CredentialRevoked carries issuanceId, tenantId and reason and is published on secret-broker.issuances.v1.credential-revoked; AuditService records it as evidence in its own suite. The service never retries a revocation on its own beyond the retry policy of the inbox and of the worker.
Acceptance criteria
| AC1 | Given an Issued SecretBrokerService/Issuance and a workload with the service scope, when SecretBrokerService/SecretBroker.Revoke is called with its identifier and a reason, then the reply is ack-v1, the issuance is Revoked with revokedAt, the SecretBrokerService/CredentialRevoked outbox record was written in the same transaction, connectsoft.factory.secrets.live_issuances fell, a token obtained by exchange was revoked at the identity fake, and a provider that does not answer leaves the issuance Revoked (SCN-SecretBrokerService-007). |
| AC2 | Given an issuance that is already Revoked or Expired, when SecretBrokerService/SecretBroker.Revoke is called, then it is acknowledged and no row changes and no event is written; given an unknown issuance or one of another tenant, the answer is NOT_FOUND; given no workload identity, a token without the service scope or no issuance identifier, the answer is UNAUTHENTICATED, PERMISSION_DENIED or INVALID_ARGUMENT, and nothing changes (SCN-SecretBrokerService-007, ADR-0015). |
| AC3 | Given Issued issuances whose subjects name a run, an attempt and a sandbox lease, and a tool-call issuance of that attempt whose subject names no sandbox lease, when the fixture publishes, each in a case of its own, RunControlService/RunCancelled for the run, RunControlService/LeaseExpired for the lease of the attempt and ToolAdapterService/SandboxReleased for the sandbox lease, then exactly the issuances bound to each are Revoked with one SecretBrokerService/CredentialRevoked each, the issuance without a sandbox lease is untouched by the release and revoked by the expiry of the lease of its attempt, an event delivered twice under one event id has no second effect, an event that matches no Issued issuance changes nothing, and issuances of another tenant with the same identifiers in their subjects are untouched. |
| AC4 | Given Issued issuances, some past their expiresAt, when ExpirySweeper runs, then exactly those past their expiry are Expired with revokedAt empty, one SecretBrokerService/CredentialRevoked with issuanceId, tenantId and the reason expired was written for each in the transaction of its change, connectsoft.factory.secrets.live_issuances fell by their number, a token obtained by exchange was withdrawn at the identity fake, a provider that does not answer leaves the issuance Expired, a second run under the same issuanceId changes nothing and writes no second event, a failing run is repeated at most three times thirty seconds apart, and SecretBrokerService/SecretBroker.Revoke on an Expired issuance is acknowledged without a change (model/services/governance/SecretBrokerService.yaml). |
| AC5 | Given an issuance was revoked, when the outbox dispatcher publishes SecretBrokerService/CredentialRevoked on secret-broker.issuances.v1.credential-revoked, then the event is sent in the run event envelope with issuanceId, tenantId and reason, and a transport outage is retried with backoff so the event is neither lost nor duplicated under its event id (SCN-SecretBrokerService-013, ADR-0012). |
| Traces: services | SecretBrokerService |
| Traces: aggregates | SecretBrokerService/Issuance |
| Traces: apis | SecretBrokerService/SecretBroker.Revoke |
| Traces: events | SecretBrokerService/CredentialRevoked, RunControlService/RunCancelled, RunControlService/LeaseExpired, ToolAdapterService/SandboxReleased |
| Traces: descriptors | ack-v1, run-event-envelope-v1 |
| Traces: adrs | ADR-0012, ADR-0015 |
| Traces: requirements | FR-05, NFR-02 |
| Traces: scenarios | SCN-SecretBrokerService-007, SCN-SecretBrokerService-013 |
| Depends on | AIFACTORY-US-951, AIFACTORY-US-952, AIFACTORY-US-953, AIFACTORY-US-955, feature:run-control-service, feature:tool-adapter-service, feature:contracts-package |
| Sources | model/services/governance/SecretBrokerService.yaml, model/scenarios/SecretBrokerService.yaml, model/services/control-plane/RunControlService.yaml, model/services/tools-mcp/ToolAdapterService.yaml, docs/planes/trust-operations/governance/services/secret-broker-service/index.md#workers-and-jobs, docs/planes/trust-operations/governance/services/secret-broker-service/index.md#failure-and-recovery |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-3842 SecretBroker.Revoke with the CredentialRevoked outbox record and the withdrawal at the provider |
implementation | The method moves an Issued issuance of the forwarded tenant to Revoked with revokedAt and writes CredentialRevoked with issuanceId, tenantId and reason in one transaction, replies ack-v1, lets connectsoft.factory.secrets.live_issuances fall, then revokes a token obtained by exchange at the identity platform and logs and counts a withdrawal the provider did not answer without undoing the record; a Revoked or Expired issuance is acknowledged without a change, an unknown or foreign one is answered NOT_FOUND and a request without an identifier INVALID_ARGUMENT; one revocation routine serves the method, the three handlers and the rotation and revocation of a reference. | ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-TASK-3843 Inbox handlers RevokeRunIssuances, RevokeLeaseIssuances and RevokeSandboxIssuances |
implementation | The handler of RunCancelled revokes every Issued issuance whose subject names the run, the handler of LeaseExpired those whose subject names the attempt of the expired lease, and the handler of SandboxReleased those whose subject names the released sandbox lease, so that a tool-call issuance without a sandbox lease in its subject is matched by the handlers of LeaseExpired and RunCancelled only, each inside the tenant of the envelope, through the revocation routine of AIFACTORY-TASK-3842 and idempotently on the event id; an event that matches nothing changes nothing; no handler of DeletionOrderIssued exists, because it is built in I4 with RetentionResidencyService. | ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-TASK-3844 ExpirySweeper marks issuances past their lifetime as Expired and writes CredentialRevoked with the reason expired |
implementation | On its schedule the worker selects through IX_Issuances_Expiry the Issued issuances past expiresAt, per tenant partition with at most four in parallel, and in one transaction per issuance under the idempotency key issuanceId moves it to Expired, with revokedAt empty, and writes CredentialRevoked with issuanceId, tenantId and the reason expired, as the worker row of model/services/governance/SecretBrokerService.yaml lists the event as its output; it lets connectsoft.factory.secrets.live_issuances fall and then revokes a token obtained by exchange at the identity platform, a provider that does not answer leaving the issuance Expired with the failed withdrawal logged and counted; the summary of the event, a revocation before expiry, contradicts the worker row and is reported as a correction of the model; a failing run is repeated three times thirty seconds apart and a second run for the same issuance changes nothing and writes no second event. | ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-TASK-3845 Verify the revocation, the three handlers, the expiry sweep and the event through the acceptance suite |
verification | Run dotnet test -c Release --filter "Category=Acceptance&(Scenario=SCN-SecretBrokerService-007\|Scenario=SCN-SecretBrokerService-013)"; a zero-match filter counts as a failure; the tests prove AC1 to AC5 of AIFACTORY-US-956 with the fixture of AIFACTORY-TASK-3834: the revocation with its outbox record in one transaction and the withdrawal at the identity fake, the acknowledged repeat, NOT_FOUND for an unknown and a foreign issuance, the issuances revoked by fixture events of RunCancelled, LeaseExpired and SandboxReleased with redeliveries and a second tenant, the tool-call issuance without a sandbox lease that the release leaves and the expiry of the lease of its attempt revokes, the sweep of expired issuances under a moved clock with one CredentialRevoked of the reason expired each, the withdrawal at the identity fake on expiry and the provider that does not answer, and the publication and payload of CredentialRevoked with a transport outage; consumer handling is proven by the suite of AuditService. |
ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-US-957: Record the rotation of a secret to a new vault version, revoke the live issuances of the old one and count the references whose rotation is due¶
behavior
A caller whose token carries factory.secrets.admin records a rotation through SecretBrokerService/RotateSecret with an Idempotency-Key. The secret itself is rotated where it lives, in Azure Key Vault or at its provider; the body names the new vault version, and the service never receives, reads or writes a value for it. In one transaction the service replaces vaultRef of the SecretReference by the new version, sets lastRotatedAt, writes a row to RotationReceipts with RotatedAt, RotatedBy, the caller of the trusted scope, and PreviousVersionRef, revokes every Issued issuance of the reference, each with its CredentialRevoked outbox record as AIFACTORY-US-956 defines the revocation, and writes the SecretRotated outbox record; the answer is 200 with the metadata of the reference. From then on an issuance reads the new version, and the old version is never read again. A repeated call under the same key and the same body returns the same result and writes no second receipt. The reference is addressed by the path: an unknown referenceId and a reference of another tenant are answered 404 (ADR-0015), and a caller without the scope 403. Three answers are codes the model omits for this operation and AIFACTORY-US-952 reports: 400 for a body without the new version or a call without the key header, and 409 for the same key with another body and for a revoked reference, which is never rotated. The second part is the schedule. RotationScheduler, hosted by AIFACTORY-US-952 daily, finds the references that are past their rotation period, which is lastRotatedAt plus rotationDays, and sets connectsoft.factory.secrets.rotation_due per tenant to their number, so that an overdue rotation is visible. The model adds that the worker rotates on its own the kinds the vault can rotate and lists no such kind. The set of kinds is therefore one setting of the service that names no kind until the owner fills it: for a reference of a named kind the worker asks the vault port for the current version of the vault object, and when the vault holds a newer version than vaultRef it records the rotation exactly as the operation does, with the identity of the worker as RotatedBy, under the idempotency key of reference and day. The worker never writes a value. Four points the model leaves open are reported to the owner and decided nowhere here: which kinds the vault rotates, to whom the rotation tasks the worker raises are addressed, since the model names no event and no receiver for them, from which time the rotation period of a reference that was never rotated counts, since SecretReferences has no registration time and this delivery counts such a reference as not yet due, and which path turns an overdue rotation into the finding the Audit service names. SecretRotated carries referenceId, tenantId and rotatedAt and is published on secret-broker.references.v1.secret-rotated; IntegrationService, ModelRouterService and ComputePoolService use the new version for their next calls and AuditService records the event as evidence, each in its own suite. The closed action list of audit-evidence-v1 names no value for a rotation, so the event is the evidence of the act and the missing value is reported.
Acceptance criteria
| AC1 | Given a reference with two Issued issuances and a caller with factory.secrets.admin, when SecretBrokerService/RotateSecret is called with the new vault version and an Idempotency-Key, then the response is 200, the SecretBrokerService/SecretReference holds the new vaultRef and lastRotatedAt, one row of RotationReceipts holds RotatedBy and PreviousVersionRef, both issuances are Revoked with one SecretBrokerService/CredentialRevoked each, and the SecretBrokerService/SecretRotated outbox record was written in the same transaction; the fake vault recorded no read and no write (SCN-SecretBrokerService-003). |
| AC2 | Given the same call repeated with the same key and body, then the same result is returned and no second receipt, revocation or event exists; given the same key with another body or a revoked reference, the response is 409; given no new version or no key header, 400; given an unknown referenceId or a reference of another tenant, 404; given a caller without the scope, 403; and no refusal of SecretBrokerService/RotateSecret writes or publishes anything (SCN-SecretBrokerService-003, ADR-0014, ADR-0015). |
| AC3 | Given a recorded rotation, when SecretBrokerService/SecretBroker.Issue is called for the reference, then the fake vault records a read of the new version only, and no later call reads the version that PreviousVersionRef names (model/services/governance/SecretBrokerService.yaml). |
| AC4 | Given references of two tenants, some past lastRotatedAt plus rotationDays, one never rotated and one revoked, when RotationScheduler runs, then connectsoft.factory.secrets.rotation_due holds the number of due references per tenant and counts neither the never rotated nor the revoked one; with no kind configured nothing is rotated; with the kind of a due reference configured and a newer version in the fake vault, one receipt with the worker as RotatedBy and one SecretBrokerService/SecretRotated are written, and a second run on the same day changes nothing (model/services/governance/SecretBrokerService.yaml). |
| AC5 | Given a recorded rotation, when the outbox dispatcher publishes SecretBrokerService/SecretRotated on secret-broker.references.v1.secret-rotated, then the event is sent in the run event envelope with referenceId, tenantId and rotatedAt and without a vault version, and a transport outage is retried with backoff so the event is neither lost nor duplicated under its event id (SCN-SecretBrokerService-010, ADR-0012). |
| Traces: services | SecretBrokerService |
| Traces: aggregates | SecretBrokerService/SecretReference, SecretBrokerService/Issuance |
| Traces: apis | SecretBrokerService/RotateSecret, SecretBrokerService/SecretBroker.Issue |
| Traces: events | SecretBrokerService/SecretRotated, SecretBrokerService/CredentialRevoked |
| Traces: descriptors | run-event-envelope-v1 |
| Traces: adrs | ADR-0012, ADR-0014, ADR-0015 |
| Traces: requirements | NFR-02 |
| Traces: scenarios | SCN-SecretBrokerService-003, SCN-SecretBrokerService-010 |
| Depends on | AIFACTORY-US-951, AIFACTORY-US-952, AIFACTORY-US-953, AIFACTORY-US-954, AIFACTORY-US-955, AIFACTORY-US-956 |
| Sources | model/services/governance/SecretBrokerService.yaml, model/scenarios/SecretBrokerService.yaml, docs/planes/trust-operations/governance/services/secret-broker-service/index.md#workers-and-jobs |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-3846 RotateSecret with the rotation receipt, the revocation of live issuances and the SecretRotated outbox record |
implementation | The operation replaces vaultRef by the new version of the body, sets lastRotatedAt, writes the RotationReceipts row with RotatedAt, RotatedBy and PreviousVersionRef, revokes every Issued issuance of the reference through the revocation routine of AIFACTORY-TASK-3842 and writes SecretRotated with referenceId, tenantId and rotatedAt, all in one transaction, and answers 200; it reads and writes no value; the same key with the same body returns the first result, the same key with another body and a revoked reference answer 409, a missing version or key header 400, an unknown or foreign reference 404 and a missing scope 403. | ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-TASK-3847 RotationScheduler counts due references and records the rotations of the kinds configured for vault rotation |
implementation | On its daily schedule the worker computes per tenant the references past lastRotatedAt plus rotationDays, leaves a never rotated and a revoked reference out, and sets connectsoft.factory.secrets.rotation_due; for a due reference whose kind the setting of vault-rotated kinds names, a setting that names no kind by default, it reads the current version of the vault object through the vault port and, when it is newer than vaultRef, records the rotation through the routine of AIFACTORY-TASK-3846 with the worker identity as RotatedBy, under the idempotency key of reference and day and with two attempts six hundred seconds apart; it writes no value and raises no message the model does not name. | ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-TASK-3848 Verify the rotation, the rotation schedule and the event through the acceptance suite |
verification | Run dotnet test -c Release --filter "Category=Acceptance&(Scenario=SCN-SecretBrokerService-003\|Scenario=SCN-SecretBrokerService-010)"; a zero-match filter counts as a failure; the tests prove AC1 to AC5 of AIFACTORY-US-957 with the fixture of AIFACTORY-TASK-3834: the rotation with its receipt, the revoked issuances and the SecretRotated record in one transaction, the idempotent repeat, the 409, 400, 404 and 403 refusals, the read of the new version only by the next issuance, the gauge and the configured rotation of RotationScheduler under a moved clock with a second run on the same day, and the publication and payload of SecretRotated with a transport outage; consumer handling is proven by the suites of IntegrationService, ModelRouterService, ComputePoolService and AuditService. |
ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-US-958: Revoke a secret reference with a reason, revoke every live issuance from it and refuse every later use¶
behavior
A caller whose token carries factory.secrets.admin revokes a reference through SecretBrokerService/RevokeSecretReference with a reason. The reference is addressed by the path under the tenant row filter: an unknown referenceId and a reference of another tenant are answered 404, the same answer for both (ADR-0015), and a caller without the scope 403. In one transaction the service sets revoked on the SecretReference, revokes every Issued issuance of the reference, each with its CredentialRevoked outbox record as AIFACTORY-US-956 defines the revocation, and writes the SecretReferenceRevoked outbox record with the reason; the answer is 200 with the metadata of the reference. The invariant of the aggregate is thereby kept: revoking a reference invalidates every live issuance and emits an event the owners act on. The operation has natural idempotency: a repeated revocation of a revoked reference answers 200 and writes no second event and no second revocation. A body without a reason is refused with 400, a code the model omits and AIFACTORY-US-952 reports, because the event carries the reason. The revocation is final. No operation of the service clears it, a later SecretBroker.Issue for the reference is refused with FAILED_PRECONDITION, a later RotateSecret with 409, SecretBroker.Verify reports the reference as revoked without a call to the vault, and ListSecretReferences shows it revoked with no Issued issuance. The service does not touch the secret in the vault: disabling or deleting the vault object is an act of its owner in the vault, and the service reads the object no more. SecretReferenceRevoked carries referenceId, tenantId and reason and is published on secret-broker.references.v1.secret-reference-revoked. Its consumers act in their own suites: IntegrationService suspends the connections that depend on the reference, ModelRouterService takes the deployments out of routing, ComputePoolService drains the pools, ToolAdapterService refuses the tools whose descriptors name it, and AuditService records the event as evidence. The closed action list of audit-evidence-v1 names no value for the revocation of a reference, so the event is the evidence of the act and the missing value is reported to the owner.
Acceptance criteria
| AC1 | Given a reference with two Issued issuances and a caller with factory.secrets.admin, when SecretBrokerService/RevokeSecretReference is called with a reason, then the response is 200, the SecretBrokerService/SecretReference has revoked set, both issuances are Revoked with one SecretBrokerService/CredentialRevoked each, and the SecretBrokerService/SecretReferenceRevoked outbox record with the reason was written in the same transaction; the fake vault recorded no call (SCN-SecretBrokerService-004). |
| AC2 | Given a revoked reference, when SecretBrokerService/RevokeSecretReference is called again, then the response is 200 and no row changes and no event is written; given an unknown referenceId or a reference of another tenant, the response is 404; given a caller without the scope, 403; given no reason, 400; and no refusal writes or publishes anything (SCN-SecretBrokerService-004, ADR-0015). |
| AC3 | Given a revoked reference, when SecretBrokerService/SecretBroker.Issue, SecretBrokerService/RotateSecret, SecretBrokerService/SecretBroker.Verify and SecretBrokerService/ListSecretReferences are called, then the issue is refused with FAILED_PRECONDITION, the rotation with 409, the verification reports the reference as revoked without a vault call, the list shows it revoked with no Issued issuance, and no operation of the service clears revoked (model/services/governance/SecretBrokerService.yaml). |
| AC4 | Given a revoked reference, when the outbox dispatcher publishes SecretBrokerService/SecretReferenceRevoked on secret-broker.references.v1.secret-reference-revoked, then the event is sent in the run event envelope with referenceId, tenantId and reason, and a transport outage is retried with backoff so the event is neither lost nor duplicated under its event id (SCN-SecretBrokerService-011, ADR-0012). |
| Traces: services | SecretBrokerService |
| Traces: aggregates | SecretBrokerService/SecretReference, SecretBrokerService/Issuance |
| Traces: apis | SecretBrokerService/RevokeSecretReference, SecretBrokerService/SecretBroker.Issue, SecretBrokerService/RotateSecret, SecretBrokerService/SecretBroker.Verify, SecretBrokerService/ListSecretReferences |
| Traces: events | SecretBrokerService/SecretReferenceRevoked, SecretBrokerService/CredentialRevoked |
| Traces: descriptors | run-event-envelope-v1 |
| Traces: adrs | ADR-0012, ADR-0015 |
| Traces: requirements | XL-13, NFR-02 |
| Traces: scenarios | SCN-SecretBrokerService-004, SCN-SecretBrokerService-011 |
| Depends on | AIFACTORY-US-951, AIFACTORY-US-952, AIFACTORY-US-953, AIFACTORY-US-954, AIFACTORY-US-956 |
| Sources | model/services/governance/SecretBrokerService.yaml, model/scenarios/SecretBrokerService.yaml, docs/planes/trust-operations/governance/services/secret-broker-service/index.md#messages |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-3849 RevokeSecretReference with the revocation of every live issuance and the SecretReferenceRevoked outbox record |
implementation | The operation sets revoked on the reference of the path, revokes every Issued issuance of it through the revocation routine of AIFACTORY-TASK-3842 and writes SecretReferenceRevoked with referenceId, tenantId and reason, all in one transaction, and answers 200; a repeated call answers 200 without a change; a missing reason answers 400, an unknown or foreign reference 404 and a missing scope 403; the vault is not called; Issue, RotateSecret and Verify refuse or report a revoked reference as AIFACTORY-US-955, AIFACTORY-US-957 and AIFACTORY-US-959 state. | ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-TASK-3850 Verify the revocation of a reference, the later refusals and the event through the acceptance suite |
verification | Run dotnet test -c Release --filter "Category=Acceptance&(Scenario=SCN-SecretBrokerService-004\|Scenario=SCN-SecretBrokerService-011)"; a zero-match filter counts as a failure; the tests prove AC1 to AC4 of AIFACTORY-US-958 with the fixture of AIFACTORY-TASK-3834: the revocation with the revoked issuances and the SecretReferenceRevoked record in one transaction, the repeat without a change, the 404, 403 and 400 refusals, the refused issue and rotation and the reported verification of a revoked reference, and the publication and payload of SecretReferenceRevoked with a transport outage; consumer handling is proven by the suites of IntegrationService, ModelRouterService, ComputePoolService, ToolAdapterService and AuditService. |
ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-US-959: Verify that a secret reference resolves in the vault without issuing a credential to the caller¶
behavior
A Factory service that is about to depend on a reference, IntegrationService for a connection among them, asks whether the reference can be used before it relies on it. It calls SecretBrokerService/SecretBroker.Verify with a workload token that holds the service scope naming SecretBrokerService and the forwarded tenant, and names the reference. The method is a probe of class external, because it calls the vault or the identity platform, and it is read-only for the service: it creates no Issuance, publishes no event, submits no evidence record and returns no credential and no vaultRef. The service loads the reference under the tenant row filter, so an unknown reference and a reference of another tenant are both answered NOT_FOUND (ADR-0015). For a reference that names a vault object it asks Azure Key Vault through the vault port whether the object exists, is enabled and is inside its validity; for a reference that names an exchangeable identity it performs the exchange at the identity platform and discards the token at once. The reply is ack-v1 and says whether the reference was verified and, when it was not, why: the vault object is missing, disabled or outside its validity, the exchange was refused, or the reference is revoked, which is answered from the row without a call. A value read during the probe is held in memory for the probe alone and reaches no row, reply, log record or metric. The model asks more of this method than the service can know: it says the method verifies that the credential works. A reference describes the secret and its owner and not the system the credential opens, so the service has no target against which a provider key or a connection secret could be tried. This delivery verifies that the reference resolves and, for an exchangeable identity, that the exchange succeeds, and reports to the owner that a functional probe of the credential needs a target the model does not give. A call without a workload identity is refused with UNAUTHENTICATED, a token without the service scope with PERMISSION_DENIED and a request without a reference with INVALID_ARGUMENT. When the vault or the identity platform does not answer, the call fails fast with UNAVAILABLE and the failure class transient and the service does not retry; the caller decides whether to ask again. A verification is no issuance: connectsoft.factory.secrets.issuances does not count it, and no policy decision is asked for it, because nothing is handed out.
Acceptance criteria
| AC1 | Given a registered reference whose vault object exists, is enabled and valid, and a workload with the service scope, when SecretBrokerService/SecretBroker.Verify is called, then the reply is ack-v1 and reports the reference as verified, the fake vault recorded one probe, and no SecretBrokerService/Issuance, outbox record or evidence record was written and the reply holds no credential and no vaultRef (SCN-SecretBrokerService-008). |
| AC2 | Given a reference whose vault object is missing, disabled or outside its validity, an exchangeable identity whose exchange is refused, and a revoked reference, when SecretBrokerService/SecretBroker.Verify is called for each, then the reply reports it as not verified with that cause, the revoked reference is answered without a call to the vault, a token obtained by a successful exchange is discarded and appears nowhere, and nothing is written (SCN-SecretBrokerService-008, ADR-0019). |
| AC3 | Given a call to SecretBrokerService/SecretBroker.Verify without a workload identity, with a token that lacks the service scope, without a reference, or for an unknown reference or one of another tenant, when it arrives, then it is refused with UNAUTHENTICATED, PERMISSION_DENIED, INVALID_ARGUMENT and NOT_FOUND respectively and the vault is not called (SCN-SecretBrokerService-008, ADR-0015). |
| AC4 | Given the fake vault or the identity fake does not answer, when SecretBrokerService/SecretBroker.Verify is called, then it fails fast with UNAVAILABLE and the failure class transient, the fake records one call and no repetition by the service, and connectsoft.factory.secrets.issuances is unchanged (SCN-SecretBrokerService-008, model/services/governance/SecretBrokerService.yaml). |
| Traces: services | SecretBrokerService |
| Traces: aggregates | SecretBrokerService/SecretReference, SecretBrokerService/Issuance |
| Traces: apis | SecretBrokerService/SecretBroker.Verify |
| Traces: descriptors | ack-v1 |
| Traces: adrs | ADR-0015, ADR-0019 |
| Traces: requirements | NFR-02 |
| Traces: scenarios | SCN-SecretBrokerService-008 |
| Depends on | AIFACTORY-US-951, AIFACTORY-US-952, AIFACTORY-US-953, AIFACTORY-US-954 |
| Sources | model/services/governance/SecretBrokerService.yaml, model/scenarios/SecretBrokerService.yaml, docs/planes/trust-operations/governance/services/secret-broker-service/index.md#apis |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-3851 SecretBroker.Verify as a read-only probe of the vault object or of the token exchange |
implementation | The method loads the reference under the tenant row filter, answers a revoked reference from the row, asks the vault port whether the vault object exists, is enabled and is inside its validity or performs the token exchange at the identity platform and discards the token, and replies ack-v1 with the verified flag and the cause of a failure; it writes no Issuance, no outbox record and no evidence record, returns no credential and no vaultRef, asks no policy decision and does not move connectsoft.factory.secrets.issuances; an unknown or foreign reference is answered NOT_FOUND, a missing reference INVALID_ARGUMENT and a dependency that does not answer UNAVAILABLE without a retry. | ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-TASK-3852 Verify the reference probe and its refusals through the acceptance suite |
verification | Run dotnet test -c Release --filter "Category=Acceptance&Scenario=SCN-SecretBrokerService-008"; a zero-match filter counts as a failure; the tests prove AC1 to AC4 of AIFACTORY-US-959 with the fakes of AIFACTORY-TASK-3834: the verified reference with one probe and nothing written, each cause of a failed verification, the revoked reference answered without a vault call, the discarded exchange token, the four refusals with their status, and UNAVAILABLE without a retry while the fake vault or the identity fake does not answer. |
ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-US-960: Read the credential issuances made for a run as metadata only¶
behavior
A caller whose token carries the scope factory.runs.read reads which credentials were issued for a run through SecretBrokerService/ListRunIssuances. The answer is metadata only: for every issuance whose subject names the run it gives the issuance identifier, the reference identifier, the purpose, the subject with its workload identity, attempt, invocation and sandbox lease, the narrowed scope, the policy decision identifier, the state Issued, Expired or Revoked, issuedAt, expiresAt and revokedAt. It never holds a credential, which the service does not store, and never a vaultRef. The query runs under the tenant row filter, so an issuance of another tenant is never returned. Inside the tenant the project is the second boundary: the subject of an issuance names the project the caller of the issuance forwarded, and a user token reads the issuances of a run with the role Operator or Observer in that project, with an Observer role assigned at the tenant or with the tenant-wide Platform admin role, the three roles the model lists for the service at the levels at which ADR-0015 assigns them. A caller of the same tenant with another role of the project, Requester or Reviewer for example, or with no role in it is answered 403, because a missing right inside the own tenant is never answered as not found, and so is a caller without the scope (ADR-0015). An issuance whose subject names the run and no project is returned to the two tenant-wide roles only. The service keeps no runs. It cannot tell a run that does not exist from a run of another tenant or from a run for which no credential was issued, so in all three cases it holds no issuance for the runId in the tenant of the caller and answers 404, the one answer the model lists besides 200 and 403; that a run without any issuance is answered 404 and not with an empty list is reported to the owner. The read writes nothing. The model gives Issuances no column and no index for the run or the project: both are members of SubjectJson, and CredentialIssued takes its runId from there. This delivery reads them from the subject and adds no column; the missing column and index are reported, because the list scans the issuances of the tenant by a member of a JSON document. A person reaches this route through GovernanceHost, which fronts the service from I1 (D127); no direct route is built, and the suite calls it with tokens of the gateway audience.
Acceptance criteria
| AC1 | Given a run of a project with three issuances, one Issued, one Expired and one Revoked, and a caller with factory.runs.read and the role Operator in that project, when SecretBrokerService/ListRunIssuances is called with the runId, then the response is 200 with the three issuances, each with its reference identifier, purpose, subject, scope, policy decision identifier, state and times, and without a credential or a vaultRef, and nothing is written (SCN-SecretBrokerService-005). |
| AC2 | Given a caller without factory.runs.read, a caller of the same tenant without a role in the project the subjects name, or a caller whose only role in that project is Reviewer, a role outside the list of model/services/governance/SecretBrokerService.yaml, when SecretBrokerService/ListRunIssuances is called, then the response is 403; given a runId for which the tenant of the caller holds no issuance, whether the run is unknown, belongs to another tenant or used no credential, the response is 404, the same for the three (SCN-SecretBrokerService-005, ADR-0015). |
| AC3 | Given issuances of two tenants whose subjects name the same runId, when each tenant calls SecretBrokerService/ListRunIssuances, then each receives only its own SecretBrokerService/Issuance rows; a caller with the Platform admin role of a tenant and a caller with an Observer role assigned at the tenant each read the issuances of every project of that tenant, and an Observer of one project reads those of its project and is answered 403 for a run of another (SCN-SecretBrokerService-005, docs/architecture/adr/0015-factory-tenancy-under-canonical-adr-0100.md). |
| Traces: services | SecretBrokerService |
| Traces: aggregates | SecretBrokerService/Issuance |
| Traces: apis | SecretBrokerService/ListRunIssuances |
| Traces: adrs | ADR-0015 |
| Traces: requirements | FUX-01, NFR-01 |
| Traces: scenarios | SCN-SecretBrokerService-005 |
| Depends on | AIFACTORY-US-951, AIFACTORY-US-952, AIFACTORY-US-953, AIFACTORY-US-955 |
| Sources | model/services/governance/SecretBrokerService.yaml, model/scenarios/SecretBrokerService.yaml, docs/planes/trust-operations/governance/services/secret-broker-service/index.md#apis |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-3853 ListRunIssuances read model over the subject of the issuances |
implementation | The read returns the issuances of the tenant of the caller whose subject names the runId of the path, with issuance identifier, reference identifier, purpose, subject, scope, policy decision identifier, state, issuedAt, expiresAt and revokedAt; the response type has no member for a credential or a vaultRef; the project is read from the subject and a user token is admitted with the role Operator or Observer in it, with an Observer role assigned at the tenant or with the Platform admin role, and answered 403 with another role of the project or with none; an issuance without a project in its subject is returned to the two tenant-wide roles only; a runId without an issuance in the tenant is answered 404; the run and the project are read from SubjectJson and no column is added; the query runs under the tenant row filter and writes nothing. | ConnectSoft.AI.SoftwareFactory.SecretBrokerService |
AIFACTORY-TASK-3854 Verify the issuances of a run and their refusals through the acceptance suite |
verification | Run dotnet test -c Release --filter "Category=Acceptance&Scenario=SCN-SecretBrokerService-005"; a zero-match filter counts as a failure; the tests prove AC1 to AC3 of AIFACTORY-US-960 with the fixture of AIFACTORY-TASK-3834: the three issuances of a run in their states without a credential or a vaultRef, 403 for a missing scope, for another project of the tenant and for the role Reviewer in the project, 404 alike for an unknown run, a run of another tenant and a run without an issuance, the two tenants that each read only their own rows, the Operator and the Observer of the project, and the Platform admin and the Observer assigned at the tenant who each read every project of the tenant. |
ConnectSoft.AI.SoftwareFactory.SecretBrokerService |