diff --git a/AGENTS.md b/AGENTS.md index 15cfec6..1ce682e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -117,7 +117,7 @@ mints through the host's *real* gateway handlers at that same ref | `datasource/` | the same facade over `DatasourceService` | | `settings/` | presence-aware `Field[M, T]` runtime; `JSONCodec` is the only typed↔ProtoJSON boundary | | `settings/catalog/` | Go / TypeScript / proto catalog renderers that `module-compose` calls | -| `moduleauthority/` | a module's own authority: gateway broker mints; direct Accounts authority or explicitly selected gateway authority transport. Work Contexts are opaque `string`s, shape-checked only by `core/workcontext.Decode` | +| `moduleauthority/` | a module's own authority: gateway broker mints; direct Accounts authority or explicitly selected gateway authority transport. Work Contexts are opaque `string`s, shape-checked only by `core/workcontext.Decode`. `verifier_sources.go` serves core's three live-authority sources to a callee's verifier without verifying anything itself | | `gen/` | generated output. Regenerated, never edited | | `conformance/hostgateway/` | `moduleauthority` minting through the host's real gateway at the `SOURCE.txt` ref | | `internal/apiboundary` | the public-API boundary gate, with fixtures that prove it still looks | @@ -145,6 +145,15 @@ examples. Read it rather than re-deriving the API from the tree. hand-written parser, and never a decoded claim treated as a finding. Verifying belongs to the receiver (`sdk-go/workcontext`); a callee-side verifier does not come back here. + **A SOURCE is not a verifier.** `WorkContextSources` implements core's + `SealSource`, `RevisionSource` and `GrantSource` over the host's + `ResolveWorkContextAuthority`, and that belongs here: it holds no key, reads + no signature and decides nothing about a capability — it is a client of the + ISSUER's live state, which is this SDK's whole job. The rule above is about + the decision, and the decision stays in `sdk-go/workcontext`. A source may + read a claim off a capability to NARROW what it asks (the owner it questions + is the capability's own) and never to settle anything: the host checks the + same claim against the same capability, so a misreading refuses. - **The release version tracks the saas-starter module version**, and `SOURCE.txt` records the proto ref `gen/` came from. Both move together with a regeneration, or the tag claims a contract it does not carry. diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c0e96c..f452215 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,38 @@ ### Added +- **`moduleauthority.WorkContextSources`**, the three live-authority sources a + callee's verifier needs, over + `ModuleCapabilitiesService/ResolveWorkContextAuthority` + (module-saas-starter#1107). A composed module that receives a Work Context + could previously only run core's forwarding-hop `Inspector` — no seal, no + epoch, no revision, nothing consumed — so a capability whose installation was + revoked, whose build was replaced, whose binding was withdrawn or whose + principal's epoch had moved stayed accepted for its whole life. These + implement `corework.SealSource`, `corework.RevisionSource` and + `corework.GrantSource`, so a consumer hands one value to + `sdk-go/workcontext`'s `NewVerifier` as all three and brings its own replay + store (durable and shared when it runs more than one replica). + + This module still **verifies nothing**: it holds no key, reads no signature + and decides nothing about a capability. A source is a client of the ISSUER's + live state, which is this SDK's job; verification stays in + `sdk-go/workcontext`. + + `WorkContextSources` is built per presented capability and takes exactly one + required field, the capability itself — the host authenticates it, requires it + to be addressed to the calling module and to its tenant, and answers only + about the identifiers it names, so there is no tenant, audience or owner for a + caller to supply or get wrong. Answers are translated and never interpreted: a + state this client does not understand, an answer on another arm, and an answer + about another principal, installation or binding are each + `ErrUnreadableAuthorityAnswer`. Positive answers are cached for at most + `AuthorityCacheBound` (2s, a ceiling rather than a default, because a cached + answer delays a revocation by exactly that long); refusals are never cached. + A host refusal arrives with its connect code, which is how a caller tells + `CodeFailedPrecondition` ("the issuer decided; mint again") from + `CodeUnavailable` ("the lookup failed; retry"). + - **`moduleauthority.WorkloadTokenFile()`**, the one answer to "where is this module's projected token": the file `CODEFLY__WORKLOAD_TOKEN_FILE` names when it is set to a non-blank value, and the pod mount @@ -20,6 +52,37 @@ `TOKEN_FILE` in its `workload-identity` configuration and passes `ProjectedTokenFile(path)` itself. +### Changed + +- **`gen/` moves from module-saas-starter v0.0.94 to `9ab36e7e`** (the merge + commit of #1119 on `main`), which is where `ResolveWorkContextAuthority` + first exists. It carries every accounts contract change made since v0.0.94 — + `datasource`, `installations`, `api_keys`, `module_registration` and + `work_contexts` all move — and those changes are the host's, not this SDK's. + +- **`moduleauthority.ErrNoHostStateToMintFor`**, for HTTP **412** on the module + Work Context and operation-context mints. The gateway at this ref relays + accounts' `FailedPrecondition` as 412, where v0.0.94 relayed it as a 502 — so + a workload the host admits that is installed in no organization it may mint + for used to read as "the host is broken" and now reads as "the host works and + there is nothing to mint for you yet". Nothing is wrong with the credential + and nothing is denied; a mint succeeds once the module is installed. Found by + `conformance/hostgateway` against the new ref, which is what that suite is + for. The source mint's own 412 keeps its own meaning + (`ErrDelegationMissing`). + +### Removed (breaking) + +- **`SessionId` is gone from three Work Context mint requests**, with their + `GetSessionId()` accessors: `StartTaskWorkContextRequest`, + `StartChildSessionWorkContextRequest` and `StartInstallationTaskRequest`. The + host stopped accepting a caller-named session — every session a capability + carries is now the one its caller authenticated with, or a fresh one the + issuer assigns and returns — so there is no replacement field and nothing to + set. A consumer that set one was naming a session it did not own; it drops the + assignment. These are the only exported symbols the regeneration removed: + nothing else in `gen/` lost a type, a field or an RPC. + ## v0.1.2 — core v0.19.1; Work Contexts are core's, carried opaque Closes #38. The SDK requires `github.com/codefly-dev/core v0.19.1` and no diff --git a/README.md b/README.md index 7bc89e2..ae265e5 100644 --- a/README.md +++ b/README.md @@ -539,6 +539,65 @@ or binding is required. It checks current parent authority and delegation, authenticated module/audience/tenant alignment, current membership, and exact active record identity. A refusal never invokes a bearer-based fallback. +### Verifying a Work Context presented to you, at full strength + +A module that RECEIVES a Work Context is its callee, and a callee verifies with +`sdk-go/workcontext`'s `PinnedVerifier` — core's verifier, with its +configuration settled. That verifier needs three live sources only the issuer +holds, and this SDK is how you reach them: + +```go +sources, err := client.WorkContextSources(moduleauthority.WorkContextSourceSettings{ + Capability: presented, // the capability this module is verifying +}) +// Handle err before using sources. +verifier, err := workcontext.NewVerifier(workcontext.VerifierSettings{ + Issuer: issuer, Audience: audience, + Seals: sources, Revisions: sources, Grants: sources, + Replay: replayStore, // yours, and durable+shared across replicas +}, keySet) +``` + +Without them a module can only run core's forwarding-hop `Inspector`, which +checks the encoding, signature, issuer, audience, window and shape and nothing +live — so a capability whose installation was revoked, whose build was replaced, +whose operation binding was withdrawn or whose principal's epoch has moved stays +accepted until it expires. + +The capability is the only required setting, and it is the whole authorization: +the host authenticates it, requires it to be addressed to your module (its +registration prefix, or the route alias its delivered presence declares) and to +the organization your credential is bound to, and answers only about the +identifiers it names. There is no tenant, audience or owner to supply. Build one +per presented capability; a module verifying a stream of messages that carry the +same capability keeps one. + +What the answers mean: + +- `corework.ErrNoSeal`, `ErrNoApprovedBuild` and `ErrNoBinding` are core's own + sentinels, which its verifier turns into a refusal of the capability. +- `ErrUnreadableAuthorityAnswer` is a host answer this client will not read — a + state it does not understand, another arm, or an answer about another + principal, installation or binding. It is a refusal, never a permissive + default. +- `ErrNoApprovalGrant` is an approval the issuer never recorded. +- A host refusal arrives with its **connect** code (`connect.CodeOf`): + `CodeFailedPrecondition` means the issuer decided and the authority has + changed — mint again, do not retry — while `CodeUnavailable` means the lookup + failed and a retry may succeed. + +Positive answers are cached for at most `AuthorityCacheBound` (2 seconds), which +is a **ceiling**: a cached answer delays a revocation by exactly its bound, so a +larger one is refused rather than clamped, and `CacheEntries: -1` turns caching +off. Refusals are never cached. One verification costs five or more round trips +(the revision, the seal, an epoch and a build for the owner and for each actor +hop, a binding), so decide the cadence for a stream deliberately rather than +discovering it from a latency graph. + +This module verifies nothing: it holds no key, reads no signature and decides +nothing about a capability. The decision is core's, through +`sdk-go/workcontext`. + ### Gateway authority transport and audit declarations `moduleauthority.NewGatewayAuthority(seams, credentials)` explicitly selects diff --git a/SOURCE.txt b/SOURCE.txt index a77a4d9..3ec3a21 100644 --- a/SOURCE.txt +++ b/SOURCE.txt @@ -1,9 +1,14 @@ -gen/ generated from codefly-dev/module-saas-starter@v0.0.94 +gen/ generated from codefly-dev/module-saas-starter@9ab36e7efff8cfd15d48f319dfa540e52c630725 (accounts public proto: module/services/accounts/proto) (auth gateway: module/services/auth-gateway/code) module version: 0.1.0 (module/module.package.codefly.yaml) This SDK's release is matched to the saas-starter module version above. -Released upstream tag: v0.0.94. +Released upstream tag: none — this is the merge commit of +codefly-dev/module-saas-starter#1119 on `main`, which is where +ResolveWorkContextAuthority first exists. A commit is a ref this repository's +gen-drift job resolves, so the SDK does not wait on a deploy tag to carry a +contract its consumers need; the next regeneration moves to whichever tag +overtakes it. Regeneration does not publish an SDK release. diff --git a/conformance/hostgateway/testdata/sdk_conformance_test.go b/conformance/hostgateway/testdata/sdk_conformance_test.go index 9fd6a06..350a428 100644 --- a/conformance/hostgateway/testdata/sdk_conformance_test.go +++ b/conformance/hostgateway/testdata/sdk_conformance_test.go @@ -549,7 +549,7 @@ func TestSDKConformanceRefusals(t *testing.T) { {"work execution unestablished", mintWork, refusal(codes.Unavailable, ""), 503, moduleauthority.ErrExecutionUnestablished}, {"work invalid request", mintWork, refusal(codes.InvalidArgument, ""), 400, nil}, {"work unauthenticated", mintWork, refusal(codes.Unauthenticated, ""), 502, nil}, - {"work failed precondition", mintWork, refusal(codes.FailedPrecondition, ""), 502, nil}, + {"work failed precondition", mintWork, refusal(codes.FailedPrecondition, ""), 412, moduleauthority.ErrNoHostStateToMintFor}, {"operation unproven", mintOperation, refusal(codes.Unauthenticated, ""), 401, moduleauthority.ErrInvalidCredentials}, // The same organization refusal is a 403 on the operation mint. diff --git a/gen/saas/accounts/v1/accountsv1connect/datasource.connect.go b/gen/saas/accounts/v1/accountsv1connect/datasource.connect.go index 91d0a47..8ec894d 100644 --- a/gen/saas/accounts/v1/accountsv1connect/datasource.connect.go +++ b/gen/saas/accounts/v1/accountsv1connect/datasource.connect.go @@ -120,6 +120,18 @@ const ( // DatasourceServiceRevokeSourceDelegationProcedure is the fully-qualified name of the // DatasourceService's RevokeSourceDelegation RPC. DatasourceServiceRevokeSourceDelegationProcedure = "/saas.accounts.v1.DatasourceService/RevokeSourceDelegation" + // DatasourceServiceDelegateSourceTriggersProcedure is the fully-qualified name of the + // DatasourceService's DelegateSourceTriggers RPC. + DatasourceServiceDelegateSourceTriggersProcedure = "/saas.accounts.v1.DatasourceService/DelegateSourceTriggers" + // DatasourceServiceGetSourceTriggerDeclarationProcedure is the fully-qualified name of the + // DatasourceService's GetSourceTriggerDeclaration RPC. + DatasourceServiceGetSourceTriggerDeclarationProcedure = "/saas.accounts.v1.DatasourceService/GetSourceTriggerDeclaration" + // DatasourceServiceReconcileSourceProcedure is the fully-qualified name of the DatasourceService's + // ReconcileSource RPC. + DatasourceServiceReconcileSourceProcedure = "/saas.accounts.v1.DatasourceService/ReconcileSource" + // DatasourceServiceLookupReconcileSourceProcedure is the fully-qualified name of the + // DatasourceService's LookupReconcileSource RPC. + DatasourceServiceLookupReconcileSourceProcedure = "/saas.accounts.v1.DatasourceService/LookupReconcileSource" ) // DatasourceServiceClient is a client for the saas.accounts.v1.DatasourceService service. @@ -230,6 +242,55 @@ type DatasourceServiceClient interface { // only once a person reconnects it. Revoking one already revoked changes // nothing. RevokeSourceDelegation(context.Context, *connect.Request[v1.RevokeSourceDelegationRequest]) (*connect.Response[v1.RevokeSourceDelegationResponse], error) + // DelegateSourceTriggers records the delegation a declared release's + // triggers run under, for one already-connected source, without reconnecting + // it. It is the one act of binding that was otherwise only available at + // connect: a release installed after a source was connected finds no + // delegation to name, and nothing backfills one. + // + // It records nothing new about who may do what. For every module whose one + // operation binding declares source_delegation_scopes and which holds NO + // active delegation of the source, it records one under the calling + // administrator, in one transaction. + // + // It is ADDITIVE. A module that already holds an active delegation is left + // exactly as it is: this used to revoke every one of them as `replaced` and + // re-record each under the caller, which took a personal source's delegation + // away from its owner and moved unrelated modules' authority onto the + // administrator. A personal source the caller does not own is refused + // (PERMISSION_DENIED), because the authority a reference borrows must be one + // that can perform the operation the trigger admits, and on such a source + // that is the owner's alone. + DelegateSourceTriggers(context.Context, *connect.Request[v1.DelegateSourceTriggersRequest]) (*connect.Response[v1.DelegateSourceTriggersResponse], error) + // GetSourceTriggerDeclaration reads the reconcile schedule this host declares + // for one source — the trigger a declared release carries — together with + // the identity its occurrences would run under and the children already + // minted against that identity. The declaration is what an executing module + // admits occurrences from. + // + // Reading it does not mean anything fires it. No composed runtime consumes + // the declaration yet, so this host still runs the reconcile schedule itself + // as an explicitly labelled stopgap, deleted when one does. + GetSourceTriggerDeclaration(context.Context, *connect.Request[v1.GetSourceTriggerDeclarationRequest]) (*connect.Response[v1.GetSourceTriggerDeclarationResponse], error) + // ReconcileSource performs one reconcile pass over a source: the host + // operation the declared schedule's occurrences admit, and the same work a + // person asks for by hand. It resolves nothing with the provider itself — + // GitHub gets a conditional reconcile that snapshots only if its head moved, + // and a pull provider the full sync its connector has — so an occurrence is + // never slowed by one unreachable source. + // + // It is an operation, not a sweep: it names exactly one source, it carries + // the effect identity its caller chose, and its receipt is read back through + // LookupReconcileSource. Nothing in this host decides when it runs. + // The floor is organization membership and the rule is stricter than the + // floor, as on the sibling operations: a shared source is an organization + // administrator's to reconcile, a personal one only its owner's, which no + // single tenant requirement spells. ReconcileSourceAuthority enforces it, + // before the receipt guard and again after its serialization hold. + ReconcileSource(context.Context, *connect.Request[v1.ReconcileSourceRequest]) (*connect.Response[v1.ReconcileSourceResponse], error) + // LookupReconcileSource reads back the receipt of one reconcile effect. It + // never starts a pass: recovery reads what committed and nothing else. + LookupReconcileSource(context.Context, *connect.Request[v1.LookupReconcileSourceRequest]) (*connect.Response[v1.ReconcileSourceResponse], error) } // NewDatasourceServiceClient constructs a client for the saas.accounts.v1.DatasourceService @@ -417,6 +478,30 @@ func NewDatasourceServiceClient(httpClient connect.HTTPClient, baseURL string, o connect.WithSchema(datasourceServiceMethods.ByName("RevokeSourceDelegation")), connect.WithClientOptions(opts...), ), + delegateSourceTriggers: connect.NewClient[v1.DelegateSourceTriggersRequest, v1.DelegateSourceTriggersResponse]( + httpClient, + baseURL+DatasourceServiceDelegateSourceTriggersProcedure, + connect.WithSchema(datasourceServiceMethods.ByName("DelegateSourceTriggers")), + connect.WithClientOptions(opts...), + ), + getSourceTriggerDeclaration: connect.NewClient[v1.GetSourceTriggerDeclarationRequest, v1.GetSourceTriggerDeclarationResponse]( + httpClient, + baseURL+DatasourceServiceGetSourceTriggerDeclarationProcedure, + connect.WithSchema(datasourceServiceMethods.ByName("GetSourceTriggerDeclaration")), + connect.WithClientOptions(opts...), + ), + reconcileSource: connect.NewClient[v1.ReconcileSourceRequest, v1.ReconcileSourceResponse]( + httpClient, + baseURL+DatasourceServiceReconcileSourceProcedure, + connect.WithSchema(datasourceServiceMethods.ByName("ReconcileSource")), + connect.WithClientOptions(opts...), + ), + lookupReconcileSource: connect.NewClient[v1.LookupReconcileSourceRequest, v1.ReconcileSourceResponse]( + httpClient, + baseURL+DatasourceServiceLookupReconcileSourceProcedure, + connect.WithSchema(datasourceServiceMethods.ByName("LookupReconcileSource")), + connect.WithClientOptions(opts...), + ), } } @@ -451,6 +536,10 @@ type datasourceServiceClient struct { deleteDatasourceDomain *connect.Client[v1.DeleteDatasourceDomainRequest, v1.DeleteDatasourceDomainResponse] listSourceDelegations *connect.Client[v1.ListSourceDelegationsRequest, v1.ListSourceDelegationsResponse] revokeSourceDelegation *connect.Client[v1.RevokeSourceDelegationRequest, v1.RevokeSourceDelegationResponse] + delegateSourceTriggers *connect.Client[v1.DelegateSourceTriggersRequest, v1.DelegateSourceTriggersResponse] + getSourceTriggerDeclaration *connect.Client[v1.GetSourceTriggerDeclarationRequest, v1.GetSourceTriggerDeclarationResponse] + reconcileSource *connect.Client[v1.ReconcileSourceRequest, v1.ReconcileSourceResponse] + lookupReconcileSource *connect.Client[v1.LookupReconcileSourceRequest, v1.ReconcileSourceResponse] } // PruneSourceOperationReceipts calls @@ -602,6 +691,26 @@ func (c *datasourceServiceClient) RevokeSourceDelegation(ctx context.Context, re return c.revokeSourceDelegation.CallUnary(ctx, req) } +// DelegateSourceTriggers calls saas.accounts.v1.DatasourceService.DelegateSourceTriggers. +func (c *datasourceServiceClient) DelegateSourceTriggers(ctx context.Context, req *connect.Request[v1.DelegateSourceTriggersRequest]) (*connect.Response[v1.DelegateSourceTriggersResponse], error) { + return c.delegateSourceTriggers.CallUnary(ctx, req) +} + +// GetSourceTriggerDeclaration calls saas.accounts.v1.DatasourceService.GetSourceTriggerDeclaration. +func (c *datasourceServiceClient) GetSourceTriggerDeclaration(ctx context.Context, req *connect.Request[v1.GetSourceTriggerDeclarationRequest]) (*connect.Response[v1.GetSourceTriggerDeclarationResponse], error) { + return c.getSourceTriggerDeclaration.CallUnary(ctx, req) +} + +// ReconcileSource calls saas.accounts.v1.DatasourceService.ReconcileSource. +func (c *datasourceServiceClient) ReconcileSource(ctx context.Context, req *connect.Request[v1.ReconcileSourceRequest]) (*connect.Response[v1.ReconcileSourceResponse], error) { + return c.reconcileSource.CallUnary(ctx, req) +} + +// LookupReconcileSource calls saas.accounts.v1.DatasourceService.LookupReconcileSource. +func (c *datasourceServiceClient) LookupReconcileSource(ctx context.Context, req *connect.Request[v1.LookupReconcileSourceRequest]) (*connect.Response[v1.ReconcileSourceResponse], error) { + return c.lookupReconcileSource.CallUnary(ctx, req) +} + // DatasourceServiceHandler is an implementation of the saas.accounts.v1.DatasourceService service. type DatasourceServiceHandler interface { // PruneSourceOperationReceipts expires response bodies after Invoke's declared @@ -710,6 +819,55 @@ type DatasourceServiceHandler interface { // only once a person reconnects it. Revoking one already revoked changes // nothing. RevokeSourceDelegation(context.Context, *connect.Request[v1.RevokeSourceDelegationRequest]) (*connect.Response[v1.RevokeSourceDelegationResponse], error) + // DelegateSourceTriggers records the delegation a declared release's + // triggers run under, for one already-connected source, without reconnecting + // it. It is the one act of binding that was otherwise only available at + // connect: a release installed after a source was connected finds no + // delegation to name, and nothing backfills one. + // + // It records nothing new about who may do what. For every module whose one + // operation binding declares source_delegation_scopes and which holds NO + // active delegation of the source, it records one under the calling + // administrator, in one transaction. + // + // It is ADDITIVE. A module that already holds an active delegation is left + // exactly as it is: this used to revoke every one of them as `replaced` and + // re-record each under the caller, which took a personal source's delegation + // away from its owner and moved unrelated modules' authority onto the + // administrator. A personal source the caller does not own is refused + // (PERMISSION_DENIED), because the authority a reference borrows must be one + // that can perform the operation the trigger admits, and on such a source + // that is the owner's alone. + DelegateSourceTriggers(context.Context, *connect.Request[v1.DelegateSourceTriggersRequest]) (*connect.Response[v1.DelegateSourceTriggersResponse], error) + // GetSourceTriggerDeclaration reads the reconcile schedule this host declares + // for one source — the trigger a declared release carries — together with + // the identity its occurrences would run under and the children already + // minted against that identity. The declaration is what an executing module + // admits occurrences from. + // + // Reading it does not mean anything fires it. No composed runtime consumes + // the declaration yet, so this host still runs the reconcile schedule itself + // as an explicitly labelled stopgap, deleted when one does. + GetSourceTriggerDeclaration(context.Context, *connect.Request[v1.GetSourceTriggerDeclarationRequest]) (*connect.Response[v1.GetSourceTriggerDeclarationResponse], error) + // ReconcileSource performs one reconcile pass over a source: the host + // operation the declared schedule's occurrences admit, and the same work a + // person asks for by hand. It resolves nothing with the provider itself — + // GitHub gets a conditional reconcile that snapshots only if its head moved, + // and a pull provider the full sync its connector has — so an occurrence is + // never slowed by one unreachable source. + // + // It is an operation, not a sweep: it names exactly one source, it carries + // the effect identity its caller chose, and its receipt is read back through + // LookupReconcileSource. Nothing in this host decides when it runs. + // The floor is organization membership and the rule is stricter than the + // floor, as on the sibling operations: a shared source is an organization + // administrator's to reconcile, a personal one only its owner's, which no + // single tenant requirement spells. ReconcileSourceAuthority enforces it, + // before the receipt guard and again after its serialization hold. + ReconcileSource(context.Context, *connect.Request[v1.ReconcileSourceRequest]) (*connect.Response[v1.ReconcileSourceResponse], error) + // LookupReconcileSource reads back the receipt of one reconcile effect. It + // never starts a pass: recovery reads what committed and nothing else. + LookupReconcileSource(context.Context, *connect.Request[v1.LookupReconcileSourceRequest]) (*connect.Response[v1.ReconcileSourceResponse], error) } // NewDatasourceServiceHandler builds an HTTP handler from the service implementation. It returns @@ -893,6 +1051,30 @@ func NewDatasourceServiceHandler(svc DatasourceServiceHandler, opts ...connect.H connect.WithSchema(datasourceServiceMethods.ByName("RevokeSourceDelegation")), connect.WithHandlerOptions(opts...), ) + datasourceServiceDelegateSourceTriggersHandler := connect.NewUnaryHandler( + DatasourceServiceDelegateSourceTriggersProcedure, + svc.DelegateSourceTriggers, + connect.WithSchema(datasourceServiceMethods.ByName("DelegateSourceTriggers")), + connect.WithHandlerOptions(opts...), + ) + datasourceServiceGetSourceTriggerDeclarationHandler := connect.NewUnaryHandler( + DatasourceServiceGetSourceTriggerDeclarationProcedure, + svc.GetSourceTriggerDeclaration, + connect.WithSchema(datasourceServiceMethods.ByName("GetSourceTriggerDeclaration")), + connect.WithHandlerOptions(opts...), + ) + datasourceServiceReconcileSourceHandler := connect.NewUnaryHandler( + DatasourceServiceReconcileSourceProcedure, + svc.ReconcileSource, + connect.WithSchema(datasourceServiceMethods.ByName("ReconcileSource")), + connect.WithHandlerOptions(opts...), + ) + datasourceServiceLookupReconcileSourceHandler := connect.NewUnaryHandler( + DatasourceServiceLookupReconcileSourceProcedure, + svc.LookupReconcileSource, + connect.WithSchema(datasourceServiceMethods.ByName("LookupReconcileSource")), + connect.WithHandlerOptions(opts...), + ) return "/saas.accounts.v1.DatasourceService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { switch r.URL.Path { case DatasourceServicePruneSourceOperationReceiptsProcedure: @@ -953,6 +1135,14 @@ func NewDatasourceServiceHandler(svc DatasourceServiceHandler, opts ...connect.H datasourceServiceListSourceDelegationsHandler.ServeHTTP(w, r) case DatasourceServiceRevokeSourceDelegationProcedure: datasourceServiceRevokeSourceDelegationHandler.ServeHTTP(w, r) + case DatasourceServiceDelegateSourceTriggersProcedure: + datasourceServiceDelegateSourceTriggersHandler.ServeHTTP(w, r) + case DatasourceServiceGetSourceTriggerDeclarationProcedure: + datasourceServiceGetSourceTriggerDeclarationHandler.ServeHTTP(w, r) + case DatasourceServiceReconcileSourceProcedure: + datasourceServiceReconcileSourceHandler.ServeHTTP(w, r) + case DatasourceServiceLookupReconcileSourceProcedure: + datasourceServiceLookupReconcileSourceHandler.ServeHTTP(w, r) default: http.NotFound(w, r) } @@ -1077,3 +1267,19 @@ func (UnimplementedDatasourceServiceHandler) ListSourceDelegations(context.Conte func (UnimplementedDatasourceServiceHandler) RevokeSourceDelegation(context.Context, *connect.Request[v1.RevokeSourceDelegationRequest]) (*connect.Response[v1.RevokeSourceDelegationResponse], error) { return nil, connect.NewError(connect.CodeUnimplemented, errors.New("saas.accounts.v1.DatasourceService.RevokeSourceDelegation is not implemented")) } + +func (UnimplementedDatasourceServiceHandler) DelegateSourceTriggers(context.Context, *connect.Request[v1.DelegateSourceTriggersRequest]) (*connect.Response[v1.DelegateSourceTriggersResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("saas.accounts.v1.DatasourceService.DelegateSourceTriggers is not implemented")) +} + +func (UnimplementedDatasourceServiceHandler) GetSourceTriggerDeclaration(context.Context, *connect.Request[v1.GetSourceTriggerDeclarationRequest]) (*connect.Response[v1.GetSourceTriggerDeclarationResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("saas.accounts.v1.DatasourceService.GetSourceTriggerDeclaration is not implemented")) +} + +func (UnimplementedDatasourceServiceHandler) ReconcileSource(context.Context, *connect.Request[v1.ReconcileSourceRequest]) (*connect.Response[v1.ReconcileSourceResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("saas.accounts.v1.DatasourceService.ReconcileSource is not implemented")) +} + +func (UnimplementedDatasourceServiceHandler) LookupReconcileSource(context.Context, *connect.Request[v1.LookupReconcileSourceRequest]) (*connect.Response[v1.ReconcileSourceResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("saas.accounts.v1.DatasourceService.LookupReconcileSource is not implemented")) +} diff --git a/gen/saas/accounts/v1/accountsv1connect/installations.connect.go b/gen/saas/accounts/v1/accountsv1connect/installations.connect.go index 82d172d..57ca8be 100644 --- a/gen/saas/accounts/v1/accountsv1connect/installations.connect.go +++ b/gen/saas/accounts/v1/accountsv1connect/installations.connect.go @@ -43,6 +43,9 @@ const ( // InstallationServiceNarrowInstallationProcedure is the fully-qualified name of the // InstallationService's NarrowInstallation RPC. InstallationServiceNarrowInstallationProcedure = "/saas.accounts.v1.InstallationService/NarrowInstallation" + // InstallationServiceRetryInstallationProcedure is the fully-qualified name of the + // InstallationService's RetryInstallation RPC. + InstallationServiceRetryInstallationProcedure = "/saas.accounts.v1.InstallationService/RetryInstallation" // InstallationServiceTransferInstallationOwnershipProcedure is the fully-qualified name of the // InstallationService's TransferInstallationOwnership RPC. InstallationServiceTransferInstallationOwnershipProcedure = "/saas.accounts.v1.InstallationService/TransferInstallationOwnership" @@ -81,6 +84,9 @@ type InstallationServiceClient interface { // Narrowing is witnessed in the policy log before commit, then atomically // bumps the installation revision, cancels its org's work and records audit. NarrowInstallation(context.Context, *connect.Request[v1.NarrowInstallationRequest]) (*connect.Response[emptypb.Empty], error) + // RetryInstallation runs a failed installation's install step again, at the + // same revision. The installation is pending until the solution acknowledges. + RetryInstallation(context.Context, *connect.Request[v1.RetryInstallationRequest]) (*connect.Response[v1.Installation], error) // TransferInstallationOwnership reassigns the owner of record and replaces the // co-owner succession set. This is how a "connection owner left the org" // failure is repaired: an admin transfers the installation to a current admin, @@ -181,6 +187,12 @@ func NewInstallationServiceClient(httpClient connect.HTTPClient, baseURL string, connect.WithSchema(installationServiceMethods.ByName("NarrowInstallation")), connect.WithClientOptions(opts...), ), + retryInstallation: connect.NewClient[v1.RetryInstallationRequest, v1.Installation]( + httpClient, + baseURL+InstallationServiceRetryInstallationProcedure, + connect.WithSchema(installationServiceMethods.ByName("RetryInstallation")), + connect.WithClientOptions(opts...), + ), transferInstallationOwnership: connect.NewClient[v1.TransferInstallationOwnershipRequest, v1.Installation]( httpClient, baseURL+InstallationServiceTransferInstallationOwnershipProcedure, @@ -231,6 +243,7 @@ type installationServiceClient struct { installSolution *connect.Client[v1.InstallSolutionRequest, v1.Installation] uninstallSolution *connect.Client[v1.UninstallSolutionRequest, emptypb.Empty] narrowInstallation *connect.Client[v1.NarrowInstallationRequest, emptypb.Empty] + retryInstallation *connect.Client[v1.RetryInstallationRequest, v1.Installation] transferInstallationOwnership *connect.Client[v1.TransferInstallationOwnershipRequest, v1.Installation] getInstallation *connect.Client[v1.GetInstallationRequest, v1.GetInstallationResponse] listInstallations *connect.Client[v1.ListInstallationsRequest, v1.ListInstallationsResponse] @@ -255,6 +268,11 @@ func (c *installationServiceClient) NarrowInstallation(ctx context.Context, req return c.narrowInstallation.CallUnary(ctx, req) } +// RetryInstallation calls saas.accounts.v1.InstallationService.RetryInstallation. +func (c *installationServiceClient) RetryInstallation(ctx context.Context, req *connect.Request[v1.RetryInstallationRequest]) (*connect.Response[v1.Installation], error) { + return c.retryInstallation.CallUnary(ctx, req) +} + // TransferInstallationOwnership calls // saas.accounts.v1.InstallationService.TransferInstallationOwnership. func (c *installationServiceClient) TransferInstallationOwnership(ctx context.Context, req *connect.Request[v1.TransferInstallationOwnershipRequest]) (*connect.Response[v1.Installation], error) { @@ -308,6 +326,9 @@ type InstallationServiceHandler interface { // Narrowing is witnessed in the policy log before commit, then atomically // bumps the installation revision, cancels its org's work and records audit. NarrowInstallation(context.Context, *connect.Request[v1.NarrowInstallationRequest]) (*connect.Response[emptypb.Empty], error) + // RetryInstallation runs a failed installation's install step again, at the + // same revision. The installation is pending until the solution acknowledges. + RetryInstallation(context.Context, *connect.Request[v1.RetryInstallationRequest]) (*connect.Response[v1.Installation], error) // TransferInstallationOwnership reassigns the owner of record and replaces the // co-owner succession set. This is how a "connection owner left the org" // failure is repaired: an admin transfers the installation to a current admin, @@ -404,6 +425,12 @@ func NewInstallationServiceHandler(svc InstallationServiceHandler, opts ...conne connect.WithSchema(installationServiceMethods.ByName("NarrowInstallation")), connect.WithHandlerOptions(opts...), ) + installationServiceRetryInstallationHandler := connect.NewUnaryHandler( + InstallationServiceRetryInstallationProcedure, + svc.RetryInstallation, + connect.WithSchema(installationServiceMethods.ByName("RetryInstallation")), + connect.WithHandlerOptions(opts...), + ) installationServiceTransferInstallationOwnershipHandler := connect.NewUnaryHandler( InstallationServiceTransferInstallationOwnershipProcedure, svc.TransferInstallationOwnership, @@ -454,6 +481,8 @@ func NewInstallationServiceHandler(svc InstallationServiceHandler, opts ...conne installationServiceUninstallSolutionHandler.ServeHTTP(w, r) case InstallationServiceNarrowInstallationProcedure: installationServiceNarrowInstallationHandler.ServeHTTP(w, r) + case InstallationServiceRetryInstallationProcedure: + installationServiceRetryInstallationHandler.ServeHTTP(w, r) case InstallationServiceTransferInstallationOwnershipProcedure: installationServiceTransferInstallationOwnershipHandler.ServeHTTP(w, r) case InstallationServiceGetInstallationProcedure: @@ -489,6 +518,10 @@ func (UnimplementedInstallationServiceHandler) NarrowInstallation(context.Contex return nil, connect.NewError(connect.CodeUnimplemented, errors.New("saas.accounts.v1.InstallationService.NarrowInstallation is not implemented")) } +func (UnimplementedInstallationServiceHandler) RetryInstallation(context.Context, *connect.Request[v1.RetryInstallationRequest]) (*connect.Response[v1.Installation], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("saas.accounts.v1.InstallationService.RetryInstallation is not implemented")) +} + func (UnimplementedInstallationServiceHandler) TransferInstallationOwnership(context.Context, *connect.Request[v1.TransferInstallationOwnershipRequest]) (*connect.Response[v1.Installation], error) { return nil, connect.NewError(connect.CodeUnimplemented, errors.New("saas.accounts.v1.InstallationService.TransferInstallationOwnership is not implemented")) } diff --git a/gen/saas/accounts/v1/accountsv1connect/module_capabilities.connect.go b/gen/saas/accounts/v1/accountsv1connect/module_capabilities.connect.go index 427ccc3..6717eef 100644 --- a/gen/saas/accounts/v1/accountsv1connect/module_capabilities.connect.go +++ b/gen/saas/accounts/v1/accountsv1connect/module_capabilities.connect.go @@ -131,6 +131,9 @@ const ( // ModuleCapabilitiesServiceReplayEventsProcedure is the fully-qualified name of the // ModuleCapabilitiesService's ReplayEvents RPC. ModuleCapabilitiesServiceReplayEventsProcedure = "/saas.accounts.v1.ModuleCapabilitiesService/ReplayEvents" + // ModuleCapabilitiesServiceResolveWorkContextAuthorityProcedure is the fully-qualified name of the + // ModuleCapabilitiesService's ResolveWorkContextAuthority RPC. + ModuleCapabilitiesServiceResolveWorkContextAuthorityProcedure = "/saas.accounts.v1.ModuleCapabilitiesService/ResolveWorkContextAuthority" ) // ModuleCapabilitiesServiceClient is a client for the saas.accounts.v1.ModuleCapabilitiesService @@ -257,6 +260,14 @@ type ModuleCapabilitiesServiceClient interface { ListSubscriptions(context.Context, *connect.Request[v1.ModuleListSubscriptionsRequest]) (*connect.Response[v1.ModuleListSubscriptionsResponse], error) // ReplayEvents re-delivers durable events to the caller's own subscriptions. ReplayEvents(context.Context, *connect.Request[v1.ModuleReplayEventsRequest]) (*connect.Response[v1.ModuleReplayEventsResponse], error) + // ResolveWorkContextAuthority answers one live value a callee's verifier + // holds a capability's seal against: the installation it was sealed to and + // its revision, a principal's epoch, the build the issuer approves for a + // principal, an operation binding, the authorization revision a capability's + // owner carries, or an approval grant. It is the surface a composed module + // builds its seal, revision and grant sources on; see the block above + // ModuleResolveWorkContextAuthorityRequest for what a caller may ask. + ResolveWorkContextAuthority(context.Context, *connect.Request[v1.ModuleResolveWorkContextAuthorityRequest]) (*connect.Response[v1.ModuleResolveWorkContextAuthorityResponse], error) } // NewModuleCapabilitiesServiceClient constructs a client for the @@ -462,6 +473,12 @@ func NewModuleCapabilitiesServiceClient(httpClient connect.HTTPClient, baseURL s connect.WithSchema(moduleCapabilitiesServiceMethods.ByName("ReplayEvents")), connect.WithClientOptions(opts...), ), + resolveWorkContextAuthority: connect.NewClient[v1.ModuleResolveWorkContextAuthorityRequest, v1.ModuleResolveWorkContextAuthorityResponse]( + httpClient, + baseURL+ModuleCapabilitiesServiceResolveWorkContextAuthorityProcedure, + connect.WithSchema(moduleCapabilitiesServiceMethods.ByName("ResolveWorkContextAuthority")), + connect.WithClientOptions(opts...), + ), } } @@ -499,6 +516,7 @@ type moduleCapabilitiesServiceClient struct { unsubscribe *connect.Client[v1.ModuleUnsubscribeRequest, emptypb.Empty] listSubscriptions *connect.Client[v1.ModuleListSubscriptionsRequest, v1.ModuleListSubscriptionsResponse] replayEvents *connect.Client[v1.ModuleReplayEventsRequest, v1.ModuleReplayEventsResponse] + resolveWorkContextAuthority *connect.Client[v1.ModuleResolveWorkContextAuthorityRequest, v1.ModuleResolveWorkContextAuthorityResponse] } // GetCurrentInstallation calls saas.accounts.v1.ModuleCapabilitiesService.GetCurrentInstallation. @@ -672,6 +690,12 @@ func (c *moduleCapabilitiesServiceClient) ReplayEvents(ctx context.Context, req return c.replayEvents.CallUnary(ctx, req) } +// ResolveWorkContextAuthority calls +// saas.accounts.v1.ModuleCapabilitiesService.ResolveWorkContextAuthority. +func (c *moduleCapabilitiesServiceClient) ResolveWorkContextAuthority(ctx context.Context, req *connect.Request[v1.ModuleResolveWorkContextAuthorityRequest]) (*connect.Response[v1.ModuleResolveWorkContextAuthorityResponse], error) { + return c.resolveWorkContextAuthority.CallUnary(ctx, req) +} + // ModuleCapabilitiesServiceHandler is an implementation of the // saas.accounts.v1.ModuleCapabilitiesService service. type ModuleCapabilitiesServiceHandler interface { @@ -796,6 +820,14 @@ type ModuleCapabilitiesServiceHandler interface { ListSubscriptions(context.Context, *connect.Request[v1.ModuleListSubscriptionsRequest]) (*connect.Response[v1.ModuleListSubscriptionsResponse], error) // ReplayEvents re-delivers durable events to the caller's own subscriptions. ReplayEvents(context.Context, *connect.Request[v1.ModuleReplayEventsRequest]) (*connect.Response[v1.ModuleReplayEventsResponse], error) + // ResolveWorkContextAuthority answers one live value a callee's verifier + // holds a capability's seal against: the installation it was sealed to and + // its revision, a principal's epoch, the build the issuer approves for a + // principal, an operation binding, the authorization revision a capability's + // owner carries, or an approval grant. It is the surface a composed module + // builds its seal, revision and grant sources on; see the block above + // ModuleResolveWorkContextAuthorityRequest for what a caller may ask. + ResolveWorkContextAuthority(context.Context, *connect.Request[v1.ModuleResolveWorkContextAuthorityRequest]) (*connect.Response[v1.ModuleResolveWorkContextAuthorityResponse], error) } // NewModuleCapabilitiesServiceHandler builds an HTTP handler from the service implementation. It @@ -997,6 +1029,12 @@ func NewModuleCapabilitiesServiceHandler(svc ModuleCapabilitiesServiceHandler, o connect.WithSchema(moduleCapabilitiesServiceMethods.ByName("ReplayEvents")), connect.WithHandlerOptions(opts...), ) + moduleCapabilitiesServiceResolveWorkContextAuthorityHandler := connect.NewUnaryHandler( + ModuleCapabilitiesServiceResolveWorkContextAuthorityProcedure, + svc.ResolveWorkContextAuthority, + connect.WithSchema(moduleCapabilitiesServiceMethods.ByName("ResolveWorkContextAuthority")), + connect.WithHandlerOptions(opts...), + ) return "/saas.accounts.v1.ModuleCapabilitiesService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { switch r.URL.Path { case ModuleCapabilitiesServiceGetCurrentInstallationProcedure: @@ -1063,6 +1101,8 @@ func NewModuleCapabilitiesServiceHandler(svc ModuleCapabilitiesServiceHandler, o moduleCapabilitiesServiceListSubscriptionsHandler.ServeHTTP(w, r) case ModuleCapabilitiesServiceReplayEventsProcedure: moduleCapabilitiesServiceReplayEventsHandler.ServeHTTP(w, r) + case ModuleCapabilitiesServiceResolveWorkContextAuthorityProcedure: + moduleCapabilitiesServiceResolveWorkContextAuthorityHandler.ServeHTTP(w, r) default: http.NotFound(w, r) } @@ -1199,3 +1239,7 @@ func (UnimplementedModuleCapabilitiesServiceHandler) ListSubscriptions(context.C func (UnimplementedModuleCapabilitiesServiceHandler) ReplayEvents(context.Context, *connect.Request[v1.ModuleReplayEventsRequest]) (*connect.Response[v1.ModuleReplayEventsResponse], error) { return nil, connect.NewError(connect.CodeUnimplemented, errors.New("saas.accounts.v1.ModuleCapabilitiesService.ReplayEvents is not implemented")) } + +func (UnimplementedModuleCapabilitiesServiceHandler) ResolveWorkContextAuthority(context.Context, *connect.Request[v1.ModuleResolveWorkContextAuthorityRequest]) (*connect.Response[v1.ModuleResolveWorkContextAuthorityResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("saas.accounts.v1.ModuleCapabilitiesService.ResolveWorkContextAuthority is not implemented")) +} diff --git a/gen/saas/accounts/v1/api_keys.pb.go b/gen/saas/accounts/v1/api_keys.pb.go index 6aef82e..7b5b7dd 100644 --- a/gen/saas/accounts/v1/api_keys.pb.go +++ b/gen/saas/accounts/v1/api_keys.pb.go @@ -717,7 +717,7 @@ const file_saas_accounts_v1_api_keys_proto_rawDesc = "" + "\x18API_KEY_ENVIRONMENT_TEST\x10\x022\xf1\x05\n" + "\rAPIKeyService\x12\xcd\x01\n" + "\fCreateAPIKey\x12%.saas.accounts.v1.CreateAPIKeyRequest\x1a&.saas.accounts.v1.CreateAPIKeyResponse\"n\xc2\xf3\x18S\b\x02\x10\x04\x1a\x0eapi_keys:write*\x15\n" + - "\x0forganization_id\x10\x02\x18\x010\x01:\x18\n" + + "\x0forganization_id\x10\x02\x18\x010\x04:\x18\n" + "\x14saas.api_key.created\x10\x02@\x01H\x04P\x03X\x04`\x01x\x02\x82\xd3\xe4\x93\x02\x11:\x01*\"\f/v1/api-keys\x12\xbd\x01\n" + "\vListAPIKeys\x12$.saas.accounts.v1.ListAPIKeysRequest\x1a%.saas.accounts.v1.ListAPIKeysResponse\"a\xc2\xf3\x18I\b\x02\x10\x03\x1a\rapi_keys:read\"\rapi_keys:read*\x15\n" + "\x0forganization_id\x10\x02\x18\x010\x01:\x02\x10\x01@\x01H\x03P\x03X\x03`\x01\x82\xd3\xe4\x93\x02\x0e\x12\f/v1/api-keys\x12\xd0\x01\n" + diff --git a/gen/saas/accounts/v1/datasource.pb.go b/gen/saas/accounts/v1/datasource.pb.go index 09ce5e3..ea8ce23 100644 --- a/gen/saas/accounts/v1/datasource.pb.go +++ b/gen/saas/accounts/v1/datasource.pb.go @@ -913,7 +913,7 @@ func (x SourceOperation_Effect) Number() protoreflect.EnumNumber { // Deprecated: Use SourceOperation_Effect.Descriptor instead. func (SourceOperation_Effect) EnumDescriptor() ([]byte, []int) { - return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{65, 0} + return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{77, 0} } // GitHubDatasourceConfig is the public, non-secret configuration of a GitHub @@ -5485,6 +5485,965 @@ func (x *RevokeSourceDelegationResponse) GetDelegation() *SourceDelegation { return nil } +// TriggerIdentity is the identity a declared trigger's occurrences run under. +// EXACTLY ONE field is set, and the two are not alternatives of equal +// standing: +// +// - source names a connected source whose delegation this host owns. It is +// the grant reference: an identifier rather than a credential, re-checked +// against current facts on every mint, so an occurrence's run may outlive +// the capability that admitted it and revoking the delegation refuses the +// next occurrence. +// +// IT IS NOT OPAQUE, and revocation is therefore not permanent. The value +// is the source's own id, and a mint resolves whichever delegation of that +// source is active, so revoking one and then RECONNECTING the source +// records a new delegation the same reference resolves to — re-arming an +// installed trigger with no explicit re-delegation. A reference that +// revocation ends for good is a delegation-level one; this host accepts +// that form at MintSourceOperationContext (delegation_id), but the client +// an executing module mints through sends only source_id, so a declaration +// cannot name it yet. +// +// - binding names one of the release's declared operation bindings, and an +// occurrence would run under the installation's own principal from that +// binding's headless scopes — an ordinary token admission, bounded by the +// capability's own short lifetime. +// +// IT IS PLANNED, and no declaration this host builds has ever set it. It +// cannot serve the reconcile trigger: the headless mint lives 60 seconds +// against that trigger's 10-minute declared deadline, and the capability +// is the module's own principal while ReconcileSource requires an +// organization member. +// +// THE NAMES ARE THE INSTALLATION DOCUMENT'S, not this host's and not the +// executing module's read API's. That distinction is load-bearing: the module +// that fires triggers answers an operator's READ with `source_delegation` and +// `installation_binding`, and decodes an INSTALLATION with `source` and +// `binding`. Only the second has to parse for a release to install at all, so +// it is the one this host speaks — everywhere, so there is one vocabulary +// here rather than two that can drift apart. +type TriggerIdentity struct { + state protoimpl.MessageState `protogen:"open.v1"` + Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` + Binding string `protobuf:"bytes,2,opt,name=binding,proto3" json:"binding,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TriggerIdentity) Reset() { + *x = TriggerIdentity{} + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TriggerIdentity) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TriggerIdentity) ProtoMessage() {} + +func (x *TriggerIdentity) ProtoReflect() protoreflect.Message { + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[65] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TriggerIdentity.ProtoReflect.Descriptor instead. +func (*TriggerIdentity) Descriptor() ([]byte, []int) { + return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{65} +} + +func (x *TriggerIdentity) GetSource() string { + if x != nil { + return x.Source + } + return "" +} + +func (x *TriggerIdentity) GetBinding() string { + if x != nil { + return x.Binding + } + return "" +} + +// DeclaredTriggerSchedule is the clock a release declares, in the vocabulary +// the executing module validates: a five-field cron expression in a named IANA +// location, what becomes of occurrences that came due while nothing was +// running them, what becomes of one that comes due while the previous still +// runs, how long one occurrence's run may take, and the input every +// occurrence is admitted with. A schedule has no arrival to take an input +// from and no runtime may invent one that satisfies a release's own schema, so +// the declaration carries it. +type DeclaredTriggerSchedule struct { + state protoimpl.MessageState `protogen:"open.v1"` + Cron string `protobuf:"bytes,1,opt,name=cron,proto3" json:"cron,omitempty"` + Timezone string `protobuf:"bytes,2,opt,name=timezone,proto3" json:"timezone,omitempty"` + // missed_run is "skip" or "catch_up", and overlap is "skip", "queue" or + // "cancel_previous" — the values the installation decode admits. The read + // API of the module that fires triggers reports the same two facts as + // MISSED_RUN_POLICY_* and OVERLAP_POLICY_*; those are a projection, and a + // declaration carrying them would be refused. + MissedRun string `protobuf:"bytes,3,opt,name=missed_run,json=missedRun,proto3" json:"missed_run,omitempty"` + Overlap string `protobuf:"bytes,4,opt,name=overlap,proto3" json:"overlap,omitempty"` + // deadline is how long one occurrence's run may take, as an integer count of + // NANOSECONDS — the installation document decodes durations with plain + // encoding/json, so a duration string such as "10m" fails the whole document + // rather than the field. + Deadline int64 `protobuf:"varint,5,opt,name=deadline,proto3" json:"deadline,omitempty"` + // input_json is the input every occurrence is admitted with, as the JSON text + // the document carries verbatim. It is a string rather than bytes because + // that is what it is: a JSON value a composition pastes into an installation, + // and base64 would make it unreadable for the one reader who needs it. + InputJson string `protobuf:"bytes,6,opt,name=input_json,json=inputJson,proto3" json:"input_json,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeclaredTriggerSchedule) Reset() { + *x = DeclaredTriggerSchedule{} + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeclaredTriggerSchedule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeclaredTriggerSchedule) ProtoMessage() {} + +func (x *DeclaredTriggerSchedule) ProtoReflect() protoreflect.Message { + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[66] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeclaredTriggerSchedule.ProtoReflect.Descriptor instead. +func (*DeclaredTriggerSchedule) Descriptor() ([]byte, []int) { + return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{66} +} + +func (x *DeclaredTriggerSchedule) GetCron() string { + if x != nil { + return x.Cron + } + return "" +} + +func (x *DeclaredTriggerSchedule) GetTimezone() string { + if x != nil { + return x.Timezone + } + return "" +} + +func (x *DeclaredTriggerSchedule) GetMissedRun() string { + if x != nil { + return x.MissedRun + } + return "" +} + +func (x *DeclaredTriggerSchedule) GetOverlap() string { + if x != nil { + return x.Overlap + } + return "" +} + +func (x *DeclaredTriggerSchedule) GetDeadline() int64 { + if x != nil { + return x.Deadline + } + return 0 +} + +func (x *DeclaredTriggerSchedule) GetInputJson() string { + if x != nil { + return x.InputJson + } + return "" +} + +// TriggerDelegationReference is one delegation reference as an operator binds +// it to a declared release's triggers: the value to write in the release's +// trigger identity, which module and binding it confers, whose authority it +// carries, what it allows, and whether it is still live. +type TriggerDelegationReference struct { + state protoimpl.MessageState `protogen:"open.v1"` + // reference is what a release's trigger names as its source_delegation. It + // is the connected source's id, because the host resolves the active + // delegation from it on every mint — so a reference never names a revoked + // row and a reconnect does not invalidate what an operator installed. + Reference string `protobuf:"bytes,1,opt,name=reference,proto3" json:"reference,omitempty"` + // delegation_id is the row the reference resolved to at read time. It is + // deliberately not the reference: a reconnect replaces the row. + DelegationId string `protobuf:"bytes,2,opt,name=delegation_id,json=delegationId,proto3" json:"delegation_id,omitempty"` + // module is the consuming module's registration prefix and binding the key + // of its operation_audiences entry whose source_delegation_scopes this + // delegation confers. + Module string `protobuf:"bytes,3,opt,name=module,proto3" json:"module,omitempty"` + Binding string `protobuf:"bytes,4,opt,name=binding,proto3" json:"binding,omitempty"` + Audience string `protobuf:"bytes,5,opt,name=audience,proto3" json:"audience,omitempty"` + // tenant is the organization an occurrence acts in and owner_principal_id + // the person whose authority it carries. Neither is a caller's to choose: + // both are read off the delegation. + Tenant string `protobuf:"bytes,6,opt,name=tenant,proto3" json:"tenant,omitempty"` + OwnerPrincipalId string `protobuf:"bytes,7,opt,name=owner_principal_id,json=ownerPrincipalId,proto3" json:"owner_principal_id,omitempty"` + // scopes is what occurrences may do, as `kind:action[:resource]` — exactly + // the binding's declared delegation scopes, and never the module's own + // authority. + Scopes []string `protobuf:"bytes,8,rep,name=scopes,proto3" json:"scopes,omitempty"` + Active bool `protobuf:"varint,9,opt,name=active,proto3" json:"active,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + // revoked_at is unset while the delegation is active. + RevokedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=revoked_at,json=revokedAt,proto3" json:"revoked_at,omitempty"` + Revocation SourceDelegationRevocation `protobuf:"varint,12,opt,name=revocation,proto3,enum=saas.accounts.v1.SourceDelegationRevocation" json:"revocation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TriggerDelegationReference) Reset() { + *x = TriggerDelegationReference{} + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TriggerDelegationReference) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TriggerDelegationReference) ProtoMessage() {} + +func (x *TriggerDelegationReference) ProtoReflect() protoreflect.Message { + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[67] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TriggerDelegationReference.ProtoReflect.Descriptor instead. +func (*TriggerDelegationReference) Descriptor() ([]byte, []int) { + return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{67} +} + +func (x *TriggerDelegationReference) GetReference() string { + if x != nil { + return x.Reference + } + return "" +} + +func (x *TriggerDelegationReference) GetDelegationId() string { + if x != nil { + return x.DelegationId + } + return "" +} + +func (x *TriggerDelegationReference) GetModule() string { + if x != nil { + return x.Module + } + return "" +} + +func (x *TriggerDelegationReference) GetBinding() string { + if x != nil { + return x.Binding + } + return "" +} + +func (x *TriggerDelegationReference) GetAudience() string { + if x != nil { + return x.Audience + } + return "" +} + +func (x *TriggerDelegationReference) GetTenant() string { + if x != nil { + return x.Tenant + } + return "" +} + +func (x *TriggerDelegationReference) GetOwnerPrincipalId() string { + if x != nil { + return x.OwnerPrincipalId + } + return "" +} + +func (x *TriggerDelegationReference) GetScopes() []string { + if x != nil { + return x.Scopes + } + return nil +} + +func (x *TriggerDelegationReference) GetActive() bool { + if x != nil { + return x.Active + } + return false +} + +func (x *TriggerDelegationReference) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *TriggerDelegationReference) GetRevokedAt() *timestamppb.Timestamp { + if x != nil { + return x.RevokedAt + } + return nil +} + +func (x *TriggerDelegationReference) GetRevocation() SourceDelegationRevocation { + if x != nil { + return x.Revocation + } + return SourceDelegationRevocation_SOURCE_DELEGATION_REVOCATION_UNSPECIFIED +} + +// TriggerChildContext is one child Work Context this host minted against a +// reference: one occurrence's identity, as the audit trail recorded it. The +// host keeps no other record — a capability lives about a minute and nothing +// caches one. +type TriggerChildContext struct { + state protoimpl.MessageState `protogen:"open.v1"` + DelegationId string `protobuf:"bytes,1,opt,name=delegation_id,json=delegationId,proto3" json:"delegation_id,omitempty"` + Module string `protobuf:"bytes,2,opt,name=module,proto3" json:"module,omitempty"` + Binding string `protobuf:"bytes,3,opt,name=binding,proto3" json:"binding,omitempty"` + Audience string `protobuf:"bytes,4,opt,name=audience,proto3" json:"audience,omitempty"` + Scopes []string `protobuf:"bytes,5,rep,name=scopes,proto3" json:"scopes,omitempty"` + // lookup says the capability could only recover an effect's receipt rather + // than produce the effect. + Lookup bool `protobuf:"varint,6,opt,name=lookup,proto3" json:"lookup,omitempty"` + MintedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=minted_at,json=mintedAt,proto3" json:"minted_at,omitempty"` + // record is the trail row this child was read from. A child has no identity + // of its own — nothing stores a capability — so the record of the mint is + // what one is identified by. + Record string `protobuf:"bytes,8,opt,name=record,proto3" json:"record,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TriggerChildContext) Reset() { + *x = TriggerChildContext{} + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TriggerChildContext) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TriggerChildContext) ProtoMessage() {} + +func (x *TriggerChildContext) ProtoReflect() protoreflect.Message { + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[68] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TriggerChildContext.ProtoReflect.Descriptor instead. +func (*TriggerChildContext) Descriptor() ([]byte, []int) { + return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{68} +} + +func (x *TriggerChildContext) GetDelegationId() string { + if x != nil { + return x.DelegationId + } + return "" +} + +func (x *TriggerChildContext) GetModule() string { + if x != nil { + return x.Module + } + return "" +} + +func (x *TriggerChildContext) GetBinding() string { + if x != nil { + return x.Binding + } + return "" +} + +func (x *TriggerChildContext) GetAudience() string { + if x != nil { + return x.Audience + } + return "" +} + +func (x *TriggerChildContext) GetScopes() []string { + if x != nil { + return x.Scopes + } + return nil +} + +func (x *TriggerChildContext) GetLookup() bool { + if x != nil { + return x.Lookup + } + return false +} + +func (x *TriggerChildContext) GetMintedAt() *timestamppb.Timestamp { + if x != nil { + return x.MintedAt + } + return nil +} + +func (x *TriggerChildContext) GetRecord() string { + if x != nil { + return x.Record + } + return "" +} + +// SourceTriggerDeclaration is the reconcile schedule this host declares for +// one source, as the trigger a declared release carries. The host fires +// nothing on it: the source's reconcile_interval is the configuration that +// re-declares the trigger, and an executing module owns the clock, the +// occurrences and their cursor. +type SourceTriggerDeclaration struct { + state protoimpl.MessageState `protogen:"open.v1"` + // release is the kind-of-work name the declaration installs under, and + // operation the host operation an occurrence admits, by its method path. + Release string `protobuf:"bytes,1,opt,name=release,proto3" json:"release,omitempty"` + Operation string `protobuf:"bytes,2,opt,name=operation,proto3" json:"operation,omitempty"` + // schedule and identity are unset when undeclarable_reason is set. + Schedule *DeclaredTriggerSchedule `protobuf:"bytes,3,opt,name=schedule,proto3" json:"schedule,omitempty"` + Identity *TriggerIdentity `protobuf:"bytes,4,opt,name=identity,proto3" json:"identity,omitempty"` + // digest fingerprints the declaration, so an interval edit is visibly a + // different declaration rather than the same one with different contents. + Digest string `protobuf:"bytes,5,opt,name=digest,proto3" json:"digest,omitempty"` + // last_occurrence_at is the most recent reconcile this host recorded for the + // source, whatever admitted it, and next_occurrence_at the next instant the + // declared cron comes due. The authoritative cursor belongs to the module + // that fires the trigger; this is what the declaration says, read back. + LastOccurrenceAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=last_occurrence_at,json=lastOccurrenceAt,proto3" json:"last_occurrence_at,omitempty"` + NextOccurrenceAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=next_occurrence_at,json=nextOccurrenceAt,proto3" json:"next_occurrence_at,omitempty"` + // undeclarable_reason says why this source declares no trigger at all: its + // schedule is disabled, or its interval is not one a five-field cron can + // express. Empty means the declaration above is complete. + UndeclarableReason string `protobuf:"bytes,8,opt,name=undeclarable_reason,json=undeclarableReason,proto3" json:"undeclarable_reason,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SourceTriggerDeclaration) Reset() { + *x = SourceTriggerDeclaration{} + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SourceTriggerDeclaration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SourceTriggerDeclaration) ProtoMessage() {} + +func (x *SourceTriggerDeclaration) ProtoReflect() protoreflect.Message { + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[69] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SourceTriggerDeclaration.ProtoReflect.Descriptor instead. +func (*SourceTriggerDeclaration) Descriptor() ([]byte, []int) { + return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{69} +} + +func (x *SourceTriggerDeclaration) GetRelease() string { + if x != nil { + return x.Release + } + return "" +} + +func (x *SourceTriggerDeclaration) GetOperation() string { + if x != nil { + return x.Operation + } + return "" +} + +func (x *SourceTriggerDeclaration) GetSchedule() *DeclaredTriggerSchedule { + if x != nil { + return x.Schedule + } + return nil +} + +func (x *SourceTriggerDeclaration) GetIdentity() *TriggerIdentity { + if x != nil { + return x.Identity + } + return nil +} + +func (x *SourceTriggerDeclaration) GetDigest() string { + if x != nil { + return x.Digest + } + return "" +} + +func (x *SourceTriggerDeclaration) GetLastOccurrenceAt() *timestamppb.Timestamp { + if x != nil { + return x.LastOccurrenceAt + } + return nil +} + +func (x *SourceTriggerDeclaration) GetNextOccurrenceAt() *timestamppb.Timestamp { + if x != nil { + return x.NextOccurrenceAt + } + return nil +} + +func (x *SourceTriggerDeclaration) GetUndeclarableReason() string { + if x != nil { + return x.UndeclarableReason + } + return "" +} + +type DelegateSourceTriggersRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + SourceId string `protobuf:"bytes,2,opt,name=source_id,json=sourceId,proto3" json:"source_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DelegateSourceTriggersRequest) Reset() { + *x = DelegateSourceTriggersRequest{} + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DelegateSourceTriggersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DelegateSourceTriggersRequest) ProtoMessage() {} + +func (x *DelegateSourceTriggersRequest) ProtoReflect() protoreflect.Message { + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[70] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DelegateSourceTriggersRequest.ProtoReflect.Descriptor instead. +func (*DelegateSourceTriggersRequest) Descriptor() ([]byte, []int) { + return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{70} +} + +func (x *DelegateSourceTriggersRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *DelegateSourceTriggersRequest) GetSourceId() string { + if x != nil { + return x.SourceId + } + return "" +} + +type DelegateSourceTriggersResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // One reference per module binding that accepts delegations, by module + // prefix. Empty means no composed module declares one, so no release's + // triggers can name a reference here at all. + Delegations []*TriggerDelegationReference `protobuf:"bytes,1,rep,name=delegations,proto3" json:"delegations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DelegateSourceTriggersResponse) Reset() { + *x = DelegateSourceTriggersResponse{} + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DelegateSourceTriggersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DelegateSourceTriggersResponse) ProtoMessage() {} + +func (x *DelegateSourceTriggersResponse) ProtoReflect() protoreflect.Message { + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[71] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DelegateSourceTriggersResponse.ProtoReflect.Descriptor instead. +func (*DelegateSourceTriggersResponse) Descriptor() ([]byte, []int) { + return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{71} +} + +func (x *DelegateSourceTriggersResponse) GetDelegations() []*TriggerDelegationReference { + if x != nil { + return x.Delegations + } + return nil +} + +type GetSourceTriggerDeclarationRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + SourceId string `protobuf:"bytes,2,opt,name=source_id,json=sourceId,proto3" json:"source_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSourceTriggerDeclarationRequest) Reset() { + *x = GetSourceTriggerDeclarationRequest{} + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSourceTriggerDeclarationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSourceTriggerDeclarationRequest) ProtoMessage() {} + +func (x *GetSourceTriggerDeclarationRequest) ProtoReflect() protoreflect.Message { + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[72] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSourceTriggerDeclarationRequest.ProtoReflect.Descriptor instead. +func (*GetSourceTriggerDeclarationRequest) Descriptor() ([]byte, []int) { + return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{72} +} + +func (x *GetSourceTriggerDeclarationRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *GetSourceTriggerDeclarationRequest) GetSourceId() string { + if x != nil { + return x.SourceId + } + return "" +} + +type GetSourceTriggerDeclarationResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Declaration *SourceTriggerDeclaration `protobuf:"bytes,1,opt,name=declaration,proto3" json:"declaration,omitempty"` + // delegations are the references an operator may bind to this source's + // triggers, revoked ones included, newest first. + Delegations []*TriggerDelegationReference `protobuf:"bytes,2,rep,name=delegations,proto3" json:"delegations,omitempty"` + // children are the child Work Contexts minted against those references, + // newest first and bounded to a recent window. + Children []*TriggerChildContext `protobuf:"bytes,3,rep,name=children,proto3" json:"children,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSourceTriggerDeclarationResponse) Reset() { + *x = GetSourceTriggerDeclarationResponse{} + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSourceTriggerDeclarationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSourceTriggerDeclarationResponse) ProtoMessage() {} + +func (x *GetSourceTriggerDeclarationResponse) ProtoReflect() protoreflect.Message { + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[73] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSourceTriggerDeclarationResponse.ProtoReflect.Descriptor instead. +func (*GetSourceTriggerDeclarationResponse) Descriptor() ([]byte, []int) { + return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{73} +} + +func (x *GetSourceTriggerDeclarationResponse) GetDeclaration() *SourceTriggerDeclaration { + if x != nil { + return x.Declaration + } + return nil +} + +func (x *GetSourceTriggerDeclarationResponse) GetDelegations() []*TriggerDelegationReference { + if x != nil { + return x.Delegations + } + return nil +} + +func (x *GetSourceTriggerDeclarationResponse) GetChildren() []*TriggerChildContext { + if x != nil { + return x.Children + } + return nil +} + +type ReconcileSourceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + SourceId string `protobuf:"bytes,2,opt,name=source_id,json=sourceId,proto3" json:"source_id,omitempty"` + // effect_id is the effect identity this pass commits under, also accepted in + // the effect-id header. Two passes under one identity are one pass. + EffectId string `protobuf:"bytes,3,opt,name=effect_id,json=effectId,proto3" json:"effect_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ReconcileSourceRequest) Reset() { + *x = ReconcileSourceRequest{} + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ReconcileSourceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReconcileSourceRequest) ProtoMessage() {} + +func (x *ReconcileSourceRequest) ProtoReflect() protoreflect.Message { + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[74] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReconcileSourceRequest.ProtoReflect.Descriptor instead. +func (*ReconcileSourceRequest) Descriptor() ([]byte, []int) { + return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{74} +} + +func (x *ReconcileSourceRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *ReconcileSourceRequest) GetSourceId() string { + if x != nil { + return x.SourceId + } + return "" +} + +func (x *ReconcileSourceRequest) GetEffectId() string { + if x != nil { + return x.EffectId + } + return "" +} + +type ReconcileSourceResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + EffectId string `protobuf:"bytes,1,opt,name=effect_id,json=effectId,proto3" json:"effect_id,omitempty"` + // status is "committed" when this pass is recorded, "unknown" when a + // recovery found no receipt for the effect. + Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` + // job_id traces the work this pass handed to the source's own sync engine. + // Empty when the pass committed nothing to trace — a recovered receipt with + // no job, or a source whose schedule is disabled. + JobId string `protobuf:"bytes,3,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ReconcileSourceResponse) Reset() { + *x = ReconcileSourceResponse{} + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ReconcileSourceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReconcileSourceResponse) ProtoMessage() {} + +func (x *ReconcileSourceResponse) ProtoReflect() protoreflect.Message { + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[75] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReconcileSourceResponse.ProtoReflect.Descriptor instead. +func (*ReconcileSourceResponse) Descriptor() ([]byte, []int) { + return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{75} +} + +func (x *ReconcileSourceResponse) GetEffectId() string { + if x != nil { + return x.EffectId + } + return "" +} + +func (x *ReconcileSourceResponse) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *ReconcileSourceResponse) GetJobId() string { + if x != nil { + return x.JobId + } + return "" +} + +type LookupReconcileSourceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + EffectId string `protobuf:"bytes,1,opt,name=effect_id,json=effectId,proto3" json:"effect_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LookupReconcileSourceRequest) Reset() { + *x = LookupReconcileSourceRequest{} + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LookupReconcileSourceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LookupReconcileSourceRequest) ProtoMessage() {} + +func (x *LookupReconcileSourceRequest) ProtoReflect() protoreflect.Message { + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[76] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LookupReconcileSourceRequest.ProtoReflect.Descriptor instead. +func (*LookupReconcileSourceRequest) Descriptor() ([]byte, []int) { + return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{76} +} + +func (x *LookupReconcileSourceRequest) GetEffectId() string { + if x != nil { + return x.EffectId + } + return "" +} + // DatasourceService is the tenant-facing surface a solution drives (directly or // through the generated SDK) to declare and operate connected datasources. // SourceOperation is an admitted route and bounded JSON contract, never a credential. @@ -5506,7 +6465,7 @@ type SourceOperation struct { func (x *SourceOperation) Reset() { *x = SourceOperation{} - mi := &file_saas_accounts_v1_datasource_proto_msgTypes[65] + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[77] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5518,7 +6477,7 @@ func (x *SourceOperation) String() string { func (*SourceOperation) ProtoMessage() {} func (x *SourceOperation) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_datasource_proto_msgTypes[65] + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[77] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5531,7 +6490,7 @@ func (x *SourceOperation) ProtoReflect() protoreflect.Message { // Deprecated: Use SourceOperation.ProtoReflect.Descriptor instead. func (*SourceOperation) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{65} + return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{77} } func (x *SourceOperation) GetName() string { @@ -5615,7 +6574,7 @@ type DeclareSourceOperationsRequest struct { func (x *DeclareSourceOperationsRequest) Reset() { *x = DeclareSourceOperationsRequest{} - mi := &file_saas_accounts_v1_datasource_proto_msgTypes[66] + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[78] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5627,7 +6586,7 @@ func (x *DeclareSourceOperationsRequest) String() string { func (*DeclareSourceOperationsRequest) ProtoMessage() {} func (x *DeclareSourceOperationsRequest) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_datasource_proto_msgTypes[66] + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[78] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5640,7 +6599,7 @@ func (x *DeclareSourceOperationsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeclareSourceOperationsRequest.ProtoReflect.Descriptor instead. func (*DeclareSourceOperationsRequest) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{66} + return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{78} } func (x *DeclareSourceOperationsRequest) GetOrgId() string { @@ -5673,7 +6632,7 @@ type DeclareSourceOperationsResponse struct { func (x *DeclareSourceOperationsResponse) Reset() { *x = DeclareSourceOperationsResponse{} - mi := &file_saas_accounts_v1_datasource_proto_msgTypes[67] + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[79] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5685,7 +6644,7 @@ func (x *DeclareSourceOperationsResponse) String() string { func (*DeclareSourceOperationsResponse) ProtoMessage() {} func (x *DeclareSourceOperationsResponse) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_datasource_proto_msgTypes[67] + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[79] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5698,7 +6657,7 @@ func (x *DeclareSourceOperationsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeclareSourceOperationsResponse.ProtoReflect.Descriptor instead. func (*DeclareSourceOperationsResponse) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{67} + return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{79} } func (x *DeclareSourceOperationsResponse) GetOperations() []*SourceOperation { @@ -5718,7 +6677,7 @@ type ListSourceOperationsRequest struct { func (x *ListSourceOperationsRequest) Reset() { *x = ListSourceOperationsRequest{} - mi := &file_saas_accounts_v1_datasource_proto_msgTypes[68] + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[80] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5730,7 +6689,7 @@ func (x *ListSourceOperationsRequest) String() string { func (*ListSourceOperationsRequest) ProtoMessage() {} func (x *ListSourceOperationsRequest) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_datasource_proto_msgTypes[68] + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[80] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5743,7 +6702,7 @@ func (x *ListSourceOperationsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListSourceOperationsRequest.ProtoReflect.Descriptor instead. func (*ListSourceOperationsRequest) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{68} + return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{80} } func (x *ListSourceOperationsRequest) GetOrgId() string { @@ -5769,7 +6728,7 @@ type ListSourceOperationsResponse struct { func (x *ListSourceOperationsResponse) Reset() { *x = ListSourceOperationsResponse{} - mi := &file_saas_accounts_v1_datasource_proto_msgTypes[69] + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[81] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5781,7 +6740,7 @@ func (x *ListSourceOperationsResponse) String() string { func (*ListSourceOperationsResponse) ProtoMessage() {} func (x *ListSourceOperationsResponse) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_datasource_proto_msgTypes[69] + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[81] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5794,7 +6753,7 @@ func (x *ListSourceOperationsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListSourceOperationsResponse.ProtoReflect.Descriptor instead. func (*ListSourceOperationsResponse) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{69} + return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{81} } func (x *ListSourceOperationsResponse) GetOperations() []*SourceOperation { @@ -5819,7 +6778,7 @@ type InvokeSourceOperationRequest struct { func (x *InvokeSourceOperationRequest) Reset() { *x = InvokeSourceOperationRequest{} - mi := &file_saas_accounts_v1_datasource_proto_msgTypes[70] + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[82] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5831,7 +6790,7 @@ func (x *InvokeSourceOperationRequest) String() string { func (*InvokeSourceOperationRequest) ProtoMessage() {} func (x *InvokeSourceOperationRequest) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_datasource_proto_msgTypes[70] + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[82] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5844,7 +6803,7 @@ func (x *InvokeSourceOperationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use InvokeSourceOperationRequest.ProtoReflect.Descriptor instead. func (*InvokeSourceOperationRequest) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{70} + return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{82} } func (x *InvokeSourceOperationRequest) GetOrgId() string { @@ -5896,7 +6855,7 @@ type SourceOperationReceipt struct { func (x *SourceOperationReceipt) Reset() { *x = SourceOperationReceipt{} - mi := &file_saas_accounts_v1_datasource_proto_msgTypes[71] + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[83] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5908,7 +6867,7 @@ func (x *SourceOperationReceipt) String() string { func (*SourceOperationReceipt) ProtoMessage() {} func (x *SourceOperationReceipt) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_datasource_proto_msgTypes[71] + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[83] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5921,7 +6880,7 @@ func (x *SourceOperationReceipt) ProtoReflect() protoreflect.Message { // Deprecated: Use SourceOperationReceipt.ProtoReflect.Descriptor instead. func (*SourceOperationReceipt) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{71} + return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{83} } func (x *SourceOperationReceipt) GetEffectId() string { @@ -5969,7 +6928,7 @@ type InvokeSourceOperationResponse struct { func (x *InvokeSourceOperationResponse) Reset() { *x = InvokeSourceOperationResponse{} - mi := &file_saas_accounts_v1_datasource_proto_msgTypes[72] + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[84] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5981,7 +6940,7 @@ func (x *InvokeSourceOperationResponse) String() string { func (*InvokeSourceOperationResponse) ProtoMessage() {} func (x *InvokeSourceOperationResponse) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_datasource_proto_msgTypes[72] + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[84] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5994,7 +6953,7 @@ func (x *InvokeSourceOperationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use InvokeSourceOperationResponse.ProtoReflect.Descriptor instead. func (*InvokeSourceOperationResponse) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{72} + return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{84} } func (x *InvokeSourceOperationResponse) GetOutputJson() string { @@ -6022,7 +6981,7 @@ type LookupInvokeSourceOperationRequest struct { func (x *LookupInvokeSourceOperationRequest) Reset() { *x = LookupInvokeSourceOperationRequest{} - mi := &file_saas_accounts_v1_datasource_proto_msgTypes[73] + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[85] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6034,7 +6993,7 @@ func (x *LookupInvokeSourceOperationRequest) String() string { func (*LookupInvokeSourceOperationRequest) ProtoMessage() {} func (x *LookupInvokeSourceOperationRequest) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_datasource_proto_msgTypes[73] + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[85] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6047,7 +7006,7 @@ func (x *LookupInvokeSourceOperationRequest) ProtoReflect() protoreflect.Message // Deprecated: Use LookupInvokeSourceOperationRequest.ProtoReflect.Descriptor instead. func (*LookupInvokeSourceOperationRequest) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{73} + return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{85} } func (x *LookupInvokeSourceOperationRequest) GetEffectId() string { @@ -6069,7 +7028,7 @@ type PruneSourceOperationReceiptsRequest struct { func (x *PruneSourceOperationReceiptsRequest) Reset() { *x = PruneSourceOperationReceiptsRequest{} - mi := &file_saas_accounts_v1_datasource_proto_msgTypes[74] + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[86] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6081,7 +7040,7 @@ func (x *PruneSourceOperationReceiptsRequest) String() string { func (*PruneSourceOperationReceiptsRequest) ProtoMessage() {} func (x *PruneSourceOperationReceiptsRequest) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_datasource_proto_msgTypes[74] + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[86] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6094,7 +7053,7 @@ func (x *PruneSourceOperationReceiptsRequest) ProtoReflect() protoreflect.Messag // Deprecated: Use PruneSourceOperationReceiptsRequest.ProtoReflect.Descriptor instead. func (*PruneSourceOperationReceiptsRequest) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{74} + return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{86} } func (x *PruneSourceOperationReceiptsRequest) GetOrgId() string { @@ -6129,7 +7088,7 @@ type PruneSourceOperationReceiptsResponse struct { func (x *PruneSourceOperationReceiptsResponse) Reset() { *x = PruneSourceOperationReceiptsResponse{} - mi := &file_saas_accounts_v1_datasource_proto_msgTypes[75] + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[87] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6141,7 +7100,7 @@ func (x *PruneSourceOperationReceiptsResponse) String() string { func (*PruneSourceOperationReceiptsResponse) ProtoMessage() {} func (x *PruneSourceOperationReceiptsResponse) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_datasource_proto_msgTypes[75] + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[87] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6154,7 +7113,7 @@ func (x *PruneSourceOperationReceiptsResponse) ProtoReflect() protoreflect.Messa // Deprecated: Use PruneSourceOperationReceiptsResponse.ProtoReflect.Descriptor instead. func (*PruneSourceOperationReceiptsResponse) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{75} + return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{87} } func (x *PruneSourceOperationReceiptsResponse) GetEffectId() string { @@ -6187,7 +7146,7 @@ type LookupPruneSourceOperationReceiptsRequest struct { func (x *LookupPruneSourceOperationReceiptsRequest) Reset() { *x = LookupPruneSourceOperationReceiptsRequest{} - mi := &file_saas_accounts_v1_datasource_proto_msgTypes[76] + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[88] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6199,7 +7158,7 @@ func (x *LookupPruneSourceOperationReceiptsRequest) String() string { func (*LookupPruneSourceOperationReceiptsRequest) ProtoMessage() {} func (x *LookupPruneSourceOperationReceiptsRequest) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_datasource_proto_msgTypes[76] + mi := &file_saas_accounts_v1_datasource_proto_msgTypes[88] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6212,7 +7171,7 @@ func (x *LookupPruneSourceOperationReceiptsRequest) ProtoReflect() protoreflect. // Deprecated: Use LookupPruneSourceOperationReceiptsRequest.ProtoReflect.Descriptor instead. func (*LookupPruneSourceOperationReceiptsRequest) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{76} + return file_saas_accounts_v1_datasource_proto_rawDescGZIP(), []int{88} } func (x *LookupPruneSourceOperationReceiptsRequest) GetEffectId() string { @@ -6587,7 +7546,79 @@ const file_saas_accounts_v1_datasource_proto_rawDesc = "" + "\x1eRevokeSourceDelegationResponse\x12B\n" + "\n" + "delegation\x18\x01 \x01(\v2\".saas.accounts.v1.SourceDelegationR\n" + - "delegation\"\xd4\x03\n" + + "delegation\"C\n" + + "\x0fTriggerIdentity\x12\x16\n" + + "\x06source\x18\x01 \x01(\tR\x06source\x12\x18\n" + + "\abinding\x18\x02 \x01(\tR\abinding\"\xbd\x01\n" + + "\x17DeclaredTriggerSchedule\x12\x12\n" + + "\x04cron\x18\x01 \x01(\tR\x04cron\x12\x1a\n" + + "\btimezone\x18\x02 \x01(\tR\btimezone\x12\x1d\n" + + "\n" + + "missed_run\x18\x03 \x01(\tR\tmissedRun\x12\x18\n" + + "\aoverlap\x18\x04 \x01(\tR\aoverlap\x12\x1a\n" + + "\bdeadline\x18\x05 \x01(\x03R\bdeadline\x12\x1d\n" + + "\n" + + "input_json\x18\x06 \x01(\tR\tinputJson\"\xe7\x03\n" + + "\x1aTriggerDelegationReference\x12\x1c\n" + + "\treference\x18\x01 \x01(\tR\treference\x12#\n" + + "\rdelegation_id\x18\x02 \x01(\tR\fdelegationId\x12\x16\n" + + "\x06module\x18\x03 \x01(\tR\x06module\x12\x18\n" + + "\abinding\x18\x04 \x01(\tR\abinding\x12\x1a\n" + + "\baudience\x18\x05 \x01(\tR\baudience\x12\x16\n" + + "\x06tenant\x18\x06 \x01(\tR\x06tenant\x12,\n" + + "\x12owner_principal_id\x18\a \x01(\tR\x10ownerPrincipalId\x12\x16\n" + + "\x06scopes\x18\b \x03(\tR\x06scopes\x12\x16\n" + + "\x06active\x18\t \x01(\bR\x06active\x129\n" + + "\n" + + "created_at\x18\n" + + " \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "revoked_at\x18\v \x01(\v2\x1a.google.protobuf.TimestampR\trevokedAt\x12L\n" + + "\n" + + "revocation\x18\f \x01(\x0e2,.saas.accounts.v1.SourceDelegationRevocationR\n" + + "revocation\"\x89\x02\n" + + "\x13TriggerChildContext\x12#\n" + + "\rdelegation_id\x18\x01 \x01(\tR\fdelegationId\x12\x16\n" + + "\x06module\x18\x02 \x01(\tR\x06module\x12\x18\n" + + "\abinding\x18\x03 \x01(\tR\abinding\x12\x1a\n" + + "\baudience\x18\x04 \x01(\tR\baudience\x12\x16\n" + + "\x06scopes\x18\x05 \x03(\tR\x06scopes\x12\x16\n" + + "\x06lookup\x18\x06 \x01(\bR\x06lookup\x127\n" + + "\tminted_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\bmintedAt\x12\x16\n" + + "\x06record\x18\b \x01(\tR\x06record\"\xb5\x03\n" + + "\x18SourceTriggerDeclaration\x12\x18\n" + + "\arelease\x18\x01 \x01(\tR\arelease\x12\x1c\n" + + "\toperation\x18\x02 \x01(\tR\toperation\x12E\n" + + "\bschedule\x18\x03 \x01(\v2).saas.accounts.v1.DeclaredTriggerScheduleR\bschedule\x12=\n" + + "\bidentity\x18\x04 \x01(\v2!.saas.accounts.v1.TriggerIdentityR\bidentity\x12\x16\n" + + "\x06digest\x18\x05 \x01(\tR\x06digest\x12H\n" + + "\x12last_occurrence_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\x10lastOccurrenceAt\x12H\n" + + "\x12next_occurrence_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\x10nextOccurrenceAt\x12/\n" + + "\x13undeclarable_reason\x18\b \x01(\tR\x12undeclarableReason\"g\n" + + "\x1dDelegateSourceTriggersRequest\x12\x1f\n" + + "\x06org_id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x05orgId\x12%\n" + + "\tsource_id\x18\x02 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\bsourceId\"p\n" + + "\x1eDelegateSourceTriggersResponse\x12N\n" + + "\vdelegations\x18\x01 \x03(\v2,.saas.accounts.v1.TriggerDelegationReferenceR\vdelegations\"l\n" + + "\"GetSourceTriggerDeclarationRequest\x12\x1f\n" + + "\x06org_id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x05orgId\x12%\n" + + "\tsource_id\x18\x02 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\bsourceId\"\x86\x02\n" + + "#GetSourceTriggerDeclarationResponse\x12L\n" + + "\vdeclaration\x18\x01 \x01(\v2*.saas.accounts.v1.SourceTriggerDeclarationR\vdeclaration\x12N\n" + + "\vdelegations\x18\x02 \x03(\v2,.saas.accounts.v1.TriggerDelegationReferenceR\vdelegations\x12A\n" + + "\bchildren\x18\x03 \x03(\v2%.saas.accounts.v1.TriggerChildContextR\bchildren\"\x89\x01\n" + + "\x16ReconcileSourceRequest\x12\x1f\n" + + "\x06org_id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x05orgId\x12%\n" + + "\tsource_id\x18\x02 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\bsourceId\x12'\n" + + "\teffect_id\x18\x03 \x01(\tB\n" + + "\xbaH\ar\x05\x10\x01\x18\x80\x01R\beffectId\"e\n" + + "\x17ReconcileSourceResponse\x12\x1b\n" + + "\teffect_id\x18\x01 \x01(\tR\beffectId\x12\x16\n" + + "\x06status\x18\x02 \x01(\tR\x06status\x12\x15\n" + + "\x06job_id\x18\x03 \x01(\tR\x05jobId\"G\n" + + "\x1cLookupReconcileSourceRequest\x12'\n" + + "\teffect_id\x18\x01 \x01(\tB\n" + + "\xbaH\ar\x05\x10\x01\x18\x80\x01R\beffectId\"\xd4\x03\n" + "\x0fSourceOperation\x12\x12\n" + "\x04name\x18\x01 \x01(\tR\x04name\x12 \n" + "\vdescription\x18\x02 \x01(\tR\vdescription\x12\x16\n" + @@ -6728,7 +7759,7 @@ const file_saas_accounts_v1_datasource_proto_rawDesc = "" + "+SOURCE_DELEGATION_REVOCATION_MEMBER_REMOVED\x10\x04\x120\n" + ",SOURCE_DELEGATION_REVOCATION_PERMISSION_LOST\x10\x05\x12.\n" + "*SOURCE_DELEGATION_REVOCATION_USER_INACTIVE\x10\x06\x120\n" + - ",SOURCE_DELEGATION_REVOCATION_BINDING_CHANGED\x10\a2\x9e0\n" + + ",SOURCE_DELEGATION_REVOCATION_BINDING_CHANGED\x10\a2\x898\n" + "\x11DatasourceService\x12\xb9\x03\n" + "\x1cPruneSourceOperationReceipts\x125.saas.accounts.v1.PruneSourceOperationReceiptsRequest\x1a6.saas.accounts.v1.PruneSourceOperationReceiptsResponse\"\xa9\x02\xc2\xf3\x18l\b\x02\x10\x03\x1a\x11datasource:invoke\"\x11datasource:invoke*\x0f\n" + "\tsource_id\x10\x04\x18\x030\x01:#\n" + @@ -6810,7 +7841,20 @@ const file_saas_accounts_v1_datasource_proto_rawDesc = "" + "\x06org_id\x10\x02\x18\x010\x01:\x02\x10\x01@\x01H\x03P\x02X\x03`\x01\x12\xc7\x01\n" + "\x16RevokeSourceDelegation\x12/.saas.accounts.v1.RevokeSourceDelegationRequest\x1a0.saas.accounts.v1.RevokeSourceDelegationResponse\"J\xc2\xf3\x18F\b\x02\x10\x04*\f\n" + "\x06org_id\x10\x02\x18\x010\x01:&\n" + - "\"saas.datasource.delegation.revoked\x10\x02@\x01H\x04P\x02X\x03`\x01B\xcd\x01\n" + + "\"saas.datasource.delegation.revoked\x10\x02@\x01H\x04P\x02X\x03`\x01\x12\xeb\x01\n" + + "\x16DelegateSourceTriggers\x12/.saas.accounts.v1.DelegateSourceTriggersRequest\x1a0.saas.accounts.v1.DelegateSourceTriggersResponse\"n\xc2\xf3\x18j\b\x02\x10\x04*\f\n" + + "\x06org_id\x10\x02\x18\x010\x01:J\n" + + "\"saas.datasource.delegation.created\n" + + "\"saas.datasource.delegation.revoked\x10\x02@\x01H\x04P\x02X\x03`\x01\x12\xb2\x01\n" + + "\x1bGetSourceTriggerDeclaration\x124.saas.accounts.v1.GetSourceTriggerDeclarationRequest\x1a5.saas.accounts.v1.GetSourceTriggerDeclarationResponse\"&\xc2\xf3\x18\"\b\x02\x10\x04*\f\n" + + "\x06org_id\x10\x02\x18\x010\x01:\x02\x10\x01@\x01H\x03P\x02X\x03`\x01\x12\x83\x03\n" + + "\x0fReconcileSource\x12(.saas.accounts.v1.ReconcileSourceRequest\x1a).saas.accounts.v1.ReconcileSourceResponse\"\x9a\x02\xc2\xf3\x18j\b\x02\x10\x03\x1a\x11datasource:invoke\"\x11datasource:invoke*\x0f\n" + + "\tsource_id\x10\x04\x18\x030\x01:!\n" + + "\x1dsaas.datasource.source.synced\x10\x02@\x03H\x04P\x02X\x02`\x01\xda\xf3\x18\xa7\x01\n" + + "\x02\b<\x12\x03\b\xd8\x04\x18\x05\"\x02\b\x02*\vUNAVAILABLE*\x12RESOURCE_EXHAUSTED*\aABORTED2\x0fsaas-datasourceJ9/saas.accounts.v1.DatasourceService/LookupReconcileSourceP\x80 X\x80 `\x01r\x18\n" + + "\x06source\x12\x06invoke\x12\x04read\x18\x01\x12\xbf\x01\n" + + "\x15LookupReconcileSource\x12..saas.accounts.v1.LookupReconcileSourceRequest\x1a).saas.accounts.v1.ReconcileSourceResponse\"K\xc2\xf3\x18G\b\x02\x10\x03\x1a\x0fdatasource:read\"\x0fdatasource:read*\x0f\n" + + "\teffect_id\x10\x04\x18\x030\x01:\x02\x10\x01@\x01H\x03P\x02X\x02`\x01B\xcd\x01\n" + "\x14com.saas.accounts.v1B\x0fDatasourceProtoP\x01ZBgithub.com/codefly-dev/saas-sdk-go/gen/saas/accounts/v1;accountsv1\xa2\x02\x03SAX\xaa\x02\x10Saas.Accounts.V1\xca\x02\x10Saas\\Accounts\\V1\xe2\x02\x1cSaas\\Accounts\\V1\\GPBMetadata\xea\x02\x12Saas::Accounts::V1b\x06proto3" var ( @@ -6826,7 +7870,7 @@ func file_saas_accounts_v1_datasource_proto_rawDescGZIP() []byte { } var file_saas_accounts_v1_datasource_proto_enumTypes = make([]protoimpl.EnumInfo, 14) -var file_saas_accounts_v1_datasource_proto_msgTypes = make([]protoimpl.MessageInfo, 77) +var file_saas_accounts_v1_datasource_proto_msgTypes = make([]protoimpl.MessageInfo, 89) var file_saas_accounts_v1_datasource_proto_goTypes = []any{ (DatasourceProvider)(0), // 0: saas.accounts.v1.DatasourceProvider (DatasourceStatus)(0), // 1: saas.accounts.v1.DatasourceStatus @@ -6907,23 +7951,35 @@ var file_saas_accounts_v1_datasource_proto_goTypes = []any{ (*ListSourceDelegationsResponse)(nil), // 76: saas.accounts.v1.ListSourceDelegationsResponse (*RevokeSourceDelegationRequest)(nil), // 77: saas.accounts.v1.RevokeSourceDelegationRequest (*RevokeSourceDelegationResponse)(nil), // 78: saas.accounts.v1.RevokeSourceDelegationResponse - (*SourceOperation)(nil), // 79: saas.accounts.v1.SourceOperation - (*DeclareSourceOperationsRequest)(nil), // 80: saas.accounts.v1.DeclareSourceOperationsRequest - (*DeclareSourceOperationsResponse)(nil), // 81: saas.accounts.v1.DeclareSourceOperationsResponse - (*ListSourceOperationsRequest)(nil), // 82: saas.accounts.v1.ListSourceOperationsRequest - (*ListSourceOperationsResponse)(nil), // 83: saas.accounts.v1.ListSourceOperationsResponse - (*InvokeSourceOperationRequest)(nil), // 84: saas.accounts.v1.InvokeSourceOperationRequest - (*SourceOperationReceipt)(nil), // 85: saas.accounts.v1.SourceOperationReceipt - (*InvokeSourceOperationResponse)(nil), // 86: saas.accounts.v1.InvokeSourceOperationResponse - (*LookupInvokeSourceOperationRequest)(nil), // 87: saas.accounts.v1.LookupInvokeSourceOperationRequest - (*PruneSourceOperationReceiptsRequest)(nil), // 88: saas.accounts.v1.PruneSourceOperationReceiptsRequest - (*PruneSourceOperationReceiptsResponse)(nil), // 89: saas.accounts.v1.PruneSourceOperationReceiptsResponse - (*LookupPruneSourceOperationReceiptsRequest)(nil), // 90: saas.accounts.v1.LookupPruneSourceOperationReceiptsRequest - (*timestamppb.Timestamp)(nil), // 91: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 92: google.protobuf.Duration - (v1.JobState)(0), // 93: saas.jobs.v1.JobState - (*v1.JobExecutionReference)(nil), // 94: saas.jobs.v1.JobExecutionReference - (*structpb.Struct)(nil), // 95: google.protobuf.Struct + (*TriggerIdentity)(nil), // 79: saas.accounts.v1.TriggerIdentity + (*DeclaredTriggerSchedule)(nil), // 80: saas.accounts.v1.DeclaredTriggerSchedule + (*TriggerDelegationReference)(nil), // 81: saas.accounts.v1.TriggerDelegationReference + (*TriggerChildContext)(nil), // 82: saas.accounts.v1.TriggerChildContext + (*SourceTriggerDeclaration)(nil), // 83: saas.accounts.v1.SourceTriggerDeclaration + (*DelegateSourceTriggersRequest)(nil), // 84: saas.accounts.v1.DelegateSourceTriggersRequest + (*DelegateSourceTriggersResponse)(nil), // 85: saas.accounts.v1.DelegateSourceTriggersResponse + (*GetSourceTriggerDeclarationRequest)(nil), // 86: saas.accounts.v1.GetSourceTriggerDeclarationRequest + (*GetSourceTriggerDeclarationResponse)(nil), // 87: saas.accounts.v1.GetSourceTriggerDeclarationResponse + (*ReconcileSourceRequest)(nil), // 88: saas.accounts.v1.ReconcileSourceRequest + (*ReconcileSourceResponse)(nil), // 89: saas.accounts.v1.ReconcileSourceResponse + (*LookupReconcileSourceRequest)(nil), // 90: saas.accounts.v1.LookupReconcileSourceRequest + (*SourceOperation)(nil), // 91: saas.accounts.v1.SourceOperation + (*DeclareSourceOperationsRequest)(nil), // 92: saas.accounts.v1.DeclareSourceOperationsRequest + (*DeclareSourceOperationsResponse)(nil), // 93: saas.accounts.v1.DeclareSourceOperationsResponse + (*ListSourceOperationsRequest)(nil), // 94: saas.accounts.v1.ListSourceOperationsRequest + (*ListSourceOperationsResponse)(nil), // 95: saas.accounts.v1.ListSourceOperationsResponse + (*InvokeSourceOperationRequest)(nil), // 96: saas.accounts.v1.InvokeSourceOperationRequest + (*SourceOperationReceipt)(nil), // 97: saas.accounts.v1.SourceOperationReceipt + (*InvokeSourceOperationResponse)(nil), // 98: saas.accounts.v1.InvokeSourceOperationResponse + (*LookupInvokeSourceOperationRequest)(nil), // 99: saas.accounts.v1.LookupInvokeSourceOperationRequest + (*PruneSourceOperationReceiptsRequest)(nil), // 100: saas.accounts.v1.PruneSourceOperationReceiptsRequest + (*PruneSourceOperationReceiptsResponse)(nil), // 101: saas.accounts.v1.PruneSourceOperationReceiptsResponse + (*LookupPruneSourceOperationReceiptsRequest)(nil), // 102: saas.accounts.v1.LookupPruneSourceOperationReceiptsRequest + (*timestamppb.Timestamp)(nil), // 103: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 104: google.protobuf.Duration + (v1.JobState)(0), // 105: saas.jobs.v1.JobState + (*v1.JobExecutionReference)(nil), // 106: saas.jobs.v1.JobExecutionReference + (*structpb.Struct)(nil), // 107: google.protobuf.Struct } var file_saas_accounts_v1_datasource_proto_depIdxs = []int32{ 12, // 0: saas.accounts.v1.ApiOAuth2Config.grant:type_name -> saas.accounts.v1.ApiOAuth2Config.Grant @@ -6932,15 +7988,15 @@ var file_saas_accounts_v1_datasource_proto_depIdxs = []int32{ 0, // 3: saas.accounts.v1.Datasource.provider:type_name -> saas.accounts.v1.DatasourceProvider 14, // 4: saas.accounts.v1.Datasource.github:type_name -> saas.accounts.v1.GitHubDatasourceConfig 1, // 5: saas.accounts.v1.Datasource.status:type_name -> saas.accounts.v1.DatasourceStatus - 91, // 6: saas.accounts.v1.Datasource.created_at:type_name -> google.protobuf.Timestamp - 91, // 7: saas.accounts.v1.Datasource.updated_at:type_name -> google.protobuf.Timestamp - 91, // 8: saas.accounts.v1.Datasource.last_synced_at:type_name -> google.protobuf.Timestamp + 103, // 6: saas.accounts.v1.Datasource.created_at:type_name -> google.protobuf.Timestamp + 103, // 7: saas.accounts.v1.Datasource.updated_at:type_name -> google.protobuf.Timestamp + 103, // 8: saas.accounts.v1.Datasource.last_synced_at:type_name -> google.protobuf.Timestamp 16, // 9: saas.accounts.v1.Datasource.api:type_name -> saas.accounts.v1.ApiDatasourceConfig 17, // 10: saas.accounts.v1.Datasource.crawler:type_name -> saas.accounts.v1.CrawlerDatasourceConfig 18, // 11: saas.accounts.v1.Datasource.upload:type_name -> saas.accounts.v1.UploadDatasourceConfig - 91, // 12: saas.accounts.v1.Datasource.last_ingested_at:type_name -> google.protobuf.Timestamp + 103, // 12: saas.accounts.v1.Datasource.last_ingested_at:type_name -> google.protobuf.Timestamp 2, // 13: saas.accounts.v1.Datasource.live_delivery:type_name -> saas.accounts.v1.DatasourceLiveDelivery - 92, // 14: saas.accounts.v1.Datasource.reconcile_interval:type_name -> google.protobuf.Duration + 104, // 14: saas.accounts.v1.Datasource.reconcile_interval:type_name -> google.protobuf.Duration 19, // 15: saas.accounts.v1.AddGitHubSourceResponse.datasource:type_name -> saas.accounts.v1.Datasource 0, // 16: saas.accounts.v1.AddSourceRequest.provider:type_name -> saas.accounts.v1.DatasourceProvider 14, // 17: saas.accounts.v1.AddSourceRequest.github:type_name -> saas.accounts.v1.GitHubDatasourceConfig @@ -6958,31 +8014,31 @@ var file_saas_accounts_v1_datasource_proto_depIdxs = []int32{ 26, // 29: saas.accounts.v1.GetDatasourceCatalogResponse.providers:type_name -> saas.accounts.v1.DatasourceProviderDescriptor 19, // 30: saas.accounts.v1.ListSourcesResponse.datasources:type_name -> saas.accounts.v1.Datasource 19, // 31: saas.accounts.v1.GetSourceResponse.datasource:type_name -> saas.accounts.v1.Datasource - 93, // 32: saas.accounts.v1.SourceSyncDelivery.state:type_name -> saas.jobs.v1.JobState - 94, // 33: saas.accounts.v1.SourceSyncDelivery.execution:type_name -> saas.jobs.v1.JobExecutionReference + 105, // 32: saas.accounts.v1.SourceSyncDelivery.state:type_name -> saas.jobs.v1.JobState + 106, // 33: saas.accounts.v1.SourceSyncDelivery.execution:type_name -> saas.jobs.v1.JobExecutionReference 8, // 34: saas.accounts.v1.SourceSyncFailure.reason:type_name -> saas.accounts.v1.SourceSyncFailureReason - 91, // 35: saas.accounts.v1.SourceSyncFailure.retry_at:type_name -> google.protobuf.Timestamp + 103, // 35: saas.accounts.v1.SourceSyncFailure.retry_at:type_name -> google.protobuf.Timestamp 7, // 36: saas.accounts.v1.SourceSyncProgress.phase:type_name -> saas.accounts.v1.SourceSyncPhase 9, // 37: saas.accounts.v1.SourceSyncProgress.trigger:type_name -> saas.accounts.v1.SourceSyncTrigger - 91, // 38: saas.accounts.v1.SourceSyncProgress.queued_at:type_name -> google.protobuf.Timestamp - 91, // 39: saas.accounts.v1.SourceSyncProgress.fetching_at:type_name -> google.protobuf.Timestamp - 91, // 40: saas.accounts.v1.SourceSyncProgress.compiled_at:type_name -> google.protobuf.Timestamp - 91, // 41: saas.accounts.v1.SourceSyncProgress.handed_off_at:type_name -> google.protobuf.Timestamp - 91, // 42: saas.accounts.v1.SourceSyncProgress.finished_at:type_name -> google.protobuf.Timestamp + 103, // 38: saas.accounts.v1.SourceSyncProgress.queued_at:type_name -> google.protobuf.Timestamp + 103, // 39: saas.accounts.v1.SourceSyncProgress.fetching_at:type_name -> google.protobuf.Timestamp + 103, // 40: saas.accounts.v1.SourceSyncProgress.compiled_at:type_name -> google.protobuf.Timestamp + 103, // 41: saas.accounts.v1.SourceSyncProgress.handed_off_at:type_name -> google.protobuf.Timestamp + 103, // 42: saas.accounts.v1.SourceSyncProgress.finished_at:type_name -> google.protobuf.Timestamp 37, // 43: saas.accounts.v1.SourceSyncProgress.changes:type_name -> saas.accounts.v1.SourceSyncChanges 38, // 44: saas.accounts.v1.SourceSyncProgress.failure:type_name -> saas.accounts.v1.SourceSyncFailure - 93, // 45: saas.accounts.v1.GetSourceSyncResponse.state:type_name -> saas.jobs.v1.JobState + 105, // 45: saas.accounts.v1.GetSourceSyncResponse.state:type_name -> saas.jobs.v1.JobState 36, // 46: saas.accounts.v1.GetSourceSyncResponse.deliveries:type_name -> saas.accounts.v1.SourceSyncDelivery 39, // 47: saas.accounts.v1.GetSourceSyncResponse.progress:type_name -> saas.accounts.v1.SourceSyncProgress - 91, // 48: saas.accounts.v1.BeginGitHubAppSetupResponse.expires_at:type_name -> google.protobuf.Timestamp + 103, // 48: saas.accounts.v1.BeginGitHubAppSetupResponse.expires_at:type_name -> google.protobuf.Timestamp 43, // 49: saas.accounts.v1.CompleteGitHubAppSetupResponse.repositories:type_name -> saas.accounts.v1.GitHubAppRepository 19, // 50: saas.accounts.v1.MigrateGitHubSourceToAppResponse.datasource:type_name -> saas.accounts.v1.Datasource - 91, // 51: saas.accounts.v1.DatasourceAccountLink.created_at:type_name -> google.protobuf.Timestamp - 91, // 52: saas.accounts.v1.DatasourceGroupBinding.created_at:type_name -> google.protobuf.Timestamp + 103, // 51: saas.accounts.v1.DatasourceAccountLink.created_at:type_name -> google.protobuf.Timestamp + 103, // 52: saas.accounts.v1.DatasourceGroupBinding.created_at:type_name -> google.protobuf.Timestamp 10, // 53: saas.accounts.v1.DatasourceVerifiedDomain.status:type_name -> saas.accounts.v1.DatasourceDomainStatus - 91, // 54: saas.accounts.v1.DatasourceVerifiedDomain.verified_at:type_name -> google.protobuf.Timestamp - 91, // 55: saas.accounts.v1.DatasourceVerifiedDomain.created_at:type_name -> google.protobuf.Timestamp - 91, // 56: saas.accounts.v1.BeginDatasourceAccountLinkResponse.expires_at:type_name -> google.protobuf.Timestamp + 103, // 54: saas.accounts.v1.DatasourceVerifiedDomain.verified_at:type_name -> google.protobuf.Timestamp + 103, // 55: saas.accounts.v1.DatasourceVerifiedDomain.created_at:type_name -> google.protobuf.Timestamp + 103, // 56: saas.accounts.v1.BeginDatasourceAccountLinkResponse.expires_at:type_name -> google.protobuf.Timestamp 50, // 57: saas.accounts.v1.CompleteDatasourceAccountLinkResponse.link:type_name -> saas.accounts.v1.DatasourceAccountLink 50, // 58: saas.accounts.v1.ListMyDatasourceAccountLinksResponse.links:type_name -> saas.accounts.v1.DatasourceAccountLink 50, // 59: saas.accounts.v1.GetDatasourceDirectoryResponse.links:type_name -> saas.accounts.v1.DatasourceAccountLink @@ -6992,81 +8048,101 @@ var file_saas_accounts_v1_datasource_proto_depIdxs = []int32{ 51, // 63: saas.accounts.v1.BindDatasourceGroupResponse.binding:type_name -> saas.accounts.v1.DatasourceGroupBinding 52, // 64: saas.accounts.v1.ClaimDatasourceDomainResponse.domain:type_name -> saas.accounts.v1.DatasourceVerifiedDomain 52, // 65: saas.accounts.v1.VerifyDatasourceDomainResponse.domain:type_name -> saas.accounts.v1.DatasourceVerifiedDomain - 91, // 66: saas.accounts.v1.SourceDelegation.created_at:type_name -> google.protobuf.Timestamp - 91, // 67: saas.accounts.v1.SourceDelegation.revoked_at:type_name -> google.protobuf.Timestamp + 103, // 66: saas.accounts.v1.SourceDelegation.created_at:type_name -> google.protobuf.Timestamp + 103, // 67: saas.accounts.v1.SourceDelegation.revoked_at:type_name -> google.protobuf.Timestamp 11, // 68: saas.accounts.v1.SourceDelegation.revocation:type_name -> saas.accounts.v1.SourceDelegationRevocation 74, // 69: saas.accounts.v1.ListSourceDelegationsResponse.delegations:type_name -> saas.accounts.v1.SourceDelegation 74, // 70: saas.accounts.v1.RevokeSourceDelegationResponse.delegation:type_name -> saas.accounts.v1.SourceDelegation - 95, // 71: saas.accounts.v1.SourceOperation.input_schema:type_name -> google.protobuf.Struct - 95, // 72: saas.accounts.v1.SourceOperation.output_schema:type_name -> google.protobuf.Struct - 13, // 73: saas.accounts.v1.SourceOperation.effect:type_name -> saas.accounts.v1.SourceOperation.Effect - 79, // 74: saas.accounts.v1.DeclareSourceOperationsRequest.operations:type_name -> saas.accounts.v1.SourceOperation - 79, // 75: saas.accounts.v1.DeclareSourceOperationsResponse.operations:type_name -> saas.accounts.v1.SourceOperation - 79, // 76: saas.accounts.v1.ListSourceOperationsResponse.operations:type_name -> saas.accounts.v1.SourceOperation - 85, // 77: saas.accounts.v1.InvokeSourceOperationResponse.receipt:type_name -> saas.accounts.v1.SourceOperationReceipt - 88, // 78: saas.accounts.v1.DatasourceService.PruneSourceOperationReceipts:input_type -> saas.accounts.v1.PruneSourceOperationReceiptsRequest - 90, // 79: saas.accounts.v1.DatasourceService.LookupPruneSourceOperationReceipts:input_type -> saas.accounts.v1.LookupPruneSourceOperationReceiptsRequest - 84, // 80: saas.accounts.v1.DatasourceService.InvokeSourceOperation:input_type -> saas.accounts.v1.InvokeSourceOperationRequest - 87, // 81: saas.accounts.v1.DatasourceService.LookupInvokeSourceOperation:input_type -> saas.accounts.v1.LookupInvokeSourceOperationRequest - 82, // 82: saas.accounts.v1.DatasourceService.ListSourceOperations:input_type -> saas.accounts.v1.ListSourceOperationsRequest - 80, // 83: saas.accounts.v1.DatasourceService.DeclareSourceOperations:input_type -> saas.accounts.v1.DeclareSourceOperationsRequest - 20, // 84: saas.accounts.v1.DatasourceService.AddGitHubSource:input_type -> saas.accounts.v1.AddGitHubSourceRequest - 22, // 85: saas.accounts.v1.DatasourceService.AddSource:input_type -> saas.accounts.v1.AddSourceRequest - 27, // 86: saas.accounts.v1.DatasourceService.GetDatasourceCatalog:input_type -> saas.accounts.v1.GetDatasourceCatalogRequest - 29, // 87: saas.accounts.v1.DatasourceService.ListSources:input_type -> saas.accounts.v1.ListSourcesRequest - 31, // 88: saas.accounts.v1.DatasourceService.GetSource:input_type -> saas.accounts.v1.GetSourceRequest - 33, // 89: saas.accounts.v1.DatasourceService.SyncSource:input_type -> saas.accounts.v1.SyncSourceRequest - 35, // 90: saas.accounts.v1.DatasourceService.GetSourceSync:input_type -> saas.accounts.v1.GetSourceSyncRequest - 41, // 91: saas.accounts.v1.DatasourceService.DeleteSource:input_type -> saas.accounts.v1.DeleteSourceRequest - 44, // 92: saas.accounts.v1.DatasourceService.BeginGitHubAppSetup:input_type -> saas.accounts.v1.BeginGitHubAppSetupRequest - 46, // 93: saas.accounts.v1.DatasourceService.CompleteGitHubAppSetup:input_type -> saas.accounts.v1.CompleteGitHubAppSetupRequest - 48, // 94: saas.accounts.v1.DatasourceService.MigrateGitHubSourceToApp:input_type -> saas.accounts.v1.MigrateGitHubSourceToAppRequest - 54, // 95: saas.accounts.v1.DatasourceService.BeginDatasourceAccountLink:input_type -> saas.accounts.v1.BeginDatasourceAccountLinkRequest - 56, // 96: saas.accounts.v1.DatasourceService.CompleteDatasourceAccountLink:input_type -> saas.accounts.v1.CompleteDatasourceAccountLinkRequest - 58, // 97: saas.accounts.v1.DatasourceService.ListMyDatasourceAccountLinks:input_type -> saas.accounts.v1.ListMyDatasourceAccountLinksRequest - 60, // 98: saas.accounts.v1.DatasourceService.DeleteDatasourceAccountLink:input_type -> saas.accounts.v1.DeleteDatasourceAccountLinkRequest - 62, // 99: saas.accounts.v1.DatasourceService.GetDatasourceDirectory:input_type -> saas.accounts.v1.GetDatasourceDirectoryRequest - 64, // 100: saas.accounts.v1.DatasourceService.BindDatasourceGroup:input_type -> saas.accounts.v1.BindDatasourceGroupRequest - 66, // 101: saas.accounts.v1.DatasourceService.UnbindDatasourceGroup:input_type -> saas.accounts.v1.UnbindDatasourceGroupRequest - 68, // 102: saas.accounts.v1.DatasourceService.ClaimDatasourceDomain:input_type -> saas.accounts.v1.ClaimDatasourceDomainRequest - 70, // 103: saas.accounts.v1.DatasourceService.VerifyDatasourceDomain:input_type -> saas.accounts.v1.VerifyDatasourceDomainRequest - 72, // 104: saas.accounts.v1.DatasourceService.DeleteDatasourceDomain:input_type -> saas.accounts.v1.DeleteDatasourceDomainRequest - 75, // 105: saas.accounts.v1.DatasourceService.ListSourceDelegations:input_type -> saas.accounts.v1.ListSourceDelegationsRequest - 77, // 106: saas.accounts.v1.DatasourceService.RevokeSourceDelegation:input_type -> saas.accounts.v1.RevokeSourceDelegationRequest - 89, // 107: saas.accounts.v1.DatasourceService.PruneSourceOperationReceipts:output_type -> saas.accounts.v1.PruneSourceOperationReceiptsResponse - 89, // 108: saas.accounts.v1.DatasourceService.LookupPruneSourceOperationReceipts:output_type -> saas.accounts.v1.PruneSourceOperationReceiptsResponse - 86, // 109: saas.accounts.v1.DatasourceService.InvokeSourceOperation:output_type -> saas.accounts.v1.InvokeSourceOperationResponse - 86, // 110: saas.accounts.v1.DatasourceService.LookupInvokeSourceOperation:output_type -> saas.accounts.v1.InvokeSourceOperationResponse - 83, // 111: saas.accounts.v1.DatasourceService.ListSourceOperations:output_type -> saas.accounts.v1.ListSourceOperationsResponse - 81, // 112: saas.accounts.v1.DatasourceService.DeclareSourceOperations:output_type -> saas.accounts.v1.DeclareSourceOperationsResponse - 21, // 113: saas.accounts.v1.DatasourceService.AddGitHubSource:output_type -> saas.accounts.v1.AddGitHubSourceResponse - 23, // 114: saas.accounts.v1.DatasourceService.AddSource:output_type -> saas.accounts.v1.AddSourceResponse - 28, // 115: saas.accounts.v1.DatasourceService.GetDatasourceCatalog:output_type -> saas.accounts.v1.GetDatasourceCatalogResponse - 30, // 116: saas.accounts.v1.DatasourceService.ListSources:output_type -> saas.accounts.v1.ListSourcesResponse - 32, // 117: saas.accounts.v1.DatasourceService.GetSource:output_type -> saas.accounts.v1.GetSourceResponse - 34, // 118: saas.accounts.v1.DatasourceService.SyncSource:output_type -> saas.accounts.v1.SyncSourceResponse - 40, // 119: saas.accounts.v1.DatasourceService.GetSourceSync:output_type -> saas.accounts.v1.GetSourceSyncResponse - 42, // 120: saas.accounts.v1.DatasourceService.DeleteSource:output_type -> saas.accounts.v1.DeleteSourceResponse - 45, // 121: saas.accounts.v1.DatasourceService.BeginGitHubAppSetup:output_type -> saas.accounts.v1.BeginGitHubAppSetupResponse - 47, // 122: saas.accounts.v1.DatasourceService.CompleteGitHubAppSetup:output_type -> saas.accounts.v1.CompleteGitHubAppSetupResponse - 49, // 123: saas.accounts.v1.DatasourceService.MigrateGitHubSourceToApp:output_type -> saas.accounts.v1.MigrateGitHubSourceToAppResponse - 55, // 124: saas.accounts.v1.DatasourceService.BeginDatasourceAccountLink:output_type -> saas.accounts.v1.BeginDatasourceAccountLinkResponse - 57, // 125: saas.accounts.v1.DatasourceService.CompleteDatasourceAccountLink:output_type -> saas.accounts.v1.CompleteDatasourceAccountLinkResponse - 59, // 126: saas.accounts.v1.DatasourceService.ListMyDatasourceAccountLinks:output_type -> saas.accounts.v1.ListMyDatasourceAccountLinksResponse - 61, // 127: saas.accounts.v1.DatasourceService.DeleteDatasourceAccountLink:output_type -> saas.accounts.v1.DeleteDatasourceAccountLinkResponse - 63, // 128: saas.accounts.v1.DatasourceService.GetDatasourceDirectory:output_type -> saas.accounts.v1.GetDatasourceDirectoryResponse - 65, // 129: saas.accounts.v1.DatasourceService.BindDatasourceGroup:output_type -> saas.accounts.v1.BindDatasourceGroupResponse - 67, // 130: saas.accounts.v1.DatasourceService.UnbindDatasourceGroup:output_type -> saas.accounts.v1.UnbindDatasourceGroupResponse - 69, // 131: saas.accounts.v1.DatasourceService.ClaimDatasourceDomain:output_type -> saas.accounts.v1.ClaimDatasourceDomainResponse - 71, // 132: saas.accounts.v1.DatasourceService.VerifyDatasourceDomain:output_type -> saas.accounts.v1.VerifyDatasourceDomainResponse - 73, // 133: saas.accounts.v1.DatasourceService.DeleteDatasourceDomain:output_type -> saas.accounts.v1.DeleteDatasourceDomainResponse - 76, // 134: saas.accounts.v1.DatasourceService.ListSourceDelegations:output_type -> saas.accounts.v1.ListSourceDelegationsResponse - 78, // 135: saas.accounts.v1.DatasourceService.RevokeSourceDelegation:output_type -> saas.accounts.v1.RevokeSourceDelegationResponse - 107, // [107:136] is the sub-list for method output_type - 78, // [78:107] is the sub-list for method input_type - 78, // [78:78] is the sub-list for extension type_name - 78, // [78:78] is the sub-list for extension extendee - 0, // [0:78] is the sub-list for field type_name + 103, // 71: saas.accounts.v1.TriggerDelegationReference.created_at:type_name -> google.protobuf.Timestamp + 103, // 72: saas.accounts.v1.TriggerDelegationReference.revoked_at:type_name -> google.protobuf.Timestamp + 11, // 73: saas.accounts.v1.TriggerDelegationReference.revocation:type_name -> saas.accounts.v1.SourceDelegationRevocation + 103, // 74: saas.accounts.v1.TriggerChildContext.minted_at:type_name -> google.protobuf.Timestamp + 80, // 75: saas.accounts.v1.SourceTriggerDeclaration.schedule:type_name -> saas.accounts.v1.DeclaredTriggerSchedule + 79, // 76: saas.accounts.v1.SourceTriggerDeclaration.identity:type_name -> saas.accounts.v1.TriggerIdentity + 103, // 77: saas.accounts.v1.SourceTriggerDeclaration.last_occurrence_at:type_name -> google.protobuf.Timestamp + 103, // 78: saas.accounts.v1.SourceTriggerDeclaration.next_occurrence_at:type_name -> google.protobuf.Timestamp + 81, // 79: saas.accounts.v1.DelegateSourceTriggersResponse.delegations:type_name -> saas.accounts.v1.TriggerDelegationReference + 83, // 80: saas.accounts.v1.GetSourceTriggerDeclarationResponse.declaration:type_name -> saas.accounts.v1.SourceTriggerDeclaration + 81, // 81: saas.accounts.v1.GetSourceTriggerDeclarationResponse.delegations:type_name -> saas.accounts.v1.TriggerDelegationReference + 82, // 82: saas.accounts.v1.GetSourceTriggerDeclarationResponse.children:type_name -> saas.accounts.v1.TriggerChildContext + 107, // 83: saas.accounts.v1.SourceOperation.input_schema:type_name -> google.protobuf.Struct + 107, // 84: saas.accounts.v1.SourceOperation.output_schema:type_name -> google.protobuf.Struct + 13, // 85: saas.accounts.v1.SourceOperation.effect:type_name -> saas.accounts.v1.SourceOperation.Effect + 91, // 86: saas.accounts.v1.DeclareSourceOperationsRequest.operations:type_name -> saas.accounts.v1.SourceOperation + 91, // 87: saas.accounts.v1.DeclareSourceOperationsResponse.operations:type_name -> saas.accounts.v1.SourceOperation + 91, // 88: saas.accounts.v1.ListSourceOperationsResponse.operations:type_name -> saas.accounts.v1.SourceOperation + 97, // 89: saas.accounts.v1.InvokeSourceOperationResponse.receipt:type_name -> saas.accounts.v1.SourceOperationReceipt + 100, // 90: saas.accounts.v1.DatasourceService.PruneSourceOperationReceipts:input_type -> saas.accounts.v1.PruneSourceOperationReceiptsRequest + 102, // 91: saas.accounts.v1.DatasourceService.LookupPruneSourceOperationReceipts:input_type -> saas.accounts.v1.LookupPruneSourceOperationReceiptsRequest + 96, // 92: saas.accounts.v1.DatasourceService.InvokeSourceOperation:input_type -> saas.accounts.v1.InvokeSourceOperationRequest + 99, // 93: saas.accounts.v1.DatasourceService.LookupInvokeSourceOperation:input_type -> saas.accounts.v1.LookupInvokeSourceOperationRequest + 94, // 94: saas.accounts.v1.DatasourceService.ListSourceOperations:input_type -> saas.accounts.v1.ListSourceOperationsRequest + 92, // 95: saas.accounts.v1.DatasourceService.DeclareSourceOperations:input_type -> saas.accounts.v1.DeclareSourceOperationsRequest + 20, // 96: saas.accounts.v1.DatasourceService.AddGitHubSource:input_type -> saas.accounts.v1.AddGitHubSourceRequest + 22, // 97: saas.accounts.v1.DatasourceService.AddSource:input_type -> saas.accounts.v1.AddSourceRequest + 27, // 98: saas.accounts.v1.DatasourceService.GetDatasourceCatalog:input_type -> saas.accounts.v1.GetDatasourceCatalogRequest + 29, // 99: saas.accounts.v1.DatasourceService.ListSources:input_type -> saas.accounts.v1.ListSourcesRequest + 31, // 100: saas.accounts.v1.DatasourceService.GetSource:input_type -> saas.accounts.v1.GetSourceRequest + 33, // 101: saas.accounts.v1.DatasourceService.SyncSource:input_type -> saas.accounts.v1.SyncSourceRequest + 35, // 102: saas.accounts.v1.DatasourceService.GetSourceSync:input_type -> saas.accounts.v1.GetSourceSyncRequest + 41, // 103: saas.accounts.v1.DatasourceService.DeleteSource:input_type -> saas.accounts.v1.DeleteSourceRequest + 44, // 104: saas.accounts.v1.DatasourceService.BeginGitHubAppSetup:input_type -> saas.accounts.v1.BeginGitHubAppSetupRequest + 46, // 105: saas.accounts.v1.DatasourceService.CompleteGitHubAppSetup:input_type -> saas.accounts.v1.CompleteGitHubAppSetupRequest + 48, // 106: saas.accounts.v1.DatasourceService.MigrateGitHubSourceToApp:input_type -> saas.accounts.v1.MigrateGitHubSourceToAppRequest + 54, // 107: saas.accounts.v1.DatasourceService.BeginDatasourceAccountLink:input_type -> saas.accounts.v1.BeginDatasourceAccountLinkRequest + 56, // 108: saas.accounts.v1.DatasourceService.CompleteDatasourceAccountLink:input_type -> saas.accounts.v1.CompleteDatasourceAccountLinkRequest + 58, // 109: saas.accounts.v1.DatasourceService.ListMyDatasourceAccountLinks:input_type -> saas.accounts.v1.ListMyDatasourceAccountLinksRequest + 60, // 110: saas.accounts.v1.DatasourceService.DeleteDatasourceAccountLink:input_type -> saas.accounts.v1.DeleteDatasourceAccountLinkRequest + 62, // 111: saas.accounts.v1.DatasourceService.GetDatasourceDirectory:input_type -> saas.accounts.v1.GetDatasourceDirectoryRequest + 64, // 112: saas.accounts.v1.DatasourceService.BindDatasourceGroup:input_type -> saas.accounts.v1.BindDatasourceGroupRequest + 66, // 113: saas.accounts.v1.DatasourceService.UnbindDatasourceGroup:input_type -> saas.accounts.v1.UnbindDatasourceGroupRequest + 68, // 114: saas.accounts.v1.DatasourceService.ClaimDatasourceDomain:input_type -> saas.accounts.v1.ClaimDatasourceDomainRequest + 70, // 115: saas.accounts.v1.DatasourceService.VerifyDatasourceDomain:input_type -> saas.accounts.v1.VerifyDatasourceDomainRequest + 72, // 116: saas.accounts.v1.DatasourceService.DeleteDatasourceDomain:input_type -> saas.accounts.v1.DeleteDatasourceDomainRequest + 75, // 117: saas.accounts.v1.DatasourceService.ListSourceDelegations:input_type -> saas.accounts.v1.ListSourceDelegationsRequest + 77, // 118: saas.accounts.v1.DatasourceService.RevokeSourceDelegation:input_type -> saas.accounts.v1.RevokeSourceDelegationRequest + 84, // 119: saas.accounts.v1.DatasourceService.DelegateSourceTriggers:input_type -> saas.accounts.v1.DelegateSourceTriggersRequest + 86, // 120: saas.accounts.v1.DatasourceService.GetSourceTriggerDeclaration:input_type -> saas.accounts.v1.GetSourceTriggerDeclarationRequest + 88, // 121: saas.accounts.v1.DatasourceService.ReconcileSource:input_type -> saas.accounts.v1.ReconcileSourceRequest + 90, // 122: saas.accounts.v1.DatasourceService.LookupReconcileSource:input_type -> saas.accounts.v1.LookupReconcileSourceRequest + 101, // 123: saas.accounts.v1.DatasourceService.PruneSourceOperationReceipts:output_type -> saas.accounts.v1.PruneSourceOperationReceiptsResponse + 101, // 124: saas.accounts.v1.DatasourceService.LookupPruneSourceOperationReceipts:output_type -> saas.accounts.v1.PruneSourceOperationReceiptsResponse + 98, // 125: saas.accounts.v1.DatasourceService.InvokeSourceOperation:output_type -> saas.accounts.v1.InvokeSourceOperationResponse + 98, // 126: saas.accounts.v1.DatasourceService.LookupInvokeSourceOperation:output_type -> saas.accounts.v1.InvokeSourceOperationResponse + 95, // 127: saas.accounts.v1.DatasourceService.ListSourceOperations:output_type -> saas.accounts.v1.ListSourceOperationsResponse + 93, // 128: saas.accounts.v1.DatasourceService.DeclareSourceOperations:output_type -> saas.accounts.v1.DeclareSourceOperationsResponse + 21, // 129: saas.accounts.v1.DatasourceService.AddGitHubSource:output_type -> saas.accounts.v1.AddGitHubSourceResponse + 23, // 130: saas.accounts.v1.DatasourceService.AddSource:output_type -> saas.accounts.v1.AddSourceResponse + 28, // 131: saas.accounts.v1.DatasourceService.GetDatasourceCatalog:output_type -> saas.accounts.v1.GetDatasourceCatalogResponse + 30, // 132: saas.accounts.v1.DatasourceService.ListSources:output_type -> saas.accounts.v1.ListSourcesResponse + 32, // 133: saas.accounts.v1.DatasourceService.GetSource:output_type -> saas.accounts.v1.GetSourceResponse + 34, // 134: saas.accounts.v1.DatasourceService.SyncSource:output_type -> saas.accounts.v1.SyncSourceResponse + 40, // 135: saas.accounts.v1.DatasourceService.GetSourceSync:output_type -> saas.accounts.v1.GetSourceSyncResponse + 42, // 136: saas.accounts.v1.DatasourceService.DeleteSource:output_type -> saas.accounts.v1.DeleteSourceResponse + 45, // 137: saas.accounts.v1.DatasourceService.BeginGitHubAppSetup:output_type -> saas.accounts.v1.BeginGitHubAppSetupResponse + 47, // 138: saas.accounts.v1.DatasourceService.CompleteGitHubAppSetup:output_type -> saas.accounts.v1.CompleteGitHubAppSetupResponse + 49, // 139: saas.accounts.v1.DatasourceService.MigrateGitHubSourceToApp:output_type -> saas.accounts.v1.MigrateGitHubSourceToAppResponse + 55, // 140: saas.accounts.v1.DatasourceService.BeginDatasourceAccountLink:output_type -> saas.accounts.v1.BeginDatasourceAccountLinkResponse + 57, // 141: saas.accounts.v1.DatasourceService.CompleteDatasourceAccountLink:output_type -> saas.accounts.v1.CompleteDatasourceAccountLinkResponse + 59, // 142: saas.accounts.v1.DatasourceService.ListMyDatasourceAccountLinks:output_type -> saas.accounts.v1.ListMyDatasourceAccountLinksResponse + 61, // 143: saas.accounts.v1.DatasourceService.DeleteDatasourceAccountLink:output_type -> saas.accounts.v1.DeleteDatasourceAccountLinkResponse + 63, // 144: saas.accounts.v1.DatasourceService.GetDatasourceDirectory:output_type -> saas.accounts.v1.GetDatasourceDirectoryResponse + 65, // 145: saas.accounts.v1.DatasourceService.BindDatasourceGroup:output_type -> saas.accounts.v1.BindDatasourceGroupResponse + 67, // 146: saas.accounts.v1.DatasourceService.UnbindDatasourceGroup:output_type -> saas.accounts.v1.UnbindDatasourceGroupResponse + 69, // 147: saas.accounts.v1.DatasourceService.ClaimDatasourceDomain:output_type -> saas.accounts.v1.ClaimDatasourceDomainResponse + 71, // 148: saas.accounts.v1.DatasourceService.VerifyDatasourceDomain:output_type -> saas.accounts.v1.VerifyDatasourceDomainResponse + 73, // 149: saas.accounts.v1.DatasourceService.DeleteDatasourceDomain:output_type -> saas.accounts.v1.DeleteDatasourceDomainResponse + 76, // 150: saas.accounts.v1.DatasourceService.ListSourceDelegations:output_type -> saas.accounts.v1.ListSourceDelegationsResponse + 78, // 151: saas.accounts.v1.DatasourceService.RevokeSourceDelegation:output_type -> saas.accounts.v1.RevokeSourceDelegationResponse + 85, // 152: saas.accounts.v1.DatasourceService.DelegateSourceTriggers:output_type -> saas.accounts.v1.DelegateSourceTriggersResponse + 87, // 153: saas.accounts.v1.DatasourceService.GetSourceTriggerDeclaration:output_type -> saas.accounts.v1.GetSourceTriggerDeclarationResponse + 89, // 154: saas.accounts.v1.DatasourceService.ReconcileSource:output_type -> saas.accounts.v1.ReconcileSourceResponse + 89, // 155: saas.accounts.v1.DatasourceService.LookupReconcileSource:output_type -> saas.accounts.v1.ReconcileSourceResponse + 123, // [123:156] is the sub-list for method output_type + 90, // [90:123] is the sub-list for method input_type + 90, // [90:90] is the sub-list for extension type_name + 90, // [90:90] is the sub-list for extension extendee + 0, // [0:90] is the sub-list for field type_name } func init() { file_saas_accounts_v1_datasource_proto_init() } @@ -7093,7 +8169,7 @@ func file_saas_accounts_v1_datasource_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_saas_accounts_v1_datasource_proto_rawDesc), len(file_saas_accounts_v1_datasource_proto_rawDesc)), NumEnums: 14, - NumMessages: 77, + NumMessages: 89, NumExtensions: 0, NumServices: 1, }, diff --git a/gen/saas/accounts/v1/installations.pb.go b/gen/saas/accounts/v1/installations.pb.go index 8f04e14..90a3ec8 100644 --- a/gen/saas/accounts/v1/installations.pb.go +++ b/gen/saas/accounts/v1/installations.pb.go @@ -35,6 +35,12 @@ const ( InstallationStatus_INSTALLATION_STATUS_UNSPECIFIED InstallationStatus = 0 InstallationStatus_INSTALLATION_STATUS_ACTIVE InstallationStatus = 1 InstallationStatus_INSTALLATION_STATUS_REVOKED InstallationStatus = 2 + // Installed, and waiting for the solution to acknowledge its standard install + // step. Nothing can use a pending installation. + InstallationStatus_INSTALLATION_STATUS_PENDING InstallationStatus = 3 + // The solution refused its install step, or never answered within the + // attempt budget. Nothing can use it; an administrator may retry it. + InstallationStatus_INSTALLATION_STATUS_FAILED InstallationStatus = 4 ) // Enum value maps for InstallationStatus. @@ -43,11 +49,15 @@ var ( 0: "INSTALLATION_STATUS_UNSPECIFIED", 1: "INSTALLATION_STATUS_ACTIVE", 2: "INSTALLATION_STATUS_REVOKED", + 3: "INSTALLATION_STATUS_PENDING", + 4: "INSTALLATION_STATUS_FAILED", } InstallationStatus_value = map[string]int32{ "INSTALLATION_STATUS_UNSPECIFIED": 0, "INSTALLATION_STATUS_ACTIVE": 1, "INSTALLATION_STATUS_REVOKED": 2, + "INSTALLATION_STATUS_PENDING": 3, + "INSTALLATION_STATUS_FAILED": 4, } ) @@ -175,6 +185,9 @@ type Installation struct { // uninstalling: the installation-identity cutover, or a tenancy narrowing that // withdrew this organisation. Empty on an active row. RevokedReason string `protobuf:"bytes,12,opt,name=revoked_reason,json=revokedReason,proto3" json:"revoked_reason,omitempty"` + // Why the install step failed: the solution's bounded refusal reason, or a + // fixed reason when it never answered. Empty unless status is FAILED. + FailureReason string `protobuf:"bytes,13,opt,name=failure_reason,json=failureReason,proto3" json:"failure_reason,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -286,6 +299,13 @@ func (x *Installation) GetRevokedReason() string { return "" } +func (x *Installation) GetFailureReason() string { + if x != nil { + return x.FailureReason + } + return "" +} + type InstallSolutionRequest struct { state protoimpl.MessageState `protogen:"open.v1"` OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` @@ -309,7 +329,18 @@ type InstallSolutionRequest struct { CoOwnerPrincipalIds []string `protobuf:"bytes,9,rep,name=co_owner_principal_ids,json=coOwnerPrincipalIds,proto3" json:"co_owner_principal_ids,omitempty"` // The agent's delegated-execution ceiling (migration 108): the Work Context // audiences it may be minted for and the resource kinds it may ever touch. - // Empty = unrestricted. + // + // Empty = unrestricted FOR THIS INSTALLATION'S OWN WORK, which is what an + // administrator consented to when they installed it. + // + // A mint made with a credential delivered to a THIRD PARTY on a person's + // behalf — an MCP client the person authorized for this one solution — is not + // bounded by these lists. Its ceiling is the invoke bindings of the + // consumer's delivered authority, as this installation's scope consented to + // them when it was installed; a consumer with no delivered authority has no + // ceiling, and such a mint is refused. These lists can only narrow that + // ceiling: an empty list adds no bound, and a list naming more admits + // nothing extra. AllowedAudiences []string `protobuf:"bytes,10,rep,name=allowed_audiences,json=allowedAudiences,proto3" json:"allowed_audiences,omitempty"` AllowedScopes []string `protobuf:"bytes,11,rep,name=allowed_scopes,json=allowedScopes,proto3" json:"allowed_scopes,omitempty"` // The solution target being installed, from ListAvailableSolutions. Required. @@ -500,6 +531,58 @@ func (x *NarrowInstallationRequest) GetScope() string { return "" } +type RetryInstallationRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + InstallationId string `protobuf:"bytes,2,opt,name=installation_id,json=installationId,proto3" json:"installation_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RetryInstallationRequest) Reset() { + *x = RetryInstallationRequest{} + mi := &file_saas_accounts_v1_installations_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RetryInstallationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RetryInstallationRequest) ProtoMessage() {} + +func (x *RetryInstallationRequest) ProtoReflect() protoreflect.Message { + mi := &file_saas_accounts_v1_installations_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RetryInstallationRequest.ProtoReflect.Descriptor instead. +func (*RetryInstallationRequest) Descriptor() ([]byte, []int) { + return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{3} +} + +func (x *RetryInstallationRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *RetryInstallationRequest) GetInstallationId() string { + if x != nil { + return x.InstallationId + } + return "" +} + type UninstallSolutionRequest struct { state protoimpl.MessageState `protogen:"open.v1"` OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` @@ -510,7 +593,7 @@ type UninstallSolutionRequest struct { func (x *UninstallSolutionRequest) Reset() { *x = UninstallSolutionRequest{} - mi := &file_saas_accounts_v1_installations_proto_msgTypes[3] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -522,7 +605,7 @@ func (x *UninstallSolutionRequest) String() string { func (*UninstallSolutionRequest) ProtoMessage() {} func (x *UninstallSolutionRequest) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_installations_proto_msgTypes[3] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -535,7 +618,7 @@ func (x *UninstallSolutionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UninstallSolutionRequest.ProtoReflect.Descriptor instead. func (*UninstallSolutionRequest) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{3} + return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{4} } func (x *UninstallSolutionRequest) GetOrgId() string { @@ -566,7 +649,7 @@ type TransferInstallationOwnershipRequest struct { func (x *TransferInstallationOwnershipRequest) Reset() { *x = TransferInstallationOwnershipRequest{} - mi := &file_saas_accounts_v1_installations_proto_msgTypes[4] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -578,7 +661,7 @@ func (x *TransferInstallationOwnershipRequest) String() string { func (*TransferInstallationOwnershipRequest) ProtoMessage() {} func (x *TransferInstallationOwnershipRequest) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_installations_proto_msgTypes[4] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -591,7 +674,7 @@ func (x *TransferInstallationOwnershipRequest) ProtoReflect() protoreflect.Messa // Deprecated: Use TransferInstallationOwnershipRequest.ProtoReflect.Descriptor instead. func (*TransferInstallationOwnershipRequest) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{4} + return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{5} } func (x *TransferInstallationOwnershipRequest) GetOrgId() string { @@ -632,7 +715,7 @@ type GetInstallationRequest struct { func (x *GetInstallationRequest) Reset() { *x = GetInstallationRequest{} - mi := &file_saas_accounts_v1_installations_proto_msgTypes[5] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -644,7 +727,7 @@ func (x *GetInstallationRequest) String() string { func (*GetInstallationRequest) ProtoMessage() {} func (x *GetInstallationRequest) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_installations_proto_msgTypes[5] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -657,7 +740,7 @@ func (x *GetInstallationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetInstallationRequest.ProtoReflect.Descriptor instead. func (*GetInstallationRequest) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{5} + return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{6} } func (x *GetInstallationRequest) GetOrgId() string { @@ -685,7 +768,7 @@ type GetInstallationResponse struct { func (x *GetInstallationResponse) Reset() { *x = GetInstallationResponse{} - mi := &file_saas_accounts_v1_installations_proto_msgTypes[6] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -697,7 +780,7 @@ func (x *GetInstallationResponse) String() string { func (*GetInstallationResponse) ProtoMessage() {} func (x *GetInstallationResponse) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_installations_proto_msgTypes[6] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -710,7 +793,7 @@ func (x *GetInstallationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetInstallationResponse.ProtoReflect.Descriptor instead. func (*GetInstallationResponse) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{6} + return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{7} } func (x *GetInstallationResponse) GetInstallation() *Installation { @@ -749,7 +832,7 @@ type ListInstallationsRequest struct { func (x *ListInstallationsRequest) Reset() { *x = ListInstallationsRequest{} - mi := &file_saas_accounts_v1_installations_proto_msgTypes[7] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -761,7 +844,7 @@ func (x *ListInstallationsRequest) String() string { func (*ListInstallationsRequest) ProtoMessage() {} func (x *ListInstallationsRequest) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_installations_proto_msgTypes[7] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -774,7 +857,7 @@ func (x *ListInstallationsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListInstallationsRequest.ProtoReflect.Descriptor instead. func (*ListInstallationsRequest) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{7} + return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{8} } func (x *ListInstallationsRequest) GetOrgId() string { @@ -819,7 +902,7 @@ type InstallationSummary struct { func (x *InstallationSummary) Reset() { *x = InstallationSummary{} - mi := &file_saas_accounts_v1_installations_proto_msgTypes[8] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -831,7 +914,7 @@ func (x *InstallationSummary) String() string { func (*InstallationSummary) ProtoMessage() {} func (x *InstallationSummary) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_installations_proto_msgTypes[8] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -844,7 +927,7 @@ func (x *InstallationSummary) ProtoReflect() protoreflect.Message { // Deprecated: Use InstallationSummary.ProtoReflect.Descriptor instead. func (*InstallationSummary) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{8} + return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{9} } func (x *InstallationSummary) GetInstallation() *Installation { @@ -873,7 +956,7 @@ type ListInstallationsResponse struct { func (x *ListInstallationsResponse) Reset() { *x = ListInstallationsResponse{} - mi := &file_saas_accounts_v1_installations_proto_msgTypes[9] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -885,7 +968,7 @@ func (x *ListInstallationsResponse) String() string { func (*ListInstallationsResponse) ProtoMessage() {} func (x *ListInstallationsResponse) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_installations_proto_msgTypes[9] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -898,7 +981,7 @@ func (x *ListInstallationsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListInstallationsResponse.ProtoReflect.Descriptor instead. func (*ListInstallationsResponse) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{9} + return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{10} } func (x *ListInstallationsResponse) GetInstallations() []*InstallationSummary { @@ -928,7 +1011,7 @@ type ListOrganizationInstallationsRequest struct { func (x *ListOrganizationInstallationsRequest) Reset() { *x = ListOrganizationInstallationsRequest{} - mi := &file_saas_accounts_v1_installations_proto_msgTypes[10] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -940,7 +1023,7 @@ func (x *ListOrganizationInstallationsRequest) String() string { func (*ListOrganizationInstallationsRequest) ProtoMessage() {} func (x *ListOrganizationInstallationsRequest) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_installations_proto_msgTypes[10] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -953,7 +1036,7 @@ func (x *ListOrganizationInstallationsRequest) ProtoReflect() protoreflect.Messa // Deprecated: Use ListOrganizationInstallationsRequest.ProtoReflect.Descriptor instead. func (*ListOrganizationInstallationsRequest) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{10} + return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{11} } func (x *ListOrganizationInstallationsRequest) GetOrgId() string { @@ -1005,7 +1088,7 @@ type OrganizationInstallation struct { func (x *OrganizationInstallation) Reset() { *x = OrganizationInstallation{} - mi := &file_saas_accounts_v1_installations_proto_msgTypes[11] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1017,7 +1100,7 @@ func (x *OrganizationInstallation) String() string { func (*OrganizationInstallation) ProtoMessage() {} func (x *OrganizationInstallation) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_installations_proto_msgTypes[11] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1030,7 +1113,7 @@ func (x *OrganizationInstallation) ProtoReflect() protoreflect.Message { // Deprecated: Use OrganizationInstallation.ProtoReflect.Descriptor instead. func (*OrganizationInstallation) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{11} + return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{12} } func (x *OrganizationInstallation) GetInstallation() *Installation { @@ -1086,7 +1169,7 @@ type ListOrganizationInstallationsResponse struct { func (x *ListOrganizationInstallationsResponse) Reset() { *x = ListOrganizationInstallationsResponse{} - mi := &file_saas_accounts_v1_installations_proto_msgTypes[12] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1098,7 +1181,7 @@ func (x *ListOrganizationInstallationsResponse) String() string { func (*ListOrganizationInstallationsResponse) ProtoMessage() {} func (x *ListOrganizationInstallationsResponse) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_installations_proto_msgTypes[12] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1111,7 +1194,7 @@ func (x *ListOrganizationInstallationsResponse) ProtoReflect() protoreflect.Mess // Deprecated: Use ListOrganizationInstallationsResponse.ProtoReflect.Descriptor instead. func (*ListOrganizationInstallationsResponse) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{12} + return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{13} } func (x *ListOrganizationInstallationsResponse) GetInstallations() []*OrganizationInstallation { @@ -1144,7 +1227,7 @@ type GrantInstallationToTeamRequest struct { func (x *GrantInstallationToTeamRequest) Reset() { *x = GrantInstallationToTeamRequest{} - mi := &file_saas_accounts_v1_installations_proto_msgTypes[13] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1156,7 +1239,7 @@ func (x *GrantInstallationToTeamRequest) String() string { func (*GrantInstallationToTeamRequest) ProtoMessage() {} func (x *GrantInstallationToTeamRequest) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_installations_proto_msgTypes[13] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1169,7 +1252,7 @@ func (x *GrantInstallationToTeamRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GrantInstallationToTeamRequest.ProtoReflect.Descriptor instead. func (*GrantInstallationToTeamRequest) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{13} + return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{14} } func (x *GrantInstallationToTeamRequest) GetOrgId() string { @@ -1209,7 +1292,7 @@ type GrantInstallationToTeamResponse struct { func (x *GrantInstallationToTeamResponse) Reset() { *x = GrantInstallationToTeamResponse{} - mi := &file_saas_accounts_v1_installations_proto_msgTypes[14] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1221,7 +1304,7 @@ func (x *GrantInstallationToTeamResponse) String() string { func (*GrantInstallationToTeamResponse) ProtoMessage() {} func (x *GrantInstallationToTeamResponse) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_installations_proto_msgTypes[14] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1234,7 +1317,7 @@ func (x *GrantInstallationToTeamResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GrantInstallationToTeamResponse.ProtoReflect.Descriptor instead. func (*GrantInstallationToTeamResponse) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{14} + return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{15} } func (x *GrantInstallationToTeamResponse) GetGrant() *ScopeGrant { @@ -1258,7 +1341,7 @@ type RevokeInstallationFromTeamRequest struct { func (x *RevokeInstallationFromTeamRequest) Reset() { *x = RevokeInstallationFromTeamRequest{} - mi := &file_saas_accounts_v1_installations_proto_msgTypes[15] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1270,7 +1353,7 @@ func (x *RevokeInstallationFromTeamRequest) String() string { func (*RevokeInstallationFromTeamRequest) ProtoMessage() {} func (x *RevokeInstallationFromTeamRequest) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_installations_proto_msgTypes[15] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1283,7 +1366,7 @@ func (x *RevokeInstallationFromTeamRequest) ProtoReflect() protoreflect.Message // Deprecated: Use RevokeInstallationFromTeamRequest.ProtoReflect.Descriptor instead. func (*RevokeInstallationFromTeamRequest) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{15} + return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{16} } func (x *RevokeInstallationFromTeamRequest) GetOrgId() string { @@ -1346,7 +1429,7 @@ type AvailableSolution struct { func (x *AvailableSolution) Reset() { *x = AvailableSolution{} - mi := &file_saas_accounts_v1_installations_proto_msgTypes[16] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1358,7 +1441,7 @@ func (x *AvailableSolution) String() string { func (*AvailableSolution) ProtoMessage() {} func (x *AvailableSolution) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_installations_proto_msgTypes[16] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1371,7 +1454,7 @@ func (x *AvailableSolution) ProtoReflect() protoreflect.Message { // Deprecated: Use AvailableSolution.ProtoReflect.Descriptor instead. func (*AvailableSolution) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{16} + return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{17} } func (x *AvailableSolution) GetTargetId() string { @@ -1450,7 +1533,7 @@ type ListAvailableSolutionsRequest struct { func (x *ListAvailableSolutionsRequest) Reset() { *x = ListAvailableSolutionsRequest{} - mi := &file_saas_accounts_v1_installations_proto_msgTypes[17] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1462,7 +1545,7 @@ func (x *ListAvailableSolutionsRequest) String() string { func (*ListAvailableSolutionsRequest) ProtoMessage() {} func (x *ListAvailableSolutionsRequest) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_installations_proto_msgTypes[17] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1475,7 +1558,7 @@ func (x *ListAvailableSolutionsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListAvailableSolutionsRequest.ProtoReflect.Descriptor instead. func (*ListAvailableSolutionsRequest) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{17} + return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{18} } func (x *ListAvailableSolutionsRequest) GetOrgId() string { @@ -1509,7 +1592,7 @@ type ListAvailableSolutionsResponse struct { func (x *ListAvailableSolutionsResponse) Reset() { *x = ListAvailableSolutionsResponse{} - mi := &file_saas_accounts_v1_installations_proto_msgTypes[18] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1521,7 +1604,7 @@ func (x *ListAvailableSolutionsResponse) String() string { func (*ListAvailableSolutionsResponse) ProtoMessage() {} func (x *ListAvailableSolutionsResponse) ProtoReflect() protoreflect.Message { - mi := &file_saas_accounts_v1_installations_proto_msgTypes[18] + mi := &file_saas_accounts_v1_installations_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1534,7 +1617,7 @@ func (x *ListAvailableSolutionsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListAvailableSolutionsResponse.ProtoReflect.Descriptor instead. func (*ListAvailableSolutionsResponse) Descriptor() ([]byte, []int) { - return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{18} + return file_saas_accounts_v1_installations_proto_rawDescGZIP(), []int{19} } func (x *ListAvailableSolutionsResponse) GetSolutions() []*AvailableSolution { @@ -1555,7 +1638,7 @@ var File_saas_accounts_v1_installations_proto protoreflect.FileDescriptor const file_saas_accounts_v1_installations_proto_rawDesc = "" + "\n" + - "$saas/accounts/v1/installations.proto\x12\x10saas.accounts.v1\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$saas/accounts/v1/authorization.proto\x1a\x1csaas/policy/v1/options.proto\"\xe3\x04\n" + + "$saas/accounts/v1/installations.proto\x12\x10saas.accounts.v1\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$saas/accounts/v1/authorization.proto\x1a\x1csaas/policy/v1/options.proto\"\x94\x05\n" + "\fInstallation\x12\x18\n" + "\x02id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12\x1f\n" + "\x06org_id\x18\x02 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x05orgId\x126\n" + @@ -1570,7 +1653,8 @@ const file_saas_accounts_v1_installations_proto_rawDesc = "" + "revoked_at\x18\n" + " \x01(\v2\x1a.google.protobuf.TimestampH\x00R\trevokedAt\x88\x01\x01\x12(\n" + "\ttarget_id\x18\v \x01(\tB\v\xbaH\b\xd8\x01\x01r\x03\xb0\x01\x01R\btargetId\x12/\n" + - "\x0erevoked_reason\x18\f \x01(\tB\b\xbaH\x05r\x03\x18\x80\x04R\rrevokedReasonB\r\n" + + "\x0erevoked_reason\x18\f \x01(\tB\b\xbaH\x05r\x03\x18\x80\x04R\rrevokedReason\x12/\n" + + "\x0efailure_reason\x18\r \x01(\tB\b\xbaH\x05r\x03\x18\x80\x04R\rfailureReasonB\r\n" + "\v_revoked_atJ\x04\b\x04\x10\x05R\x13solution_identifier\"\xf6\x04\n" + "\x16InstallSolutionRequest\x12\x1f\n" + "\x06org_id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x05orgId\x125\n" + @@ -1591,6 +1675,9 @@ const file_saas_accounts_v1_installations_proto_rawDesc = "" + "\x06org_id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x05orgId\x121\n" + "\x0finstallation_id\x18\x02 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x0einstallationId\x12!\n" + "\x05scope\x18\x03 \x01(\tB\v\xbaH\br\x06\x10\x02(\x80\x80@R\x05scope\"n\n" + + "\x18RetryInstallationRequest\x12\x1f\n" + + "\x06org_id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x05orgId\x121\n" + + "\x0finstallation_id\x18\x02 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x0einstallationId\"n\n" + "\x18UninstallSolutionRequest\x12\x1f\n" + "\x06org_id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x05orgId\x121\n" + "\x0finstallation_id\x18\x02 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x0einstallationId\"\xff\x01\n" + @@ -1666,18 +1753,20 @@ const file_saas_accounts_v1_installations_proto_rawDesc = "" + "page_token\x18\x03 \x01(\tR\tpageToken\"\x8b\x01\n" + "\x1eListAvailableSolutionsResponse\x12A\n" + "\tsolutions\x18\x01 \x03(\v2#.saas.accounts.v1.AvailableSolutionR\tsolutions\x12&\n" + - "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken*z\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken*\xbb\x01\n" + "\x12InstallationStatus\x12#\n" + "\x1fINSTALLATION_STATUS_UNSPECIFIED\x10\x00\x12\x1e\n" + "\x1aINSTALLATION_STATUS_ACTIVE\x10\x01\x12\x1f\n" + - "\x1bINSTALLATION_STATUS_REVOKED\x10\x02*\x84\x02\n" + + "\x1bINSTALLATION_STATUS_REVOKED\x10\x02\x12\x1f\n" + + "\x1bINSTALLATION_STATUS_PENDING\x10\x03\x12\x1e\n" + + "\x1aINSTALLATION_STATUS_FAILED\x10\x04*\x84\x02\n" + "\x12InstallationHealth\x12#\n" + "\x1fINSTALLATION_HEALTH_UNSPECIFIED\x10\x00\x12\x1f\n" + "\x1bINSTALLATION_HEALTH_HEALTHY\x10\x01\x12)\n" + "%INSTALLATION_HEALTH_NO_ELIGIBLE_OWNER\x10\x02\x12%\n" + "!INSTALLATION_HEALTH_AGENT_REVOKED\x10\x03\x12&\n" + "\"INSTALLATION_HEALTH_AGENT_DISABLED\x10\x04\x12.\n" + - "*INSTALLATION_HEALTH_STANDING_GRANT_MISSING\x10\x052\xd1\x10\n" + + "*INSTALLATION_HEALTH_STANDING_GRANT_MISSING\x10\x052\xaa\x12\n" + "\x13InstallationService\x12\xba\x01\n" + "\x0fInstallSolution\x12(.saas.accounts.v1.InstallSolutionRequest\x1a\x1e.saas.accounts.v1.Installation\"]\xc2\xf3\x18=\b\x02\x10\x04*\f\n" + "\x06org_id\x10\x02\x18\x010\x01:\x1d\n" + @@ -1687,7 +1776,10 @@ const file_saas_accounts_v1_installations_proto_rawDesc = "" + "\x19saas.installation.revoked\x10\x02@\x01H\x04P\x03X\x03`\x01\x82\xd3\xe4\x93\x022:\x01*\"-/v1/installations/{installation_id}:uninstall\x12\xd2\x01\n" + "\x12NarrowInstallation\x12+.saas.accounts.v1.NarrowInstallationRequest\x1a\x16.google.protobuf.Empty\"w\xc2\xf3\x18>\b\x02\x10\x04*\f\n" + "\x06org_id\x10\x02\x18\x010\x01:\x1e\n" + - "\x1asaas.installation.narrowed\x10\x02@\x01H\x04P\x03X\x03`\x01\x82\xd3\xe4\x93\x02/:\x01*\"*/v1/installations/{installation_id}:narrow\x12\x89\x02\n" + + "\x1asaas.installation.narrowed\x10\x02@\x01H\x04P\x03X\x03`\x01\x82\xd3\xe4\x93\x02/:\x01*\"*/v1/installations/{installation_id}:narrow\x12\xd6\x01\n" + + "\x11RetryInstallation\x12*.saas.accounts.v1.RetryInstallationRequest\x1a\x1e.saas.accounts.v1.Installation\"u\xc2\xf3\x18=\b\x02\x10\x04*\f\n" + + "\x06org_id\x10\x02\x18\x010\x01:\x1d\n" + + "\x19saas.installation.retried\x10\x02@\x01H\x04P\x03X\x03`\x01\x82\xd3\xe4\x93\x02.:\x01*\")/v1/installations/{installation_id}:retry\x12\x89\x02\n" + "\x1dTransferInstallationOwnership\x126.saas.accounts.v1.TransferInstallationOwnershipRequest\x1a\x1e.saas.accounts.v1.Installation\"\x8f\x01\xc2\xf3\x18K\b\x02\x10\x04*\f\n" + "\x06org_id\x10\x02\x18\x010\x01:+\n" + "'saas.installation.ownership_transferred\x10\x02@\x01H\x04P\x03X\x03`\x01\x82\xd3\xe4\x93\x02::\x01*\"5/v1/installations/{installation_id}:transferOwnership\x12\xb9\x01\n" + @@ -1719,74 +1811,77 @@ func file_saas_accounts_v1_installations_proto_rawDescGZIP() []byte { } var file_saas_accounts_v1_installations_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_saas_accounts_v1_installations_proto_msgTypes = make([]protoimpl.MessageInfo, 19) +var file_saas_accounts_v1_installations_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_saas_accounts_v1_installations_proto_goTypes = []any{ (InstallationStatus)(0), // 0: saas.accounts.v1.InstallationStatus (InstallationHealth)(0), // 1: saas.accounts.v1.InstallationHealth (*Installation)(nil), // 2: saas.accounts.v1.Installation (*InstallSolutionRequest)(nil), // 3: saas.accounts.v1.InstallSolutionRequest (*NarrowInstallationRequest)(nil), // 4: saas.accounts.v1.NarrowInstallationRequest - (*UninstallSolutionRequest)(nil), // 5: saas.accounts.v1.UninstallSolutionRequest - (*TransferInstallationOwnershipRequest)(nil), // 6: saas.accounts.v1.TransferInstallationOwnershipRequest - (*GetInstallationRequest)(nil), // 7: saas.accounts.v1.GetInstallationRequest - (*GetInstallationResponse)(nil), // 8: saas.accounts.v1.GetInstallationResponse - (*ListInstallationsRequest)(nil), // 9: saas.accounts.v1.ListInstallationsRequest - (*InstallationSummary)(nil), // 10: saas.accounts.v1.InstallationSummary - (*ListInstallationsResponse)(nil), // 11: saas.accounts.v1.ListInstallationsResponse - (*ListOrganizationInstallationsRequest)(nil), // 12: saas.accounts.v1.ListOrganizationInstallationsRequest - (*OrganizationInstallation)(nil), // 13: saas.accounts.v1.OrganizationInstallation - (*ListOrganizationInstallationsResponse)(nil), // 14: saas.accounts.v1.ListOrganizationInstallationsResponse - (*GrantInstallationToTeamRequest)(nil), // 15: saas.accounts.v1.GrantInstallationToTeamRequest - (*GrantInstallationToTeamResponse)(nil), // 16: saas.accounts.v1.GrantInstallationToTeamResponse - (*RevokeInstallationFromTeamRequest)(nil), // 17: saas.accounts.v1.RevokeInstallationFromTeamRequest - (*AvailableSolution)(nil), // 18: saas.accounts.v1.AvailableSolution - (*ListAvailableSolutionsRequest)(nil), // 19: saas.accounts.v1.ListAvailableSolutionsRequest - (*ListAvailableSolutionsResponse)(nil), // 20: saas.accounts.v1.ListAvailableSolutionsResponse - (*timestamppb.Timestamp)(nil), // 21: google.protobuf.Timestamp - (*CollectionReadGrant)(nil), // 22: saas.accounts.v1.CollectionReadGrant - (*ScopeGrant)(nil), // 23: saas.accounts.v1.ScopeGrant - (*emptypb.Empty)(nil), // 24: google.protobuf.Empty + (*RetryInstallationRequest)(nil), // 5: saas.accounts.v1.RetryInstallationRequest + (*UninstallSolutionRequest)(nil), // 6: saas.accounts.v1.UninstallSolutionRequest + (*TransferInstallationOwnershipRequest)(nil), // 7: saas.accounts.v1.TransferInstallationOwnershipRequest + (*GetInstallationRequest)(nil), // 8: saas.accounts.v1.GetInstallationRequest + (*GetInstallationResponse)(nil), // 9: saas.accounts.v1.GetInstallationResponse + (*ListInstallationsRequest)(nil), // 10: saas.accounts.v1.ListInstallationsRequest + (*InstallationSummary)(nil), // 11: saas.accounts.v1.InstallationSummary + (*ListInstallationsResponse)(nil), // 12: saas.accounts.v1.ListInstallationsResponse + (*ListOrganizationInstallationsRequest)(nil), // 13: saas.accounts.v1.ListOrganizationInstallationsRequest + (*OrganizationInstallation)(nil), // 14: saas.accounts.v1.OrganizationInstallation + (*ListOrganizationInstallationsResponse)(nil), // 15: saas.accounts.v1.ListOrganizationInstallationsResponse + (*GrantInstallationToTeamRequest)(nil), // 16: saas.accounts.v1.GrantInstallationToTeamRequest + (*GrantInstallationToTeamResponse)(nil), // 17: saas.accounts.v1.GrantInstallationToTeamResponse + (*RevokeInstallationFromTeamRequest)(nil), // 18: saas.accounts.v1.RevokeInstallationFromTeamRequest + (*AvailableSolution)(nil), // 19: saas.accounts.v1.AvailableSolution + (*ListAvailableSolutionsRequest)(nil), // 20: saas.accounts.v1.ListAvailableSolutionsRequest + (*ListAvailableSolutionsResponse)(nil), // 21: saas.accounts.v1.ListAvailableSolutionsResponse + (*timestamppb.Timestamp)(nil), // 22: google.protobuf.Timestamp + (*CollectionReadGrant)(nil), // 23: saas.accounts.v1.CollectionReadGrant + (*ScopeGrant)(nil), // 24: saas.accounts.v1.ScopeGrant + (*emptypb.Empty)(nil), // 25: google.protobuf.Empty } var file_saas_accounts_v1_installations_proto_depIdxs = []int32{ 0, // 0: saas.accounts.v1.Installation.status:type_name -> saas.accounts.v1.InstallationStatus - 21, // 1: saas.accounts.v1.Installation.created_at:type_name -> google.protobuf.Timestamp - 21, // 2: saas.accounts.v1.Installation.revoked_at:type_name -> google.protobuf.Timestamp + 22, // 1: saas.accounts.v1.Installation.created_at:type_name -> google.protobuf.Timestamp + 22, // 2: saas.accounts.v1.Installation.revoked_at:type_name -> google.protobuf.Timestamp 2, // 3: saas.accounts.v1.GetInstallationResponse.installation:type_name -> saas.accounts.v1.Installation 1, // 4: saas.accounts.v1.GetInstallationResponse.health:type_name -> saas.accounts.v1.InstallationHealth 0, // 5: saas.accounts.v1.ListInstallationsRequest.status:type_name -> saas.accounts.v1.InstallationStatus 2, // 6: saas.accounts.v1.InstallationSummary.installation:type_name -> saas.accounts.v1.Installation 1, // 7: saas.accounts.v1.InstallationSummary.health:type_name -> saas.accounts.v1.InstallationHealth - 10, // 8: saas.accounts.v1.ListInstallationsResponse.installations:type_name -> saas.accounts.v1.InstallationSummary + 11, // 8: saas.accounts.v1.ListInstallationsResponse.installations:type_name -> saas.accounts.v1.InstallationSummary 2, // 9: saas.accounts.v1.OrganizationInstallation.installation:type_name -> saas.accounts.v1.Installation 1, // 10: saas.accounts.v1.OrganizationInstallation.health:type_name -> saas.accounts.v1.InstallationHealth - 18, // 11: saas.accounts.v1.OrganizationInstallation.target:type_name -> saas.accounts.v1.AvailableSolution - 22, // 12: saas.accounts.v1.OrganizationInstallation.granted_teams:type_name -> saas.accounts.v1.CollectionReadGrant - 22, // 13: saas.accounts.v1.OrganizationInstallation.inherited_teams:type_name -> saas.accounts.v1.CollectionReadGrant - 13, // 14: saas.accounts.v1.ListOrganizationInstallationsResponse.installations:type_name -> saas.accounts.v1.OrganizationInstallation - 23, // 15: saas.accounts.v1.GrantInstallationToTeamResponse.grant:type_name -> saas.accounts.v1.ScopeGrant - 18, // 16: saas.accounts.v1.ListAvailableSolutionsResponse.solutions:type_name -> saas.accounts.v1.AvailableSolution + 19, // 11: saas.accounts.v1.OrganizationInstallation.target:type_name -> saas.accounts.v1.AvailableSolution + 23, // 12: saas.accounts.v1.OrganizationInstallation.granted_teams:type_name -> saas.accounts.v1.CollectionReadGrant + 23, // 13: saas.accounts.v1.OrganizationInstallation.inherited_teams:type_name -> saas.accounts.v1.CollectionReadGrant + 14, // 14: saas.accounts.v1.ListOrganizationInstallationsResponse.installations:type_name -> saas.accounts.v1.OrganizationInstallation + 24, // 15: saas.accounts.v1.GrantInstallationToTeamResponse.grant:type_name -> saas.accounts.v1.ScopeGrant + 19, // 16: saas.accounts.v1.ListAvailableSolutionsResponse.solutions:type_name -> saas.accounts.v1.AvailableSolution 3, // 17: saas.accounts.v1.InstallationService.InstallSolution:input_type -> saas.accounts.v1.InstallSolutionRequest - 5, // 18: saas.accounts.v1.InstallationService.UninstallSolution:input_type -> saas.accounts.v1.UninstallSolutionRequest + 6, // 18: saas.accounts.v1.InstallationService.UninstallSolution:input_type -> saas.accounts.v1.UninstallSolutionRequest 4, // 19: saas.accounts.v1.InstallationService.NarrowInstallation:input_type -> saas.accounts.v1.NarrowInstallationRequest - 6, // 20: saas.accounts.v1.InstallationService.TransferInstallationOwnership:input_type -> saas.accounts.v1.TransferInstallationOwnershipRequest - 7, // 21: saas.accounts.v1.InstallationService.GetInstallation:input_type -> saas.accounts.v1.GetInstallationRequest - 9, // 22: saas.accounts.v1.InstallationService.ListInstallations:input_type -> saas.accounts.v1.ListInstallationsRequest - 19, // 23: saas.accounts.v1.InstallationService.ListAvailableSolutions:input_type -> saas.accounts.v1.ListAvailableSolutionsRequest - 12, // 24: saas.accounts.v1.InstallationService.ListOrganizationInstallations:input_type -> saas.accounts.v1.ListOrganizationInstallationsRequest - 15, // 25: saas.accounts.v1.InstallationService.GrantInstallationToTeam:input_type -> saas.accounts.v1.GrantInstallationToTeamRequest - 17, // 26: saas.accounts.v1.InstallationService.RevokeInstallationFromTeam:input_type -> saas.accounts.v1.RevokeInstallationFromTeamRequest - 2, // 27: saas.accounts.v1.InstallationService.InstallSolution:output_type -> saas.accounts.v1.Installation - 24, // 28: saas.accounts.v1.InstallationService.UninstallSolution:output_type -> google.protobuf.Empty - 24, // 29: saas.accounts.v1.InstallationService.NarrowInstallation:output_type -> google.protobuf.Empty - 2, // 30: saas.accounts.v1.InstallationService.TransferInstallationOwnership:output_type -> saas.accounts.v1.Installation - 8, // 31: saas.accounts.v1.InstallationService.GetInstallation:output_type -> saas.accounts.v1.GetInstallationResponse - 11, // 32: saas.accounts.v1.InstallationService.ListInstallations:output_type -> saas.accounts.v1.ListInstallationsResponse - 20, // 33: saas.accounts.v1.InstallationService.ListAvailableSolutions:output_type -> saas.accounts.v1.ListAvailableSolutionsResponse - 14, // 34: saas.accounts.v1.InstallationService.ListOrganizationInstallations:output_type -> saas.accounts.v1.ListOrganizationInstallationsResponse - 16, // 35: saas.accounts.v1.InstallationService.GrantInstallationToTeam:output_type -> saas.accounts.v1.GrantInstallationToTeamResponse - 24, // 36: saas.accounts.v1.InstallationService.RevokeInstallationFromTeam:output_type -> google.protobuf.Empty - 27, // [27:37] is the sub-list for method output_type - 17, // [17:27] is the sub-list for method input_type + 5, // 20: saas.accounts.v1.InstallationService.RetryInstallation:input_type -> saas.accounts.v1.RetryInstallationRequest + 7, // 21: saas.accounts.v1.InstallationService.TransferInstallationOwnership:input_type -> saas.accounts.v1.TransferInstallationOwnershipRequest + 8, // 22: saas.accounts.v1.InstallationService.GetInstallation:input_type -> saas.accounts.v1.GetInstallationRequest + 10, // 23: saas.accounts.v1.InstallationService.ListInstallations:input_type -> saas.accounts.v1.ListInstallationsRequest + 20, // 24: saas.accounts.v1.InstallationService.ListAvailableSolutions:input_type -> saas.accounts.v1.ListAvailableSolutionsRequest + 13, // 25: saas.accounts.v1.InstallationService.ListOrganizationInstallations:input_type -> saas.accounts.v1.ListOrganizationInstallationsRequest + 16, // 26: saas.accounts.v1.InstallationService.GrantInstallationToTeam:input_type -> saas.accounts.v1.GrantInstallationToTeamRequest + 18, // 27: saas.accounts.v1.InstallationService.RevokeInstallationFromTeam:input_type -> saas.accounts.v1.RevokeInstallationFromTeamRequest + 2, // 28: saas.accounts.v1.InstallationService.InstallSolution:output_type -> saas.accounts.v1.Installation + 25, // 29: saas.accounts.v1.InstallationService.UninstallSolution:output_type -> google.protobuf.Empty + 25, // 30: saas.accounts.v1.InstallationService.NarrowInstallation:output_type -> google.protobuf.Empty + 2, // 31: saas.accounts.v1.InstallationService.RetryInstallation:output_type -> saas.accounts.v1.Installation + 2, // 32: saas.accounts.v1.InstallationService.TransferInstallationOwnership:output_type -> saas.accounts.v1.Installation + 9, // 33: saas.accounts.v1.InstallationService.GetInstallation:output_type -> saas.accounts.v1.GetInstallationResponse + 12, // 34: saas.accounts.v1.InstallationService.ListInstallations:output_type -> saas.accounts.v1.ListInstallationsResponse + 21, // 35: saas.accounts.v1.InstallationService.ListAvailableSolutions:output_type -> saas.accounts.v1.ListAvailableSolutionsResponse + 15, // 36: saas.accounts.v1.InstallationService.ListOrganizationInstallations:output_type -> saas.accounts.v1.ListOrganizationInstallationsResponse + 17, // 37: saas.accounts.v1.InstallationService.GrantInstallationToTeam:output_type -> saas.accounts.v1.GrantInstallationToTeamResponse + 25, // 38: saas.accounts.v1.InstallationService.RevokeInstallationFromTeam:output_type -> google.protobuf.Empty + 28, // [28:39] is the sub-list for method output_type + 17, // [17:28] is the sub-list for method input_type 17, // [17:17] is the sub-list for extension type_name 17, // [17:17] is the sub-list for extension extendee 0, // [0:17] is the sub-list for field type_name @@ -1806,7 +1901,7 @@ func file_saas_accounts_v1_installations_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_saas_accounts_v1_installations_proto_rawDesc), len(file_saas_accounts_v1_installations_proto_rawDesc)), NumEnums: 2, - NumMessages: 19, + NumMessages: 20, NumExtensions: 0, NumServices: 1, }, diff --git a/gen/saas/accounts/v1/module_capabilities.pb.go b/gen/saas/accounts/v1/module_capabilities.pb.go index 9bc51b1..dd7c172 100644 --- a/gen/saas/accounts/v1/module_capabilities.pb.go +++ b/gen/saas/accounts/v1/module_capabilities.pb.go @@ -378,6 +378,279 @@ func (SourceSyncStage) EnumDescriptor() ([]byte, []int) { return file_saas_accounts_v1_module_capabilities_proto_rawDescGZIP(), []int{5} } +// WorkContextSealState tells a held installation from one the principal does not +// hold. UNSPECIFIED is neither: it is a host that answered nothing. +type WorkContextSealState int32 + +const ( + WorkContextSealState_WORK_CONTEXT_SEAL_STATE_UNSPECIFIED WorkContextSealState = 0 + // HELD: the principal holds this installation, and the answer carries its + // live revision. + WorkContextSealState_WORK_CONTEXT_SEAL_STATE_HELD WorkContextSealState = 1 + // UNHELD: the installation is not active in this organization, or the + // principal is not an active member of it. A capability sealed to it is not a + // credential, so a verifier refuses rather than erroring. + WorkContextSealState_WORK_CONTEXT_SEAL_STATE_UNHELD WorkContextSealState = 2 +) + +// Enum value maps for WorkContextSealState. +var ( + WorkContextSealState_name = map[int32]string{ + 0: "WORK_CONTEXT_SEAL_STATE_UNSPECIFIED", + 1: "WORK_CONTEXT_SEAL_STATE_HELD", + 2: "WORK_CONTEXT_SEAL_STATE_UNHELD", + } + WorkContextSealState_value = map[string]int32{ + "WORK_CONTEXT_SEAL_STATE_UNSPECIFIED": 0, + "WORK_CONTEXT_SEAL_STATE_HELD": 1, + "WORK_CONTEXT_SEAL_STATE_UNHELD": 2, + } +) + +func (x WorkContextSealState) Enum() *WorkContextSealState { + p := new(WorkContextSealState) + *p = x + return p +} + +func (x WorkContextSealState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (WorkContextSealState) Descriptor() protoreflect.EnumDescriptor { + return file_saas_accounts_v1_module_capabilities_proto_enumTypes[6].Descriptor() +} + +func (WorkContextSealState) Type() protoreflect.EnumType { + return &file_saas_accounts_v1_module_capabilities_proto_enumTypes[6] +} + +func (x WorkContextSealState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use WorkContextSealState.Descriptor instead. +func (WorkContextSealState) EnumDescriptor() ([]byte, []int) { + return file_saas_accounts_v1_module_capabilities_proto_rawDescGZIP(), []int{6} +} + +// WorkContextPrincipalState tells a principal this organization has an +// authorization record for from one it has never heard of. An unknown principal +// is a refusal, never an epoch of zero. +type WorkContextPrincipalState int32 + +const ( + WorkContextPrincipalState_WORK_CONTEXT_PRINCIPAL_STATE_UNSPECIFIED WorkContextPrincipalState = 0 + WorkContextPrincipalState_WORK_CONTEXT_PRINCIPAL_STATE_KNOWN WorkContextPrincipalState = 1 + WorkContextPrincipalState_WORK_CONTEXT_PRINCIPAL_STATE_UNKNOWN WorkContextPrincipalState = 2 +) + +// Enum value maps for WorkContextPrincipalState. +var ( + WorkContextPrincipalState_name = map[int32]string{ + 0: "WORK_CONTEXT_PRINCIPAL_STATE_UNSPECIFIED", + 1: "WORK_CONTEXT_PRINCIPAL_STATE_KNOWN", + 2: "WORK_CONTEXT_PRINCIPAL_STATE_UNKNOWN", + } + WorkContextPrincipalState_value = map[string]int32{ + "WORK_CONTEXT_PRINCIPAL_STATE_UNSPECIFIED": 0, + "WORK_CONTEXT_PRINCIPAL_STATE_KNOWN": 1, + "WORK_CONTEXT_PRINCIPAL_STATE_UNKNOWN": 2, + } +) + +func (x WorkContextPrincipalState) Enum() *WorkContextPrincipalState { + p := new(WorkContextPrincipalState) + *p = x + return p +} + +func (x WorkContextPrincipalState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (WorkContextPrincipalState) Descriptor() protoreflect.EnumDescriptor { + return file_saas_accounts_v1_module_capabilities_proto_enumTypes[7].Descriptor() +} + +func (WorkContextPrincipalState) Type() protoreflect.EnumType { + return &file_saas_accounts_v1_module_capabilities_proto_enumTypes[7] +} + +func (x WorkContextPrincipalState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use WorkContextPrincipalState.Descriptor instead. +func (WorkContextPrincipalState) EnumDescriptor() ([]byte, []int) { + return file_saas_accounts_v1_module_capabilities_proto_rawDescGZIP(), []int{7} +} + +// WorkContextApprovedBuildState separates the three answers this question has, +// because collapsing any two of them is the dangerous direction: a principal +// with an approved build, a principal that BEARS NO EXECUTION — a person's +// session, which is correct and not an error — and anything else, which is a +// refusal carried as an error rather than a state. +type WorkContextApprovedBuildState int32 + +const ( + WorkContextApprovedBuildState_WORK_CONTEXT_APPROVED_BUILD_STATE_UNSPECIFIED WorkContextApprovedBuildState = 0 + WorkContextApprovedBuildState_WORK_CONTEXT_APPROVED_BUILD_STATE_APPROVED WorkContextApprovedBuildState = 1 + // BEARS_NO_EXECUTION: this principal runs no approved build at all. A + // capability of its own carries no execution, and one that carries an + // execution is refused — a process claiming to be a workload. + WorkContextApprovedBuildState_WORK_CONTEXT_APPROVED_BUILD_STATE_BEARS_NO_EXECUTION WorkContextApprovedBuildState = 2 +) + +// Enum value maps for WorkContextApprovedBuildState. +var ( + WorkContextApprovedBuildState_name = map[int32]string{ + 0: "WORK_CONTEXT_APPROVED_BUILD_STATE_UNSPECIFIED", + 1: "WORK_CONTEXT_APPROVED_BUILD_STATE_APPROVED", + 2: "WORK_CONTEXT_APPROVED_BUILD_STATE_BEARS_NO_EXECUTION", + } + WorkContextApprovedBuildState_value = map[string]int32{ + "WORK_CONTEXT_APPROVED_BUILD_STATE_UNSPECIFIED": 0, + "WORK_CONTEXT_APPROVED_BUILD_STATE_APPROVED": 1, + "WORK_CONTEXT_APPROVED_BUILD_STATE_BEARS_NO_EXECUTION": 2, + } +) + +func (x WorkContextApprovedBuildState) Enum() *WorkContextApprovedBuildState { + p := new(WorkContextApprovedBuildState) + *p = x + return p +} + +func (x WorkContextApprovedBuildState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (WorkContextApprovedBuildState) Descriptor() protoreflect.EnumDescriptor { + return file_saas_accounts_v1_module_capabilities_proto_enumTypes[8].Descriptor() +} + +func (WorkContextApprovedBuildState) Type() protoreflect.EnumType { + return &file_saas_accounts_v1_module_capabilities_proto_enumTypes[8] +} + +func (x WorkContextApprovedBuildState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use WorkContextApprovedBuildState.Descriptor instead. +func (WorkContextApprovedBuildState) EnumDescriptor() ([]byte, []int) { + return file_saas_accounts_v1_module_capabilities_proto_rawDescGZIP(), []int{8} +} + +// WorkContextOperationBindingState tells a resolved binding from an id that +// names nothing this organization holds. +type WorkContextOperationBindingState int32 + +const ( + WorkContextOperationBindingState_WORK_CONTEXT_OPERATION_BINDING_STATE_UNSPECIFIED WorkContextOperationBindingState = 0 + WorkContextOperationBindingState_WORK_CONTEXT_OPERATION_BINDING_STATE_RESOLVED WorkContextOperationBindingState = 1 + // ABSENT: no such binding — no delegation under that id, or one this + // organization does not entitle the named module to use. An id is a pointer + // and never authority, so guessing one resolves here. + WorkContextOperationBindingState_WORK_CONTEXT_OPERATION_BINDING_STATE_ABSENT WorkContextOperationBindingState = 2 +) + +// Enum value maps for WorkContextOperationBindingState. +var ( + WorkContextOperationBindingState_name = map[int32]string{ + 0: "WORK_CONTEXT_OPERATION_BINDING_STATE_UNSPECIFIED", + 1: "WORK_CONTEXT_OPERATION_BINDING_STATE_RESOLVED", + 2: "WORK_CONTEXT_OPERATION_BINDING_STATE_ABSENT", + } + WorkContextOperationBindingState_value = map[string]int32{ + "WORK_CONTEXT_OPERATION_BINDING_STATE_UNSPECIFIED": 0, + "WORK_CONTEXT_OPERATION_BINDING_STATE_RESOLVED": 1, + "WORK_CONTEXT_OPERATION_BINDING_STATE_ABSENT": 2, + } +) + +func (x WorkContextOperationBindingState) Enum() *WorkContextOperationBindingState { + p := new(WorkContextOperationBindingState) + *p = x + return p +} + +func (x WorkContextOperationBindingState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (WorkContextOperationBindingState) Descriptor() protoreflect.EnumDescriptor { + return file_saas_accounts_v1_module_capabilities_proto_enumTypes[9].Descriptor() +} + +func (WorkContextOperationBindingState) Type() protoreflect.EnumType { + return &file_saas_accounts_v1_module_capabilities_proto_enumTypes[9] +} + +func (x WorkContextOperationBindingState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use WorkContextOperationBindingState.Descriptor instead. +func (WorkContextOperationBindingState) EnumDescriptor() ([]byte, []int) { + return file_saas_accounts_v1_module_capabilities_proto_rawDescGZIP(), []int{9} +} + +// WorkContextApprovalGrantState is the state of an approval grant. +// +// This host records none, and NOT_RECORDED is the only state it answers today: +// a capability carrying a grant hop names a decision this host never made, and +// its verifier refuses it. The state is served rather than assumed by a client +// so that the policy has one home — the day this host records approvals, this +// answer grows the record it resolved and a client that does not understand the +// new state keeps refusing, which is the safe direction. +type WorkContextApprovalGrantState int32 + +const ( + WorkContextApprovalGrantState_WORK_CONTEXT_APPROVAL_GRANT_STATE_UNSPECIFIED WorkContextApprovalGrantState = 0 + WorkContextApprovalGrantState_WORK_CONTEXT_APPROVAL_GRANT_STATE_NOT_RECORDED WorkContextApprovalGrantState = 1 +) + +// Enum value maps for WorkContextApprovalGrantState. +var ( + WorkContextApprovalGrantState_name = map[int32]string{ + 0: "WORK_CONTEXT_APPROVAL_GRANT_STATE_UNSPECIFIED", + 1: "WORK_CONTEXT_APPROVAL_GRANT_STATE_NOT_RECORDED", + } + WorkContextApprovalGrantState_value = map[string]int32{ + "WORK_CONTEXT_APPROVAL_GRANT_STATE_UNSPECIFIED": 0, + "WORK_CONTEXT_APPROVAL_GRANT_STATE_NOT_RECORDED": 1, + } +) + +func (x WorkContextApprovalGrantState) Enum() *WorkContextApprovalGrantState { + p := new(WorkContextApprovalGrantState) + *p = x + return p +} + +func (x WorkContextApprovalGrantState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (WorkContextApprovalGrantState) Descriptor() protoreflect.EnumDescriptor { + return file_saas_accounts_v1_module_capabilities_proto_enumTypes[10].Descriptor() +} + +func (WorkContextApprovalGrantState) Type() protoreflect.EnumType { + return &file_saas_accounts_v1_module_capabilities_proto_enumTypes[10] +} + +func (x WorkContextApprovalGrantState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use WorkContextApprovalGrantState.Descriptor instead. +func (WorkContextApprovalGrantState) EnumDescriptor() ([]byte, []int) { + return file_saas_accounts_v1_module_capabilities_proto_rawDescGZIP(), []int{10} +} + // ModuleEnqueueJobRequest names the tenant the work belongs to and carries the // same producer-owned NewJob the in-process producer uses. tenant must equal // the caller principal's bound tenant unless the principal holds a cross-tenant @@ -4646,128 +4919,1154 @@ func (x *ModuleCurrentInstallationResponse) GetBindingId() string { return "" } -var File_saas_accounts_v1_module_capabilities_proto protoreflect.FileDescriptor +// WorkContextSealQuestion asks for the live installation one principal holds. +// Both identifiers must be the ones the presented capability names — its owner +// and the installation it is sealed to — and its revision is the issuer's to +// answer. +type WorkContextSealQuestion struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Both are compared against the presented capability, which is what makes + // them trustworthy — so neither carries a format rule. A uuid constraint + // here would add no safety the comparison does not already give and would + // refuse an installation id this host legitimately holds. + PrincipalId string `protobuf:"bytes,1,opt,name=principal_id,json=principalId,proto3" json:"principal_id,omitempty"` + InstallationId string `protobuf:"bytes,2,opt,name=installation_id,json=installationId,proto3" json:"installation_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} -const file_saas_accounts_v1_module_capabilities_proto_rawDesc = "" + - "\n" + - "*saas/accounts/v1/module_capabilities.proto\x12\x10saas.accounts.v1\x1a$saas/accounts/v1/work_contexts.proto\x1a\x1bbuf/validate/validate.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a*saas/accounts/v1/module_registration.proto\x1a\x1bsaas/events/v1/events.proto\x1a\x17saas/jobs/v1/jobs.proto\x1a\x1csaas/policy/v1/options.proto\"k\n" + - "\x17ModuleEnqueueJobRequest\x12 \n" + - "\x06tenant\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x06tenant\x12.\n" + - "\x03job\x18\x02 \x01(\v2\x14.saas.jobs.v1.NewJobB\x06\xbaH\x03\xc8\x01\x01R\x03job\"\x8a\x01\n" + - "\x18ModuleEnqueueJobResponse\x12\x1f\n" + - "\x06job_id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x05jobId\x12M\n" + - "\vdisposition\x18\x02 \x01(\x0e2#.saas.jobs.v1.JobEnqueueDispositionB\x06\xbaH\x03\xc8\x01\x01R\vdisposition\"\xf1\x01\n" + - "\x16ModuleClaimJobsRequest\x125\n" + - "\x05queue\x18\x01 \x01(\tB\x1f\xbaH\x1cr\x1a\x10\x01\x18\x80\x012\x13^[a-z][a-z0-9_.-]*$R\x05queue\x12'\n" + - "\tworker_id\x18\x02 \x01(\tB\n" + - "\xbaH\ar\x05\x10\x01\x18\xff\x01R\bworkerId\x12\x1f\n" + - "\x05limit\x18\x03 \x01(\rB\t\xbaH\x06*\x04\x18d(\x01R\x05limit\x12V\n" + - "\x0elease_duration\x18\x04 \x01(\v2\x19.google.protobuf.DurationB\x14\xbaH\x11\xc8\x01\x01\xaa\x01\v\"\x03\b\x90\x1c2\x04\x10\xc0\x84=R\rleaseDuration\"H\n" + - "\x17ModuleClaimJobsResponse\x12-\n" + - "\x04jobs\x18\x01 \x03(\v2\x19.saas.jobs.v1.JobEnvelopeR\x04jobs\"\xa9\x01\n" + - "\x19ModuleHeartbeatJobRequest\x12=\n" + - "\x05lease\x18\x01 \x01(\v2\x1f.saas.jobs.v1.JobLeaseReferenceB\x06\xbaH\x03\xc8\x01\x01R\x05lease\x12M\n" + - "\textension\x18\x02 \x01(\v2\x19.google.protobuf.DurationB\x14\xbaH\x11\xc8\x01\x01\xaa\x01\v\"\x03\b\x90\x1c2\x04\x10\xc0\x84=R\textension\"R\n" + - "\x1aModuleHeartbeatJobResponse\x124\n" + - "\x05lease\x18\x01 \x01(\v2\x16.saas.jobs.v1.JobLeaseB\x06\xbaH\x03\xc8\x01\x01R\x05lease\"\xc9\x01\n" + - "\x13ModuleAckJobRequest\x12=\n" + - "\x05lease\x18\x01 \x01(\v2\x1f.saas.jobs.v1.JobLeaseReferenceB\x06\xbaH\x03\xc8\x01\x01R\x05lease\x12F\n" + - "\x0eexecution_kind\x18\x02 \x01(\tB\x1f\xbaH\x1cr\x1a\x18@2\x16^$|^[a-z][a-z0-9_.-]*$R\rexecutionKind\x12+\n" + - "\fexecution_id\x18\x03 \x01(\tB\b\xbaH\x05r\x03\x18\xff\x01R\vexecutionId\"\xe6\x01\n" + - "\x14ModuleNackJobRequest\x12=\n" + - "\x05lease\x18\x01 \x01(\v2\x1f.saas.jobs.v1.JobLeaseReferenceB\x06\xbaH\x03\xc8\x01\x01R\x05lease\x12:\n" + - "\afailure\x18\x02 \x01(\v2\x18.saas.jobs.v1.JobFailureB\x06\xbaH\x03\xc8\x01\x01R\afailure\x12\x1c\n" + - "\tretryable\x18\x03 \x01(\bR\tretryable\x125\n" + - "\bretry_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\aretryAt\"\xbe\x02\n" + - "\x17ModuleNotifyUserRequest\x12 \n" + - "\x06tenant\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x06tenant\x12!\n" + - "\auser_id\x18\x02 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x06userId\x12 \n" + - "\x05title\x18\x03 \x01(\tB\n" + - "\xbaH\ar\x05\x10\x01\x18\xe6\aR\x05title\x12\x1c\n" + - "\x04body\x18\x04 \x01(\tB\b\xbaH\x05r\x03\x18\x80@R\x04body\x12\x1b\n" + - "\x04type\x18\x05 \x01(\tB\a\xbaH\x04r\x02\x18@R\x04type\x12'\n" + - "\n" + - "action_url\x18\x06 \x01(\tB\b\xbaH\x05r\x03\x18\x80\x10R\tactionUrl\x12%\n" + - "\bcategory\x18\a \x01(\tB\t\xbaH\x06r\x04\x10\x01\x18 R\bcategory\x121\n" + - "\x0fidempotency_key\x18\b \x01(\tB\b\xbaH\x05r\x03\x18\xff\x01R\x0eidempotencyKey\"a\n" + - "\x18ModuleNotifyUserResponse\x12'\n" + - "\x0fnotification_id\x18\x01 \x01(\tR\x0enotificationId\x12\x1c\n" + - "\tdelivered\x18\x02 \x01(\bR\tdelivered\"\xa0\x02\n" + - "\x1cModuleNotifyOrgAdminsRequest\x12 \n" + - "\x06tenant\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x06tenant\x12 \n" + - "\x05title\x18\x02 \x01(\tB\n" + - "\xbaH\ar\x05\x10\x01\x18\xe6\aR\x05title\x12\x1c\n" + - "\x04body\x18\x03 \x01(\tB\b\xbaH\x05r\x03\x18\x80@R\x04body\x12\x1b\n" + - "\x04type\x18\x04 \x01(\tB\a\xbaH\x04r\x02\x18@R\x04type\x12'\n" + - "\n" + - "action_url\x18\x05 \x01(\tB\b\xbaH\x05r\x03\x18\x80\x10R\tactionUrl\x12%\n" + - "\bcategory\x18\x06 \x01(\tB\t\xbaH\x06r\x04\x10\x01\x18 R\bcategory\x121\n" + - "\x0fidempotency_key\x18\a \x01(\tB\b\xbaH\x05r\x03\x18\xff\x01R\x0eidempotencyKey\"=\n" + - "\x1dModuleNotifyOrgAdminsResponse\x12\x1c\n" + - "\tdelivered\x18\x01 \x01(\bR\tdelivered\"\x83\x01\n" + - "\x14ModuleApprovalPolicy\x12\x1f\n" + - "\x06quorum\x18\x01 \x01(\rB\a\xbaH\x04*\x02\x18dR\x06quorum\x12+\n" + - "\fapprover_set\x18\x02 \x03(\tB\b\xbaH\x05\x92\x01\x02\x10dR\vapproverSet\x12\x1d\n" + - "\n" + - "allow_self\x18\x03 \x01(\bR\tallowSelf\"\xb2\x01\n" + - "\x0fModuleResumeRef\x125\n" + - "\x05queue\x18\x01 \x01(\tB\x1f\xbaH\x1cr\x1a\x10\x01\x18\x80\x012\x13^[a-z][a-z0-9_.-]*$R\x05queue\x125\n" + - "\x05topic\x18\x02 \x01(\tB\x1f\xbaH\x1cr\x1a\x10\x01\x18\xff\x012\x13^[a-z][a-z0-9_.-]*$R\x05topic\x121\n" + - "\apayload\x18\x03 \x01(\v2\x17.google.protobuf.StructR\apayload\"\xf0\x03\n" + - "\x1cModuleRequestApprovalRequest\x12 \n" + - "\x06tenant\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x06tenant\x12&\n" + - "\bresource\x18\x02 \x01(\tB\n" + - "\xbaH\ar\x05\x10\x01\x18\x80\x01R\bresource\x12\"\n" + - "\x06action\x18\x03 \x01(\tB\n" + - "\xbaH\ar\x05\x10\x01\x18\x80\x01R\x06action\x121\n" + - "\asubject\x18\x04 \x01(\v2\x17.google.protobuf.StructR\asubject\x12-\n" + - "\frequested_by\x18\x05 \x01(\tB\n" + - "\xbaH\ar\x05\x10\x01\x18\xff\x01R\vrequestedBy\x12>\n" + - "\x06policy\x18\x06 \x01(\v2&.saas.accounts.v1.ModuleApprovalPolicyR\x06policy\x12H\n" + - "\n" + - "resume_ref\x18\a \x01(\v2!.saas.accounts.v1.ModuleResumeRefB\x06\xbaH\x03\xc8\x01\x01R\tresumeRef\x129\n" + - "\n" + - "expires_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\texpiresAt\x12;\n" + - "\vescalate_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\n" + - "escalateAt\"J\n" + - "\x1dModuleRequestApprovalResponse\x12)\n" + - "\vapproval_id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\n" + - "approvalId\"g\n" + - "\x18ModuleGetApprovalRequest\x12 \n" + - "\x06tenant\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x06tenant\x12)\n" + - "\vapproval_id\x18\x02 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\n" + - "approvalId\"\xe5\x03\n" + - "\x0eModuleApproval\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" + - "\x06tenant\x18\x02 \x01(\tR\x06tenant\x12\x1a\n" + - "\bresource\x18\x03 \x01(\tR\bresource\x12\x16\n" + - "\x06action\x18\x04 \x01(\tR\x06action\x121\n" + - "\asubject\x18\x05 \x01(\v2\x17.google.protobuf.StructR\asubject\x12!\n" + - "\frequested_by\x18\x06 \x01(\tR\vrequestedBy\x12\x16\n" + - "\x06quorum\x18\a \x01(\rR\x06quorum\x12\x14\n" + - "\x05state\x18\b \x01(\tR\x05state\x12@\n" + - "\n" + - "resume_ref\x18\t \x01(\v2!.saas.accounts.v1.ModuleResumeRefR\tresumeRef\x129\n" + - "\n" + - "expires_at\x18\n" + - " \x01(\v2\x1a.google.protobuf.TimestampR\texpiresAt\x12;\n" + - "\vescalate_at\x18\v \x01(\v2\x1a.google.protobuf.TimestampR\n" + - "escalateAt\x129\n" + - "\n" + - "created_at\x18\f \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\"\x8c\x01\n" + - "\x1bModuleCancelApprovalRequest\x12 \n" + - "\x06tenant\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x06tenant\x12)\n" + - "\vapproval_id\x18\x02 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\n" + - "approvalId\x12 \n" + - "\x06reason\x18\x03 \x01(\tB\b\xbaH\x05r\x03\x18\x80\bR\x06reason\"\xb3\x02\n" + - "\x1bModuleEmitAuditEventRequest\x12\x16\n" + - "\x06tenant\x18\x01 \x01(\tR\x06tenant\x12)\n" + - "\n" + - "event_type\x18\x02 \x01(\tB\n" + - "\xbaH\ar\x05\x10\x01\x18\x80\x01R\teventType\x12 \n" + - "\x05actor\x18\x03 \x01(\tB\n" + - "\xbaH\ar\x05\x10\x01\x18\xff\x01R\x05actor\x12&\n" + - "\bsolution\x18\x04 \x01(\tB\n" + +func (x *WorkContextSealQuestion) Reset() { + *x = WorkContextSealQuestion{} + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorkContextSealQuestion) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkContextSealQuestion) ProtoMessage() {} + +func (x *WorkContextSealQuestion) ProtoReflect() protoreflect.Message { + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[63] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkContextSealQuestion.ProtoReflect.Descriptor instead. +func (*WorkContextSealQuestion) Descriptor() ([]byte, []int) { + return file_saas_accounts_v1_module_capabilities_proto_rawDescGZIP(), []int{63} +} + +func (x *WorkContextSealQuestion) GetPrincipalId() string { + if x != nil { + return x.PrincipalId + } + return "" +} + +func (x *WorkContextSealQuestion) GetInstallationId() string { + if x != nil { + return x.InstallationId + } + return "" +} + +// WorkContextPrincipalEpochQuestion asks for one principal's live epoch, +// independent of any installation. It is the question asked of the task owner +// and of every actor hop alike, so a delegated actor is revocable on its own — +// and the principal must be one of those: the capability's owner, or a principal +// in its actor chain. +type WorkContextPrincipalEpochQuestion struct { + state protoimpl.MessageState `protogen:"open.v1"` + PrincipalId string `protobuf:"bytes,1,opt,name=principal_id,json=principalId,proto3" json:"principal_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorkContextPrincipalEpochQuestion) Reset() { + *x = WorkContextPrincipalEpochQuestion{} + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorkContextPrincipalEpochQuestion) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkContextPrincipalEpochQuestion) ProtoMessage() {} + +func (x *WorkContextPrincipalEpochQuestion) ProtoReflect() protoreflect.Message { + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[64] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkContextPrincipalEpochQuestion.ProtoReflect.Descriptor instead. +func (*WorkContextPrincipalEpochQuestion) Descriptor() ([]byte, []int) { + return file_saas_accounts_v1_module_capabilities_proto_rawDescGZIP(), []int{64} +} + +func (x *WorkContextPrincipalEpochQuestion) GetPrincipalId() string { + if x != nil { + return x.PrincipalId + } + return "" +} + +// WorkContextApprovedBuildQuestion asks what execution the issuer APPROVES for +// one principal. It takes no attribute of the workload: resolving by what a +// caller presents is exactly what lets a superseded pod in. The principal must +// be the capability's owner or one in its actor chain, which is every principal +// a verifier holds an execution against. +type WorkContextApprovedBuildQuestion struct { + state protoimpl.MessageState `protogen:"open.v1"` + PrincipalId string `protobuf:"bytes,1,opt,name=principal_id,json=principalId,proto3" json:"principal_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorkContextApprovedBuildQuestion) Reset() { + *x = WorkContextApprovedBuildQuestion{} + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorkContextApprovedBuildQuestion) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkContextApprovedBuildQuestion) ProtoMessage() {} + +func (x *WorkContextApprovedBuildQuestion) ProtoReflect() protoreflect.Message { + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[65] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkContextApprovedBuildQuestion.ProtoReflect.Descriptor instead. +func (*WorkContextApprovedBuildQuestion) Descriptor() ([]byte, []int) { + return file_saas_accounts_v1_module_capabilities_proto_rawDescGZIP(), []int{65} +} + +func (x *WorkContextApprovedBuildQuestion) GetPrincipalId() string { + if x != nil { + return x.PrincipalId + } + return "" +} + +// WorkContextOperationBindingQuestion resolves one operation binding by its +// opaque id, EXACTLY: the one the presented capability is sealed to, and no +// other. There is deliberately no question that lists bindings or finds one +// whose scopes would admit a call — a search is a predicate somebody writes, and +// one case too generous grants authority nobody reviewed — and none that +// resolves a binding some other capability names, which would make this an +// oracle over other modules' installations. +type WorkContextOperationBindingQuestion struct { + state protoimpl.MessageState `protogen:"open.v1"` + BindingId string `protobuf:"bytes,1,opt,name=binding_id,json=bindingId,proto3" json:"binding_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorkContextOperationBindingQuestion) Reset() { + *x = WorkContextOperationBindingQuestion{} + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorkContextOperationBindingQuestion) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkContextOperationBindingQuestion) ProtoMessage() {} + +func (x *WorkContextOperationBindingQuestion) ProtoReflect() protoreflect.Message { + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[66] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkContextOperationBindingQuestion.ProtoReflect.Descriptor instead. +func (*WorkContextOperationBindingQuestion) Descriptor() ([]byte, []int) { + return file_saas_accounts_v1_module_capabilities_proto_rawDescGZIP(), []int{66} +} + +func (x *WorkContextOperationBindingQuestion) GetBindingId() string { + if x != nil { + return x.BindingId + } + return "" +} + +// WorkContextAuthorizationRevisionQuestion asks the authorization revision a +// capability owned by one principal carries. +// +// It names the OWNER, and core's RevisionSource is keyed by tenant alone. That +// is not a widening: this host's revision is the greater of the organization's +// and the owner's own (a module principal's is its installed grant), so an answer +// for a tenant without an owner would be a different number from the one the mint +// stamped. The owner must be the presented capability's own owner, so naming a +// principal whose revision happens to be lower is not expressible. +type WorkContextAuthorizationRevisionQuestion struct { + state protoimpl.MessageState `protogen:"open.v1"` + OwnerPrincipalId string `protobuf:"bytes,1,opt,name=owner_principal_id,json=ownerPrincipalId,proto3" json:"owner_principal_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorkContextAuthorizationRevisionQuestion) Reset() { + *x = WorkContextAuthorizationRevisionQuestion{} + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorkContextAuthorizationRevisionQuestion) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkContextAuthorizationRevisionQuestion) ProtoMessage() {} + +func (x *WorkContextAuthorizationRevisionQuestion) ProtoReflect() protoreflect.Message { + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[67] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkContextAuthorizationRevisionQuestion.ProtoReflect.Descriptor instead. +func (*WorkContextAuthorizationRevisionQuestion) Descriptor() ([]byte, []int) { + return file_saas_accounts_v1_module_capabilities_proto_rawDescGZIP(), []int{67} +} + +func (x *WorkContextAuthorizationRevisionQuestion) GetOwnerPrincipalId() string { + if x != nil { + return x.OwnerPrincipalId + } + return "" +} + +// WorkContextApprovalGrantQuestion resolves the approval a capability's grant +// hop claims. The id must be the one the presented capability's hop claims, so a +// capability carrying no grant hop has no grant to ask about. +type WorkContextApprovalGrantQuestion struct { + state protoimpl.MessageState `protogen:"open.v1"` + GrantId string `protobuf:"bytes,1,opt,name=grant_id,json=grantId,proto3" json:"grant_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorkContextApprovalGrantQuestion) Reset() { + *x = WorkContextApprovalGrantQuestion{} + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorkContextApprovalGrantQuestion) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkContextApprovalGrantQuestion) ProtoMessage() {} + +func (x *WorkContextApprovalGrantQuestion) ProtoReflect() protoreflect.Message { + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[68] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkContextApprovalGrantQuestion.ProtoReflect.Descriptor instead. +func (*WorkContextApprovalGrantQuestion) Descriptor() ([]byte, []int) { + return file_saas_accounts_v1_module_capabilities_proto_rawDescGZIP(), []int{68} +} + +func (x *WorkContextApprovalGrantQuestion) GetGrantId() string { + if x != nil { + return x.GrantId + } + return "" +} + +type WorkContextSealAnswer struct { + state protoimpl.MessageState `protogen:"open.v1"` + State WorkContextSealState `protobuf:"varint,1,opt,name=state,proto3,enum=saas.accounts.v1.WorkContextSealState" json:"state,omitempty"` + // The installation this answer is ABOUT, echoed so a source that resolved + // something else cannot pass for the one that was asked about. + InstallationId string `protobuf:"bytes,2,opt,name=installation_id,json=installationId,proto3" json:"installation_id,omitempty"` + InstallationRevision uint64 `protobuf:"varint,3,opt,name=installation_revision,json=installationRevision,proto3" json:"installation_revision,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorkContextSealAnswer) Reset() { + *x = WorkContextSealAnswer{} + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorkContextSealAnswer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkContextSealAnswer) ProtoMessage() {} + +func (x *WorkContextSealAnswer) ProtoReflect() protoreflect.Message { + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[69] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkContextSealAnswer.ProtoReflect.Descriptor instead. +func (*WorkContextSealAnswer) Descriptor() ([]byte, []int) { + return file_saas_accounts_v1_module_capabilities_proto_rawDescGZIP(), []int{69} +} + +func (x *WorkContextSealAnswer) GetState() WorkContextSealState { + if x != nil { + return x.State + } + return WorkContextSealState_WORK_CONTEXT_SEAL_STATE_UNSPECIFIED +} + +func (x *WorkContextSealAnswer) GetInstallationId() string { + if x != nil { + return x.InstallationId + } + return "" +} + +func (x *WorkContextSealAnswer) GetInstallationRevision() uint64 { + if x != nil { + return x.InstallationRevision + } + return 0 +} + +type WorkContextPrincipalEpochAnswer struct { + state protoimpl.MessageState `protogen:"open.v1"` + State WorkContextPrincipalState `protobuf:"varint,1,opt,name=state,proto3,enum=saas.accounts.v1.WorkContextPrincipalState" json:"state,omitempty"` + PrincipalId string `protobuf:"bytes,2,opt,name=principal_id,json=principalId,proto3" json:"principal_id,omitempty"` + Epoch uint64 `protobuf:"varint,3,opt,name=epoch,proto3" json:"epoch,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorkContextPrincipalEpochAnswer) Reset() { + *x = WorkContextPrincipalEpochAnswer{} + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorkContextPrincipalEpochAnswer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkContextPrincipalEpochAnswer) ProtoMessage() {} + +func (x *WorkContextPrincipalEpochAnswer) ProtoReflect() protoreflect.Message { + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[70] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkContextPrincipalEpochAnswer.ProtoReflect.Descriptor instead. +func (*WorkContextPrincipalEpochAnswer) Descriptor() ([]byte, []int) { + return file_saas_accounts_v1_module_capabilities_proto_rawDescGZIP(), []int{70} +} + +func (x *WorkContextPrincipalEpochAnswer) GetState() WorkContextPrincipalState { + if x != nil { + return x.State + } + return WorkContextPrincipalState_WORK_CONTEXT_PRINCIPAL_STATE_UNSPECIFIED +} + +func (x *WorkContextPrincipalEpochAnswer) GetPrincipalId() string { + if x != nil { + return x.PrincipalId + } + return "" +} + +func (x *WorkContextPrincipalEpochAnswer) GetEpoch() uint64 { + if x != nil { + return x.Epoch + } + return 0 +} + +type WorkContextApprovedBuildAnswer struct { + state protoimpl.MessageState `protogen:"open.v1"` + State WorkContextApprovedBuildState `protobuf:"varint,1,opt,name=state,proto3,enum=saas.accounts.v1.WorkContextApprovedBuildState" json:"state,omitempty"` + PrincipalId string `protobuf:"bytes,2,opt,name=principal_id,json=principalId,proto3" json:"principal_id,omitempty"` + // The digest portion of the approved image, and the incarnation it was + // approved at. Both empty/zero when the principal bears no execution. + ImageDigest string `protobuf:"bytes,3,opt,name=image_digest,json=imageDigest,proto3" json:"image_digest,omitempty"` + BuildIncarnation uint64 `protobuf:"varint,4,opt,name=build_incarnation,json=buildIncarnation,proto3" json:"build_incarnation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorkContextApprovedBuildAnswer) Reset() { + *x = WorkContextApprovedBuildAnswer{} + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorkContextApprovedBuildAnswer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkContextApprovedBuildAnswer) ProtoMessage() {} + +func (x *WorkContextApprovedBuildAnswer) ProtoReflect() protoreflect.Message { + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[71] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkContextApprovedBuildAnswer.ProtoReflect.Descriptor instead. +func (*WorkContextApprovedBuildAnswer) Descriptor() ([]byte, []int) { + return file_saas_accounts_v1_module_capabilities_proto_rawDescGZIP(), []int{71} +} + +func (x *WorkContextApprovedBuildAnswer) GetState() WorkContextApprovedBuildState { + if x != nil { + return x.State + } + return WorkContextApprovedBuildState_WORK_CONTEXT_APPROVED_BUILD_STATE_UNSPECIFIED +} + +func (x *WorkContextApprovedBuildAnswer) GetPrincipalId() string { + if x != nil { + return x.PrincipalId + } + return "" +} + +func (x *WorkContextApprovedBuildAnswer) GetImageDigest() string { + if x != nil { + return x.ImageDigest + } + return "" +} + +func (x *WorkContextApprovedBuildAnswer) GetBuildIncarnation() uint64 { + if x != nil { + return x.BuildIncarnation + } + return 0 +} + +type WorkContextOperationBindingAnswer struct { + state protoimpl.MessageState `protogen:"open.v1"` + State WorkContextOperationBindingState `protobuf:"varint,1,opt,name=state,proto3,enum=saas.accounts.v1.WorkContextOperationBindingState" json:"state,omitempty"` + // The binding this answer is ABOUT, echoed for the same reason the seal's + // installation is. + BindingId string `protobuf:"bytes,2,opt,name=binding_id,json=bindingId,proto3" json:"binding_id,omitempty"` + // Who holds it, and where. An id whose counters match proves nothing on its + // own: a verifier requires that the binding is granted to the principal + // exercising the capability, within the installation it is sealed to. + PrincipalId string `protobuf:"bytes,3,opt,name=principal_id,json=principalId,proto3" json:"principal_id,omitempty"` + InstallationId string `protobuf:"bytes,4,opt,name=installation_id,json=installationId,proto3" json:"installation_id,omitempty"` + Revision uint64 `protobuf:"varint,5,opt,name=revision,proto3" json:"revision,omitempty"` + Incarnation uint64 `protobuf:"varint,6,opt,name=incarnation,proto3" json:"incarnation,omitempty"` + Revoked bool `protobuf:"varint,7,opt,name=revoked,proto3" json:"revoked,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorkContextOperationBindingAnswer) Reset() { + *x = WorkContextOperationBindingAnswer{} + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorkContextOperationBindingAnswer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkContextOperationBindingAnswer) ProtoMessage() {} + +func (x *WorkContextOperationBindingAnswer) ProtoReflect() protoreflect.Message { + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[72] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkContextOperationBindingAnswer.ProtoReflect.Descriptor instead. +func (*WorkContextOperationBindingAnswer) Descriptor() ([]byte, []int) { + return file_saas_accounts_v1_module_capabilities_proto_rawDescGZIP(), []int{72} +} + +func (x *WorkContextOperationBindingAnswer) GetState() WorkContextOperationBindingState { + if x != nil { + return x.State + } + return WorkContextOperationBindingState_WORK_CONTEXT_OPERATION_BINDING_STATE_UNSPECIFIED +} + +func (x *WorkContextOperationBindingAnswer) GetBindingId() string { + if x != nil { + return x.BindingId + } + return "" +} + +func (x *WorkContextOperationBindingAnswer) GetPrincipalId() string { + if x != nil { + return x.PrincipalId + } + return "" +} + +func (x *WorkContextOperationBindingAnswer) GetInstallationId() string { + if x != nil { + return x.InstallationId + } + return "" +} + +func (x *WorkContextOperationBindingAnswer) GetRevision() uint64 { + if x != nil { + return x.Revision + } + return 0 +} + +func (x *WorkContextOperationBindingAnswer) GetIncarnation() uint64 { + if x != nil { + return x.Incarnation + } + return 0 +} + +func (x *WorkContextOperationBindingAnswer) GetRevoked() bool { + if x != nil { + return x.Revoked + } + return false +} + +type WorkContextAuthorizationRevisionAnswer struct { + state protoimpl.MessageState `protogen:"open.v1"` + OwnerPrincipalId string `protobuf:"bytes,1,opt,name=owner_principal_id,json=ownerPrincipalId,proto3" json:"owner_principal_id,omitempty"` + Revision uint64 `protobuf:"varint,2,opt,name=revision,proto3" json:"revision,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorkContextAuthorizationRevisionAnswer) Reset() { + *x = WorkContextAuthorizationRevisionAnswer{} + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorkContextAuthorizationRevisionAnswer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkContextAuthorizationRevisionAnswer) ProtoMessage() {} + +func (x *WorkContextAuthorizationRevisionAnswer) ProtoReflect() protoreflect.Message { + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[73] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkContextAuthorizationRevisionAnswer.ProtoReflect.Descriptor instead. +func (*WorkContextAuthorizationRevisionAnswer) Descriptor() ([]byte, []int) { + return file_saas_accounts_v1_module_capabilities_proto_rawDescGZIP(), []int{73} +} + +func (x *WorkContextAuthorizationRevisionAnswer) GetOwnerPrincipalId() string { + if x != nil { + return x.OwnerPrincipalId + } + return "" +} + +func (x *WorkContextAuthorizationRevisionAnswer) GetRevision() uint64 { + if x != nil { + return x.Revision + } + return 0 +} + +type WorkContextApprovalGrantAnswer struct { + state protoimpl.MessageState `protogen:"open.v1"` + State WorkContextApprovalGrantState `protobuf:"varint,1,opt,name=state,proto3,enum=saas.accounts.v1.WorkContextApprovalGrantState" json:"state,omitempty"` + GrantId string `protobuf:"bytes,2,opt,name=grant_id,json=grantId,proto3" json:"grant_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorkContextApprovalGrantAnswer) Reset() { + *x = WorkContextApprovalGrantAnswer{} + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorkContextApprovalGrantAnswer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkContextApprovalGrantAnswer) ProtoMessage() {} + +func (x *WorkContextApprovalGrantAnswer) ProtoReflect() protoreflect.Message { + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[74] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkContextApprovalGrantAnswer.ProtoReflect.Descriptor instead. +func (*WorkContextApprovalGrantAnswer) Descriptor() ([]byte, []int) { + return file_saas_accounts_v1_module_capabilities_proto_rawDescGZIP(), []int{74} +} + +func (x *WorkContextApprovalGrantAnswer) GetState() WorkContextApprovalGrantState { + if x != nil { + return x.State + } + return WorkContextApprovalGrantState_WORK_CONTEXT_APPROVAL_GRANT_STATE_UNSPECIFIED +} + +func (x *WorkContextApprovalGrantAnswer) GetGrantId() string { + if x != nil { + return x.GrantId + } + return "" +} + +type ModuleResolveWorkContextAuthorityRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The capability being verified, exactly as it was presented to the caller. + // + // It is the subject of the question and the whole of its authorization: the + // host authenticates it, requires it to be addressed to one of the caller's + // own names and to the caller's own tenant, and answers only about the + // identifiers it names. It is not minted from, not derived from, and NOT + // CONSUMED — a single-use capability presented here is still its consumer's + // to spend. + WorkContext string `protobuf:"bytes,1,opt,name=work_context,json=workContext,proto3" json:"work_context,omitempty"` + // Types that are valid to be assigned to Question: + // + // *ModuleResolveWorkContextAuthorityRequest_Seal + // *ModuleResolveWorkContextAuthorityRequest_PrincipalEpoch + // *ModuleResolveWorkContextAuthorityRequest_ApprovedBuild + // *ModuleResolveWorkContextAuthorityRequest_OperationBinding + // *ModuleResolveWorkContextAuthorityRequest_AuthorizationRevision + // *ModuleResolveWorkContextAuthorityRequest_ApprovalGrant + Question isModuleResolveWorkContextAuthorityRequest_Question `protobuf_oneof:"question"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ModuleResolveWorkContextAuthorityRequest) Reset() { + *x = ModuleResolveWorkContextAuthorityRequest{} + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ModuleResolveWorkContextAuthorityRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModuleResolveWorkContextAuthorityRequest) ProtoMessage() {} + +func (x *ModuleResolveWorkContextAuthorityRequest) ProtoReflect() protoreflect.Message { + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[75] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ModuleResolveWorkContextAuthorityRequest.ProtoReflect.Descriptor instead. +func (*ModuleResolveWorkContextAuthorityRequest) Descriptor() ([]byte, []int) { + return file_saas_accounts_v1_module_capabilities_proto_rawDescGZIP(), []int{75} +} + +func (x *ModuleResolveWorkContextAuthorityRequest) GetWorkContext() string { + if x != nil { + return x.WorkContext + } + return "" +} + +func (x *ModuleResolveWorkContextAuthorityRequest) GetQuestion() isModuleResolveWorkContextAuthorityRequest_Question { + if x != nil { + return x.Question + } + return nil +} + +func (x *ModuleResolveWorkContextAuthorityRequest) GetSeal() *WorkContextSealQuestion { + if x != nil { + if x, ok := x.Question.(*ModuleResolveWorkContextAuthorityRequest_Seal); ok { + return x.Seal + } + } + return nil +} + +func (x *ModuleResolveWorkContextAuthorityRequest) GetPrincipalEpoch() *WorkContextPrincipalEpochQuestion { + if x != nil { + if x, ok := x.Question.(*ModuleResolveWorkContextAuthorityRequest_PrincipalEpoch); ok { + return x.PrincipalEpoch + } + } + return nil +} + +func (x *ModuleResolveWorkContextAuthorityRequest) GetApprovedBuild() *WorkContextApprovedBuildQuestion { + if x != nil { + if x, ok := x.Question.(*ModuleResolveWorkContextAuthorityRequest_ApprovedBuild); ok { + return x.ApprovedBuild + } + } + return nil +} + +func (x *ModuleResolveWorkContextAuthorityRequest) GetOperationBinding() *WorkContextOperationBindingQuestion { + if x != nil { + if x, ok := x.Question.(*ModuleResolveWorkContextAuthorityRequest_OperationBinding); ok { + return x.OperationBinding + } + } + return nil +} + +func (x *ModuleResolveWorkContextAuthorityRequest) GetAuthorizationRevision() *WorkContextAuthorizationRevisionQuestion { + if x != nil { + if x, ok := x.Question.(*ModuleResolveWorkContextAuthorityRequest_AuthorizationRevision); ok { + return x.AuthorizationRevision + } + } + return nil +} + +func (x *ModuleResolveWorkContextAuthorityRequest) GetApprovalGrant() *WorkContextApprovalGrantQuestion { + if x != nil { + if x, ok := x.Question.(*ModuleResolveWorkContextAuthorityRequest_ApprovalGrant); ok { + return x.ApprovalGrant + } + } + return nil +} + +type isModuleResolveWorkContextAuthorityRequest_Question interface { + isModuleResolveWorkContextAuthorityRequest_Question() +} + +type ModuleResolveWorkContextAuthorityRequest_Seal struct { + Seal *WorkContextSealQuestion `protobuf:"bytes,3,opt,name=seal,proto3,oneof"` +} + +type ModuleResolveWorkContextAuthorityRequest_PrincipalEpoch struct { + PrincipalEpoch *WorkContextPrincipalEpochQuestion `protobuf:"bytes,4,opt,name=principal_epoch,json=principalEpoch,proto3,oneof"` +} + +type ModuleResolveWorkContextAuthorityRequest_ApprovedBuild struct { + ApprovedBuild *WorkContextApprovedBuildQuestion `protobuf:"bytes,5,opt,name=approved_build,json=approvedBuild,proto3,oneof"` +} + +type ModuleResolveWorkContextAuthorityRequest_OperationBinding struct { + OperationBinding *WorkContextOperationBindingQuestion `protobuf:"bytes,6,opt,name=operation_binding,json=operationBinding,proto3,oneof"` +} + +type ModuleResolveWorkContextAuthorityRequest_AuthorizationRevision struct { + AuthorizationRevision *WorkContextAuthorizationRevisionQuestion `protobuf:"bytes,7,opt,name=authorization_revision,json=authorizationRevision,proto3,oneof"` +} + +type ModuleResolveWorkContextAuthorityRequest_ApprovalGrant struct { + ApprovalGrant *WorkContextApprovalGrantQuestion `protobuf:"bytes,8,opt,name=approval_grant,json=approvalGrant,proto3,oneof"` +} + +func (*ModuleResolveWorkContextAuthorityRequest_Seal) isModuleResolveWorkContextAuthorityRequest_Question() { +} + +func (*ModuleResolveWorkContextAuthorityRequest_PrincipalEpoch) isModuleResolveWorkContextAuthorityRequest_Question() { +} + +func (*ModuleResolveWorkContextAuthorityRequest_ApprovedBuild) isModuleResolveWorkContextAuthorityRequest_Question() { +} + +func (*ModuleResolveWorkContextAuthorityRequest_OperationBinding) isModuleResolveWorkContextAuthorityRequest_Question() { +} + +func (*ModuleResolveWorkContextAuthorityRequest_AuthorizationRevision) isModuleResolveWorkContextAuthorityRequest_Question() { +} + +func (*ModuleResolveWorkContextAuthorityRequest_ApprovalGrant) isModuleResolveWorkContextAuthorityRequest_Question() { +} + +type ModuleResolveWorkContextAuthorityResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The answer to the question that was asked, and only that one. A response + // whose arm does not match the question is a host answering something else, + // which a client refuses rather than reads. + // + // Types that are valid to be assigned to Answer: + // + // *ModuleResolveWorkContextAuthorityResponse_Seal + // *ModuleResolveWorkContextAuthorityResponse_PrincipalEpoch + // *ModuleResolveWorkContextAuthorityResponse_ApprovedBuild + // *ModuleResolveWorkContextAuthorityResponse_OperationBinding + // *ModuleResolveWorkContextAuthorityResponse_AuthorizationRevision + // *ModuleResolveWorkContextAuthorityResponse_ApprovalGrant + Answer isModuleResolveWorkContextAuthorityResponse_Answer `protobuf_oneof:"answer"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ModuleResolveWorkContextAuthorityResponse) Reset() { + *x = ModuleResolveWorkContextAuthorityResponse{} + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ModuleResolveWorkContextAuthorityResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModuleResolveWorkContextAuthorityResponse) ProtoMessage() {} + +func (x *ModuleResolveWorkContextAuthorityResponse) ProtoReflect() protoreflect.Message { + mi := &file_saas_accounts_v1_module_capabilities_proto_msgTypes[76] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ModuleResolveWorkContextAuthorityResponse.ProtoReflect.Descriptor instead. +func (*ModuleResolveWorkContextAuthorityResponse) Descriptor() ([]byte, []int) { + return file_saas_accounts_v1_module_capabilities_proto_rawDescGZIP(), []int{76} +} + +func (x *ModuleResolveWorkContextAuthorityResponse) GetAnswer() isModuleResolveWorkContextAuthorityResponse_Answer { + if x != nil { + return x.Answer + } + return nil +} + +func (x *ModuleResolveWorkContextAuthorityResponse) GetSeal() *WorkContextSealAnswer { + if x != nil { + if x, ok := x.Answer.(*ModuleResolveWorkContextAuthorityResponse_Seal); ok { + return x.Seal + } + } + return nil +} + +func (x *ModuleResolveWorkContextAuthorityResponse) GetPrincipalEpoch() *WorkContextPrincipalEpochAnswer { + if x != nil { + if x, ok := x.Answer.(*ModuleResolveWorkContextAuthorityResponse_PrincipalEpoch); ok { + return x.PrincipalEpoch + } + } + return nil +} + +func (x *ModuleResolveWorkContextAuthorityResponse) GetApprovedBuild() *WorkContextApprovedBuildAnswer { + if x != nil { + if x, ok := x.Answer.(*ModuleResolveWorkContextAuthorityResponse_ApprovedBuild); ok { + return x.ApprovedBuild + } + } + return nil +} + +func (x *ModuleResolveWorkContextAuthorityResponse) GetOperationBinding() *WorkContextOperationBindingAnswer { + if x != nil { + if x, ok := x.Answer.(*ModuleResolveWorkContextAuthorityResponse_OperationBinding); ok { + return x.OperationBinding + } + } + return nil +} + +func (x *ModuleResolveWorkContextAuthorityResponse) GetAuthorizationRevision() *WorkContextAuthorizationRevisionAnswer { + if x != nil { + if x, ok := x.Answer.(*ModuleResolveWorkContextAuthorityResponse_AuthorizationRevision); ok { + return x.AuthorizationRevision + } + } + return nil +} + +func (x *ModuleResolveWorkContextAuthorityResponse) GetApprovalGrant() *WorkContextApprovalGrantAnswer { + if x != nil { + if x, ok := x.Answer.(*ModuleResolveWorkContextAuthorityResponse_ApprovalGrant); ok { + return x.ApprovalGrant + } + } + return nil +} + +type isModuleResolveWorkContextAuthorityResponse_Answer interface { + isModuleResolveWorkContextAuthorityResponse_Answer() +} + +type ModuleResolveWorkContextAuthorityResponse_Seal struct { + Seal *WorkContextSealAnswer `protobuf:"bytes,1,opt,name=seal,proto3,oneof"` +} + +type ModuleResolveWorkContextAuthorityResponse_PrincipalEpoch struct { + PrincipalEpoch *WorkContextPrincipalEpochAnswer `protobuf:"bytes,2,opt,name=principal_epoch,json=principalEpoch,proto3,oneof"` +} + +type ModuleResolveWorkContextAuthorityResponse_ApprovedBuild struct { + ApprovedBuild *WorkContextApprovedBuildAnswer `protobuf:"bytes,3,opt,name=approved_build,json=approvedBuild,proto3,oneof"` +} + +type ModuleResolveWorkContextAuthorityResponse_OperationBinding struct { + OperationBinding *WorkContextOperationBindingAnswer `protobuf:"bytes,4,opt,name=operation_binding,json=operationBinding,proto3,oneof"` +} + +type ModuleResolveWorkContextAuthorityResponse_AuthorizationRevision struct { + AuthorizationRevision *WorkContextAuthorizationRevisionAnswer `protobuf:"bytes,5,opt,name=authorization_revision,json=authorizationRevision,proto3,oneof"` +} + +type ModuleResolveWorkContextAuthorityResponse_ApprovalGrant struct { + ApprovalGrant *WorkContextApprovalGrantAnswer `protobuf:"bytes,6,opt,name=approval_grant,json=approvalGrant,proto3,oneof"` +} + +func (*ModuleResolveWorkContextAuthorityResponse_Seal) isModuleResolveWorkContextAuthorityResponse_Answer() { +} + +func (*ModuleResolveWorkContextAuthorityResponse_PrincipalEpoch) isModuleResolveWorkContextAuthorityResponse_Answer() { +} + +func (*ModuleResolveWorkContextAuthorityResponse_ApprovedBuild) isModuleResolveWorkContextAuthorityResponse_Answer() { +} + +func (*ModuleResolveWorkContextAuthorityResponse_OperationBinding) isModuleResolveWorkContextAuthorityResponse_Answer() { +} + +func (*ModuleResolveWorkContextAuthorityResponse_AuthorizationRevision) isModuleResolveWorkContextAuthorityResponse_Answer() { +} + +func (*ModuleResolveWorkContextAuthorityResponse_ApprovalGrant) isModuleResolveWorkContextAuthorityResponse_Answer() { +} + +var File_saas_accounts_v1_module_capabilities_proto protoreflect.FileDescriptor + +const file_saas_accounts_v1_module_capabilities_proto_rawDesc = "" + + "\n" + + "*saas/accounts/v1/module_capabilities.proto\x12\x10saas.accounts.v1\x1a$saas/accounts/v1/work_contexts.proto\x1a\x1bbuf/validate/validate.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a*saas/accounts/v1/module_registration.proto\x1a\x1bsaas/events/v1/events.proto\x1a\x17saas/jobs/v1/jobs.proto\x1a\x1csaas/policy/v1/options.proto\"k\n" + + "\x17ModuleEnqueueJobRequest\x12 \n" + + "\x06tenant\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x06tenant\x12.\n" + + "\x03job\x18\x02 \x01(\v2\x14.saas.jobs.v1.NewJobB\x06\xbaH\x03\xc8\x01\x01R\x03job\"\x8a\x01\n" + + "\x18ModuleEnqueueJobResponse\x12\x1f\n" + + "\x06job_id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x05jobId\x12M\n" + + "\vdisposition\x18\x02 \x01(\x0e2#.saas.jobs.v1.JobEnqueueDispositionB\x06\xbaH\x03\xc8\x01\x01R\vdisposition\"\xf1\x01\n" + + "\x16ModuleClaimJobsRequest\x125\n" + + "\x05queue\x18\x01 \x01(\tB\x1f\xbaH\x1cr\x1a\x10\x01\x18\x80\x012\x13^[a-z][a-z0-9_.-]*$R\x05queue\x12'\n" + + "\tworker_id\x18\x02 \x01(\tB\n" + + "\xbaH\ar\x05\x10\x01\x18\xff\x01R\bworkerId\x12\x1f\n" + + "\x05limit\x18\x03 \x01(\rB\t\xbaH\x06*\x04\x18d(\x01R\x05limit\x12V\n" + + "\x0elease_duration\x18\x04 \x01(\v2\x19.google.protobuf.DurationB\x14\xbaH\x11\xc8\x01\x01\xaa\x01\v\"\x03\b\x90\x1c2\x04\x10\xc0\x84=R\rleaseDuration\"H\n" + + "\x17ModuleClaimJobsResponse\x12-\n" + + "\x04jobs\x18\x01 \x03(\v2\x19.saas.jobs.v1.JobEnvelopeR\x04jobs\"\xa9\x01\n" + + "\x19ModuleHeartbeatJobRequest\x12=\n" + + "\x05lease\x18\x01 \x01(\v2\x1f.saas.jobs.v1.JobLeaseReferenceB\x06\xbaH\x03\xc8\x01\x01R\x05lease\x12M\n" + + "\textension\x18\x02 \x01(\v2\x19.google.protobuf.DurationB\x14\xbaH\x11\xc8\x01\x01\xaa\x01\v\"\x03\b\x90\x1c2\x04\x10\xc0\x84=R\textension\"R\n" + + "\x1aModuleHeartbeatJobResponse\x124\n" + + "\x05lease\x18\x01 \x01(\v2\x16.saas.jobs.v1.JobLeaseB\x06\xbaH\x03\xc8\x01\x01R\x05lease\"\xc9\x01\n" + + "\x13ModuleAckJobRequest\x12=\n" + + "\x05lease\x18\x01 \x01(\v2\x1f.saas.jobs.v1.JobLeaseReferenceB\x06\xbaH\x03\xc8\x01\x01R\x05lease\x12F\n" + + "\x0eexecution_kind\x18\x02 \x01(\tB\x1f\xbaH\x1cr\x1a\x18@2\x16^$|^[a-z][a-z0-9_.-]*$R\rexecutionKind\x12+\n" + + "\fexecution_id\x18\x03 \x01(\tB\b\xbaH\x05r\x03\x18\xff\x01R\vexecutionId\"\xe6\x01\n" + + "\x14ModuleNackJobRequest\x12=\n" + + "\x05lease\x18\x01 \x01(\v2\x1f.saas.jobs.v1.JobLeaseReferenceB\x06\xbaH\x03\xc8\x01\x01R\x05lease\x12:\n" + + "\afailure\x18\x02 \x01(\v2\x18.saas.jobs.v1.JobFailureB\x06\xbaH\x03\xc8\x01\x01R\afailure\x12\x1c\n" + + "\tretryable\x18\x03 \x01(\bR\tretryable\x125\n" + + "\bretry_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\aretryAt\"\xbe\x02\n" + + "\x17ModuleNotifyUserRequest\x12 \n" + + "\x06tenant\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x06tenant\x12!\n" + + "\auser_id\x18\x02 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x06userId\x12 \n" + + "\x05title\x18\x03 \x01(\tB\n" + + "\xbaH\ar\x05\x10\x01\x18\xe6\aR\x05title\x12\x1c\n" + + "\x04body\x18\x04 \x01(\tB\b\xbaH\x05r\x03\x18\x80@R\x04body\x12\x1b\n" + + "\x04type\x18\x05 \x01(\tB\a\xbaH\x04r\x02\x18@R\x04type\x12'\n" + + "\n" + + "action_url\x18\x06 \x01(\tB\b\xbaH\x05r\x03\x18\x80\x10R\tactionUrl\x12%\n" + + "\bcategory\x18\a \x01(\tB\t\xbaH\x06r\x04\x10\x01\x18 R\bcategory\x121\n" + + "\x0fidempotency_key\x18\b \x01(\tB\b\xbaH\x05r\x03\x18\xff\x01R\x0eidempotencyKey\"a\n" + + "\x18ModuleNotifyUserResponse\x12'\n" + + "\x0fnotification_id\x18\x01 \x01(\tR\x0enotificationId\x12\x1c\n" + + "\tdelivered\x18\x02 \x01(\bR\tdelivered\"\xa0\x02\n" + + "\x1cModuleNotifyOrgAdminsRequest\x12 \n" + + "\x06tenant\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x06tenant\x12 \n" + + "\x05title\x18\x02 \x01(\tB\n" + + "\xbaH\ar\x05\x10\x01\x18\xe6\aR\x05title\x12\x1c\n" + + "\x04body\x18\x03 \x01(\tB\b\xbaH\x05r\x03\x18\x80@R\x04body\x12\x1b\n" + + "\x04type\x18\x04 \x01(\tB\a\xbaH\x04r\x02\x18@R\x04type\x12'\n" + + "\n" + + "action_url\x18\x05 \x01(\tB\b\xbaH\x05r\x03\x18\x80\x10R\tactionUrl\x12%\n" + + "\bcategory\x18\x06 \x01(\tB\t\xbaH\x06r\x04\x10\x01\x18 R\bcategory\x121\n" + + "\x0fidempotency_key\x18\a \x01(\tB\b\xbaH\x05r\x03\x18\xff\x01R\x0eidempotencyKey\"=\n" + + "\x1dModuleNotifyOrgAdminsResponse\x12\x1c\n" + + "\tdelivered\x18\x01 \x01(\bR\tdelivered\"\x83\x01\n" + + "\x14ModuleApprovalPolicy\x12\x1f\n" + + "\x06quorum\x18\x01 \x01(\rB\a\xbaH\x04*\x02\x18dR\x06quorum\x12+\n" + + "\fapprover_set\x18\x02 \x03(\tB\b\xbaH\x05\x92\x01\x02\x10dR\vapproverSet\x12\x1d\n" + + "\n" + + "allow_self\x18\x03 \x01(\bR\tallowSelf\"\xb2\x01\n" + + "\x0fModuleResumeRef\x125\n" + + "\x05queue\x18\x01 \x01(\tB\x1f\xbaH\x1cr\x1a\x10\x01\x18\x80\x012\x13^[a-z][a-z0-9_.-]*$R\x05queue\x125\n" + + "\x05topic\x18\x02 \x01(\tB\x1f\xbaH\x1cr\x1a\x10\x01\x18\xff\x012\x13^[a-z][a-z0-9_.-]*$R\x05topic\x121\n" + + "\apayload\x18\x03 \x01(\v2\x17.google.protobuf.StructR\apayload\"\xf0\x03\n" + + "\x1cModuleRequestApprovalRequest\x12 \n" + + "\x06tenant\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x06tenant\x12&\n" + + "\bresource\x18\x02 \x01(\tB\n" + + "\xbaH\ar\x05\x10\x01\x18\x80\x01R\bresource\x12\"\n" + + "\x06action\x18\x03 \x01(\tB\n" + + "\xbaH\ar\x05\x10\x01\x18\x80\x01R\x06action\x121\n" + + "\asubject\x18\x04 \x01(\v2\x17.google.protobuf.StructR\asubject\x12-\n" + + "\frequested_by\x18\x05 \x01(\tB\n" + + "\xbaH\ar\x05\x10\x01\x18\xff\x01R\vrequestedBy\x12>\n" + + "\x06policy\x18\x06 \x01(\v2&.saas.accounts.v1.ModuleApprovalPolicyR\x06policy\x12H\n" + + "\n" + + "resume_ref\x18\a \x01(\v2!.saas.accounts.v1.ModuleResumeRefB\x06\xbaH\x03\xc8\x01\x01R\tresumeRef\x129\n" + + "\n" + + "expires_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\texpiresAt\x12;\n" + + "\vescalate_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "escalateAt\"J\n" + + "\x1dModuleRequestApprovalResponse\x12)\n" + + "\vapproval_id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\n" + + "approvalId\"g\n" + + "\x18ModuleGetApprovalRequest\x12 \n" + + "\x06tenant\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x06tenant\x12)\n" + + "\vapproval_id\x18\x02 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\n" + + "approvalId\"\xe5\x03\n" + + "\x0eModuleApproval\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" + + "\x06tenant\x18\x02 \x01(\tR\x06tenant\x12\x1a\n" + + "\bresource\x18\x03 \x01(\tR\bresource\x12\x16\n" + + "\x06action\x18\x04 \x01(\tR\x06action\x121\n" + + "\asubject\x18\x05 \x01(\v2\x17.google.protobuf.StructR\asubject\x12!\n" + + "\frequested_by\x18\x06 \x01(\tR\vrequestedBy\x12\x16\n" + + "\x06quorum\x18\a \x01(\rR\x06quorum\x12\x14\n" + + "\x05state\x18\b \x01(\tR\x05state\x12@\n" + + "\n" + + "resume_ref\x18\t \x01(\v2!.saas.accounts.v1.ModuleResumeRefR\tresumeRef\x129\n" + + "\n" + + "expires_at\x18\n" + + " \x01(\v2\x1a.google.protobuf.TimestampR\texpiresAt\x12;\n" + + "\vescalate_at\x18\v \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "escalateAt\x129\n" + + "\n" + + "created_at\x18\f \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\"\x8c\x01\n" + + "\x1bModuleCancelApprovalRequest\x12 \n" + + "\x06tenant\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x06tenant\x12)\n" + + "\vapproval_id\x18\x02 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\n" + + "approvalId\x12 \n" + + "\x06reason\x18\x03 \x01(\tB\b\xbaH\x05r\x03\x18\x80\bR\x06reason\"\xb3\x02\n" + + "\x1bModuleEmitAuditEventRequest\x12\x16\n" + + "\x06tenant\x18\x01 \x01(\tR\x06tenant\x12)\n" + + "\n" + + "event_type\x18\x02 \x01(\tB\n" + + "\xbaH\ar\x05\x10\x01\x18\x80\x01R\teventType\x12 \n" + + "\x05actor\x18\x03 \x01(\tB\n" + + "\xbaH\ar\x05\x10\x01\x18\xff\x01R\x05actor\x12&\n" + + "\bsolution\x18\x04 \x01(\tB\n" + "\xbaH\ar\x05\x10\x01\x18\x80\x01R\bsolution\x12#\n" + "\bentry_id\x18\x05 \x01(\tB\b\xbaH\x05r\x03\x18\xff\x01R\aentryId\x12/\n" + "\x06fields\x18\x06 \x01(\v2\x17.google.protobuf.StructR\x06fields\x121\n" + @@ -4992,7 +6291,73 @@ const file_saas_accounts_v1_module_capabilities_proto_rawDesc = "" + "\ttenant_id\x18\x02 \x01(\tR\btenantId\x12%\n" + "\ttarget_id\x18\x04 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\btargetId\x12\x1d\n" + "\n" + - "binding_id\x18\x05 \x01(\tR\tbindingIdJ\x04\b\x03\x10\x04R\x13solution_identifier*\xb8\x02\n" + + "binding_id\x18\x05 \x01(\tR\tbindingIdJ\x04\b\x03\x10\x04R\x13solution_identifier\"}\n" + + "\x17WorkContextSealQuestion\x12-\n" + + "\fprincipal_id\x18\x01 \x01(\tB\n" + + "\xbaH\ar\x05\x10\x01\x18\x80\x04R\vprincipalId\x123\n" + + "\x0finstallation_id\x18\x02 \x01(\tB\n" + + "\xbaH\ar\x05\x10\x01\x18\x80\x04R\x0einstallationId\"R\n" + + "!WorkContextPrincipalEpochQuestion\x12-\n" + + "\fprincipal_id\x18\x01 \x01(\tB\n" + + "\xbaH\ar\x05\x10\x01\x18\x80\x04R\vprincipalId\"Q\n" + + " WorkContextApprovedBuildQuestion\x12-\n" + + "\fprincipal_id\x18\x01 \x01(\tB\n" + + "\xbaH\ar\x05\x10\x01\x18\x80\x04R\vprincipalId\"P\n" + + "#WorkContextOperationBindingQuestion\x12)\n" + + "\n" + + "binding_id\x18\x01 \x01(\tB\n" + + "\xbaH\ar\x05\x10\x01\x18\x80\x04R\tbindingId\"d\n" + + "(WorkContextAuthorizationRevisionQuestion\x128\n" + + "\x12owner_principal_id\x18\x01 \x01(\tB\n" + + "\xbaH\ar\x05\x10\x01\x18\x80\x04R\x10ownerPrincipalId\"I\n" + + " WorkContextApprovalGrantQuestion\x12%\n" + + "\bgrant_id\x18\x01 \x01(\tB\n" + + "\xbaH\ar\x05\x10\x01\x18\x80\x02R\agrantId\"\xb3\x01\n" + + "\x15WorkContextSealAnswer\x12<\n" + + "\x05state\x18\x01 \x01(\x0e2&.saas.accounts.v1.WorkContextSealStateR\x05state\x12'\n" + + "\x0finstallation_id\x18\x02 \x01(\tR\x0einstallationId\x123\n" + + "\x15installation_revision\x18\x03 \x01(\x04R\x14installationRevision\"\x9d\x01\n" + + "\x1fWorkContextPrincipalEpochAnswer\x12A\n" + + "\x05state\x18\x01 \x01(\x0e2+.saas.accounts.v1.WorkContextPrincipalStateR\x05state\x12!\n" + + "\fprincipal_id\x18\x02 \x01(\tR\vprincipalId\x12\x14\n" + + "\x05epoch\x18\x03 \x01(\x04R\x05epoch\"\xda\x01\n" + + "\x1eWorkContextApprovedBuildAnswer\x12E\n" + + "\x05state\x18\x01 \x01(\x0e2/.saas.accounts.v1.WorkContextApprovedBuildStateR\x05state\x12!\n" + + "\fprincipal_id\x18\x02 \x01(\tR\vprincipalId\x12!\n" + + "\fimage_digest\x18\x03 \x01(\tR\vimageDigest\x12+\n" + + "\x11build_incarnation\x18\x04 \x01(\x04R\x10buildIncarnation\"\xb0\x02\n" + + "!WorkContextOperationBindingAnswer\x12H\n" + + "\x05state\x18\x01 \x01(\x0e22.saas.accounts.v1.WorkContextOperationBindingStateR\x05state\x12\x1d\n" + + "\n" + + "binding_id\x18\x02 \x01(\tR\tbindingId\x12!\n" + + "\fprincipal_id\x18\x03 \x01(\tR\vprincipalId\x12'\n" + + "\x0finstallation_id\x18\x04 \x01(\tR\x0einstallationId\x12\x1a\n" + + "\brevision\x18\x05 \x01(\x04R\brevision\x12 \n" + + "\vincarnation\x18\x06 \x01(\x04R\vincarnation\x12\x18\n" + + "\arevoked\x18\a \x01(\bR\arevoked\"r\n" + + "&WorkContextAuthorizationRevisionAnswer\x12,\n" + + "\x12owner_principal_id\x18\x01 \x01(\tR\x10ownerPrincipalId\x12\x1a\n" + + "\brevision\x18\x02 \x01(\x04R\brevision\"\x82\x01\n" + + "\x1eWorkContextApprovalGrantAnswer\x12E\n" + + "\x05state\x18\x01 \x01(\x0e2/.saas.accounts.v1.WorkContextApprovalGrantStateR\x05state\x12\x19\n" + + "\bgrant_id\x18\x02 \x01(\tR\agrantId\"\xb3\x05\n" + + "(ModuleResolveWorkContextAuthorityRequest\x12.\n" + + "\fwork_context\x18\x01 \x01(\tB\v\xbaH\br\x06\x10\x01\x18\x80\x80\x02R\vworkContext\x12?\n" + + "\x04seal\x18\x03 \x01(\v2).saas.accounts.v1.WorkContextSealQuestionH\x00R\x04seal\x12^\n" + + "\x0fprincipal_epoch\x18\x04 \x01(\v23.saas.accounts.v1.WorkContextPrincipalEpochQuestionH\x00R\x0eprincipalEpoch\x12[\n" + + "\x0eapproved_build\x18\x05 \x01(\v22.saas.accounts.v1.WorkContextApprovedBuildQuestionH\x00R\rapprovedBuild\x12d\n" + + "\x11operation_binding\x18\x06 \x01(\v25.saas.accounts.v1.WorkContextOperationBindingQuestionH\x00R\x10operationBinding\x12s\n" + + "\x16authorization_revision\x18\a \x01(\v2:.saas.accounts.v1.WorkContextAuthorizationRevisionQuestionH\x00R\x15authorizationRevision\x12[\n" + + "\x0eapproval_grant\x18\b \x01(\v22.saas.accounts.v1.WorkContextApprovalGrantQuestionH\x00R\rapprovalGrantB\x11\n" + + "\bquestion\x12\x05\xbaH\x02\b\x01J\x04\b\x02\x10\x03R\baudience\"\xdf\x04\n" + + ")ModuleResolveWorkContextAuthorityResponse\x12=\n" + + "\x04seal\x18\x01 \x01(\v2'.saas.accounts.v1.WorkContextSealAnswerH\x00R\x04seal\x12\\\n" + + "\x0fprincipal_epoch\x18\x02 \x01(\v21.saas.accounts.v1.WorkContextPrincipalEpochAnswerH\x00R\x0eprincipalEpoch\x12Y\n" + + "\x0eapproved_build\x18\x03 \x01(\v20.saas.accounts.v1.WorkContextApprovedBuildAnswerH\x00R\rapprovedBuild\x12b\n" + + "\x11operation_binding\x18\x04 \x01(\v23.saas.accounts.v1.WorkContextOperationBindingAnswerH\x00R\x10operationBinding\x12q\n" + + "\x16authorization_revision\x18\x05 \x01(\v28.saas.accounts.v1.WorkContextAuthorizationRevisionAnswerH\x00R\x15authorizationRevision\x12Y\n" + + "\x0eapproval_grant\x18\x06 \x01(\v20.saas.accounts.v1.WorkContextApprovalGrantAnswerH\x00R\rapprovalGrantB\b\n" + + "\x06answer*\xb8\x02\n" + "\x14ModuleAuditFieldKind\x12'\n" + "#MODULE_AUDIT_FIELD_KIND_UNSPECIFIED\x10\x00\x12\"\n" + "\x1eMODULE_AUDIT_FIELD_KIND_STRING\x10\x01\x12 \n" + @@ -5021,7 +6386,26 @@ const file_saas_accounts_v1_module_capabilities_proto_rawDesc = "" + "\x1cMETADATA_DISCLOSURE_WITHHELD\x10\x02*\\\n" + "\x0fSourceSyncStage\x12!\n" + "\x1dSOURCE_SYNC_STAGE_UNSPECIFIED\x10\x00\x12&\n" + - "\"SOURCE_SYNC_STAGE_CHANGES_ENQUEUED\x10\x012\xad&\n" + + "\"SOURCE_SYNC_STAGE_CHANGES_ENQUEUED\x10\x01*\x85\x01\n" + + "\x14WorkContextSealState\x12'\n" + + "#WORK_CONTEXT_SEAL_STATE_UNSPECIFIED\x10\x00\x12 \n" + + "\x1cWORK_CONTEXT_SEAL_STATE_HELD\x10\x01\x12\"\n" + + "\x1eWORK_CONTEXT_SEAL_STATE_UNHELD\x10\x02*\x9b\x01\n" + + "\x19WorkContextPrincipalState\x12,\n" + + "(WORK_CONTEXT_PRINCIPAL_STATE_UNSPECIFIED\x10\x00\x12&\n" + + "\"WORK_CONTEXT_PRINCIPAL_STATE_KNOWN\x10\x01\x12(\n" + + "$WORK_CONTEXT_PRINCIPAL_STATE_UNKNOWN\x10\x02*\xbc\x01\n" + + "\x1dWorkContextApprovedBuildState\x121\n" + + "-WORK_CONTEXT_APPROVED_BUILD_STATE_UNSPECIFIED\x10\x00\x12.\n" + + "*WORK_CONTEXT_APPROVED_BUILD_STATE_APPROVED\x10\x01\x128\n" + + "4WORK_CONTEXT_APPROVED_BUILD_STATE_BEARS_NO_EXECUTION\x10\x02*\xbc\x01\n" + + " WorkContextOperationBindingState\x124\n" + + "0WORK_CONTEXT_OPERATION_BINDING_STATE_UNSPECIFIED\x10\x00\x121\n" + + "-WORK_CONTEXT_OPERATION_BINDING_STATE_RESOLVED\x10\x01\x12/\n" + + "+WORK_CONTEXT_OPERATION_BINDING_STATE_ABSENT\x10\x02*\x86\x01\n" + + "\x1dWorkContextApprovalGrantState\x121\n" + + "-WORK_CONTEXT_APPROVAL_GRANT_STATE_UNSPECIFIED\x10\x00\x122\n" + + ".WORK_CONTEXT_APPROVAL_GRANT_STATE_NOT_RECORDED\x10\x012\xe0'\n" + "\x19ModuleCapabilitiesService\x12\x9b\x01\n" + "\x16GetCurrentInstallation\x122.saas.accounts.v1.ModuleCurrentInstallationRequest\x1a3.saas.accounts.v1.ModuleCurrentInstallationResponse\"\x18\xc2\xf3\x18\x14\b\x03\x10\x010\x01:\x02\x10\x01@\x01H\aP\x04X\x03`\x01\x12\xc6\x01\n" + "\x19ApproveExecutableArtifact\x121.saas.accounts.v1.ModuleExecutableArtifactRequest\x1a2.saas.accounts.v1.ModuleExecutableArtifactResponse\"B\xc2\xf3\x18>\b\x03\x10\x010\x01:,\n" + @@ -5065,7 +6449,8 @@ const file_saas_accounts_v1_module_capabilities_proto_rawDesc = "" + "\tSubscribe\x12(.saas.accounts.v1.ModuleSubscribeRequest\x1a).saas.accounts.v1.ModuleSubscribeResponse\"\x18\xc2\xf3\x18\x14\b\x03\x10\x010\x01:\x02\x10\x01@\x01H\aP\x03X\x03`\x01\x12k\n" + "\vUnsubscribe\x12*.saas.accounts.v1.ModuleUnsubscribeRequest\x1a\x16.google.protobuf.Empty\"\x18\xc2\xf3\x18\x14\b\x03\x10\x010\x01:\x02\x10\x01@\x01H\aP\x03X\x03`\x01\x12\x92\x01\n" + "\x11ListSubscriptions\x120.saas.accounts.v1.ModuleListSubscriptionsRequest\x1a1.saas.accounts.v1.ModuleListSubscriptionsResponse\"\x18\xc2\xf3\x18\x14\b\x03\x10\x010\x01:\x02\x10\x01@\x01H\aP\x03X\x03`\x01\x12\x83\x01\n" + - "\fReplayEvents\x12+.saas.accounts.v1.ModuleReplayEventsRequest\x1a,.saas.accounts.v1.ModuleReplayEventsResponse\"\x18\xc2\xf3\x18\x14\b\x03\x10\x010\x01:\x02\x10\x01@\x01H\aP\x03X\x03`\x01B\xd5\x01\n" + + "\fReplayEvents\x12+.saas.accounts.v1.ModuleReplayEventsRequest\x1a,.saas.accounts.v1.ModuleReplayEventsResponse\"\x18\xc2\xf3\x18\x14\b\x03\x10\x010\x01:\x02\x10\x01@\x01H\aP\x03X\x03`\x01\x12\xb0\x01\n" + + "\x1bResolveWorkContextAuthority\x12:.saas.accounts.v1.ModuleResolveWorkContextAuthorityRequest\x1a;.saas.accounts.v1.ModuleResolveWorkContextAuthorityResponse\"\x18\xc2\xf3\x18\x14\b\x03\x10\x010\x01:\x02\x10\x01@\x01H\aP\x03X\x03`\x01B\xd5\x01\n" + "\x14com.saas.accounts.v1B\x17ModuleCapabilitiesProtoP\x01ZBgithub.com/codefly-dev/saas-sdk-go/gen/saas/accounts/v1;accountsv1\xa2\x02\x03SAX\xaa\x02\x10Saas.Accounts.V1\xca\x02\x10Saas\\Accounts\\V1\xe2\x02\x1cSaas\\Accounts\\V1\\GPBMetadata\xea\x02\x12Saas::Accounts::V1b\x06proto3" var ( @@ -5080,8 +6465,8 @@ func file_saas_accounts_v1_module_capabilities_proto_rawDescGZIP() []byte { return file_saas_accounts_v1_module_capabilities_proto_rawDescData } -var file_saas_accounts_v1_module_capabilities_proto_enumTypes = make([]protoimpl.EnumInfo, 6) -var file_saas_accounts_v1_module_capabilities_proto_msgTypes = make([]protoimpl.MessageInfo, 63) +var file_saas_accounts_v1_module_capabilities_proto_enumTypes = make([]protoimpl.EnumInfo, 11) +var file_saas_accounts_v1_module_capabilities_proto_msgTypes = make([]protoimpl.MessageInfo, 77) var file_saas_accounts_v1_module_capabilities_proto_goTypes = []any{ (ModuleAuditFieldKind)(0), // 0: saas.accounts.v1.ModuleAuditFieldKind (ModuleAuditEventVisibility)(0), // 1: saas.accounts.v1.ModuleAuditEventVisibility @@ -5089,210 +6474,248 @@ var file_saas_accounts_v1_module_capabilities_proto_goTypes = []any{ (EventDelivery)(0), // 3: saas.accounts.v1.EventDelivery (MetadataDisclosure)(0), // 4: saas.accounts.v1.MetadataDisclosure (SourceSyncStage)(0), // 5: saas.accounts.v1.SourceSyncStage - (*ModuleEnqueueJobRequest)(nil), // 6: saas.accounts.v1.ModuleEnqueueJobRequest - (*ModuleEnqueueJobResponse)(nil), // 7: saas.accounts.v1.ModuleEnqueueJobResponse - (*ModuleClaimJobsRequest)(nil), // 8: saas.accounts.v1.ModuleClaimJobsRequest - (*ModuleClaimJobsResponse)(nil), // 9: saas.accounts.v1.ModuleClaimJobsResponse - (*ModuleHeartbeatJobRequest)(nil), // 10: saas.accounts.v1.ModuleHeartbeatJobRequest - (*ModuleHeartbeatJobResponse)(nil), // 11: saas.accounts.v1.ModuleHeartbeatJobResponse - (*ModuleAckJobRequest)(nil), // 12: saas.accounts.v1.ModuleAckJobRequest - (*ModuleNackJobRequest)(nil), // 13: saas.accounts.v1.ModuleNackJobRequest - (*ModuleNotifyUserRequest)(nil), // 14: saas.accounts.v1.ModuleNotifyUserRequest - (*ModuleNotifyUserResponse)(nil), // 15: saas.accounts.v1.ModuleNotifyUserResponse - (*ModuleNotifyOrgAdminsRequest)(nil), // 16: saas.accounts.v1.ModuleNotifyOrgAdminsRequest - (*ModuleNotifyOrgAdminsResponse)(nil), // 17: saas.accounts.v1.ModuleNotifyOrgAdminsResponse - (*ModuleApprovalPolicy)(nil), // 18: saas.accounts.v1.ModuleApprovalPolicy - (*ModuleResumeRef)(nil), // 19: saas.accounts.v1.ModuleResumeRef - (*ModuleRequestApprovalRequest)(nil), // 20: saas.accounts.v1.ModuleRequestApprovalRequest - (*ModuleRequestApprovalResponse)(nil), // 21: saas.accounts.v1.ModuleRequestApprovalResponse - (*ModuleGetApprovalRequest)(nil), // 22: saas.accounts.v1.ModuleGetApprovalRequest - (*ModuleApproval)(nil), // 23: saas.accounts.v1.ModuleApproval - (*ModuleCancelApprovalRequest)(nil), // 24: saas.accounts.v1.ModuleCancelApprovalRequest - (*ModuleEmitAuditEventRequest)(nil), // 25: saas.accounts.v1.ModuleEmitAuditEventRequest - (*ModuleAuditFieldDeclaration)(nil), // 26: saas.accounts.v1.ModuleAuditFieldDeclaration - (*ModuleAuditEventTypeDeclaration)(nil), // 27: saas.accounts.v1.ModuleAuditEventTypeDeclaration - (*ModuleDeclareAuditEventTypesRequest)(nil), // 28: saas.accounts.v1.ModuleDeclareAuditEventTypesRequest - (*ModuleDeclareAuditEventTypesResponse)(nil), // 29: saas.accounts.v1.ModuleDeclareAuditEventTypesResponse - (*SubjectVisibilityGrant)(nil), // 30: saas.accounts.v1.SubjectVisibilityGrant - (*ModuleListSubjectVisibilityRequest)(nil), // 31: saas.accounts.v1.ModuleListSubjectVisibilityRequest - (*ModuleListSubjectVisibilityResponse)(nil), // 32: saas.accounts.v1.ModuleListSubjectVisibilityResponse - (*FetchDatasourceBlobRequest)(nil), // 33: saas.accounts.v1.FetchDatasourceBlobRequest - (*FetchDatasourceBlobChunk)(nil), // 34: saas.accounts.v1.FetchDatasourceBlobChunk - (*DatasourceFileRef)(nil), // 35: saas.accounts.v1.DatasourceFileRef - (*FetchDatasourceFilesRequest)(nil), // 36: saas.accounts.v1.FetchDatasourceFilesRequest - (*DatasourceProvenance)(nil), // 37: saas.accounts.v1.DatasourceProvenance - (*DatasourceItemReaders)(nil), // 38: saas.accounts.v1.DatasourceItemReaders - (*DatasourceFileHeader)(nil), // 39: saas.accounts.v1.DatasourceFileHeader - (*FetchDatasourceFilesFrame)(nil), // 40: saas.accounts.v1.FetchDatasourceFilesFrame - (*ModulePublishEventRequest)(nil), // 41: saas.accounts.v1.ModulePublishEventRequest - (*ModulePublishEventResponse)(nil), // 42: saas.accounts.v1.ModulePublishEventResponse - (*ModuleSubscribeRequest)(nil), // 43: saas.accounts.v1.ModuleSubscribeRequest - (*ModuleSubscription)(nil), // 44: saas.accounts.v1.ModuleSubscription - (*ModuleSubscribeResponse)(nil), // 45: saas.accounts.v1.ModuleSubscribeResponse - (*ModuleUnsubscribeRequest)(nil), // 46: saas.accounts.v1.ModuleUnsubscribeRequest - (*ModuleListSubscriptionsRequest)(nil), // 47: saas.accounts.v1.ModuleListSubscriptionsRequest - (*ModuleListSubscriptionsResponse)(nil), // 48: saas.accounts.v1.ModuleListSubscriptionsResponse - (*ModuleReplayEventsRequest)(nil), // 49: saas.accounts.v1.ModuleReplayEventsRequest - (*ModuleReplayEventsResponse)(nil), // 50: saas.accounts.v1.ModuleReplayEventsResponse - (*ReadableSourceCollection)(nil), // 51: saas.accounts.v1.ReadableSourceCollection - (*ReadableCollectionGrant)(nil), // 52: saas.accounts.v1.ReadableCollectionGrant - (*CollectionSyncProvenance)(nil), // 53: saas.accounts.v1.CollectionSyncProvenance - (*ListReadableSourceCollectionsRequest)(nil), // 54: saas.accounts.v1.ListReadableSourceCollectionsRequest - (*ListReadableSourceCollectionsResponse)(nil), // 55: saas.accounts.v1.ListReadableSourceCollectionsResponse - (*ModulePlaceRecordRequest)(nil), // 56: saas.accounts.v1.ModulePlaceRecordRequest - (*ModulePlaceRecordResponse)(nil), // 57: saas.accounts.v1.ModulePlaceRecordResponse - (*CheckWorkContextRecordAccessRequest)(nil), // 58: saas.accounts.v1.CheckWorkContextRecordAccessRequest - (*CheckWorkContextRecordAccessResponse)(nil), // 59: saas.accounts.v1.CheckWorkContextRecordAccessResponse - (*ModuleExchangeDelegatedReadAudienceRequest)(nil), // 60: saas.accounts.v1.ModuleExchangeDelegatedReadAudienceRequest - (*ModuleExchangeDelegatedOperationAudienceRequest)(nil), // 61: saas.accounts.v1.ModuleExchangeDelegatedOperationAudienceRequest - (*ExecutableArtifactContract)(nil), // 62: saas.accounts.v1.ExecutableArtifactContract - (*ExecutableArtifactIdentity)(nil), // 63: saas.accounts.v1.ExecutableArtifactIdentity - (*ModuleExecutableArtifactRequest)(nil), // 64: saas.accounts.v1.ModuleExecutableArtifactRequest - (*ModuleRevokeExecutableArtifactRequest)(nil), // 65: saas.accounts.v1.ModuleRevokeExecutableArtifactRequest - (*ModuleExecutableArtifactResponse)(nil), // 66: saas.accounts.v1.ModuleExecutableArtifactResponse - (*ModuleCurrentInstallationRequest)(nil), // 67: saas.accounts.v1.ModuleCurrentInstallationRequest - (*ModuleCurrentInstallationResponse)(nil), // 68: saas.accounts.v1.ModuleCurrentInstallationResponse - (*v1.NewJob)(nil), // 69: saas.jobs.v1.NewJob - (v1.JobEnqueueDisposition)(0), // 70: saas.jobs.v1.JobEnqueueDisposition - (*durationpb.Duration)(nil), // 71: google.protobuf.Duration - (*v1.JobEnvelope)(nil), // 72: saas.jobs.v1.JobEnvelope - (*v1.JobLeaseReference)(nil), // 73: saas.jobs.v1.JobLeaseReference - (*v1.JobLease)(nil), // 74: saas.jobs.v1.JobLease - (*v1.JobFailure)(nil), // 75: saas.jobs.v1.JobFailure - (*timestamppb.Timestamp)(nil), // 76: google.protobuf.Timestamp - (*structpb.Struct)(nil), // 77: google.protobuf.Struct - (*v11.EventEnvelope)(nil), // 78: saas.events.v1.EventEnvelope - (*ModuleMintWorkContextRequest)(nil), // 79: saas.accounts.v1.ModuleMintWorkContextRequest - (*ModuleMintOperationContextRequest)(nil), // 80: saas.accounts.v1.ModuleMintOperationContextRequest - (*ModuleMintSourceOperationContextRequest)(nil), // 81: saas.accounts.v1.ModuleMintSourceOperationContextRequest - (*IssuedWorkContext)(nil), // 82: saas.accounts.v1.IssuedWorkContext - (*emptypb.Empty)(nil), // 83: google.protobuf.Empty - (*ModuleMintWorkContextResponse)(nil), // 84: saas.accounts.v1.ModuleMintWorkContextResponse - (*ModuleMintOperationContextResponse)(nil), // 85: saas.accounts.v1.ModuleMintOperationContextResponse - (*ModuleMintSourceOperationContextResponse)(nil), // 86: saas.accounts.v1.ModuleMintSourceOperationContextResponse + (WorkContextSealState)(0), // 6: saas.accounts.v1.WorkContextSealState + (WorkContextPrincipalState)(0), // 7: saas.accounts.v1.WorkContextPrincipalState + (WorkContextApprovedBuildState)(0), // 8: saas.accounts.v1.WorkContextApprovedBuildState + (WorkContextOperationBindingState)(0), // 9: saas.accounts.v1.WorkContextOperationBindingState + (WorkContextApprovalGrantState)(0), // 10: saas.accounts.v1.WorkContextApprovalGrantState + (*ModuleEnqueueJobRequest)(nil), // 11: saas.accounts.v1.ModuleEnqueueJobRequest + (*ModuleEnqueueJobResponse)(nil), // 12: saas.accounts.v1.ModuleEnqueueJobResponse + (*ModuleClaimJobsRequest)(nil), // 13: saas.accounts.v1.ModuleClaimJobsRequest + (*ModuleClaimJobsResponse)(nil), // 14: saas.accounts.v1.ModuleClaimJobsResponse + (*ModuleHeartbeatJobRequest)(nil), // 15: saas.accounts.v1.ModuleHeartbeatJobRequest + (*ModuleHeartbeatJobResponse)(nil), // 16: saas.accounts.v1.ModuleHeartbeatJobResponse + (*ModuleAckJobRequest)(nil), // 17: saas.accounts.v1.ModuleAckJobRequest + (*ModuleNackJobRequest)(nil), // 18: saas.accounts.v1.ModuleNackJobRequest + (*ModuleNotifyUserRequest)(nil), // 19: saas.accounts.v1.ModuleNotifyUserRequest + (*ModuleNotifyUserResponse)(nil), // 20: saas.accounts.v1.ModuleNotifyUserResponse + (*ModuleNotifyOrgAdminsRequest)(nil), // 21: saas.accounts.v1.ModuleNotifyOrgAdminsRequest + (*ModuleNotifyOrgAdminsResponse)(nil), // 22: saas.accounts.v1.ModuleNotifyOrgAdminsResponse + (*ModuleApprovalPolicy)(nil), // 23: saas.accounts.v1.ModuleApprovalPolicy + (*ModuleResumeRef)(nil), // 24: saas.accounts.v1.ModuleResumeRef + (*ModuleRequestApprovalRequest)(nil), // 25: saas.accounts.v1.ModuleRequestApprovalRequest + (*ModuleRequestApprovalResponse)(nil), // 26: saas.accounts.v1.ModuleRequestApprovalResponse + (*ModuleGetApprovalRequest)(nil), // 27: saas.accounts.v1.ModuleGetApprovalRequest + (*ModuleApproval)(nil), // 28: saas.accounts.v1.ModuleApproval + (*ModuleCancelApprovalRequest)(nil), // 29: saas.accounts.v1.ModuleCancelApprovalRequest + (*ModuleEmitAuditEventRequest)(nil), // 30: saas.accounts.v1.ModuleEmitAuditEventRequest + (*ModuleAuditFieldDeclaration)(nil), // 31: saas.accounts.v1.ModuleAuditFieldDeclaration + (*ModuleAuditEventTypeDeclaration)(nil), // 32: saas.accounts.v1.ModuleAuditEventTypeDeclaration + (*ModuleDeclareAuditEventTypesRequest)(nil), // 33: saas.accounts.v1.ModuleDeclareAuditEventTypesRequest + (*ModuleDeclareAuditEventTypesResponse)(nil), // 34: saas.accounts.v1.ModuleDeclareAuditEventTypesResponse + (*SubjectVisibilityGrant)(nil), // 35: saas.accounts.v1.SubjectVisibilityGrant + (*ModuleListSubjectVisibilityRequest)(nil), // 36: saas.accounts.v1.ModuleListSubjectVisibilityRequest + (*ModuleListSubjectVisibilityResponse)(nil), // 37: saas.accounts.v1.ModuleListSubjectVisibilityResponse + (*FetchDatasourceBlobRequest)(nil), // 38: saas.accounts.v1.FetchDatasourceBlobRequest + (*FetchDatasourceBlobChunk)(nil), // 39: saas.accounts.v1.FetchDatasourceBlobChunk + (*DatasourceFileRef)(nil), // 40: saas.accounts.v1.DatasourceFileRef + (*FetchDatasourceFilesRequest)(nil), // 41: saas.accounts.v1.FetchDatasourceFilesRequest + (*DatasourceProvenance)(nil), // 42: saas.accounts.v1.DatasourceProvenance + (*DatasourceItemReaders)(nil), // 43: saas.accounts.v1.DatasourceItemReaders + (*DatasourceFileHeader)(nil), // 44: saas.accounts.v1.DatasourceFileHeader + (*FetchDatasourceFilesFrame)(nil), // 45: saas.accounts.v1.FetchDatasourceFilesFrame + (*ModulePublishEventRequest)(nil), // 46: saas.accounts.v1.ModulePublishEventRequest + (*ModulePublishEventResponse)(nil), // 47: saas.accounts.v1.ModulePublishEventResponse + (*ModuleSubscribeRequest)(nil), // 48: saas.accounts.v1.ModuleSubscribeRequest + (*ModuleSubscription)(nil), // 49: saas.accounts.v1.ModuleSubscription + (*ModuleSubscribeResponse)(nil), // 50: saas.accounts.v1.ModuleSubscribeResponse + (*ModuleUnsubscribeRequest)(nil), // 51: saas.accounts.v1.ModuleUnsubscribeRequest + (*ModuleListSubscriptionsRequest)(nil), // 52: saas.accounts.v1.ModuleListSubscriptionsRequest + (*ModuleListSubscriptionsResponse)(nil), // 53: saas.accounts.v1.ModuleListSubscriptionsResponse + (*ModuleReplayEventsRequest)(nil), // 54: saas.accounts.v1.ModuleReplayEventsRequest + (*ModuleReplayEventsResponse)(nil), // 55: saas.accounts.v1.ModuleReplayEventsResponse + (*ReadableSourceCollection)(nil), // 56: saas.accounts.v1.ReadableSourceCollection + (*ReadableCollectionGrant)(nil), // 57: saas.accounts.v1.ReadableCollectionGrant + (*CollectionSyncProvenance)(nil), // 58: saas.accounts.v1.CollectionSyncProvenance + (*ListReadableSourceCollectionsRequest)(nil), // 59: saas.accounts.v1.ListReadableSourceCollectionsRequest + (*ListReadableSourceCollectionsResponse)(nil), // 60: saas.accounts.v1.ListReadableSourceCollectionsResponse + (*ModulePlaceRecordRequest)(nil), // 61: saas.accounts.v1.ModulePlaceRecordRequest + (*ModulePlaceRecordResponse)(nil), // 62: saas.accounts.v1.ModulePlaceRecordResponse + (*CheckWorkContextRecordAccessRequest)(nil), // 63: saas.accounts.v1.CheckWorkContextRecordAccessRequest + (*CheckWorkContextRecordAccessResponse)(nil), // 64: saas.accounts.v1.CheckWorkContextRecordAccessResponse + (*ModuleExchangeDelegatedReadAudienceRequest)(nil), // 65: saas.accounts.v1.ModuleExchangeDelegatedReadAudienceRequest + (*ModuleExchangeDelegatedOperationAudienceRequest)(nil), // 66: saas.accounts.v1.ModuleExchangeDelegatedOperationAudienceRequest + (*ExecutableArtifactContract)(nil), // 67: saas.accounts.v1.ExecutableArtifactContract + (*ExecutableArtifactIdentity)(nil), // 68: saas.accounts.v1.ExecutableArtifactIdentity + (*ModuleExecutableArtifactRequest)(nil), // 69: saas.accounts.v1.ModuleExecutableArtifactRequest + (*ModuleRevokeExecutableArtifactRequest)(nil), // 70: saas.accounts.v1.ModuleRevokeExecutableArtifactRequest + (*ModuleExecutableArtifactResponse)(nil), // 71: saas.accounts.v1.ModuleExecutableArtifactResponse + (*ModuleCurrentInstallationRequest)(nil), // 72: saas.accounts.v1.ModuleCurrentInstallationRequest + (*ModuleCurrentInstallationResponse)(nil), // 73: saas.accounts.v1.ModuleCurrentInstallationResponse + (*WorkContextSealQuestion)(nil), // 74: saas.accounts.v1.WorkContextSealQuestion + (*WorkContextPrincipalEpochQuestion)(nil), // 75: saas.accounts.v1.WorkContextPrincipalEpochQuestion + (*WorkContextApprovedBuildQuestion)(nil), // 76: saas.accounts.v1.WorkContextApprovedBuildQuestion + (*WorkContextOperationBindingQuestion)(nil), // 77: saas.accounts.v1.WorkContextOperationBindingQuestion + (*WorkContextAuthorizationRevisionQuestion)(nil), // 78: saas.accounts.v1.WorkContextAuthorizationRevisionQuestion + (*WorkContextApprovalGrantQuestion)(nil), // 79: saas.accounts.v1.WorkContextApprovalGrantQuestion + (*WorkContextSealAnswer)(nil), // 80: saas.accounts.v1.WorkContextSealAnswer + (*WorkContextPrincipalEpochAnswer)(nil), // 81: saas.accounts.v1.WorkContextPrincipalEpochAnswer + (*WorkContextApprovedBuildAnswer)(nil), // 82: saas.accounts.v1.WorkContextApprovedBuildAnswer + (*WorkContextOperationBindingAnswer)(nil), // 83: saas.accounts.v1.WorkContextOperationBindingAnswer + (*WorkContextAuthorizationRevisionAnswer)(nil), // 84: saas.accounts.v1.WorkContextAuthorizationRevisionAnswer + (*WorkContextApprovalGrantAnswer)(nil), // 85: saas.accounts.v1.WorkContextApprovalGrantAnswer + (*ModuleResolveWorkContextAuthorityRequest)(nil), // 86: saas.accounts.v1.ModuleResolveWorkContextAuthorityRequest + (*ModuleResolveWorkContextAuthorityResponse)(nil), // 87: saas.accounts.v1.ModuleResolveWorkContextAuthorityResponse + (*v1.NewJob)(nil), // 88: saas.jobs.v1.NewJob + (v1.JobEnqueueDisposition)(0), // 89: saas.jobs.v1.JobEnqueueDisposition + (*durationpb.Duration)(nil), // 90: google.protobuf.Duration + (*v1.JobEnvelope)(nil), // 91: saas.jobs.v1.JobEnvelope + (*v1.JobLeaseReference)(nil), // 92: saas.jobs.v1.JobLeaseReference + (*v1.JobLease)(nil), // 93: saas.jobs.v1.JobLease + (*v1.JobFailure)(nil), // 94: saas.jobs.v1.JobFailure + (*timestamppb.Timestamp)(nil), // 95: google.protobuf.Timestamp + (*structpb.Struct)(nil), // 96: google.protobuf.Struct + (*v11.EventEnvelope)(nil), // 97: saas.events.v1.EventEnvelope + (*ModuleMintWorkContextRequest)(nil), // 98: saas.accounts.v1.ModuleMintWorkContextRequest + (*ModuleMintOperationContextRequest)(nil), // 99: saas.accounts.v1.ModuleMintOperationContextRequest + (*ModuleMintSourceOperationContextRequest)(nil), // 100: saas.accounts.v1.ModuleMintSourceOperationContextRequest + (*IssuedWorkContext)(nil), // 101: saas.accounts.v1.IssuedWorkContext + (*emptypb.Empty)(nil), // 102: google.protobuf.Empty + (*ModuleMintWorkContextResponse)(nil), // 103: saas.accounts.v1.ModuleMintWorkContextResponse + (*ModuleMintOperationContextResponse)(nil), // 104: saas.accounts.v1.ModuleMintOperationContextResponse + (*ModuleMintSourceOperationContextResponse)(nil), // 105: saas.accounts.v1.ModuleMintSourceOperationContextResponse } var file_saas_accounts_v1_module_capabilities_proto_depIdxs = []int32{ - 69, // 0: saas.accounts.v1.ModuleEnqueueJobRequest.job:type_name -> saas.jobs.v1.NewJob - 70, // 1: saas.accounts.v1.ModuleEnqueueJobResponse.disposition:type_name -> saas.jobs.v1.JobEnqueueDisposition - 71, // 2: saas.accounts.v1.ModuleClaimJobsRequest.lease_duration:type_name -> google.protobuf.Duration - 72, // 3: saas.accounts.v1.ModuleClaimJobsResponse.jobs:type_name -> saas.jobs.v1.JobEnvelope - 73, // 4: saas.accounts.v1.ModuleHeartbeatJobRequest.lease:type_name -> saas.jobs.v1.JobLeaseReference - 71, // 5: saas.accounts.v1.ModuleHeartbeatJobRequest.extension:type_name -> google.protobuf.Duration - 74, // 6: saas.accounts.v1.ModuleHeartbeatJobResponse.lease:type_name -> saas.jobs.v1.JobLease - 73, // 7: saas.accounts.v1.ModuleAckJobRequest.lease:type_name -> saas.jobs.v1.JobLeaseReference - 73, // 8: saas.accounts.v1.ModuleNackJobRequest.lease:type_name -> saas.jobs.v1.JobLeaseReference - 75, // 9: saas.accounts.v1.ModuleNackJobRequest.failure:type_name -> saas.jobs.v1.JobFailure - 76, // 10: saas.accounts.v1.ModuleNackJobRequest.retry_at:type_name -> google.protobuf.Timestamp - 77, // 11: saas.accounts.v1.ModuleResumeRef.payload:type_name -> google.protobuf.Struct - 77, // 12: saas.accounts.v1.ModuleRequestApprovalRequest.subject:type_name -> google.protobuf.Struct - 18, // 13: saas.accounts.v1.ModuleRequestApprovalRequest.policy:type_name -> saas.accounts.v1.ModuleApprovalPolicy - 19, // 14: saas.accounts.v1.ModuleRequestApprovalRequest.resume_ref:type_name -> saas.accounts.v1.ModuleResumeRef - 76, // 15: saas.accounts.v1.ModuleRequestApprovalRequest.expires_at:type_name -> google.protobuf.Timestamp - 76, // 16: saas.accounts.v1.ModuleRequestApprovalRequest.escalate_at:type_name -> google.protobuf.Timestamp - 77, // 17: saas.accounts.v1.ModuleApproval.subject:type_name -> google.protobuf.Struct - 19, // 18: saas.accounts.v1.ModuleApproval.resume_ref:type_name -> saas.accounts.v1.ModuleResumeRef - 76, // 19: saas.accounts.v1.ModuleApproval.expires_at:type_name -> google.protobuf.Timestamp - 76, // 20: saas.accounts.v1.ModuleApproval.escalate_at:type_name -> google.protobuf.Timestamp - 76, // 21: saas.accounts.v1.ModuleApproval.created_at:type_name -> google.protobuf.Timestamp - 77, // 22: saas.accounts.v1.ModuleEmitAuditEventRequest.fields:type_name -> google.protobuf.Struct - 0, // 23: saas.accounts.v1.ModuleAuditFieldDeclaration.kind:type_name -> saas.accounts.v1.ModuleAuditFieldKind - 26, // 24: saas.accounts.v1.ModuleAuditEventTypeDeclaration.fields:type_name -> saas.accounts.v1.ModuleAuditFieldDeclaration - 1, // 25: saas.accounts.v1.ModuleAuditEventTypeDeclaration.visibility:type_name -> saas.accounts.v1.ModuleAuditEventVisibility - 27, // 26: saas.accounts.v1.ModuleDeclareAuditEventTypesRequest.types:type_name -> saas.accounts.v1.ModuleAuditEventTypeDeclaration - 76, // 27: saas.accounts.v1.SubjectVisibilityGrant.expires_at:type_name -> google.protobuf.Timestamp - 30, // 28: saas.accounts.v1.ModuleListSubjectVisibilityResponse.grants:type_name -> saas.accounts.v1.SubjectVisibilityGrant - 35, // 29: saas.accounts.v1.FetchDatasourceFilesRequest.files:type_name -> saas.accounts.v1.DatasourceFileRef - 2, // 30: saas.accounts.v1.DatasourceItemReaders.basis:type_name -> saas.accounts.v1.DatasourceItemReadersBasis - 37, // 31: saas.accounts.v1.DatasourceFileHeader.provenance:type_name -> saas.accounts.v1.DatasourceProvenance - 38, // 32: saas.accounts.v1.DatasourceFileHeader.readers:type_name -> saas.accounts.v1.DatasourceItemReaders - 39, // 33: saas.accounts.v1.FetchDatasourceFilesFrame.header:type_name -> saas.accounts.v1.DatasourceFileHeader - 78, // 34: saas.accounts.v1.ModulePublishEventRequest.envelope:type_name -> saas.events.v1.EventEnvelope - 3, // 35: saas.accounts.v1.ModuleSubscribeRequest.delivery:type_name -> saas.accounts.v1.EventDelivery - 3, // 36: saas.accounts.v1.ModuleSubscription.delivery:type_name -> saas.accounts.v1.EventDelivery - 76, // 37: saas.accounts.v1.ModuleSubscription.created_at:type_name -> google.protobuf.Timestamp - 44, // 38: saas.accounts.v1.ModuleSubscribeResponse.subscription:type_name -> saas.accounts.v1.ModuleSubscription - 44, // 39: saas.accounts.v1.ModuleListSubscriptionsResponse.subscriptions:type_name -> saas.accounts.v1.ModuleSubscription - 76, // 40: saas.accounts.v1.ModuleReplayEventsRequest.since:type_name -> google.protobuf.Timestamp - 4, // 41: saas.accounts.v1.ReadableSourceCollection.grant_disclosure:type_name -> saas.accounts.v1.MetadataDisclosure - 52, // 42: saas.accounts.v1.ReadableSourceCollection.read_grants:type_name -> saas.accounts.v1.ReadableCollectionGrant - 53, // 43: saas.accounts.v1.ReadableSourceCollection.sync:type_name -> saas.accounts.v1.CollectionSyncProvenance - 76, // 44: saas.accounts.v1.ReadableCollectionGrant.expires_at:type_name -> google.protobuf.Timestamp - 5, // 45: saas.accounts.v1.CollectionSyncProvenance.stage:type_name -> saas.accounts.v1.SourceSyncStage - 76, // 46: saas.accounts.v1.CollectionSyncProvenance.at:type_name -> google.protobuf.Timestamp - 4, // 47: saas.accounts.v1.CollectionSyncProvenance.requester_disclosure:type_name -> saas.accounts.v1.MetadataDisclosure - 76, // 48: saas.accounts.v1.CollectionSyncProvenance.requested_at:type_name -> google.protobuf.Timestamp - 51, // 49: saas.accounts.v1.ListReadableSourceCollectionsResponse.collections:type_name -> saas.accounts.v1.ReadableSourceCollection - 62, // 50: saas.accounts.v1.ExecutableArtifactIdentity.contracts:type_name -> saas.accounts.v1.ExecutableArtifactContract - 63, // 51: saas.accounts.v1.ModuleExecutableArtifactRequest.identity:type_name -> saas.accounts.v1.ExecutableArtifactIdentity - 67, // 52: saas.accounts.v1.ModuleCapabilitiesService.GetCurrentInstallation:input_type -> saas.accounts.v1.ModuleCurrentInstallationRequest - 64, // 53: saas.accounts.v1.ModuleCapabilitiesService.ApproveExecutableArtifact:input_type -> saas.accounts.v1.ModuleExecutableArtifactRequest - 64, // 54: saas.accounts.v1.ModuleCapabilitiesService.AuthorizeExecutableArtifact:input_type -> saas.accounts.v1.ModuleExecutableArtifactRequest - 65, // 55: saas.accounts.v1.ModuleCapabilitiesService.RevokeExecutableArtifact:input_type -> saas.accounts.v1.ModuleRevokeExecutableArtifactRequest - 60, // 56: saas.accounts.v1.ModuleCapabilitiesService.ExchangeDelegatedReadAudience:input_type -> saas.accounts.v1.ModuleExchangeDelegatedReadAudienceRequest - 61, // 57: saas.accounts.v1.ModuleCapabilitiesService.ExchangeDelegatedOperationAudience:input_type -> saas.accounts.v1.ModuleExchangeDelegatedOperationAudienceRequest - 58, // 58: saas.accounts.v1.ModuleCapabilitiesService.CheckWorkContextRecordAccess:input_type -> saas.accounts.v1.CheckWorkContextRecordAccessRequest - 54, // 59: saas.accounts.v1.ModuleCapabilitiesService.ListReadableSourceCollections:input_type -> saas.accounts.v1.ListReadableSourceCollectionsRequest - 56, // 60: saas.accounts.v1.ModuleCapabilitiesService.PlaceRecord:input_type -> saas.accounts.v1.ModulePlaceRecordRequest - 6, // 61: saas.accounts.v1.ModuleCapabilitiesService.EnqueueJob:input_type -> saas.accounts.v1.ModuleEnqueueJobRequest - 8, // 62: saas.accounts.v1.ModuleCapabilitiesService.ClaimJobs:input_type -> saas.accounts.v1.ModuleClaimJobsRequest - 10, // 63: saas.accounts.v1.ModuleCapabilitiesService.HeartbeatJob:input_type -> saas.accounts.v1.ModuleHeartbeatJobRequest - 12, // 64: saas.accounts.v1.ModuleCapabilitiesService.AckJob:input_type -> saas.accounts.v1.ModuleAckJobRequest - 13, // 65: saas.accounts.v1.ModuleCapabilitiesService.NackJob:input_type -> saas.accounts.v1.ModuleNackJobRequest - 14, // 66: saas.accounts.v1.ModuleCapabilitiesService.NotifyUser:input_type -> saas.accounts.v1.ModuleNotifyUserRequest - 16, // 67: saas.accounts.v1.ModuleCapabilitiesService.NotifyOrgAdmins:input_type -> saas.accounts.v1.ModuleNotifyOrgAdminsRequest - 20, // 68: saas.accounts.v1.ModuleCapabilitiesService.RequestApproval:input_type -> saas.accounts.v1.ModuleRequestApprovalRequest - 22, // 69: saas.accounts.v1.ModuleCapabilitiesService.GetApproval:input_type -> saas.accounts.v1.ModuleGetApprovalRequest - 24, // 70: saas.accounts.v1.ModuleCapabilitiesService.CancelApproval:input_type -> saas.accounts.v1.ModuleCancelApprovalRequest - 25, // 71: saas.accounts.v1.ModuleCapabilitiesService.EmitAuditEvent:input_type -> saas.accounts.v1.ModuleEmitAuditEventRequest - 28, // 72: saas.accounts.v1.ModuleCapabilitiesService.DeclareAuditEventTypes:input_type -> saas.accounts.v1.ModuleDeclareAuditEventTypesRequest - 31, // 73: saas.accounts.v1.ModuleCapabilitiesService.ListSubjectVisibility:input_type -> saas.accounts.v1.ModuleListSubjectVisibilityRequest - 33, // 74: saas.accounts.v1.ModuleCapabilitiesService.FetchDatasourceBlob:input_type -> saas.accounts.v1.FetchDatasourceBlobRequest - 36, // 75: saas.accounts.v1.ModuleCapabilitiesService.FetchDatasourceFiles:input_type -> saas.accounts.v1.FetchDatasourceFilesRequest - 79, // 76: saas.accounts.v1.ModuleCapabilitiesService.MintModuleWorkContext:input_type -> saas.accounts.v1.ModuleMintWorkContextRequest - 80, // 77: saas.accounts.v1.ModuleCapabilitiesService.MintModuleOperationContext:input_type -> saas.accounts.v1.ModuleMintOperationContextRequest - 81, // 78: saas.accounts.v1.ModuleCapabilitiesService.MintSourceOperationContext:input_type -> saas.accounts.v1.ModuleMintSourceOperationContextRequest - 41, // 79: saas.accounts.v1.ModuleCapabilitiesService.PublishEvent:input_type -> saas.accounts.v1.ModulePublishEventRequest - 43, // 80: saas.accounts.v1.ModuleCapabilitiesService.Subscribe:input_type -> saas.accounts.v1.ModuleSubscribeRequest - 46, // 81: saas.accounts.v1.ModuleCapabilitiesService.Unsubscribe:input_type -> saas.accounts.v1.ModuleUnsubscribeRequest - 47, // 82: saas.accounts.v1.ModuleCapabilitiesService.ListSubscriptions:input_type -> saas.accounts.v1.ModuleListSubscriptionsRequest - 49, // 83: saas.accounts.v1.ModuleCapabilitiesService.ReplayEvents:input_type -> saas.accounts.v1.ModuleReplayEventsRequest - 68, // 84: saas.accounts.v1.ModuleCapabilitiesService.GetCurrentInstallation:output_type -> saas.accounts.v1.ModuleCurrentInstallationResponse - 66, // 85: saas.accounts.v1.ModuleCapabilitiesService.ApproveExecutableArtifact:output_type -> saas.accounts.v1.ModuleExecutableArtifactResponse - 66, // 86: saas.accounts.v1.ModuleCapabilitiesService.AuthorizeExecutableArtifact:output_type -> saas.accounts.v1.ModuleExecutableArtifactResponse - 66, // 87: saas.accounts.v1.ModuleCapabilitiesService.RevokeExecutableArtifact:output_type -> saas.accounts.v1.ModuleExecutableArtifactResponse - 82, // 88: saas.accounts.v1.ModuleCapabilitiesService.ExchangeDelegatedReadAudience:output_type -> saas.accounts.v1.IssuedWorkContext - 82, // 89: saas.accounts.v1.ModuleCapabilitiesService.ExchangeDelegatedOperationAudience:output_type -> saas.accounts.v1.IssuedWorkContext - 59, // 90: saas.accounts.v1.ModuleCapabilitiesService.CheckWorkContextRecordAccess:output_type -> saas.accounts.v1.CheckWorkContextRecordAccessResponse - 55, // 91: saas.accounts.v1.ModuleCapabilitiesService.ListReadableSourceCollections:output_type -> saas.accounts.v1.ListReadableSourceCollectionsResponse - 57, // 92: saas.accounts.v1.ModuleCapabilitiesService.PlaceRecord:output_type -> saas.accounts.v1.ModulePlaceRecordResponse - 7, // 93: saas.accounts.v1.ModuleCapabilitiesService.EnqueueJob:output_type -> saas.accounts.v1.ModuleEnqueueJobResponse - 9, // 94: saas.accounts.v1.ModuleCapabilitiesService.ClaimJobs:output_type -> saas.accounts.v1.ModuleClaimJobsResponse - 11, // 95: saas.accounts.v1.ModuleCapabilitiesService.HeartbeatJob:output_type -> saas.accounts.v1.ModuleHeartbeatJobResponse - 83, // 96: saas.accounts.v1.ModuleCapabilitiesService.AckJob:output_type -> google.protobuf.Empty - 83, // 97: saas.accounts.v1.ModuleCapabilitiesService.NackJob:output_type -> google.protobuf.Empty - 15, // 98: saas.accounts.v1.ModuleCapabilitiesService.NotifyUser:output_type -> saas.accounts.v1.ModuleNotifyUserResponse - 17, // 99: saas.accounts.v1.ModuleCapabilitiesService.NotifyOrgAdmins:output_type -> saas.accounts.v1.ModuleNotifyOrgAdminsResponse - 21, // 100: saas.accounts.v1.ModuleCapabilitiesService.RequestApproval:output_type -> saas.accounts.v1.ModuleRequestApprovalResponse - 23, // 101: saas.accounts.v1.ModuleCapabilitiesService.GetApproval:output_type -> saas.accounts.v1.ModuleApproval - 83, // 102: saas.accounts.v1.ModuleCapabilitiesService.CancelApproval:output_type -> google.protobuf.Empty - 83, // 103: saas.accounts.v1.ModuleCapabilitiesService.EmitAuditEvent:output_type -> google.protobuf.Empty - 29, // 104: saas.accounts.v1.ModuleCapabilitiesService.DeclareAuditEventTypes:output_type -> saas.accounts.v1.ModuleDeclareAuditEventTypesResponse - 32, // 105: saas.accounts.v1.ModuleCapabilitiesService.ListSubjectVisibility:output_type -> saas.accounts.v1.ModuleListSubjectVisibilityResponse - 34, // 106: saas.accounts.v1.ModuleCapabilitiesService.FetchDatasourceBlob:output_type -> saas.accounts.v1.FetchDatasourceBlobChunk - 40, // 107: saas.accounts.v1.ModuleCapabilitiesService.FetchDatasourceFiles:output_type -> saas.accounts.v1.FetchDatasourceFilesFrame - 84, // 108: saas.accounts.v1.ModuleCapabilitiesService.MintModuleWorkContext:output_type -> saas.accounts.v1.ModuleMintWorkContextResponse - 85, // 109: saas.accounts.v1.ModuleCapabilitiesService.MintModuleOperationContext:output_type -> saas.accounts.v1.ModuleMintOperationContextResponse - 86, // 110: saas.accounts.v1.ModuleCapabilitiesService.MintSourceOperationContext:output_type -> saas.accounts.v1.ModuleMintSourceOperationContextResponse - 42, // 111: saas.accounts.v1.ModuleCapabilitiesService.PublishEvent:output_type -> saas.accounts.v1.ModulePublishEventResponse - 45, // 112: saas.accounts.v1.ModuleCapabilitiesService.Subscribe:output_type -> saas.accounts.v1.ModuleSubscribeResponse - 83, // 113: saas.accounts.v1.ModuleCapabilitiesService.Unsubscribe:output_type -> google.protobuf.Empty - 48, // 114: saas.accounts.v1.ModuleCapabilitiesService.ListSubscriptions:output_type -> saas.accounts.v1.ModuleListSubscriptionsResponse - 50, // 115: saas.accounts.v1.ModuleCapabilitiesService.ReplayEvents:output_type -> saas.accounts.v1.ModuleReplayEventsResponse - 84, // [84:116] is the sub-list for method output_type - 52, // [52:84] is the sub-list for method input_type - 52, // [52:52] is the sub-list for extension type_name - 52, // [52:52] is the sub-list for extension extendee - 0, // [0:52] is the sub-list for field type_name + 88, // 0: saas.accounts.v1.ModuleEnqueueJobRequest.job:type_name -> saas.jobs.v1.NewJob + 89, // 1: saas.accounts.v1.ModuleEnqueueJobResponse.disposition:type_name -> saas.jobs.v1.JobEnqueueDisposition + 90, // 2: saas.accounts.v1.ModuleClaimJobsRequest.lease_duration:type_name -> google.protobuf.Duration + 91, // 3: saas.accounts.v1.ModuleClaimJobsResponse.jobs:type_name -> saas.jobs.v1.JobEnvelope + 92, // 4: saas.accounts.v1.ModuleHeartbeatJobRequest.lease:type_name -> saas.jobs.v1.JobLeaseReference + 90, // 5: saas.accounts.v1.ModuleHeartbeatJobRequest.extension:type_name -> google.protobuf.Duration + 93, // 6: saas.accounts.v1.ModuleHeartbeatJobResponse.lease:type_name -> saas.jobs.v1.JobLease + 92, // 7: saas.accounts.v1.ModuleAckJobRequest.lease:type_name -> saas.jobs.v1.JobLeaseReference + 92, // 8: saas.accounts.v1.ModuleNackJobRequest.lease:type_name -> saas.jobs.v1.JobLeaseReference + 94, // 9: saas.accounts.v1.ModuleNackJobRequest.failure:type_name -> saas.jobs.v1.JobFailure + 95, // 10: saas.accounts.v1.ModuleNackJobRequest.retry_at:type_name -> google.protobuf.Timestamp + 96, // 11: saas.accounts.v1.ModuleResumeRef.payload:type_name -> google.protobuf.Struct + 96, // 12: saas.accounts.v1.ModuleRequestApprovalRequest.subject:type_name -> google.protobuf.Struct + 23, // 13: saas.accounts.v1.ModuleRequestApprovalRequest.policy:type_name -> saas.accounts.v1.ModuleApprovalPolicy + 24, // 14: saas.accounts.v1.ModuleRequestApprovalRequest.resume_ref:type_name -> saas.accounts.v1.ModuleResumeRef + 95, // 15: saas.accounts.v1.ModuleRequestApprovalRequest.expires_at:type_name -> google.protobuf.Timestamp + 95, // 16: saas.accounts.v1.ModuleRequestApprovalRequest.escalate_at:type_name -> google.protobuf.Timestamp + 96, // 17: saas.accounts.v1.ModuleApproval.subject:type_name -> google.protobuf.Struct + 24, // 18: saas.accounts.v1.ModuleApproval.resume_ref:type_name -> saas.accounts.v1.ModuleResumeRef + 95, // 19: saas.accounts.v1.ModuleApproval.expires_at:type_name -> google.protobuf.Timestamp + 95, // 20: saas.accounts.v1.ModuleApproval.escalate_at:type_name -> google.protobuf.Timestamp + 95, // 21: saas.accounts.v1.ModuleApproval.created_at:type_name -> google.protobuf.Timestamp + 96, // 22: saas.accounts.v1.ModuleEmitAuditEventRequest.fields:type_name -> google.protobuf.Struct + 0, // 23: saas.accounts.v1.ModuleAuditFieldDeclaration.kind:type_name -> saas.accounts.v1.ModuleAuditFieldKind + 31, // 24: saas.accounts.v1.ModuleAuditEventTypeDeclaration.fields:type_name -> saas.accounts.v1.ModuleAuditFieldDeclaration + 1, // 25: saas.accounts.v1.ModuleAuditEventTypeDeclaration.visibility:type_name -> saas.accounts.v1.ModuleAuditEventVisibility + 32, // 26: saas.accounts.v1.ModuleDeclareAuditEventTypesRequest.types:type_name -> saas.accounts.v1.ModuleAuditEventTypeDeclaration + 95, // 27: saas.accounts.v1.SubjectVisibilityGrant.expires_at:type_name -> google.protobuf.Timestamp + 35, // 28: saas.accounts.v1.ModuleListSubjectVisibilityResponse.grants:type_name -> saas.accounts.v1.SubjectVisibilityGrant + 40, // 29: saas.accounts.v1.FetchDatasourceFilesRequest.files:type_name -> saas.accounts.v1.DatasourceFileRef + 2, // 30: saas.accounts.v1.DatasourceItemReaders.basis:type_name -> saas.accounts.v1.DatasourceItemReadersBasis + 42, // 31: saas.accounts.v1.DatasourceFileHeader.provenance:type_name -> saas.accounts.v1.DatasourceProvenance + 43, // 32: saas.accounts.v1.DatasourceFileHeader.readers:type_name -> saas.accounts.v1.DatasourceItemReaders + 44, // 33: saas.accounts.v1.FetchDatasourceFilesFrame.header:type_name -> saas.accounts.v1.DatasourceFileHeader + 97, // 34: saas.accounts.v1.ModulePublishEventRequest.envelope:type_name -> saas.events.v1.EventEnvelope + 3, // 35: saas.accounts.v1.ModuleSubscribeRequest.delivery:type_name -> saas.accounts.v1.EventDelivery + 3, // 36: saas.accounts.v1.ModuleSubscription.delivery:type_name -> saas.accounts.v1.EventDelivery + 95, // 37: saas.accounts.v1.ModuleSubscription.created_at:type_name -> google.protobuf.Timestamp + 49, // 38: saas.accounts.v1.ModuleSubscribeResponse.subscription:type_name -> saas.accounts.v1.ModuleSubscription + 49, // 39: saas.accounts.v1.ModuleListSubscriptionsResponse.subscriptions:type_name -> saas.accounts.v1.ModuleSubscription + 95, // 40: saas.accounts.v1.ModuleReplayEventsRequest.since:type_name -> google.protobuf.Timestamp + 4, // 41: saas.accounts.v1.ReadableSourceCollection.grant_disclosure:type_name -> saas.accounts.v1.MetadataDisclosure + 57, // 42: saas.accounts.v1.ReadableSourceCollection.read_grants:type_name -> saas.accounts.v1.ReadableCollectionGrant + 58, // 43: saas.accounts.v1.ReadableSourceCollection.sync:type_name -> saas.accounts.v1.CollectionSyncProvenance + 95, // 44: saas.accounts.v1.ReadableCollectionGrant.expires_at:type_name -> google.protobuf.Timestamp + 5, // 45: saas.accounts.v1.CollectionSyncProvenance.stage:type_name -> saas.accounts.v1.SourceSyncStage + 95, // 46: saas.accounts.v1.CollectionSyncProvenance.at:type_name -> google.protobuf.Timestamp + 4, // 47: saas.accounts.v1.CollectionSyncProvenance.requester_disclosure:type_name -> saas.accounts.v1.MetadataDisclosure + 95, // 48: saas.accounts.v1.CollectionSyncProvenance.requested_at:type_name -> google.protobuf.Timestamp + 56, // 49: saas.accounts.v1.ListReadableSourceCollectionsResponse.collections:type_name -> saas.accounts.v1.ReadableSourceCollection + 67, // 50: saas.accounts.v1.ExecutableArtifactIdentity.contracts:type_name -> saas.accounts.v1.ExecutableArtifactContract + 68, // 51: saas.accounts.v1.ModuleExecutableArtifactRequest.identity:type_name -> saas.accounts.v1.ExecutableArtifactIdentity + 6, // 52: saas.accounts.v1.WorkContextSealAnswer.state:type_name -> saas.accounts.v1.WorkContextSealState + 7, // 53: saas.accounts.v1.WorkContextPrincipalEpochAnswer.state:type_name -> saas.accounts.v1.WorkContextPrincipalState + 8, // 54: saas.accounts.v1.WorkContextApprovedBuildAnswer.state:type_name -> saas.accounts.v1.WorkContextApprovedBuildState + 9, // 55: saas.accounts.v1.WorkContextOperationBindingAnswer.state:type_name -> saas.accounts.v1.WorkContextOperationBindingState + 10, // 56: saas.accounts.v1.WorkContextApprovalGrantAnswer.state:type_name -> saas.accounts.v1.WorkContextApprovalGrantState + 74, // 57: saas.accounts.v1.ModuleResolveWorkContextAuthorityRequest.seal:type_name -> saas.accounts.v1.WorkContextSealQuestion + 75, // 58: saas.accounts.v1.ModuleResolveWorkContextAuthorityRequest.principal_epoch:type_name -> saas.accounts.v1.WorkContextPrincipalEpochQuestion + 76, // 59: saas.accounts.v1.ModuleResolveWorkContextAuthorityRequest.approved_build:type_name -> saas.accounts.v1.WorkContextApprovedBuildQuestion + 77, // 60: saas.accounts.v1.ModuleResolveWorkContextAuthorityRequest.operation_binding:type_name -> saas.accounts.v1.WorkContextOperationBindingQuestion + 78, // 61: saas.accounts.v1.ModuleResolveWorkContextAuthorityRequest.authorization_revision:type_name -> saas.accounts.v1.WorkContextAuthorizationRevisionQuestion + 79, // 62: saas.accounts.v1.ModuleResolveWorkContextAuthorityRequest.approval_grant:type_name -> saas.accounts.v1.WorkContextApprovalGrantQuestion + 80, // 63: saas.accounts.v1.ModuleResolveWorkContextAuthorityResponse.seal:type_name -> saas.accounts.v1.WorkContextSealAnswer + 81, // 64: saas.accounts.v1.ModuleResolveWorkContextAuthorityResponse.principal_epoch:type_name -> saas.accounts.v1.WorkContextPrincipalEpochAnswer + 82, // 65: saas.accounts.v1.ModuleResolveWorkContextAuthorityResponse.approved_build:type_name -> saas.accounts.v1.WorkContextApprovedBuildAnswer + 83, // 66: saas.accounts.v1.ModuleResolveWorkContextAuthorityResponse.operation_binding:type_name -> saas.accounts.v1.WorkContextOperationBindingAnswer + 84, // 67: saas.accounts.v1.ModuleResolveWorkContextAuthorityResponse.authorization_revision:type_name -> saas.accounts.v1.WorkContextAuthorizationRevisionAnswer + 85, // 68: saas.accounts.v1.ModuleResolveWorkContextAuthorityResponse.approval_grant:type_name -> saas.accounts.v1.WorkContextApprovalGrantAnswer + 72, // 69: saas.accounts.v1.ModuleCapabilitiesService.GetCurrentInstallation:input_type -> saas.accounts.v1.ModuleCurrentInstallationRequest + 69, // 70: saas.accounts.v1.ModuleCapabilitiesService.ApproveExecutableArtifact:input_type -> saas.accounts.v1.ModuleExecutableArtifactRequest + 69, // 71: saas.accounts.v1.ModuleCapabilitiesService.AuthorizeExecutableArtifact:input_type -> saas.accounts.v1.ModuleExecutableArtifactRequest + 70, // 72: saas.accounts.v1.ModuleCapabilitiesService.RevokeExecutableArtifact:input_type -> saas.accounts.v1.ModuleRevokeExecutableArtifactRequest + 65, // 73: saas.accounts.v1.ModuleCapabilitiesService.ExchangeDelegatedReadAudience:input_type -> saas.accounts.v1.ModuleExchangeDelegatedReadAudienceRequest + 66, // 74: saas.accounts.v1.ModuleCapabilitiesService.ExchangeDelegatedOperationAudience:input_type -> saas.accounts.v1.ModuleExchangeDelegatedOperationAudienceRequest + 63, // 75: saas.accounts.v1.ModuleCapabilitiesService.CheckWorkContextRecordAccess:input_type -> saas.accounts.v1.CheckWorkContextRecordAccessRequest + 59, // 76: saas.accounts.v1.ModuleCapabilitiesService.ListReadableSourceCollections:input_type -> saas.accounts.v1.ListReadableSourceCollectionsRequest + 61, // 77: saas.accounts.v1.ModuleCapabilitiesService.PlaceRecord:input_type -> saas.accounts.v1.ModulePlaceRecordRequest + 11, // 78: saas.accounts.v1.ModuleCapabilitiesService.EnqueueJob:input_type -> saas.accounts.v1.ModuleEnqueueJobRequest + 13, // 79: saas.accounts.v1.ModuleCapabilitiesService.ClaimJobs:input_type -> saas.accounts.v1.ModuleClaimJobsRequest + 15, // 80: saas.accounts.v1.ModuleCapabilitiesService.HeartbeatJob:input_type -> saas.accounts.v1.ModuleHeartbeatJobRequest + 17, // 81: saas.accounts.v1.ModuleCapabilitiesService.AckJob:input_type -> saas.accounts.v1.ModuleAckJobRequest + 18, // 82: saas.accounts.v1.ModuleCapabilitiesService.NackJob:input_type -> saas.accounts.v1.ModuleNackJobRequest + 19, // 83: saas.accounts.v1.ModuleCapabilitiesService.NotifyUser:input_type -> saas.accounts.v1.ModuleNotifyUserRequest + 21, // 84: saas.accounts.v1.ModuleCapabilitiesService.NotifyOrgAdmins:input_type -> saas.accounts.v1.ModuleNotifyOrgAdminsRequest + 25, // 85: saas.accounts.v1.ModuleCapabilitiesService.RequestApproval:input_type -> saas.accounts.v1.ModuleRequestApprovalRequest + 27, // 86: saas.accounts.v1.ModuleCapabilitiesService.GetApproval:input_type -> saas.accounts.v1.ModuleGetApprovalRequest + 29, // 87: saas.accounts.v1.ModuleCapabilitiesService.CancelApproval:input_type -> saas.accounts.v1.ModuleCancelApprovalRequest + 30, // 88: saas.accounts.v1.ModuleCapabilitiesService.EmitAuditEvent:input_type -> saas.accounts.v1.ModuleEmitAuditEventRequest + 33, // 89: saas.accounts.v1.ModuleCapabilitiesService.DeclareAuditEventTypes:input_type -> saas.accounts.v1.ModuleDeclareAuditEventTypesRequest + 36, // 90: saas.accounts.v1.ModuleCapabilitiesService.ListSubjectVisibility:input_type -> saas.accounts.v1.ModuleListSubjectVisibilityRequest + 38, // 91: saas.accounts.v1.ModuleCapabilitiesService.FetchDatasourceBlob:input_type -> saas.accounts.v1.FetchDatasourceBlobRequest + 41, // 92: saas.accounts.v1.ModuleCapabilitiesService.FetchDatasourceFiles:input_type -> saas.accounts.v1.FetchDatasourceFilesRequest + 98, // 93: saas.accounts.v1.ModuleCapabilitiesService.MintModuleWorkContext:input_type -> saas.accounts.v1.ModuleMintWorkContextRequest + 99, // 94: saas.accounts.v1.ModuleCapabilitiesService.MintModuleOperationContext:input_type -> saas.accounts.v1.ModuleMintOperationContextRequest + 100, // 95: saas.accounts.v1.ModuleCapabilitiesService.MintSourceOperationContext:input_type -> saas.accounts.v1.ModuleMintSourceOperationContextRequest + 46, // 96: saas.accounts.v1.ModuleCapabilitiesService.PublishEvent:input_type -> saas.accounts.v1.ModulePublishEventRequest + 48, // 97: saas.accounts.v1.ModuleCapabilitiesService.Subscribe:input_type -> saas.accounts.v1.ModuleSubscribeRequest + 51, // 98: saas.accounts.v1.ModuleCapabilitiesService.Unsubscribe:input_type -> saas.accounts.v1.ModuleUnsubscribeRequest + 52, // 99: saas.accounts.v1.ModuleCapabilitiesService.ListSubscriptions:input_type -> saas.accounts.v1.ModuleListSubscriptionsRequest + 54, // 100: saas.accounts.v1.ModuleCapabilitiesService.ReplayEvents:input_type -> saas.accounts.v1.ModuleReplayEventsRequest + 86, // 101: saas.accounts.v1.ModuleCapabilitiesService.ResolveWorkContextAuthority:input_type -> saas.accounts.v1.ModuleResolveWorkContextAuthorityRequest + 73, // 102: saas.accounts.v1.ModuleCapabilitiesService.GetCurrentInstallation:output_type -> saas.accounts.v1.ModuleCurrentInstallationResponse + 71, // 103: saas.accounts.v1.ModuleCapabilitiesService.ApproveExecutableArtifact:output_type -> saas.accounts.v1.ModuleExecutableArtifactResponse + 71, // 104: saas.accounts.v1.ModuleCapabilitiesService.AuthorizeExecutableArtifact:output_type -> saas.accounts.v1.ModuleExecutableArtifactResponse + 71, // 105: saas.accounts.v1.ModuleCapabilitiesService.RevokeExecutableArtifact:output_type -> saas.accounts.v1.ModuleExecutableArtifactResponse + 101, // 106: saas.accounts.v1.ModuleCapabilitiesService.ExchangeDelegatedReadAudience:output_type -> saas.accounts.v1.IssuedWorkContext + 101, // 107: saas.accounts.v1.ModuleCapabilitiesService.ExchangeDelegatedOperationAudience:output_type -> saas.accounts.v1.IssuedWorkContext + 64, // 108: saas.accounts.v1.ModuleCapabilitiesService.CheckWorkContextRecordAccess:output_type -> saas.accounts.v1.CheckWorkContextRecordAccessResponse + 60, // 109: saas.accounts.v1.ModuleCapabilitiesService.ListReadableSourceCollections:output_type -> saas.accounts.v1.ListReadableSourceCollectionsResponse + 62, // 110: saas.accounts.v1.ModuleCapabilitiesService.PlaceRecord:output_type -> saas.accounts.v1.ModulePlaceRecordResponse + 12, // 111: saas.accounts.v1.ModuleCapabilitiesService.EnqueueJob:output_type -> saas.accounts.v1.ModuleEnqueueJobResponse + 14, // 112: saas.accounts.v1.ModuleCapabilitiesService.ClaimJobs:output_type -> saas.accounts.v1.ModuleClaimJobsResponse + 16, // 113: saas.accounts.v1.ModuleCapabilitiesService.HeartbeatJob:output_type -> saas.accounts.v1.ModuleHeartbeatJobResponse + 102, // 114: saas.accounts.v1.ModuleCapabilitiesService.AckJob:output_type -> google.protobuf.Empty + 102, // 115: saas.accounts.v1.ModuleCapabilitiesService.NackJob:output_type -> google.protobuf.Empty + 20, // 116: saas.accounts.v1.ModuleCapabilitiesService.NotifyUser:output_type -> saas.accounts.v1.ModuleNotifyUserResponse + 22, // 117: saas.accounts.v1.ModuleCapabilitiesService.NotifyOrgAdmins:output_type -> saas.accounts.v1.ModuleNotifyOrgAdminsResponse + 26, // 118: saas.accounts.v1.ModuleCapabilitiesService.RequestApproval:output_type -> saas.accounts.v1.ModuleRequestApprovalResponse + 28, // 119: saas.accounts.v1.ModuleCapabilitiesService.GetApproval:output_type -> saas.accounts.v1.ModuleApproval + 102, // 120: saas.accounts.v1.ModuleCapabilitiesService.CancelApproval:output_type -> google.protobuf.Empty + 102, // 121: saas.accounts.v1.ModuleCapabilitiesService.EmitAuditEvent:output_type -> google.protobuf.Empty + 34, // 122: saas.accounts.v1.ModuleCapabilitiesService.DeclareAuditEventTypes:output_type -> saas.accounts.v1.ModuleDeclareAuditEventTypesResponse + 37, // 123: saas.accounts.v1.ModuleCapabilitiesService.ListSubjectVisibility:output_type -> saas.accounts.v1.ModuleListSubjectVisibilityResponse + 39, // 124: saas.accounts.v1.ModuleCapabilitiesService.FetchDatasourceBlob:output_type -> saas.accounts.v1.FetchDatasourceBlobChunk + 45, // 125: saas.accounts.v1.ModuleCapabilitiesService.FetchDatasourceFiles:output_type -> saas.accounts.v1.FetchDatasourceFilesFrame + 103, // 126: saas.accounts.v1.ModuleCapabilitiesService.MintModuleWorkContext:output_type -> saas.accounts.v1.ModuleMintWorkContextResponse + 104, // 127: saas.accounts.v1.ModuleCapabilitiesService.MintModuleOperationContext:output_type -> saas.accounts.v1.ModuleMintOperationContextResponse + 105, // 128: saas.accounts.v1.ModuleCapabilitiesService.MintSourceOperationContext:output_type -> saas.accounts.v1.ModuleMintSourceOperationContextResponse + 47, // 129: saas.accounts.v1.ModuleCapabilitiesService.PublishEvent:output_type -> saas.accounts.v1.ModulePublishEventResponse + 50, // 130: saas.accounts.v1.ModuleCapabilitiesService.Subscribe:output_type -> saas.accounts.v1.ModuleSubscribeResponse + 102, // 131: saas.accounts.v1.ModuleCapabilitiesService.Unsubscribe:output_type -> google.protobuf.Empty + 53, // 132: saas.accounts.v1.ModuleCapabilitiesService.ListSubscriptions:output_type -> saas.accounts.v1.ModuleListSubscriptionsResponse + 55, // 133: saas.accounts.v1.ModuleCapabilitiesService.ReplayEvents:output_type -> saas.accounts.v1.ModuleReplayEventsResponse + 87, // 134: saas.accounts.v1.ModuleCapabilitiesService.ResolveWorkContextAuthority:output_type -> saas.accounts.v1.ModuleResolveWorkContextAuthorityResponse + 102, // [102:135] is the sub-list for method output_type + 69, // [69:102] is the sub-list for method input_type + 69, // [69:69] is the sub-list for extension type_name + 69, // [69:69] is the sub-list for extension extendee + 0, // [0:69] is the sub-list for field type_name } func init() { file_saas_accounts_v1_module_capabilities_proto_init() } @@ -5306,13 +6729,29 @@ func file_saas_accounts_v1_module_capabilities_proto_init() { (*FetchDatasourceFilesFrame_Header)(nil), (*FetchDatasourceFilesFrame_Data)(nil), } + file_saas_accounts_v1_module_capabilities_proto_msgTypes[75].OneofWrappers = []any{ + (*ModuleResolveWorkContextAuthorityRequest_Seal)(nil), + (*ModuleResolveWorkContextAuthorityRequest_PrincipalEpoch)(nil), + (*ModuleResolveWorkContextAuthorityRequest_ApprovedBuild)(nil), + (*ModuleResolveWorkContextAuthorityRequest_OperationBinding)(nil), + (*ModuleResolveWorkContextAuthorityRequest_AuthorizationRevision)(nil), + (*ModuleResolveWorkContextAuthorityRequest_ApprovalGrant)(nil), + } + file_saas_accounts_v1_module_capabilities_proto_msgTypes[76].OneofWrappers = []any{ + (*ModuleResolveWorkContextAuthorityResponse_Seal)(nil), + (*ModuleResolveWorkContextAuthorityResponse_PrincipalEpoch)(nil), + (*ModuleResolveWorkContextAuthorityResponse_ApprovedBuild)(nil), + (*ModuleResolveWorkContextAuthorityResponse_OperationBinding)(nil), + (*ModuleResolveWorkContextAuthorityResponse_AuthorizationRevision)(nil), + (*ModuleResolveWorkContextAuthorityResponse_ApprovalGrant)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_saas_accounts_v1_module_capabilities_proto_rawDesc), len(file_saas_accounts_v1_module_capabilities_proto_rawDesc)), - NumEnums: 6, - NumMessages: 63, + NumEnums: 11, + NumMessages: 77, NumExtensions: 0, NumServices: 1, }, diff --git a/gen/saas/accounts/v1/module_registration.pb.go b/gen/saas/accounts/v1/module_registration.pb.go index 7308e17..7cc184f 100644 --- a/gen/saas/accounts/v1/module_registration.pb.go +++ b/gen/saas/accounts/v1/module_registration.pb.go @@ -43,8 +43,21 @@ type ModuleMintWorkContextRequest struct { // tenant-pinned principal, omit or match its tenant. Accounts validates the // requested organization's live installation after authenticating execution. OrganizationId string `protobuf:"bytes,4,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // upstream is where the minting workload serves its backend, as an absolute + // https origin with no path: the dynamic half of its registration, reported + // by the runtime that proved its identity with the token above (#952). The + // gateway reaches it only under the SVID the applied presence names for the + // workload, so a claimed origin that is not that workload serves nothing. + // Empty leaves the registration's backend half as it is. + Upstream string `protobuf:"bytes,5,opt,name=upstream,proto3" json:"upstream,omitempty"` + // manifest is the solution's frontend manifest as its runtime serves it: the + // other dynamic half of a solution's registration (a module has none), the + // document the host's frontend renders the solution's page from. Reported + // with the same proven identity as upstream. Empty leaves the frontend half + // as it is. + Manifest string `protobuf:"bytes,6,opt,name=manifest,proto3" json:"manifest,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ModuleMintWorkContextRequest) Reset() { @@ -98,6 +111,20 @@ func (x *ModuleMintWorkContextRequest) GetOrganizationId() string { return "" } +func (x *ModuleMintWorkContextRequest) GetUpstream() string { + if x != nil { + return x.Upstream + } + return "" +} + +func (x *ModuleMintWorkContextRequest) GetManifest() string { + if x != nil { + return x.Manifest + } + return "" +} + // ModuleMintWorkContextResponse carries the signed capability plus the identity // it asserts, so a module can attribute its own work without parsing the token. type ModuleMintWorkContextResponse struct { @@ -574,11 +601,13 @@ var File_saas_accounts_v1_module_registration_proto protoreflect.FileDescriptor const file_saas_accounts_v1_module_registration_proto_rawDesc = "" + "\n" + - "*saas/accounts/v1/module_registration.proto\x12\x10saas.accounts.v1\x1a\x1bbuf/validate/validate.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe9\x01\n" + + "*saas/accounts/v1/module_registration.proto\x12\x10saas.accounts.v1\x1a\x1bbuf/validate/validate.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbf\x02\n" + "\x1cModuleMintWorkContextRequest\x12D\n" + "\x06prefix\x18\x01 \x01(\tB,\xbaH)r'\x10\x01\x18?2!^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$R\x06prefix\x12?\n" + "\x15service_account_token\x18\x03 \x01(\tB\v\xbaH\br\x06\x10\x01\x18\x80\x80\x04R\x13serviceAccountToken\x124\n" + - "\x0forganization_id\x18\x04 \x01(\tB\v\xbaH\b\xd8\x01\x01r\x03\xb0\x01\x01R\x0eorganizationIdJ\x04\b\x02\x10\x03R\x06secret\"\xab\x01\n" + + "\x0forganization_id\x18\x04 \x01(\tB\v\xbaH\b\xd8\x01\x01r\x03\xb0\x01\x01R\x0eorganizationId\x12*\n" + + "\bupstream\x18\x05 \x01(\tB\x0e\xbaH\v\xd8\x01\x01r\x06\x18\x80\x04\x88\x01\x01R\bupstream\x12(\n" + + "\bmanifest\x18\x06 \x01(\tB\f\xbaH\t\xd8\x01\x01r\x04\x18\x80\x80\x04R\bmanifestJ\x04\b\x02\x10\x03R\x06secret\"\xab\x01\n" + "\x1dModuleMintWorkContextResponse\x12\x14\n" + "\x05token\x18\x01 \x01(\tR\x05token\x129\n" + "\n" + diff --git a/gen/saas/accounts/v1/work_contexts.pb.go b/gen/saas/accounts/v1/work_contexts.pb.go index e27ffb7..5f5952b 100644 --- a/gen/saas/accounts/v1/work_contexts.pb.go +++ b/gen/saas/accounts/v1/work_contexts.pb.go @@ -140,6 +140,12 @@ func (x *WorkContextScope) GetResourceIds() []string { return nil } +// StartTaskWorkContextRequest mints a Task capability for the caller. Its Session +// is the one the caller authenticated with — or a fresh one when it has none — +// assigned by the issuer and returned in IssuedWorkContext, never named by the +// caller: a session a caller could name is one it could name after another +// credential's, and a confined credential is paired with a capability on the +// session alone. type StartTaskWorkContextRequest struct { state protoimpl.MessageState `protogen:"open.v1"` OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` @@ -154,8 +160,7 @@ type StartTaskWorkContextRequest struct { // rule here is only "a UUID when present" and the handler refuses the wrong // shape on either path: an absent boundary on an ordinary mint, a named one // on a solution-scoped mint. - TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - SessionId string `protobuf:"bytes,3,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` // Empty means a direct human-owned Task. Otherwise this must name an active, // registered agent Principal in org_id. ActorPrincipalId string `protobuf:"bytes,4,opt,name=actor_principal_id,json=actorPrincipalId,proto3" json:"actor_principal_id,omitempty"` @@ -216,13 +221,6 @@ func (x *StartTaskWorkContextRequest) GetTaskId() string { return "" } -func (x *StartTaskWorkContextRequest) GetSessionId() string { - if x != nil { - return x.SessionId - } - return "" -} - func (x *StartTaskWorkContextRequest) GetActorPrincipalId() string { if x != nil { return x.ActorPrincipalId @@ -284,12 +282,16 @@ func (x *StartTaskWorkContextRequest) GetProjectId() string { // that node's own row and checks the agent holds a standing grant at an // ancestor-or-equal of it. This differs from CheckAccess, where resource_id is a // placed-record id; do not pass a record id here. +// +// The Session is assigned by the issuer and returned in IssuedWorkContext, never +// named by the caller: a session a caller could name is one it could name after +// another credential's, and a confined credential is paired with a capability on +// the session alone. type StartInstallationTaskRequest struct { state protoimpl.MessageState `protogen:"open.v1"` OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` InstallationId string `protobuf:"bytes,2,opt,name=installation_id,json=installationId,proto3" json:"installation_id,omitempty"` TaskId string `protobuf:"bytes,3,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - SessionId string `protobuf:"bytes,4,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` AuthorityScopes []*WorkContextScope `protobuf:"bytes,5,rep,name=authority_scopes,json=authorityScopes,proto3" json:"authority_scopes,omitempty"` Audience string `protobuf:"bytes,6,opt,name=audience,proto3" json:"audience,omitempty"` ReplayPolicy WorkContextReplayPolicy `protobuf:"varint,7,opt,name=replay_policy,json=replayPolicy,proto3,enum=saas.accounts.v1.WorkContextReplayPolicy" json:"replay_policy,omitempty"` @@ -351,13 +353,6 @@ func (x *StartInstallationTaskRequest) GetTaskId() string { return "" } -func (x *StartInstallationTaskRequest) GetSessionId() string { - if x != nil { - return x.SessionId - } - return "" -} - func (x *StartInstallationTaskRequest) GetAuthorityScopes() []*WorkContextScope { if x != nil { return x.AuthorityScopes @@ -484,9 +479,10 @@ func (x *StartRootSessionWorkContextRequest) GetTtlSeconds() int32 { return 0 } -// ExchangeWorkContextAudienceRequest reissues the same immutable Task, -// Session, owner, and delegation lineage for another service boundary while -// attenuating the effective authority to the requested scopes. +// ExchangeWorkContextAudienceRequest reissues the same immutable Task, owner, +// and delegation lineage for another service boundary while attenuating the +// effective authority to the requested scopes. The reissued capability opens the +// caller's own authenticated Session, assigned by the issuer. type ExchangeWorkContextAudienceRequest struct { state protoimpl.MessageState `protogen:"open.v1"` OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` @@ -571,11 +567,16 @@ func (x *ExchangeWorkContextAudienceRequest) GetTtlSeconds() int32 { return 0 } +// StartChildSessionWorkContextRequest delegates one more hop from a verified +// parent. The child Session is assigned by the issuer and returned in +// IssuedWorkContext (with the parent's as parent_session_id), never named by the +// caller: a session a caller could name is one it could name after another +// credential's, and a confined credential is paired with a capability on the +// session alone. type StartChildSessionWorkContextRequest struct { state protoimpl.MessageState `protogen:"open.v1"` OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` ParentWorkContextToken string `protobuf:"bytes,2,opt,name=parent_work_context_token,json=parentWorkContextToken,proto3" json:"parent_work_context_token,omitempty"` - SessionId string `protobuf:"bytes,3,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` ActorPrincipalId string `protobuf:"bytes,4,opt,name=actor_principal_id,json=actorPrincipalId,proto3" json:"actor_principal_id,omitempty"` GrantedScopes []*WorkContextScope `protobuf:"bytes,5,rep,name=granted_scopes,json=grantedScopes,proto3" json:"granted_scopes,omitempty"` Audience string `protobuf:"bytes,6,opt,name=audience,proto3" json:"audience,omitempty"` @@ -629,13 +630,6 @@ func (x *StartChildSessionWorkContextRequest) GetParentWorkContextToken() string return "" } -func (x *StartChildSessionWorkContextRequest) GetSessionId() string { - if x != nil { - return x.SessionId - } - return "" -} - func (x *StartChildSessionWorkContextRequest) GetActorPrincipalId() string { if x != nil { return x.ActorPrincipalId @@ -675,8 +669,8 @@ func (x *StartChildSessionWorkContextRequest) GetTtlSeconds() int32 { // signing TTL cap without the originating user present. The caller is the // current (outermost) actor of the parent context, not its owner, so a // long-running delegated task can keep itself alive. Renewal preserves the -// Task, Session, owner, and delegation lineage; it may attenuate but can never -// widen the current actor's authority. +// Task, owner, and delegation lineage and opens a fresh Session assigned by the +// issuer; it may attenuate but can never widen the current actor's authority. type RenewWorkContextRequest struct { state protoimpl.MessageState `protogen:"open.v1"` OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` @@ -955,8 +949,14 @@ type CheckAuthorizationRevisionRequest struct { OwnerPrincipalId string `protobuf:"bytes,2,opt,name=owner_principal_id,json=ownerPrincipalId,proto3" json:"owner_principal_id,omitempty"` AuthorizationRevision uint64 `protobuf:"varint,3,opt,name=authorization_revision,json=authorizationRevision,proto3" json:"authorization_revision,omitempty"` Subjects []*WorkContextRevisionSubject `protobuf:"bytes,4,rep,name=subjects,proto3" json:"subjects,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // operation_binding_id is the operation binding the context sealed, copied + // from its operation_binding.binding_id. A context minted from a source + // delegation exercises one (the delegation, used by its actor), and is + // confirmed only against that binding, re-read live; such a context checked + // without it is not confirmed. Empty for a context that seals none. + OperationBindingId *string `protobuf:"bytes,5,opt,name=operation_binding_id,json=operationBindingId,proto3,oneof" json:"operation_binding_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CheckAuthorizationRevisionRequest) Reset() { @@ -1017,6 +1017,13 @@ func (x *CheckAuthorizationRevisionRequest) GetSubjects() []*WorkContextRevision return nil } +func (x *CheckAuthorizationRevisionRequest) GetOperationBindingId() string { + if x != nil && x.OperationBindingId != nil { + return *x.OperationBindingId + } + return "" +} + // AuthorizeEvidenceReadRequest asks Accounts to authorize one filtered // Evidence read using current membership and RBAC state. Empty optional // filters describe a tenant-directory read and require unscoped evidence:read. @@ -1174,12 +1181,10 @@ const file_saas_accounts_v1_work_contexts_proto_rawDesc = "" + "\rresource_kind\x18\x01 \x01(\tB\n" + "\xbaH\ar\x05\x10\x01\x18\x80\x01R\fresourceKind\x12/\n" + "\aactions\x18\x02 \x03(\tB\x15\xbaH\x12\x92\x01\x0f\b\x01\x10@\x18\x01\"\ar\x05\x10\x01\x18\x80\x01R\aactions\x127\n" + - "\fresource_ids\x18\x03 \x03(\tB\x14\xbaH\x11\x92\x01\x0e\x10\x80\x02\x18\x01\"\ar\x05\x10\x01\x18\x80\x04R\vresourceIds\"\xbf\x04\n" + + "\fresource_ids\x18\x03 \x03(\tB\x14\xbaH\x11\x92\x01\x0e\x10\x80\x02\x18\x01\"\ar\x05\x10\x01\x18\x80\x04R\vresourceIds\"\xa8\x04\n" + "\x1bStartTaskWorkContextRequest\x12\x1f\n" + "\x06org_id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x05orgId\x12$\n" + - "\atask_id\x18\x02 \x01(\tB\v\xbaH\b\xd8\x01\x01r\x03\xb0\x01\x01R\x06taskId\x12'\n" + - "\n" + - "session_id\x18\x03 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\tsessionId\x12,\n" + + "\atask_id\x18\x02 \x01(\tB\v\xbaH\b\xd8\x01\x01r\x03\xb0\x01\x01R\x06taskId\x12,\n" + "\x12actor_principal_id\x18\x04 \x01(\tR\x10actorPrincipalId\x12Y\n" + "\x10authority_scopes\x18\x05 \x03(\v2\".saas.accounts.v1.WorkContextScopeB\n" + "\xbaH\a\x92\x01\x04\b\x01\x10@R\x0fauthorityScopes\x12&\n" + @@ -1196,13 +1201,12 @@ const file_saas_accounts_v1_work_contexts_proto_rawDesc = "" + " \x01(\tB\n" + "\xbaH\ar\x05\x10\x01\x18\x80\x04H\x01R\tprojectId\x88\x01\x01B\x0f\n" + "\r_workspace_idB\r\n" + - "\v_project_id\"\xc2\x04\n" + + "\v_project_idJ\x04\b\x03\x10\x04R\n" + + "session_id\"\xab\x04\n" + "\x1cStartInstallationTaskRequest\x12\x1f\n" + "\x06org_id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x05orgId\x121\n" + "\x0finstallation_id\x18\x02 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x0einstallationId\x12!\n" + - "\atask_id\x18\x03 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x06taskId\x12'\n" + - "\n" + - "session_id\x18\x04 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\tsessionId\x12Y\n" + + "\atask_id\x18\x03 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x06taskId\x12Y\n" + "\x10authority_scopes\x18\x05 \x03(\v2\".saas.accounts.v1.WorkContextScopeB\n" + "\xbaH\a\x92\x01\x04\b\x01\x10@R\x0fauthorityScopes\x12&\n" + "\baudience\x18\x06 \x01(\tB\n" + @@ -1218,7 +1222,8 @@ const file_saas_accounts_v1_work_contexts_proto_rawDesc = "" + " \x01(\tB\n" + "\xbaH\ar\x05\x10\x01\x18\x80\x04H\x01R\tprojectId\x88\x01\x01B\x0f\n" + "\r_workspace_idB\r\n" + - "\v_project_id\"\xdb\x02\n" + + "\v_project_idJ\x04\b\x04\x10\x05R\n" + + "session_id\"\xdb\x02\n" + "\"StartRootSessionWorkContextRequest\x12\x1f\n" + "\x06org_id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x05orgId\x12F\n" + "\x19parent_work_context_token\x18\x02 \x01(\tB\v\xbaH\br\x06\x10\x01\x18\x80\x80\x02R\x16parentWorkContextToken\x12'\n" + @@ -1240,12 +1245,10 @@ const file_saas_accounts_v1_work_contexts_proto_rawDesc = "" + "\rreplay_policy\x18\x05 \x01(\x0e2).saas.accounts.v1.WorkContextReplayPolicyR\freplayPolicy\x12+\n" + "\vttl_seconds\x18\x06 \x01(\x05B\n" + "\xbaH\a\x1a\x05\x18\x84\a(\x00R\n" + - "ttlSeconds\"\xeb\x03\n" + + "ttlSeconds\"\xd4\x03\n" + "#StartChildSessionWorkContextRequest\x12\x1f\n" + "\x06org_id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x05orgId\x12F\n" + - "\x19parent_work_context_token\x18\x02 \x01(\tB\v\xbaH\br\x06\x10\x01\x18\x80\x80\x02R\x16parentWorkContextToken\x12'\n" + - "\n" + - "session_id\x18\x03 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\tsessionId\x126\n" + + "\x19parent_work_context_token\x18\x02 \x01(\tB\v\xbaH\br\x06\x10\x01\x18\x80\x80\x02R\x16parentWorkContextToken\x126\n" + "\x12actor_principal_id\x18\x04 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x10actorPrincipalId\x12U\n" + "\x0egranted_scopes\x18\x05 \x03(\v2\".saas.accounts.v1.WorkContextScopeB\n" + "\xbaH\a\x92\x01\x04\b\x01\x10@R\rgrantedScopes\x12&\n" + @@ -1254,7 +1257,8 @@ const file_saas_accounts_v1_work_contexts_proto_rawDesc = "" + "\rreplay_policy\x18\a \x01(\x0e2).saas.accounts.v1.WorkContextReplayPolicyR\freplayPolicy\x12+\n" + "\vttl_seconds\x18\b \x01(\x05B\n" + "\xbaH\a\x1a\x05\x18\x84\a(\x00R\n" + - "ttlSeconds\"\x94\x03\n" + + "ttlSecondsJ\x04\b\x03\x10\x04R\n" + + "session_id\"\x94\x03\n" + "\x17RenewWorkContextRequest\x12\x1f\n" + "\x06org_id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x05orgId\x12F\n" + "\x19parent_work_context_token\x18\x02 \x01(\tB\v\xbaH\br\x06\x10\x01\x18\x80\x80\x02R\x16parentWorkContextToken\x12+\n" + @@ -1287,13 +1291,16 @@ const file_saas_accounts_v1_work_contexts_proto_rawDesc = "" + "\v_project_id\"\x8f\x01\n" + "\x1aWorkContextRevisionSubject\x12+\n" + "\fprincipal_id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\vprincipalId\x12D\n" + - "\x06scopes\x18\x02 \x03(\v2\".saas.accounts.v1.WorkContextScopeB\b\xbaH\x05\x92\x01\x02\x10@R\x06scopes\"\x92\x02\n" + + "\x06scopes\x18\x02 \x03(\v2\".saas.accounts.v1.WorkContextScopeB\b\xbaH\x05\x92\x01\x02\x10@R\x06scopes\"\xee\x02\n" + "!CheckAuthorizationRevisionRequest\x12\x1f\n" + "\x06org_id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x05orgId\x126\n" + "\x12owner_principal_id\x18\x02 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x10ownerPrincipalId\x12>\n" + "\x16authorization_revision\x18\x03 \x01(\x04B\a\xbaH\x042\x02 \x00R\x15authorizationRevision\x12T\n" + "\bsubjects\x18\x04 \x03(\v2,.saas.accounts.v1.WorkContextRevisionSubjectB\n" + - "\xbaH\a\x92\x01\x04\b\x01\x10\x11R\bsubjects\"\xc2\x02\n" + + "\xbaH\a\x92\x01\x04\b\x01\x10\x11R\bsubjects\x12A\n" + + "\x14operation_binding_id\x18\x05 \x01(\tB\n" + + "\xbaH\ar\x05\x10\x01\x18\x80\x04H\x00R\x12operationBindingId\x88\x01\x01B\x17\n" + + "\x15_operation_binding_id\"\xc2\x02\n" + "\x1cAuthorizeEvidenceReadRequest\x12\x1f\n" + "\x06org_id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x05orgId\x128\n" + "\x13caller_principal_id\x18\x02 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x11callerPrincipalId\x12;\n" + @@ -1421,6 +1428,7 @@ func file_saas_accounts_v1_work_contexts_proto_init() { file_saas_accounts_v1_work_contexts_proto_msgTypes[2].OneofWrappers = []any{} file_saas_accounts_v1_work_contexts_proto_msgTypes[6].OneofWrappers = []any{} file_saas_accounts_v1_work_contexts_proto_msgTypes[7].OneofWrappers = []any{} + file_saas_accounts_v1_work_contexts_proto_msgTypes[9].OneofWrappers = []any{} file_saas_accounts_v1_work_contexts_proto_msgTypes[10].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/moduleauthority/broker.go b/moduleauthority/broker.go index 4a89721..000fb32 100644 --- a/moduleauthority/broker.go +++ b/moduleauthority/broker.go @@ -119,8 +119,19 @@ func (b broker) post(ctx context.Context, path, projectedToken string, body any, } // brokerRefusal types the statuses the mints share: 401 is an unproven -// module, 403 a proven one refused, 503 a host that could not establish what -// this pod is running. Anything else stays a bare *BrokerError. +// module, 403 a proven one refused, 412 a proven one the host holds no state to +// mint for, 503 a host that could not establish what this pod is running. +// Anything else stays a bare *BrokerError. +// +// 412 arrived with the host ref this SDK is generated from. The gateway used to +// relay accounts' FailedPrecondition on the module Work Context mint as a 502, +// which reads as "the host is broken"; it now relays it as 412, which reads as +// "the host works and there is nothing to mint for you yet" — a workload that +// is admitted and installed nowhere. The two want different handling, which is +// why the distinction exists and why this is not a bare *BrokerError. +// +// The source mint's own 412 keeps its own meaning (ErrDelegationMissing), which +// is why that path types its statuses itself rather than through here. func brokerRefusal(err error) error { var be *BrokerError if !errors.As(err, &be) { @@ -131,6 +142,8 @@ func brokerRefusal(err error) error { return fmt.Errorf("%w: %w", ErrInvalidCredentials, err) case http.StatusForbidden: return fmt.Errorf("%w: %w", ErrPermissionDenied, err) + case http.StatusPreconditionFailed: + return fmt.Errorf("%w: %w", ErrNoHostStateToMintFor, err) case http.StatusServiceUnavailable: return fmt.Errorf("%w: %w", ErrExecutionUnestablished, err) } diff --git a/moduleauthority/broker_errors_test.go b/moduleauthority/broker_errors_test.go index 4f7c65e..a37e228 100644 --- a/moduleauthority/broker_errors_test.go +++ b/moduleauthority/broker_errors_test.go @@ -13,10 +13,12 @@ import ( // brokerMintCase is one mint and the sentinel each mint types a status with. // The statuses are driven by a raw transport, not by the host fake: they pin -// the SDK's mapping for any status, including some the v0.0.94 gateway never -// sends on that path (a 403 or 412 on the work-context mint — accounts' -// PermissionDenied is a 401 there). The real gateway's statuses per path are -// held by conformance/hostgateway. +// the SDK's mapping for any status, including one the gateway never sends on +// that path (a 403 on the work-context mint — accounts' PermissionDenied is a +// 401 there). The real gateway's statuses per path are held by +// conformance/hostgateway, which is where the 412 below came from: the gateway +// now relays accounts' FailedPrecondition on the work-context and +// operation-context mints as 412 rather than 502. type brokerMintCase struct { path string call func(*Client) error @@ -26,11 +28,11 @@ type brokerMintCase struct { func brokerMints(t *testing.T) []brokerMintCase { return []brokerMintCase{ - {hostWorkContextPath, func(c *Client) error { _, err := c.ModuleWorkContext(t.Context()); return err }, ErrPermissionDenied, nil}, + {hostWorkContextPath, func(c *Client) error { _, err := c.ModuleWorkContext(t.Context()); return err }, ErrPermissionDenied, ErrNoHostStateToMintFor}, {hostOperationContextPath, func(c *Client) error { _, err := c.MintModuleOperationContext(t.Context(), "binding") return err - }, ErrPermissionDenied, nil}, + }, ErrPermissionDenied, ErrNoHostStateToMintFor}, {hostSourceOperationContextPath, func(c *Client) error { _, err := c.MintSourceOperationContext(t.Context(), exampleSource) return err @@ -127,7 +129,7 @@ func TestBrokerFailuresPreserveStatus(t *testing.T) { case 503: want = ErrExecutionUnestablished } - for _, sentinel := range []error{ErrInvalidCredentials, ErrPermissionDenied, ErrDelegationInvalid, ErrDelegationMissing, ErrDelegationRevoked, ErrExecutionUnestablished} { + for _, sentinel := range []error{ErrInvalidCredentials, ErrPermissionDenied, ErrDelegationInvalid, ErrDelegationMissing, ErrDelegationRevoked, ErrExecutionUnestablished, ErrNoHostStateToMintFor} { if errors.Is(err, sentinel) != (sentinel == want) { t.Errorf("classification = %v, want only %v", err, want) } diff --git a/moduleauthority/client.go b/moduleauthority/client.go index 8c1aa92..eb31e88 100644 --- a/moduleauthority/client.go +++ b/moduleauthority/client.go @@ -60,6 +60,15 @@ var ( // ErrInvalidCapability: SaaS answered with a Work Context this client // refuses to hand out (malformed, expired, or issued for something else). ErrInvalidCapability = errors.New("module authority: SaaS returned an invalid Work Context") + // ErrNoHostStateToMintFor: the module is PROVEN and the host holds nothing + // to mint it a capability against (HTTP 412, which relays accounts' + // FailedPrecondition) — most usually a workload the host admits that is + // installed in no organization it may mint for, or a tenant that names no + // organization. Nothing is wrong with the credential and nothing is denied: + // a mint succeeds once the module is installed. It is distinct from + // ErrPermissionDenied for that reason, and from a 502, which is the gateway + // saying the host itself failed. + ErrNoHostStateToMintFor = errors.New("module authority: the host holds no state to mint this module a capability against") // ErrPermissionDenied: the module is proven but may not have what it asked // for (HTTP 403 from the operation mint: a binding that declares no // headless scopes, or one the module does not hold). diff --git a/moduleauthority/host_fake_test.go b/moduleauthority/host_fake_test.go index 18adbbb..e2c5d6f 100644 --- a/moduleauthority/host_fake_test.go +++ b/moduleauthority/host_fake_test.go @@ -334,6 +334,10 @@ type authorityCall struct { request *v1.ModuleExchangeDelegatedOperationAudienceRequest notice *v1.ModuleNotifyOrgAdminsRequest userNotice *v1.ModuleNotifyUserRequest + // authorityQuestion is one live-authority question, so a test can assert + // the capability travelled with it and that the identifiers are the + // capability's own. + authorityQuestion *v1.ModuleResolveWorkContextAuthorityRequest } // servedOnAuthority is the slice of business.ModuleAuthorityProcedures this @@ -349,6 +353,7 @@ var servedOnAuthority = map[string]bool{ accountsv1connect.ModuleCapabilitiesServiceExchangeDelegatedReadAudienceProcedure: true, accountsv1connect.ModuleCapabilitiesServiceNotifyOrgAdminsProcedure: true, accountsv1connect.ModuleCapabilitiesServiceNotifyUserProcedure: true, + accountsv1connect.ModuleCapabilitiesServiceResolveWorkContextAuthorityProcedure: true, } type fakeAuthority struct { @@ -358,6 +363,11 @@ type fakeAuthority struct { declarationError error // foreign answers an exchange with a token core does not decode. foreign bool + // authorityRefusal is the host's verdict on a live-authority question, + // configured before a call. nil answers the question. + authorityRefusal error + // authority is the live state this host answers, by question kind. + authority authorityState mu sync.Mutex calls []authorityCall @@ -411,6 +421,9 @@ func (a *fakeAuthority) handle(_ any, stream grpc.ServerStream) error { case accountsv1connect.ModuleCapabilitiesServiceNotifyUserProcedure: call.userNotice = &v1.ModuleNotifyUserRequest{} recvErr = stream.RecvMsg(call.userNotice) + case accountsv1connect.ModuleCapabilitiesServiceResolveWorkContextAuthorityProcedure: + call.authorityQuestion = &v1.ModuleResolveWorkContextAuthorityRequest{} + recvErr = stream.RecvMsg(call.authorityQuestion) default: recvErr = stream.RecvMsg(request) call.request = request @@ -514,6 +527,18 @@ func (a *fakeAuthority) handle(_ any, stream grpc.ServerStream) error { } return stream.SendMsg(&v1.ModuleNotifyUserResponse{NotificationId: "n-1", Delivered: n.GetCategory() != "marketing"}) } + if question := call.authorityQuestion; question != nil { + // ResolveWorkContextAuthority: one live-authority answer, or the + // host's refusal. + if a.authorityRefusal != nil { + return a.authorityRefusal + } + answer, err := a.answerAuthority(question) + if err != nil { + return err + } + return stream.SendMsg(answer) + } // The host's own message-level rule: a binding, and exactly one of the two // authority arms. Stated here so a client that sent both, or neither, is // caught by the fake the way the real surface would catch it. @@ -573,3 +598,126 @@ func (h host) assertNoStrayPaths(t *testing.T) { t.Fatalf("the client sent non-broker paths to the gateway: %v", stray) } } + +// authorityState is the live authority the fake host answers a verifier's +// questions from — the issuer's side of +// ModuleCapabilitiesService/ResolveWorkContextAuthority as +// module-saas-starter serves it. +// +// It is a fake of the ANSWERS and never of the client's translation: every +// state the wire can carry is settable, including the UNSPECIFIED a host that +// said nothing would send, so the client's refusals are exercised rather than +// assumed. +type authorityState struct { + sealState v1.WorkContextSealState + installationRevision uint64 + // installationID overrides the installation the answer is ABOUT, so a + // client that fails to notice an answer about something else is caught. + installationID string + principalState v1.WorkContextPrincipalState + epoch uint64 + principalID string + buildState v1.WorkContextApprovedBuildState + imageDigest string + incarnation uint64 + bindingState v1.WorkContextOperationBindingState + binding *v1.WorkContextOperationBindingAnswer + revision uint64 + ownerPrincipal string + grantState v1.WorkContextApprovalGrantState + emptyAnswer bool + mismatchedArm bool +} + +// answerAuthority renders one answer for one question. +func (a *fakeAuthority) answerAuthority( + question *v1.ModuleResolveWorkContextAuthorityRequest, +) (*v1.ModuleResolveWorkContextAuthorityResponse, error) { + if question == nil { + return nil, status.Error(codes.InvalidArgument, "no question") + } + state := a.authority + if state.emptyAnswer { + return &v1.ModuleResolveWorkContextAuthorityResponse{}, nil + } + if state.mismatchedArm { + // A host answering a different question than the one asked. The client + // must refuse rather than read it. + return &v1.ModuleResolveWorkContextAuthorityResponse{ + Answer: &v1.ModuleResolveWorkContextAuthorityResponse_AuthorizationRevision{ + AuthorizationRevision: &v1.WorkContextAuthorizationRevisionAnswer{Revision: 1}, + }, + }, nil + } + switch asked := question.GetQuestion().(type) { + case *v1.ModuleResolveWorkContextAuthorityRequest_Seal: + installation := asked.Seal.GetInstallationId() + if state.installationID != "" { + installation = state.installationID + } + return &v1.ModuleResolveWorkContextAuthorityResponse{ + Answer: &v1.ModuleResolveWorkContextAuthorityResponse_Seal{ + Seal: &v1.WorkContextSealAnswer{ + State: state.sealState, InstallationId: installation, + InstallationRevision: state.installationRevision, + }, + }, + }, nil + case *v1.ModuleResolveWorkContextAuthorityRequest_PrincipalEpoch: + principal := asked.PrincipalEpoch.GetPrincipalId() + if state.principalID != "" { + principal = state.principalID + } + return &v1.ModuleResolveWorkContextAuthorityResponse{ + Answer: &v1.ModuleResolveWorkContextAuthorityResponse_PrincipalEpoch{ + PrincipalEpoch: &v1.WorkContextPrincipalEpochAnswer{ + State: state.principalState, PrincipalId: principal, Epoch: state.epoch, + }, + }, + }, nil + case *v1.ModuleResolveWorkContextAuthorityRequest_ApprovedBuild: + principal := asked.ApprovedBuild.GetPrincipalId() + if state.principalID != "" { + principal = state.principalID + } + return &v1.ModuleResolveWorkContextAuthorityResponse{ + Answer: &v1.ModuleResolveWorkContextAuthorityResponse_ApprovedBuild{ + ApprovedBuild: &v1.WorkContextApprovedBuildAnswer{ + State: state.buildState, PrincipalId: principal, + ImageDigest: state.imageDigest, BuildIncarnation: state.incarnation, + }, + }, + }, nil + case *v1.ModuleResolveWorkContextAuthorityRequest_OperationBinding: + answer := state.binding + if answer == nil { + answer = &v1.WorkContextOperationBindingAnswer{ + State: state.bindingState, BindingId: asked.OperationBinding.GetBindingId(), + } + } + return &v1.ModuleResolveWorkContextAuthorityResponse{ + Answer: &v1.ModuleResolveWorkContextAuthorityResponse_OperationBinding{OperationBinding: answer}, + }, nil + case *v1.ModuleResolveWorkContextAuthorityRequest_AuthorizationRevision: + owner := asked.AuthorizationRevision.GetOwnerPrincipalId() + if state.ownerPrincipal != "" { + owner = state.ownerPrincipal + } + return &v1.ModuleResolveWorkContextAuthorityResponse{ + Answer: &v1.ModuleResolveWorkContextAuthorityResponse_AuthorizationRevision{ + AuthorizationRevision: &v1.WorkContextAuthorizationRevisionAnswer{ + OwnerPrincipalId: owner, Revision: state.revision, + }, + }, + }, nil + case *v1.ModuleResolveWorkContextAuthorityRequest_ApprovalGrant: + return &v1.ModuleResolveWorkContextAuthorityResponse{ + Answer: &v1.ModuleResolveWorkContextAuthorityResponse_ApprovalGrant{ + ApprovalGrant: &v1.WorkContextApprovalGrantAnswer{ + State: state.grantState, GrantId: asked.ApprovalGrant.GetGrantId(), + }, + }, + }, nil + } + return nil, status.Error(codes.InvalidArgument, "unknown question") +} diff --git a/moduleauthority/verifier_sources.go b/moduleauthority/verifier_sources.go new file mode 100644 index 0000000..ba539af --- /dev/null +++ b/moduleauthority/verifier_sources.go @@ -0,0 +1,462 @@ +package moduleauthority + +import ( + "context" + "errors" + "fmt" + "sync" + "time" + + corework "github.com/codefly-dev/core/workcontext" + + v1 "github.com/codefly-dev/saas-sdk-go/gen/saas/accounts/v1" + "github.com/codefly-dev/saas-sdk-go/gen/saas/accounts/v1/accountsv1connect" +) + +// The live authority behind a capability presented TO this module. +// +// A module that receives a Work Context is its callee, and a callee verifies at +// full strength. The checks a trust root alone answers — encoding, signature, +// issuer, audience, window, shape — are a forwarding hop's; the rest is the +// ISSUER'S live state: the installation a capability is sealed to and its +// revision, the epoch of every principal in its chain, the build the exercising +// principal runs, the operation binding it exercises, and the authorization +// revision. A module that stops at the hop's checks accepts a capability whose +// installation was revoked or whose principal's epoch has moved, for as long as +// that capability lives. +// +// This file is the CLIENT of those answers and nothing more. It verifies +// nothing: it holds no key, reads no signature, and makes no decision about a +// capability. Verification is core's, reached through sdk-go/workcontext's +// PinnedVerifier, and these three sources are what that verifier is given: +// +// sources, err := client.WorkContextSources(moduleauthority.WorkContextSourceSettings{ +// Capability: presented, // the capability this module is verifying +// }) +// verifier, err := workcontext.NewVerifier(workcontext.VerifierSettings{ +// Issuer: issuer, Audience: audience, +// Seals: sources, Revisions: sources, Grants: sources, +// Replay: replayStore, // the consumer's own, durable and shared +// }, keySet) +// +// That split is the rule this package already keeps for a token: the module is +// a holder and a sender, never a verifier. A source is a client of the issuer, +// which is this package's whole job; the verifier stays in sdk-go/workcontext. + +// ErrInvalidAuthorityQuestion: a source was asked something it will not send — +// an empty or non-canonical principal, installation or binding identifier, or a +// source built with an incomplete selector. Nothing is sent, because a +// malformed question cannot be answered safely: a host that resolved something +// adjacent would be compared against the capability as though it were the +// answer. +var ErrInvalidAuthorityQuestion = errors.New("module authority: invalid live-authority question") + +// ErrUnreadableAuthorityAnswer: the host answered something this client will not +// read — an answer on another arm than the question, an answer about another +// principal, installation or binding, or a state this client does not +// understand. It is a REFUSAL and never a permissive default: an answer that +// cannot be read is not evidence that a capability is still good. +var ErrUnreadableAuthorityAnswer = errors.New("module authority: unreadable live-authority answer") + +// A HOST REFUSAL AND A HOST OUTAGE ARE DIFFERENT ANSWERS, and a caller acts on +// them differently: `CodeFailedPrecondition` means the issuer decided and the +// authority the question asks about has changed — the capability is revoked, so +// mint again and do not retry — while `CodeUnavailable` means the lookup failed +// and a retry may succeed. They arrive as CONNECT codes, read with +// `connect.CodeOf`; grpc-go's `status.Code` answers Unknown for them, because +// this client calls over Connect. +// +// ErrNoApprovalGrant: the host records no approval grant under the id a +// capability's grant hop claims. Core's GrantSource has no absence sentinel, +// deliberately — a capability claiming an approval the issuer never made is not +// a credential — so this is an error, and a verifier refuses on it. +var ErrNoApprovalGrant = errors.New("module authority: the issuer records no such approval grant") + +// AuthorityCacheBound is the longest a resolved answer may be served from +// memory, and the ceiling WorkContextSources enforces on a configured one. +// +// A cache delays a revocation by at most its bound, so the bound is the +// security parameter. It is short enough to be a rounding error against the +// 15-minute capability ceiling and long enough to collapse the several +// questions one verification asks about the same principal into one round trip. +// +// Only POSITIVE answers are cached. A refusal is never cached: re-asking a +// question that refused costs one call and keeps a transient failure from +// becoming a sticky one. +const AuthorityCacheBound = 2 * time.Second + +// defaultAuthorityCacheEntries bounds how many answers are held, so a module +// verifying capabilities for many principals cannot grow this without limit. +const defaultAuthorityCacheEntries = 2048 + +// WorkContextSourceSettings is everything a source set is, besides the client. +// +// There is exactly one required field, and that is the design: the host answers +// only about the capability presented with each question, so the capability is +// the whole selector. The tenant, the audience and the owner used to be fields +// here; the host now reads all three off the capability it authenticates, which +// is what makes them its own statement rather than a caller's label. +type WorkContextSourceSettings struct { + // Capability is the Work Context this module is verifying, exactly as it + // was presented to it. It travels with every question. + // + // It is shape-checked here with core's structural reader and nothing more: + // this package holds Work Contexts and never verifies one. The host + // authenticates it, requires it to be addressed to this module and to its + // tenant, and refuses a question about anything it does not name — so a + // claim read off it here can only narrow what is asked, never widen what is + // answered. + Capability string + + // CacheBound is how long a positive answer may be served from memory. Zero + // means AuthorityCacheBound; a value above it is refused rather than + // clamped, because a clamp would serve a posture the caller did not choose + // and never tell them. + CacheBound time.Duration + + // CacheEntries bounds the cache. Zero means defaultAuthorityCacheEntries. A + // negative value disables caching, which is the strongest posture: every + // question is one call. + CacheEntries int + + // Now is the clock the cache reads. nil means time.Now. + Now func() time.Time +} + +// WorkContextSources answers the live authority behind ONE capability presented +// to this module. +// +// It implements core's SealSource, RevisionSource and GrantSource, and is handed +// to a verifier as all three. +type WorkContextSources struct { + client *Client + settings WorkContextSourceSettings + // owner is the capability's own owner, read off it with core's structural + // reader. The host checks it against the same capability, so a + // misreading here refuses rather than misanswers. + owner string + + mu sync.Mutex + cached map[string]cachedAuthorityAnswer +} + +type cachedAuthorityAnswer struct { + answer *v1.ModuleResolveWorkContextAuthorityResponse + until time.Time +} + +var ( + _ corework.SealSource = (*WorkContextSources)(nil) + _ corework.RevisionSource = (*WorkContextSources)(nil) + _ corework.GrantSource = (*WorkContextSources)(nil) +) + +// WorkContextSources builds the three sources for one presented capability, or +// refuses the settings by name. +// +// It is per capability because the host answers per capability. Building one is +// cheap — no call is made here — and a module verifying a stream of messages +// carrying the same capability keeps one and reuses it. +func (c *Client) WorkContextSources(settings WorkContextSourceSettings) (*WorkContextSources, error) { + if c == nil { + return nil, ErrInvalidAuthorityQuestion + } + if !sealed(settings.Capability) { + return nil, fmt.Errorf( + "%w: the capability is not structurally a sealed Work Context in core's encoding", + ErrInvalidAuthorityQuestion) + } + decoded, err := corework.Decode(settings.Capability) + if err != nil { + return nil, fmt.Errorf("%w: the capability could not be read", ErrInvalidAuthorityQuestion) + } + owner := decoded.Context().GetOwnerPrincipalId() + if owner == "" { + return nil, fmt.Errorf("%w: the capability names no owner", ErrInvalidAuthorityQuestion) + } + if settings.CacheBound > AuthorityCacheBound { + return nil, fmt.Errorf( + "%w: a cache bound of %s delays a revocation by that long; the ceiling is %s", + ErrInvalidAuthorityQuestion, settings.CacheBound, AuthorityCacheBound) + } + if settings.CacheBound == 0 { + settings.CacheBound = AuthorityCacheBound + } + if settings.CacheEntries == 0 { + settings.CacheEntries = defaultAuthorityCacheEntries + } + return &WorkContextSources{client: c, settings: settings, owner: owner}, nil +} + +func (s *WorkContextSources) now() time.Time { + if s.settings.Now == nil { + return time.Now() + } + return s.settings.Now() +} + +// ask sends one question, serving a positive answer from the cache while it is +// inside the bound. +// +// key is the question's identity. A cache keyed on anything less specific than +// the whole question would answer one question with another's answer, which is +// the failure a cache must not have. +func (s *WorkContextSources) ask( + ctx context.Context, key string, ask func(*v1.ModuleResolveWorkContextAuthorityRequest), +) (*v1.ModuleResolveWorkContextAuthorityResponse, error) { + if cached, ok := s.load(key); ok { + return cached, nil + } + request := &v1.ModuleResolveWorkContextAuthorityRequest{WorkContext: s.settings.Capability} + ask(request) + answer, err := callAsModule(ctx, s.client, + accountsv1connect.ModuleCapabilitiesServiceClient.ResolveWorkContextAuthority, request) + if err != nil { + return nil, err + } + if answer == nil { + return nil, ErrUnreadableAuthorityAnswer + } + s.store(key, answer) + return answer, nil +} + +func (s *WorkContextSources) load(key string) (*v1.ModuleResolveWorkContextAuthorityResponse, bool) { + if s.settings.CacheEntries < 0 { + return nil, false + } + s.mu.Lock() + defer s.mu.Unlock() + entry, held := s.cached[key] + if !held || !s.now().Before(entry.until) { + delete(s.cached, key) + return nil, false + } + return entry.answer, true +} + +func (s *WorkContextSources) store(key string, answer *v1.ModuleResolveWorkContextAuthorityResponse) { + if s.settings.CacheEntries < 0 { + return + } + s.mu.Lock() + defer s.mu.Unlock() + if s.cached == nil { + s.cached = make(map[string]cachedAuthorityAnswer, 8) + } + // At the bound, the whole cache is dropped rather than one entry evicted by + // age: this holds a handful of answers for a few seconds, and a dropped + // cache costs one extra call while a wrong eviction policy costs a reader's + // understanding of what is cached. + if len(s.cached) >= s.settings.CacheEntries { + s.cached = make(map[string]cachedAuthorityAnswer, 8) + } + s.cached[key] = cachedAuthorityAnswer{answer: answer, until: s.now().Add(s.settings.CacheBound)} +} + +// Seal answers the live installation one principal holds, for core's SealSource. +// +// The installation in the answer is compared against the one asked about before +// anything else is read: a host that resolved a different installation would +// make every comparison core then makes meaningless, and core checks this too. +// Checking it here as well is not duplication — it is this client refusing to +// carry an answer it cannot attribute. +func (s *WorkContextSources) Seal( + ctx context.Context, principalID, installationID string, +) (corework.Seal, error) { + if principalID == "" || installationID == "" { + return corework.Seal{}, fmt.Errorf("%w: seal", ErrInvalidAuthorityQuestion) + } + answer, err := s.ask(ctx, "seal\x00"+principalID+"\x00"+installationID, + func(request *v1.ModuleResolveWorkContextAuthorityRequest) { + request.Question = &v1.ModuleResolveWorkContextAuthorityRequest_Seal{ + Seal: &v1.WorkContextSealQuestion{ + PrincipalId: principalID, InstallationId: installationID, + }, + } + }) + if err != nil { + return corework.Seal{}, err + } + seal := answer.GetSeal() + if seal == nil || seal.GetInstallationId() != installationID { + return corework.Seal{}, fmt.Errorf("%w: seal", ErrUnreadableAuthorityAnswer) + } + switch seal.GetState() { + case v1.WorkContextSealState_WORK_CONTEXT_SEAL_STATE_HELD: + return corework.Seal{ + InstallationID: seal.GetInstallationId(), + InstallationRevision: seal.GetInstallationRevision(), + }, nil + case v1.WorkContextSealState_WORK_CONTEXT_SEAL_STATE_UNHELD: + // Core's own sentinel, which its verifier turns into a refusal of the + // capability rather than into an outage. + return corework.Seal{}, corework.ErrNoSeal + default: + return corework.Seal{}, fmt.Errorf("%w: seal state", ErrUnreadableAuthorityAnswer) + } +} + +// PrincipalEpoch answers one principal's live epoch. It is asked of the task +// owner and of every actor hop, which is what makes a delegated actor revocable +// on its own. +func (s *WorkContextSources) PrincipalEpoch(ctx context.Context, principalID string) (uint64, error) { + if principalID == "" { + return 0, fmt.Errorf("%w: principal epoch", ErrInvalidAuthorityQuestion) + } + answer, err := s.ask(ctx, "epoch\x00"+principalID, + func(request *v1.ModuleResolveWorkContextAuthorityRequest) { + request.Question = &v1.ModuleResolveWorkContextAuthorityRequest_PrincipalEpoch{ + PrincipalEpoch: &v1.WorkContextPrincipalEpochQuestion{PrincipalId: principalID}, + } + }) + if err != nil { + return 0, err + } + epoch := answer.GetPrincipalEpoch() + if epoch == nil || epoch.GetPrincipalId() != principalID { + return 0, fmt.Errorf("%w: principal epoch", ErrUnreadableAuthorityAnswer) + } + switch epoch.GetState() { + case v1.WorkContextPrincipalState_WORK_CONTEXT_PRINCIPAL_STATE_KNOWN: + return epoch.GetEpoch(), nil + case v1.WorkContextPrincipalState_WORK_CONTEXT_PRINCIPAL_STATE_UNKNOWN: + // A principal the issuer does not hold. Core turns this into a refusal; + // an epoch of zero would compare equal to a real epoch of zero and so + // would pass for exactly the capabilities that claim nothing. + return 0, corework.ErrNoSeal + default: + return 0, fmt.Errorf("%w: principal state", ErrUnreadableAuthorityAnswer) + } +} + +// ApprovedBuild answers what execution the issuer APPROVES for one principal — +// never what a workload presents, which is the caller's attestation and the +// other half of the comparison. +func (s *WorkContextSources) ApprovedBuild( + ctx context.Context, principalID string, +) (string, uint64, error) { + if principalID == "" { + return "", 0, fmt.Errorf("%w: approved build", ErrInvalidAuthorityQuestion) + } + answer, err := s.ask(ctx, "build\x00"+principalID, + func(request *v1.ModuleResolveWorkContextAuthorityRequest) { + request.Question = &v1.ModuleResolveWorkContextAuthorityRequest_ApprovedBuild{ + ApprovedBuild: &v1.WorkContextApprovedBuildQuestion{PrincipalId: principalID}, + } + }) + if err != nil { + return "", 0, err + } + build := answer.GetApprovedBuild() + if build == nil || build.GetPrincipalId() != principalID { + return "", 0, fmt.Errorf("%w: approved build", ErrUnreadableAuthorityAnswer) + } + switch build.GetState() { + case v1.WorkContextApprovedBuildState_WORK_CONTEXT_APPROVED_BUILD_STATE_APPROVED: + return build.GetImageDigest(), build.GetBuildIncarnation(), nil + case v1.WorkContextApprovedBuildState_WORK_CONTEXT_APPROVED_BUILD_STATE_BEARS_NO_EXECUTION: + // A person's session runs no approved build. This is the answer, not a + // failure — and it is NOT what an unknown principal gets, which the host + // refuses outright. + return "", 0, corework.ErrNoApprovedBuild + default: + return "", 0, fmt.Errorf("%w: approved-build state", ErrUnreadableAuthorityAnswer) + } +} + +// OperationBinding resolves one binding by its opaque id, exactly. There is no +// method that searches bindings for one whose scopes would admit a call: scope +// containment is not binding identity, and a revoked narrow capability must not +// validate through a wider binding. +func (s *WorkContextSources) OperationBinding( + ctx context.Context, bindingID string, +) (corework.OperationBinding, error) { + if bindingID == "" { + return corework.OperationBinding{}, fmt.Errorf("%w: operation binding", ErrInvalidAuthorityQuestion) + } + answer, err := s.ask(ctx, "binding\x00"+bindingID, + func(request *v1.ModuleResolveWorkContextAuthorityRequest) { + request.Question = &v1.ModuleResolveWorkContextAuthorityRequest_OperationBinding{ + OperationBinding: &v1.WorkContextOperationBindingQuestion{BindingId: bindingID}, + } + }) + if err != nil { + return corework.OperationBinding{}, err + } + binding := answer.GetOperationBinding() + if binding == nil || binding.GetBindingId() != bindingID { + return corework.OperationBinding{}, fmt.Errorf("%w: operation binding", ErrUnreadableAuthorityAnswer) + } + switch binding.GetState() { + case v1.WorkContextOperationBindingState_WORK_CONTEXT_OPERATION_BINDING_STATE_RESOLVED: + return corework.OperationBinding{ + ID: binding.GetBindingId(), + PrincipalID: binding.GetPrincipalId(), + InstallationID: binding.GetInstallationId(), + Revision: binding.GetRevision(), + Incarnation: binding.GetIncarnation(), + Revoked: binding.GetRevoked(), + }, nil + case v1.WorkContextOperationBindingState_WORK_CONTEXT_OPERATION_BINDING_STATE_ABSENT: + return corework.OperationBinding{}, corework.ErrNoBinding + default: + return corework.OperationBinding{}, fmt.Errorf("%w: binding state", ErrUnreadableAuthorityAnswer) + } +} + +// AuthorizationRevision answers the revision a capability owned by this source's +// owner carries, for core's RevisionSource. +// +// Core passes only the tenant, and this source does not compare it: the host +// answers for the tenant the presented capability names and refuses one in any +// other organization, so there is no second tenant for an answer to be about. +// The owner is the capability's own. +func (s *WorkContextSources) AuthorizationRevision(ctx context.Context, _ string) (uint64, error) { + answer, err := s.ask(ctx, "revision\x00"+s.owner, + func(request *v1.ModuleResolveWorkContextAuthorityRequest) { + request.Question = &v1.ModuleResolveWorkContextAuthorityRequest_AuthorizationRevision{ + AuthorizationRevision: &v1.WorkContextAuthorizationRevisionQuestion{ + OwnerPrincipalId: s.owner, + }, + } + }) + if err != nil { + return 0, err + } + revision := answer.GetAuthorizationRevision() + if revision == nil || revision.GetOwnerPrincipalId() != s.owner { + return 0, fmt.Errorf("%w: authorization revision", ErrUnreadableAuthorityAnswer) + } + return revision.GetRevision(), nil +} + +// Grant resolves the approval a capability's grant hop claims. +// +// The host answers NOT_RECORDED today, because it records no approval grants, +// and this returns an error for it: core's GrantSource has no absence sentinel, +// so "the issuer never made that decision" is a refusal. A state this client +// does not understand is also a refusal, which is what makes the day the host +// starts recording grants fail closed here rather than open. +func (s *WorkContextSources) Grant(ctx context.Context, grantID string) (*corework.Grant, error) { + if grantID == "" { + return nil, fmt.Errorf("%w: approval grant", ErrInvalidAuthorityQuestion) + } + answer, err := s.ask(ctx, "grant\x00"+grantID, + func(request *v1.ModuleResolveWorkContextAuthorityRequest) { + request.Question = &v1.ModuleResolveWorkContextAuthorityRequest_ApprovalGrant{ + ApprovalGrant: &v1.WorkContextApprovalGrantQuestion{GrantId: grantID}, + } + }) + if err != nil { + return nil, err + } + grant := answer.GetApprovalGrant() + if grant == nil || grant.GetGrantId() != grantID { + return nil, fmt.Errorf("%w: approval grant", ErrUnreadableAuthorityAnswer) + } + if grant.GetState() == v1.WorkContextApprovalGrantState_WORK_CONTEXT_APPROVAL_GRANT_STATE_NOT_RECORDED { + return nil, fmt.Errorf("%w: %q", ErrNoApprovalGrant, grantID) + } + return nil, fmt.Errorf("%w: approval-grant state", ErrUnreadableAuthorityAnswer) +} diff --git a/moduleauthority/verifier_sources_test.go b/moduleauthority/verifier_sources_test.go new file mode 100644 index 0000000..f951dc8 --- /dev/null +++ b/moduleauthority/verifier_sources_test.go @@ -0,0 +1,390 @@ +package moduleauthority + +import ( + "context" + "errors" + "testing" + "time" + + "connectrpc.com/connect" + corework "github.com/codefly-dev/core/workcontext" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + v1 "github.com/codefly-dev/saas-sdk-go/gen/saas/accounts/v1" +) + +// The live-authority sources, against the fake host. +// +// What these hold is the half of the contract this module owns: that each +// question carries the capability and the identifiers the host will check, and +// that every answer is TRANSLATED and never interpreted. The host's own half — +// which capability a module may ask about, and what the live answers are — is +// held in module-saas-starter, by a test that drives sdk-go/workcontext's +// PinnedVerifier against the real handler. +// +// Every state the wire can carry is exercised, including the UNSPECIFIED a host +// that said nothing would send and an answer on the wrong arm, because those +// are the cases where a client that guessed would turn the strongest check in +// the model into the easiest to defeat. + +func authoritySources(t *testing.T, h host, state authorityState) (*WorkContextSources, *Client) { + t.Helper() + client := h.client(t, moduleCredentials) + h.authority.authority = state + sources, err := client.WorkContextSources(WorkContextSourceSettings{ + Capability: sealedToken("verified.capability"), + // No cache, so each test counts the calls its own question makes. + CacheEntries: -1, + }) + if err != nil { + t.Fatalf("WorkContextSources: %v", err) + } + return sources, client +} + +// Every question carries the capability, and the identifiers it asks about are +// the ones the host will hold against that capability. The owner is read off +// the capability rather than taken from the consumer: one fewer value to get +// wrong, and the host refuses a misreading anyway. +func TestEveryAuthorityQuestionCarriesTheCapability(t *testing.T) { + h := newHost(t) + sources, _ := authoritySources(t, h, authorityState{ + principalState: v1.WorkContextPrincipalState_WORK_CONTEXT_PRINCIPAL_STATE_KNOWN, + epoch: 7, + revision: 12, + }) + + epoch, err := sources.PrincipalEpoch(context.Background(), corework.FixturePrincipal) + if err != nil || epoch != 7 { + t.Fatalf("PrincipalEpoch = %d, %v; want 7, nil", epoch, err) + } + revision, err := sources.AuthorizationRevision(context.Background(), corework.FixtureTenant) + if err != nil || revision != 12 { + t.Fatalf("AuthorizationRevision = %d, %v; want 12, nil", revision, err) + } + + calls := h.authority.snapshot() + questions := 0 + for _, call := range calls { + question := call.authorityQuestion + if question == nil { + continue + } + questions++ + if question.GetWorkContext() != sealedToken("verified.capability") { + t.Error("a question travelled without the capability it is about") + } + if revision := question.GetAuthorizationRevision(); revision != nil && + revision.GetOwnerPrincipalId() != corework.FixturePrincipal { + t.Errorf("the revision question names owner %q, not the capability's", revision.GetOwnerPrincipalId()) + } + } + if questions != 2 { + t.Fatalf("made %d questions, want 2", questions) + } +} + +// Each negative state is core's own sentinel, because a verifier turns each into +// a REFUSAL of the capability rather than into an outage. +func TestEveryAbsenceStateBecomesCoresSentinel(t *testing.T) { + for _, probe := range []struct { + what string + state authorityState + call func(*WorkContextSources) error + want error + }{ + { + what: "an installation the principal does not hold", + state: authorityState{sealState: v1.WorkContextSealState_WORK_CONTEXT_SEAL_STATE_UNHELD}, + call: func(s *WorkContextSources) error { + _, err := s.Seal(context.Background(), corework.FixturePrincipal, corework.FixtureInstallation) + return err + }, + want: corework.ErrNoSeal, + }, + { + what: "a principal the issuer does not hold", + state: authorityState{principalState: v1.WorkContextPrincipalState_WORK_CONTEXT_PRINCIPAL_STATE_UNKNOWN}, + call: func(s *WorkContextSources) error { + _, err := s.PrincipalEpoch(context.Background(), corework.FixturePrincipal) + return err + }, + want: corework.ErrNoSeal, + }, + { + what: "a principal that bears no execution", + state: authorityState{buildState: v1.WorkContextApprovedBuildState_WORK_CONTEXT_APPROVED_BUILD_STATE_BEARS_NO_EXECUTION}, + call: func(s *WorkContextSources) error { + _, _, err := s.ApprovedBuild(context.Background(), corework.FixturePrincipal) + return err + }, + want: corework.ErrNoApprovedBuild, + }, + { + what: "a binding the issuer does not hold", + state: authorityState{bindingState: v1.WorkContextOperationBindingState_WORK_CONTEXT_OPERATION_BINDING_STATE_ABSENT}, + call: func(s *WorkContextSources) error { + _, err := s.OperationBinding(context.Background(), "source-delegation/x/y") + return err + }, + want: corework.ErrNoBinding, + }, + { + what: "an approval the issuer never recorded", + state: authorityState{grantState: v1.WorkContextApprovalGrantState_WORK_CONTEXT_APPROVAL_GRANT_STATE_NOT_RECORDED}, + call: func(s *WorkContextSources) error { + _, err := s.Grant(context.Background(), "g-1") + return err + }, + want: ErrNoApprovalGrant, + }, + } { + t.Run(probe.what, func(t *testing.T) { + sources, _ := authoritySources(t, newHost(t), probe.state) + if err := probe.call(sources); !errors.Is(err, probe.want) { + t.Fatalf("%s: got %v, want %v", probe.what, err, probe.want) + } + }) + } +} + +// AN ANSWER THIS CLIENT CANNOT READ IS A REFUSAL, never a permissive default. +// A host that said nothing (UNSPECIFIED), answered a different question, or +// answered about something else is refused — and the refusal is this module's +// own sentinel, so a caller can tell it from a capability that is simply +// revoked. +func TestAnUnreadableAnswerIsRefused(t *testing.T) { + for _, probe := range []struct { + what string + state authorityState + call func(*WorkContextSources) error + }{ + { + what: "no seal state", + state: authorityState{}, + call: func(s *WorkContextSources) error { + _, err := s.Seal(context.Background(), corework.FixturePrincipal, corework.FixtureInstallation) + return err + }, + }, + { + what: "no principal state", + state: authorityState{}, + call: func(s *WorkContextSources) error { + _, err := s.PrincipalEpoch(context.Background(), corework.FixturePrincipal) + return err + }, + }, + { + what: "no approved-build state", + state: authorityState{}, + call: func(s *WorkContextSources) error { + _, _, err := s.ApprovedBuild(context.Background(), corework.FixturePrincipal) + return err + }, + }, + { + what: "no binding state", + state: authorityState{}, + call: func(s *WorkContextSources) error { + _, err := s.OperationBinding(context.Background(), "b-1") + return err + }, + }, + { + what: "no grant state", + state: authorityState{}, + call: func(s *WorkContextSources) error { + _, err := s.Grant(context.Background(), "g-1") + return err + }, + }, + { + what: "an answer about another installation", + state: authorityState{sealState: v1.WorkContextSealState_WORK_CONTEXT_SEAL_STATE_HELD, installationID: "another-installation"}, + call: func(s *WorkContextSources) error { + _, err := s.Seal(context.Background(), corework.FixturePrincipal, corework.FixtureInstallation) + return err + }, + }, + { + what: "an answer about another principal", + state: authorityState{principalState: v1.WorkContextPrincipalState_WORK_CONTEXT_PRINCIPAL_STATE_KNOWN, epoch: 3, principalID: "someone-else"}, + call: func(s *WorkContextSources) error { + _, err := s.PrincipalEpoch(context.Background(), corework.FixturePrincipal) + return err + }, + }, + { + what: "an answer on another arm", + state: authorityState{mismatchedArm: true}, + call: func(s *WorkContextSources) error { + _, err := s.PrincipalEpoch(context.Background(), corework.FixturePrincipal) + return err + }, + }, + { + what: "an empty answer", + state: authorityState{emptyAnswer: true}, + call: func(s *WorkContextSources) error { + _, err := s.PrincipalEpoch(context.Background(), corework.FixturePrincipal) + return err + }, + }, + } { + t.Run(probe.what, func(t *testing.T) { + sources, _ := authoritySources(t, newHost(t), probe.state) + if err := probe.call(sources); !errors.Is(err, ErrUnreadableAuthorityAnswer) { + t.Fatalf("%s: got %v, want ErrUnreadableAuthorityAnswer", probe.what, err) + } + }) + } +} + +// A host refusal travels as it is, and the CODE survives the trip. The client +// adds no interpretation: the difference between "the issuer decided" +// (FailedPrecondition — the capability is revoked, mint again) and "the lookup +// failed" (Unavailable — retry) is the host's to state and the caller's to act +// on, so it has to arrive readable. +// +// It arrives as a connect code, which is what a caller reads: this client calls +// over Connect, so `connect.CodeOf` is the accessor and grpc's `status.Code` +// answers Unknown for the same error. +func TestAHostRefusalTravelsWithItsCode(t *testing.T) { + for _, refusal := range []struct { + sent error + want connect.Code + }{ + {status.Error(codes.FailedPrecondition, "the authority it asks about has changed"), connect.CodeFailedPrecondition}, + {status.Error(codes.Unavailable, "the lookup failed"), connect.CodeUnavailable}, + {status.Error(codes.PermissionDenied, "caller denied"), connect.CodePermissionDenied}, + } { + h := newHost(t) + sources, _ := authoritySources(t, h, authorityState{}) + h.authority.authorityRefusal = refusal.sent + + _, err := sources.PrincipalEpoch(context.Background(), corework.FixturePrincipal) + + if connect.CodeOf(err) != refusal.want { + t.Fatalf("got %v (%s), want %s", err, connect.CodeOf(err), refusal.want) + } + } +} + +// A capability this module cannot even read structurally is refused BEFORE a +// call: core's reader decides that, and a question about an unreadable +// capability is one the host would refuse anyway. +func TestSourcesRefuseACapabilityThatIsNotOne(t *testing.T) { + h := newHost(t) + client := h.client(t, moduleCredentials) + + for _, capability := range []string{"", "not-a-work-context", corework.FixtureForeignToken()} { + if _, err := client.WorkContextSources(WorkContextSourceSettings{Capability: capability}); !errors.Is(err, ErrInvalidAuthorityQuestion) { + t.Fatalf("capability %q: got %v, want ErrInvalidAuthorityQuestion", capability, err) + } + } + for _, call := range h.authority.snapshot() { + if call.authorityQuestion != nil { + t.Fatal("a question was sent for a capability that could not be read") + } + } +} + +// A cache bound above the ceiling is REFUSED rather than clamped: a cached +// answer delays a revocation by at most its bound, so the bound is a posture +// the caller chooses and must be told about when it cannot have it. +func TestACacheBoundAboveTheCeilingIsRefused(t *testing.T) { + client := newHost(t).client(t, moduleCredentials) + + _, err := client.WorkContextSources(WorkContextSourceSettings{ + Capability: sealedToken("verified.capability"), + CacheBound: AuthorityCacheBound + time.Second, + }) + + if !errors.Is(err, ErrInvalidAuthorityQuestion) { + t.Fatalf("got %v, want ErrInvalidAuthorityQuestion", err) + } +} + +// The cache serves one answer for at most its bound, and a question that is not +// the same question is not served from it. +func TestTheCacheServesOneAnswerForAtMostItsBound(t *testing.T) { + h := newHost(t) + client := h.client(t, moduleCredentials) + now := time.Now() + sources, err := client.WorkContextSources(WorkContextSourceSettings{ + Capability: sealedToken("verified.capability"), + CacheBound: time.Second, + Now: func() time.Time { return now }, + }) + if err != nil { + t.Fatalf("WorkContextSources: %v", err) + } + h.authority.authority = authorityState{ + principalState: v1.WorkContextPrincipalState_WORK_CONTEXT_PRINCIPAL_STATE_KNOWN, epoch: 4, + } + + for range 3 { + if _, err := sources.PrincipalEpoch(context.Background(), corework.FixturePrincipal); err != nil { + t.Fatalf("PrincipalEpoch: %v", err) + } + } + if asked := authorityQuestions(h); asked != 1 { + t.Fatalf("asked %d times inside the bound, want 1", asked) + } + + // Another principal is another question, so it is asked rather than served + // from the first one's answer. A cache keyed on anything less specific than + // the whole question would answer one question with another's answer. + if _, err := sources.PrincipalEpoch(context.Background(), "another-principal"); err != nil { + t.Fatalf("PrincipalEpoch for another principal: %v", err) + } + if asked := authorityQuestions(h); asked != 2 { + t.Fatalf("asked %d times, want 2: a different question is not the cached one", asked) + } + + // Past the bound, the answer is read again — which is what makes the bound + // the longest a revocation can be delayed. + now = now.Add(2 * time.Second) + if _, err := sources.PrincipalEpoch(context.Background(), corework.FixturePrincipal); err != nil { + t.Fatalf("PrincipalEpoch after the bound: %v", err) + } + if asked := authorityQuestions(h); asked != 3 { + t.Fatalf("asked %d times after the bound, want 3", asked) + } +} + +// A REFUSAL IS NEVER CACHED. Re-asking a question that refused costs one call +// and keeps a transient failure from becoming a sticky one. +func TestARefusalIsNotCached(t *testing.T) { + h := newHost(t) + client := h.client(t, moduleCredentials) + sources, err := client.WorkContextSources(WorkContextSourceSettings{ + Capability: sealedToken("verified.capability"), + }) + if err != nil { + t.Fatalf("WorkContextSources: %v", err) + } + h.authority.authorityRefusal = status.Error(codes.Unavailable, "the lookup failed") + + for range 2 { + if _, err := sources.PrincipalEpoch(context.Background(), corework.FixturePrincipal); err == nil { + t.Fatal("the host refused; the source must too") + } + } + + if asked := authorityQuestions(h); asked != 2 { + t.Fatalf("asked %d times, want 2: a refusal must not be cached", asked) + } +} + +func authorityQuestions(h host) int { + asked := 0 + for _, call := range h.authority.snapshot() { + if call.authorityQuestion != nil { + asked++ + } + } + return asked +}