Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix(api): redact three stored secrets on read paths, free the eight reads they blocked (#21205)
Vincent Huang8887ab048acc
diff --git a/backend/api/auth/auth_test.go b/backend/api/auth/auth_test.goindex a9587aac7b..5264cf1e46 100644--- a/backend/api/auth/auth_test.go+++ b/backend/api/auth/auth_test.go@@ -72,14 +72,17 @@ func TestMCPMethodClassOfProcedure(t *testing.T) {{"/bytebase.v1.AuthService/Login", v1pb.MCPMethodClass_FORBIDDEN},{"/bytebase.v1.UserService/UpdateUser", v1pb.MCPMethodClass_FORBIDDEN},{"/bytebase.v1.WorkspaceService/LeaveWorkspace", v1pb.MCPMethodClass_FORBIDDEN},- // The serving classes resolve through the same path. Nothing acts on- // them yet — the gate that selects between them is a later change — so- // these pin resolution, not enforcement. Every v1 RPC now carries a- // class, which is why none of these is UNSPECIFIED.+ // The serving classes resolve through the same path, and the gate acts+ // on whatever this returns, so these pin resolution rather than the+ // classification decision itself — mcp_gate_test.go owns that. Every v1+ // RPC carries a class, which is why none of these is UNSPECIFIED.{"/bytebase.v1.DatabaseService/GetDatabase", v1pb.MCPMethodClass_READ},{"/bytebase.v1.IssueService/CreateIssue", v1pb.MCPMethodClass_WRITE},{"/bytebase.v1.UserService/GetUser", v1pb.MCPMethodClass_EXCLUDED},- {"/bytebase.v1.ProjectService/ListProjects", v1pb.MCPMethodClass_EXCLUDED},+ // ListProjects was EXCLUDED for returning webhook URLs verbatim. The+ // URL is write-only now, so it is an ordinary read again, and an agent+ // that cannot list projects cannot reach a database at all.+ {"/bytebase.v1.ProjectService/ListProjects", v1pb.MCPMethodClass_READ},} {got, err := MCPMethodClassOfProcedure(tc.procedure)require.NoError(t, err, tc.procedure)diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yamlindex ba006eb441..5d3cc1ca33 100644--- a/backend/api/mcp/gen/openapi.yaml+++ b/backend/api/mcp/gen/openapi.yaml@@ -20311,7 +20311,12 @@ components:Format: projects/{project}webhook:title: webhook- description: The webhook to test. Identified by its url.+ description: |-+ The webhook to test.++ The url is what gets posted to. Reads do not return a saved webhook's url,+ so leave url empty and set name to test the one already stored; set url to+ test a url before saving it.$ref: '#/components/schemas/bytebase.v1.Webhook'title: TestWebhookRequestadditionalProperties: false@@ -21176,7 +21181,36 @@ components:url:type: stringtitle: url- description: url is the url of the webhook, should be unique within the project.+ description: |-+ url is the url of the webhook, should be unique within the project.++ Write-only: an incoming-webhook url is the whole credential for posting+ into the customer's chat, so reads leave it empty, the same way a data+ source's password and SSL material are left empty. Set it to change it;+ read url_set to know whether one is configured.++ Required to create a webhook. Not required on TestWebhook, where an empty+ url on a request that names a webhook means the one already stored, so the+ field carries no REQUIRED behavior it would contradict there.+ urlSet:+ type: boolean+ title: url_set+ description: |-+ Whether a url is configured, since the url itself does not come back on+ reads.+ urlSupportsDirectMessage:+ type: boolean+ title: url_supports_direct_message+ description: |-+ Whether the stored url's endpoint form can carry a direct message to the+ users an event mentions, rather than only a post to the channel the url+ names. False for a Microsoft Teams Power Automate workflow endpoint, which+ direct messages bypass entirely: a webhook with direct_message set sends+ them and returns, so the workflow post never happens.++ Reads do not return the url, so a client editing a saved webhook cannot+ work this out for itself. It is a fact about the stored url and says+ nothing about what the url is.directMessage:type: booleantitle: direct_messagediff --git a/backend/api/mcp/openapi_index_refused_test.go b/backend/api/mcp/openapi_index_refused_test.goindex a04d1ae7fe..536cf0effb 100644--- a/backend/api/mcp/openapi_index_refused_test.go+++ b/backend/api/mcp/openapi_index_refused_test.go@@ -45,11 +45,29 @@ func TestRefusedEndpointsAreNotAdvertised(t *testing.T) {})t.Run("a service whose every method is refused is not listed at all", func(t *testing.T) {- // Every ProjectService read returns the incoming-webhook URL verbatim- // and every write administers the workspace, so the whole service is- // EXCLUDED. Nothing about it is offered.- require.NotContains(t, idx.Services(), "ProjectService")- require.Empty(t, idx.GetServiceEndpoints("ProjectService"))+ // Every identity-provider method is refused: the writes choose what+ // will later be trusted to mint a credential, and the reads are+ // workspace administration. Nothing about the service is offered.+ require.NotContains(t, idx.Services(), "IdentityProviderService")+ require.Empty(t, idx.GetServiceEndpoints("IdentityProviderService"))+ })++ t.Run("a service keeps only the methods a ceiling serves", func(t *testing.T) {+ // ProjectService is the mixed case. Its four reads are served now that+ // the webhook URL no longer rides out on them; its writes administer+ // the workspace and TestWebhook posts to a third party, so those stay+ // refused and stay unadvertised.+ var served []string+ for _, ep := range idx.GetServiceEndpoints("ProjectService") {+ served = append(served, ep.OperationID)+ }+ require.ElementsMatch(t, []string{+ "bytebase.v1.ProjectService.GetProject",+ "bytebase.v1.ProjectService.ListProjects",+ "bytebase.v1.ProjectService.BatchGetProjects",+ "bytebase.v1.ProjectService.SearchProjects",+ }, served)+ require.Contains(t, idx.Services(), "ProjectService")})t.Run("absent from search", func(t *testing.T) {diff --git a/backend/api/mcp/tool_search_test.go b/backend/api/mcp/tool_search_test.goindex 999c9dea0c..95cd9fa6f6 100644--- a/backend/api/mcp/tool_search_test.go+++ b/backend/api/mcp/tool_search_test.go@@ -28,10 +28,13 @@ func TestSearchAPIListServices(t *testing.T) {require.Contains(t, text, "SQLService")require.Contains(t, text, "DatabaseService")// A service the MCP ceiling serves nothing of is not on the menu.- // ProjectService is the clearest case: its reads return the- // incoming-webhook URL verbatim and its writes administer the workspace,- // so every one of its methods is refused.- require.NotContains(t, text, "ProjectService")+ // IdentityProviderService is the clearest case: its writes choose what will+ // later be trusted to mint a credential and its reads are workspace+ // administration, so every one of its methods is refused.+ require.NotContains(t, text, "IdentityProviderService")+ // ProjectService is the mixed case, on the menu with only its reads: an+ // agent that cannot name a project cannot reach a database at all.+ require.Contains(t, text, "ProjectService")}func TestSearchAPIByService(t *testing.T) {diff --git a/backend/api/v1/instance_service_converter.go b/backend/api/v1/instance_service_converter.goindex 69307db2f2..60ad89c4e5 100644--- a/backend/api/v1/instance_service_converter.go+++ b/backend/api/v1/instance_service_converter.go@@ -54,10 +54,20 @@ func convertInstanceRoles(instance *store.InstanceMessage, roles []*storepb.Instb.Grow(len(common.InstanceNamePrefix) + len(instance.ResourceID) + 1 + len(common.RolePrefix) + 20)for _, role := range roles {+ // We don't return the credential in the role attribute on reads. On+ // MariaDB the attribute is raw SHOW GRANTS text, which carries the+ // account's password hash inline. The grant list around it is what the+ // console renders, so the field stays and the credential is masked+ // inside it; see redactRoleAttribute for what the mask takes with it.+ var attribute *string+ if role.Attribute != nil {+ redacted := redactRoleAttribute(*role.Attribute)+ attribute = &redacted+ }v1Roles = append(v1Roles, &v1pb.InstanceRole{Name: buildRoleName(&b, instance.ResourceID, instance.ProjectID, role.Name),RoleName: role.Name,- Attribute: role.Attribute,+ Attribute: attribute,})}return v1Rolesdiff --git a/backend/api/v1/mcp_gate.go b/backend/api/v1/mcp_gate.goindex 75dde2d0f4..08a0e2a0b8 100644--- a/backend/api/v1/mcp_gate.go+++ b/backend/api/v1/mcp_gate.go@@ -210,7 +210,11 @@ var mcpDenialReasons = map[v1pb.MCPDenialReason]mcpDenialWording{v1pb.MCPDenialReason_READS_OTHER_USERS_SQL: {v1pb.MCPMethodClass_EXCLUDED, "it returns SQL that other people wrote, across the workspace or past the sharing that keeps a saved query private"},v1pb.MCPDenialReason_OPENS_AN_ADMIN_CONNECTION: {v1pb.MCPMethodClass_EXCLUDED, "it opens an admin-credentialed connection to the database and returns other sessions' live, unmasked SQL"},v1pb.MCPDenialReason_SENDS_DATA_TO_A_THIRD_PARTY: {v1pb.MCPMethodClass_EXCLUDED, "it spends a stored workspace credential to send whatever the caller passes to a third party"},- v1pb.MCPDenialReason_RETURNS_A_STORED_SECRET: {v1pb.MCPMethodClass_EXCLUDED, "its response carries a stored secret that the product redacts everywhere else"},+ // No method carries this one: the three leaks it was written for are+ // redacted on the read path and their eight methods are READ. The row+ // stays so the next read found leaking is one annotation away from a+ // denial that explains itself, rather than two edits away.+ v1pb.MCPDenialReason_RETURNS_A_STORED_SECRET: {v1pb.MCPMethodClass_EXCLUDED, "its response carries a stored secret that the product redacts everywhere else"},}// The fallback wording, per class, for a method whose reason is unset, unknown@@ -288,9 +292,9 @@ type mcpCeilingReader interface {//// A policy denial is recorded whatever the method's audit annotation says: the// gate marks the outcome and the audit interceptor records it (see-// common.SetMCPPolicyDenied). 47 of the 121 refused methods carry no audit+// common.SetMCPPolicyDenied). 39 of the 113 refused methods carry no audit// annotation — the 4 FORBIDDEN ones that were silent before this gate-// (Refresh, SwitchWorkspace, TestIdentityProvider, TestEmailSetting) plus 43+// (Refresh, SwitchWorkspace, TestIdentityProvider, TestEmailSetting) plus 35// EXCLUDED ones — and TestEmailSetting and TestIdentityProvider are the rows an// operator would most want, since each would have carried a stored secret to an// address the agent chose. Recording requests that were never recorded is whydiff --git a/backend/api/v1/mcp_gate_test.go b/backend/api/v1/mcp_gate_test.goindex cc1b3b3275..69c06f70f3 100644--- a/backend/api/v1/mcp_gate_test.go+++ b/backend/api/v1/mcp_gate_test.go@@ -480,8 +480,8 @@ func TestLintClausesFireWhenBroken(t *testing.T) {v1pb.MCPMethodClass_READ, v1pb.MCPMethodClass_WRITE, v1pb.MCPMethodClass_EXCLUDED,},}- // The real rows are passed deliberately: 93 of them carry EXCLUDED, and- // the diagnosis worth reading is the one about the table, not ninety-three+ // The real rows are passed deliberately: 85 of them carry EXCLUDED, and+ // the diagnosis worth reading is the one about the table, not eighty-five// about methods whose annotation is fine. Two modes, so the mode list in// the message is only stable because servedBy is sorted.require.Equal(t, []string{"EXCLUDED is denied and served by [READ_ONLY READ_WRITE]"},@@ -551,39 +551,80 @@ func TestForbiddenClassLeavesReadsAlone(t *testing.T) {}}-// TestExcludedOnlyForALeak pins the population that is excluded for a defect-// rather than for what the method is. Every row here is an ordinary read that-// belongs in a serving class on its merits, and is out only because its-// response carries a stored secret the product already redacts elsewhere. The-// leak is the thing to fix; when one is fixed its row leaves this test and-// becomes READ, which is a reviewed widening rather than a silent one.+// TestExcludedOnlyForALeak pins that nothing is excluded for a defect any+// more. RETURNS_A_STORED_SECRET named eight ordinary reads that belonged in a+// serving class on their merits and were out only because their responses+// carried a stored secret. The redaction closed all three leaks, so the eight+// are READ and this population is empty. That was the retirement path the+// reason was written for, and an empty list is what walking it looks like.//-// Each entry names the leak and the redaction that closes it:+// The list going non-empty again is a deliberate decision either way: a new+// read found leaking is annotated with this reason on purpose, and adding it+// here alongside is the second signature. What the list must never do is fill+// up quietly.+//+// The three leaks, and where the redaction that closed each one lives://// - The four project reads share convertToProject-// (project_service_converter.go:264), which copies the incoming-webhook URL-// out verbatim. That URL is a bearer credential — whoever holds it posts-// into the customer's Slack, Feishu, WeCom or Teams as Bytebase — and this-// repo already treats it as one: redactWebhook masks it in audit rows-// (audit.go:914) beside the OIDC client secret and the LDAP bind password.-// ListProjects pages the whole workspace, so one call takes the lot.+// (project_service_converter.go), which copied the incoming-webhook URL out+// verbatim. That URL is a bearer credential — whoever holds it posts into+// the customer's Slack, Feishu, WeCom or Teams as Bytebase — and this repo+// already treated it as one: redactWebhook masks it in audit rows+// (audit.go) beside the OIDC client secret and the LDAP bind password.+// ListProjects pages the whole workspace, so one call took the lot. The url+// is write-only now, the way a data source's password is: reads leave it+// empty and url_set says whether one is configured. TestWebhook takes the+// stored url when the request names a webhook and sends none of its own.//// - The two instance reads and ListInstanceRoles share InstanceRole.Attribute-// (instance_service_converter.go:57), which is the raw SHOW GRANTS text the-// MySQL driver stores (plugin/db/mysql/role.go:38). On MariaDB that text-// carries "IDENTIFIED BY PASSWORD '<hash>'", so the response hands over-// every database account's password hash. The data-source half of the very-// same converter gets this right and says so: "We don't return the password-// and SSLs on reads" (instance_service_converter.go:253).+// (convertInstanceRoles, instance_service_converter.go), which is the raw+// SHOW GRANTS text the MySQL driver stores (plugin/db/mysql/role.go). On+// MariaDB that text carries "IDENTIFIED BY PASSWORD '<hash>'", so the+// response handed over every database account's password hash. The+// credential clause is now masked in place (redactRoleAttribute,+// read_redaction.go) and the grant list around it still renders. The+// data-source half of the very same converter always got this right and+// says so: "We don't return the password and SSLs on reads".//-// - GetCurrentUser returns temp_otp_secret and temp_recovery_codes whenever-// the subject is the caller (user_service.go:742), so a session reading its-// own profile during an MFA-setup window captures the TOTP seed. The window-// is opened by the human in the console, not by the agent — UpdateUser,-// which starts it, is FORBIDDEN — which makes this the narrowest of the-// three and still a stored secret in a response body.+// - GetCurrentUser returned temp_otp_secret and temp_recovery_codes whenever+// the subject was the caller, so a session reading its own profile during+// an MFA-setup window captured the TOTP seed. GetUser on yourself did the+// same, which is why the fix is in convertToUser rather than in one RPC.+// Reads lose both fields. The two UpdateUser requests that drive the+// enrollment keep them, through convertToUserMintingMFAEnrollment; the rest+// of UpdateUser does not. UpdateUser is FORBIDDEN either way, so that+// response is not a surface an agent reaches.func TestExcludedOnlyForALeak(t *testing.T) {- want := []string{+ var got []string+ for _, row := range mcpClassificationsFromDescriptors(t) {+ if row.reason == v1pb.MCPDenialReason_RETURNS_A_STORED_SECRET {+ got = append(got, row.procedure)+ }+ }+ require.Empty(t, got,+ "a read excluded for a leak has to be a deliberate decision, recorded here as well as on the annotation")+}++// TestTheLeakingReadsAreServed is the other half of the same decision: the+// eight methods the redaction freed are READ, not merely no longer carrying+// the reason.+//+// Dropping the reason and leaving the class EXCLUDED does not need this test —+// checkReasonsMatchTheClass already refuses a refused method that records no+// reason. What needs it is re-excluding these rows under a different reason+// that is valid on its own terms, which ADMINISTERS_THE_WORKSPACE is for most+// of them. Probed: with GetProject annotated EXCLUDED and+// ADMINISTERS_THE_WORKSPACE, every lint passes, TestExcludedOnlyForALeak+// passes because the reason is not the leak one, and the inventory regenerates+// clean. Only this test objects, and what it is objecting to is the live+// regression coming back — an MCP session unable to name a project or an+// instance, and so unable to reach a database at all.+func TestTheLeakingReadsAreServed(t *testing.T) {+ class := map[string]v1pb.MCPMethodClass{}+ for _, row := range mcpClassificationsFromDescriptors(t) {+ class[row.procedure] = row.class+ }+ for _, procedure := range []string{v1connect.ProjectServiceGetProjectProcedure,v1connect.ProjectServiceListProjectsProcedure,v1connect.ProjectServiceBatchGetProjectsProcedure,@@ -592,17 +633,29 @@ func TestExcludedOnlyForALeak(t *testing.T) {v1connect.InstanceServiceListInstancesProcedure,v1connect.InstanceRoleServiceListInstanceRolesProcedure,v1connect.UserServiceGetCurrentUserProcedure,+ } {+ require.Equal(t, v1pb.MCPMethodClass_READ, class[procedure],+ "%s was excluded only for a leak that is now redacted; a read-only session needs it to reach a database at all", procedure)}- var got []string- for _, row := range mcpClassificationsFromDescriptors(t) {- if row.reason == v1pb.MCPDenialReason_RETURNS_A_STORED_SECRET {- got = append(got, row.procedure)- }++ // The reads that stay out, and why they are a different question. Identity+ // and credential administration is a scope decision, not a defect, so+ // redacting a leak does not touch it — GetUser and BatchGetUsers read other+ // people's accounts, and ListQueryHistories reads other people's SQL.+ // convertToUser was fixed for all of them regardless, because the leak was+ // live for human callers on GetUser too.+ for _, procedure := range []string{+ v1connect.UserServiceGetUserProcedure,+ v1connect.UserServiceBatchGetUsersProcedure,+ v1connect.UserServiceListUsersProcedure,+ v1connect.QueryHistoryServiceListQueryHistoriesProcedure,+ v1connect.SQLServiceListQueryHistoriesProcedure,+ v1connect.SQLServiceAdminExecuteProcedure,+ v1connect.ProjectServiceTestWebhookProcedure,+ } {+ require.Equal(t, v1pb.MCPMethodClass_EXCLUDED, class[procedure],+ "%s is excluded for what it does, which no redaction changes", procedure)}- slices.Sort(want)- slices.Sort(got)- require.Equal(t, want, got,- "this population is excluded for a leak, not for what the method is; adding or removing one is a deliberate decision")}// TestDeprecatedSQLServiceAliasesMatchTheirCanonicalMethod pins the three@@ -758,7 +811,7 @@ func classContext(class v1pb.MCPMethodClass) *common.AuthContext {// outright and proves the gate refuses it under the most permissive ceiling// there is. FORBIDDEN was already enforced; EXCLUDED is what this PR turns from// a recorded classification into a denial, and it is the larger population by-// far — 93 methods the console and the public API serve today.+// far — 85 methods the console and the public API serve today.func TestMCPGateRefusesTheDeniedClasses(t *testing.T) {for _, row := range mcpClassificationsFromDescriptors(t) {if row.class != v1pb.MCPMethodClass_FORBIDDEN && row.class != v1pb.MCPMethodClass_EXCLUDED {diff --git a/backend/api/v1/project_service.go b/backend/api/v1/project_service.goindex 4942bf3829..9bcc5a4f0f 100644--- a/backend/api/v1/project_service.go+++ b/backend/api/v1/project_service.go@@ -923,6 +923,36 @@ func (s *ProjectService) RemoveWebhook(ctx context.Context, req *connect.Requestreturn connect.NewResponse(convertToProject(project)), nil}+// storedWebhookURL reads back the URL of a saved webhook, for the one caller+// that needs it: TestWebhook, when the client has no URL to send because the+// read path does not return one. The URL is used to post the test notification+// and is never returned, and the caller already holds bb.projects.update on the+// project, which is what it takes to set that URL in the first place.+//+// The webhook has to belong to the project the request named. The ACL runs+// against that project, so without this check a caller holding the permission+// on one project could make the server post through another project's webhook.+func (s *ProjectService) storedWebhookURL(ctx context.Context, projectID, webhookName string) (string, error) {+ nameProjectID, webhookID, err := common.GetProjectIDWebhookID(webhookName)+ if err != nil {+ return "", connect.NewError(connect.CodeInvalidArgument, errors.Wrap(err, "invalid webhook name"))+ }+ if nameProjectID != projectID {+ return "", connect.NewError(connect.CodeInvalidArgument, errors.Errorf("webhook %q does not belong to project %q", webhookName, projectID))+ }+ webhook, err := s.store.GetProjectWebhook(ctx, &store.FindProjectWebhookMessage{+ ProjectID: &projectID,+ ResourceID: &webhookID,+ })+ if err != nil {+ return "", connect.NewError(connect.CodeInternal, err)+ }+ if webhook == nil {+ return "", connect.NewError(connect.CodeNotFound, errors.Errorf("webhook %q not found", webhookID))+ }+ return webhook.Payload.GetUrl(), nil+}+// TestWebhook tests a webhook.func (s *ProjectService) TestWebhook(ctx context.Context, req *connect.Request[v1pb.TestWebhookRequest]) (*connect.Response[v1pb.TestWebhookResponse], error) {externalURL, err := utils.GetEffectiveExternalURL(ctx, s.store, s.profile, common.GetWorkspaceIDFromContext(ctx))@@ -953,8 +983,33 @@ func (s *ProjectService) TestWebhook(ctx context.Context, req *connect.Request[vreturn nil, connect.NewError(connect.CodeInvalidArgument, err)}+ // Reads leave a saved webhook's URL empty, so a client testing one cannot+ // send the real URL: it never had it. An empty URL on a request that names+ // a webhook means "the one already stored", and that is what gets posted+ // to. Testing a URL the caller typed still works unchanged, which is what+ // the create form does.+ urlFromStore := false+ if webhook.Payload.GetUrl() == "" && req.Msg.Webhook.GetName() != "" {+ storedURL, err := s.storedWebhookURL(ctx, project.ResourceID, req.Msg.Webhook.GetName())+ if err != nil {+ return nil, err+ }+ webhook.Payload.Url = storedURL+ urlFromStore = true+ }+// Validate webhook URL against allowed domainsif err := webhookplugin.ValidateWebhookURL(webhook.Payload.GetType(), webhook.Payload.GetUrl()); err != nil {+ if urlFromStore {+ // The validator withholds the URL but names its hostname, and the+ // caller chose the type it was validated against, so echoing that+ // message would let anyone read a stored webhook's host back by+ // testing it as the wrong type. For a Teams webhook that host is+ // per-customer. The type is the actionable half and the only half+ // they supplied.+ return nil, connect.NewError(connect.CodeInvalidArgument,+ errors.Errorf("the stored webhook URL is not a valid %s webhook URL", webhook.Payload.GetType()))+ }return nil, connect.NewError(connect.CodeInvalidArgument, errors.Wrapf(err, "invalid webhook URL"))}@@ -1005,7 +1060,15 @@ func (s *ProjectService) TestWebhook(ctx context.Context, req *connect.Request[v},)if err != nil {- resp.Error = err.Error()+ // Most posters wrap their failure with the URL they posted to, and this+ // response is the one place that error reaches a caller. A caller who+ // typed the URL gets the message in full; one testing a stored URL gets+ // the status code and nothing else.+ if urlFromStore {+ resp.Error = storedWebhookDeliveryFailure(err)+ } else {+ resp.Error = err.Error()+ }}return connect.NewResponse(resp), nildiff --git a/backend/api/v1/project_service_converter.go b/backend/api/v1/project_service_converter.goindex 0412483c81..3520d760eb 100644--- a/backend/api/v1/project_service_converter.go+++ b/backend/api/v1/project_service_converter.go@@ -13,6 +13,7 @@ import ("github.com/bytebase/bytebase/backend/common"storepb "github.com/bytebase/bytebase/backend/generated-go/store"v1pb "github.com/bytebase/bytebase/backend/generated-go/v1"+ webhookplugin "github.com/bytebase/bytebase/backend/plugin/webhook""github.com/bytebase/bytebase/backend/store")@@ -257,13 +258,21 @@ func convertToStoreIamPolicyMember(member string) (string, error) {func convertToProject(projectMessage *store.ProjectMessage) *v1pb.Project {var projectWebhooks []*v1pb.Webhookfor _, webhook := range projectMessage.Webhooks {+ // We don't return the webhook URL on reads. An incoming-webhook URL is+ // the whole credential: whoever holds it posts into the customer's+ // Slack, Feishu, WeCom or Teams as Bytebase. url_set carries the one+ // thing a client still needs, which is whether one is configured, and+ // TestWebhook takes the stored URL when the request names a webhook and+ // leaves url empty.projectWebhooks = append(projectWebhooks, &v1pb.Webhook{Name: fmt.Sprintf("%s/%s%s", common.FormatProject(projectMessage.ResourceID), common.WebhookIDPrefix, webhook.ResourceID),Type: convertToV1WebhookType(webhook.Payload.GetType()),Title: webhook.Payload.GetTitle(),- Url: webhook.Payload.GetUrl(),+ UrlSet: webhook.Payload.GetUrl() != "",NotificationTypes: convertToV1ActivityTypes(webhook.Payload.GetActivities()),DirectMessage: webhook.Payload.GetDirectMessage(),+ UrlSupportsDirectMessage: webhookplugin.URLSupportsDirectMessage(+ webhook.Payload.GetType(), webhook.Payload.GetUrl()),})}diff --git a/backend/api/v1/read_redaction.go b/backend/api/v1/read_redaction.gonew file mode 100644index 0000000000..4e799d8297--- /dev/null+++ b/backend/api/v1/read_redaction.go@@ -0,0 +1,95 @@+package v1++import (+ "fmt"+ "regexp"+)++// Read-path redaction for the values a whole field cannot simply be emptied of.+//+// A stored secret must not come back out of a read. The instance converter has+// said so about data-source credentials for a long time — "We don't return the+// password and SSLs on reads" — and where the whole field is the secret, the+// proto says so too: INPUT_ONLY on the field, an OUTPUT_ONLY <field>_set bool+// beside it for the one thing a client still needs to know. A project's chat+// webhook URL is now shaped that way.+//+// What is left here is the case that shape does not fit: an instance role's+// attribute is grant text a DBA reads, with a credential clause buried inside+// it, so the field stays and the clause is masked.+//+// This is not the audit redaction in audit.go. That one masks what gets+// LOGGED; this masks what gets RETURNED to the caller. The values overlap+// because they are the same secrets, but the two run on different paths and+// neither can stand in for the other.++// redactedValue stands in for a secret inside a larger string a read does+// return. Nothing that has to parse a real value will mistake it for one.+const redactedValue = "<redacted>"++// mysqlGrantCredential matches the credential clause SHOW GRANTS writes into a+// grant line on the MySQL family. MariaDB emits every form; MySQL 8.0 and+// 5.7.44 emit none, so this is a no-op there.+//+// GRANT ... TO `u`@`%` IDENTIFIED BY PASSWORD '*05A6C9A5...'+// GRANT ... TO `u`@`%` IDENTIFIED VIA ed25519 USING 'ZIgUREUg...'+// GRANT ... TO `u`@`%` IDENTIFIED VIA ed25519 USING 'A' OR mysql_native_password USING '*B'+//+// The quoted run is matched greedily, to the last quote on the line, and that+// is deliberate. MariaDB does not escape a quote inside the stored auth+// string: an auth string of ab'cd comes back as USING 'ab'cd', which is not+// even re-parseable SQL. A lazy match would stop at the inner quote and return+// the rest of the secret. Greedy can only ever take too much — a REQUIRE+// SUBJECT '<dn>' following the credential goes into the mask with it — and+// taking too much of a grant line is a display cost, where taking too little+// is the leak this exists to close. The clauses that carry no quotes, REQUIRE+// SSL and WITH GRANT OPTION, sit outside the match and survive.+//+// The keyword is required, so an attribute that is not MySQL grant text is+// left alone: PostgreSQL, Redshift and CockroachDB store role keywords,+// Snowflake stores GRANT statements, Elasticsearch stores a role list, and+// none of them can match.+var mysqlGrantCredential = regexp.MustCompile(`(IDENTIFIED (?:BY|VIA) [^'\n]*)'[^\n]*'`)++// redactRoleAttribute masks the credential clause in an instance role's+// attribute text, which on MariaDB carries every database account's password+// hash — enough to clone the account onto another server, and to crack+// offline. The rest of the text is the grant list a DBA reads, so it stays.+func redactRoleAttribute(attribute string) string {+ return mysqlGrantCredential.ReplaceAllString(attribute, "${1}'"+redactedValue+"'")+}++// deliveryStatusCode pulls the HTTP status out of a webhook poster's failure.+//+// That status is the one thing from the message a caller who cannot see the URL+// is allowed to learn, and it is matched rather than the URL removed. The+// difference matters: removing the URL means knowing every rendering the stack+// can produce of it, and three rounds of that missed a different one each time+// — the re-encoded form net/http prints, the form it prints after rewriting+// embedded userinfo, and the scheme-less path it prints when a host answers a+// redirect with a relative Location. The last one is the whole credential for+// Slack, Discord and Feishu, whose secret lives in the path. An allowlist+// cannot lose that race, because a rendering nobody anticipated is not on it.+var deliveryStatusCode = regexp.MustCompile(`status code: (\d{3})`)++// storedWebhookDeliveryFailure describes a failed test post to a URL the caller+// cannot read. The status code says what to do about it — a 404 means the hook+// was revoked and has to be re-created — and nothing else from the poster's+// message comes back.+//+// That costs something, and knowingly. The response body often carries the+// vendor's own reason (invalid_payload, channel_not_found), and three posters+// return the body alone with no URL around it, so those failures come back as+// the generic sentence. Keeping the body would mean trusting arbitrary remote+// text not to contain the request path, which is the bet this function exists+// because we lost.+//+// A caller testing a URL they typed gets the poster's message in full. They+// supplied the URL, so there is nothing to withhold from them, and the full+// diagnosis is what makes the create form's Test button worth pressing.+func storedWebhookDeliveryFailure(err error) string {+ if match := deliveryStatusCode.FindStringSubmatch(err.Error()); match != nil {+ return fmt.Sprintf("the stored webhook URL answered with status code %s", match[1])+ }+ return "the test notification could not be delivered to the stored webhook URL"+}diff --git a/backend/api/v1/read_redaction_test.go b/backend/api/v1/read_redaction_test.gonew file mode 100644index 0000000000..dbbfa5fcd9--- /dev/null+++ b/backend/api/v1/read_redaction_test.go@@ -0,0 +1,248 @@+package v1++import (+ "testing"++ "github.com/pkg/errors"+ "github.com/stretchr/testify/require"++ storepb "github.com/bytebase/bytebase/backend/generated-go/store"+ v1pb "github.com/bytebase/bytebase/backend/generated-go/v1"+ "github.com/bytebase/bytebase/backend/store"+)++// TestRedactRoleAttributeMasksTheCredential walks the grant text a MySQL-family+// server actually returns. Every input here was read off a live server rather+// than written from the manual: MariaDB 11.4.12 for the leaking forms, MySQL+// 8.0.46 and 5.7.44 for the ones that carry no credential, and the remaining+// engines' attributes are what their own role.go builds.+//+// The forms matter more than the count. MariaDB has four ways of putting a+// credential on a grant line and one way of naming an auth plugin without one,+// and a mask that handles the first form and not the fourth reads as fixed+// while still handing over a password hash.+func TestRedactRoleAttributeMasksTheCredential(t *testing.T) {+ for _, tc := range []struct {+ name string+ in string+ want string+ }{+ {+ name: "mariadb native password hash, the common case",+ in: "GRANT SELECT ON *.* TO `leaky`@`%` IDENTIFIED BY PASSWORD '*05A6C9A570CCFE4FA5048183ECB511DA6E6414C9'",+ want: "GRANT SELECT ON *.* TO `leaky`@`%` IDENTIFIED BY PASSWORD '<redacted>'",+ },+ {+ name: "the clauses after the credential survive it",+ in: "GRANT ALL PRIVILEGES ON *.* TO `root`@`%` IDENTIFIED BY PASSWORD '*3D3B92F242033365AE5BC6A8E6FC3E1679F4140A' WITH GRANT OPTION",+ want: "GRANT ALL PRIVILEGES ON *.* TO `root`@`%` IDENTIFIED BY PASSWORD '<redacted>' WITH GRANT OPTION",+ },+ {+ name: "REQUIRE SSL survives too",+ in: "GRANT USAGE ON *.* TO `sslguy`@`%` IDENTIFIED BY PASSWORD '*B69027D44F6E5EDC07F1AEAD1477967B16F28227' REQUIRE SSL",+ want: "GRANT USAGE ON *.* TO `sslguy`@`%` IDENTIFIED BY PASSWORD '<redacted>' REQUIRE SSL",+ },+ {+ name: "mariadb pluggable auth, a different keyword for the same secret",+ in: "GRANT USAGE ON *.* TO `edguy`@`%` IDENTIFIED VIA ed25519 USING 'ZIgUREUg5PVgQ6LskhXmO+eZLS0nC8be6HPjYWR4YJY'",+ want: "GRANT USAGE ON *.* TO `edguy`@`%` IDENTIFIED VIA ed25519 USING '<redacted>'",+ },+ {+ name: "two auth methods on one line, and neither may survive",+ in: "GRANT USAGE ON *.* TO `multi`@`%` IDENTIFIED VIA ed25519 USING 'GvRmi9ungFjJD9sKjaq/T3CL1LmO2CLpz5I42gnB7Eg' OR mysql_native_password USING '*F33AE6DD04EF4C7C1D3105568E7FB7C1EE16C937'",+ want: "GRANT USAGE ON *.* TO `multi`@`%` IDENTIFIED VIA ed25519 USING '<redacted>'",+ },+ {+ // MariaDB does not escape a quote inside the stored auth string:+ // an auth string of ab'cd\\ef comes back exactly like this, which+ // is not re-parseable SQL. Matching to the first inner quote would+ // return the rest of the secret.+ name: "an unescaped quote inside the secret does not end the mask",+ in: "GRANT USAGE ON *.* TO `quoteguy`@`%` IDENTIFIED VIA ed25519 USING 'ab'cd\\\\ef'",+ want: "GRANT USAGE ON *.* TO `quoteguy`@`%` IDENTIFIED VIA ed25519 USING '<redacted>'",+ },+ {+ name: "an auth plugin that stores no secret keeps its name",+ in: "GRANT USAGE ON *.* TO `sockguy`@`%` IDENTIFIED VIA unix_socket",+ want: "GRANT USAGE ON *.* TO `sockguy`@`%` IDENTIFIED VIA unix_socket",+ },+ {+ name: "the grant lines that carry no credential are untouched",+ in: "GRANT `devrole` TO `leaky`@`%`\nGRANT SELECT ON *.* TO `leaky`@`%` IDENTIFIED BY PASSWORD '*05A6C9A570CCFE4FA5048183ECB511DA6E6414C9'",+ want: "GRANT `devrole` TO `leaky`@`%`\nGRANT SELECT ON *.* TO `leaky`@`%` IDENTIFIED BY PASSWORD '<redacted>'",+ },+ {+ name: "mysql 8.0 says nothing about the password",+ in: "GRANT SELECT ON *.* TO `leaky`@`%`",+ want: "GRANT SELECT ON *.* TO `leaky`@`%`",+ },+ {+ name: "mysql 5.7.44 does not either",+ in: "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION",+ want: "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION",+ },+ {+ name: "postgres stores role keywords, not grant text",+ in: "Superuser Create role Create DB Password valid until 2027-01-01 00:00:00+00",+ want: "Superuser Create role Create DB Password valid until 2027-01-01 00:00:00+00",+ },+ {+ name: "snowflake stores grants with no auth clause",+ in: "GRANT ROLE \"ANALYST\" TO USER \"ALICE\", GRANT ROLE \"LOADER\" TO USER \"ALICE\"",+ want: "GRANT ROLE \"ANALYST\" TO USER \"ALICE\", GRANT ROLE \"LOADER\" TO USER \"ALICE\"",+ },+ {+ name: "elasticsearch stores a role list",+ in: "[superuser, kibana_admin]",+ want: "[superuser, kibana_admin]",+ },+ {+ name: "empty stays empty",+ in: "",+ want: "",+ },+ } {+ t.Run(tc.name, func(t *testing.T) {+ require.Equal(t, tc.want, redactRoleAttribute(tc.in))+ })+ }+}++// TestConvertInstanceRolesRedactsOnTheReadPath holds the redaction at the+// converter both instance reads and ListInstanceRoles go through, rather than+// only at the function they call. It also pins that the stored role is left+// alone: the response is a copy, and a converter that masked in place would+// corrupt the cached instance for everything else reading it.+func TestConvertInstanceRolesRedactsOnTheReadPath(t *testing.T) {+ leaking := "GRANT ALL PRIVILEGES ON *.* TO `root`@`%` IDENTIFIED BY PASSWORD '*3D3B92F242033365AE5BC6A8E6FC3E1679F4140A' WITH GRANT OPTION"+ stored := []*storepb.InstanceRole{+ {Name: "root", Attribute: &leaking},+ {Name: "nameless"},+ }+ roles := convertInstanceRoles(&store.InstanceMessage{ResourceID: "mariadb"}, stored)++ require.Len(t, roles, 2)+ require.Equal(t, "instances/mariadb/roles/root", roles[0].Name)+ require.NotContains(t, roles[0].GetAttribute(), "3D3B92F242033365AE5BC6A8E6FC3E1679F4140A",+ "a read must not return the account's password hash")+ require.Contains(t, roles[0].GetAttribute(), "WITH GRANT OPTION",+ "the grants a DBA reads have to survive the mask")+ require.Nil(t, roles[1].Attribute, "a role with no attribute stays that way rather than gaining an empty one")+ require.Equal(t, leaking, *stored[0].Attribute, "the stored role must not be masked in place")+}++// TestConvertToProjectWithholdsTheWebhookURL pins the other converter. The four+// project reads share it, so one assertion covers GetProject, ListProjects,+// BatchGetProjects and SearchProjects; the write RPCs return a project through+// the same converter, which is correct, because the caller of AddWebhook is the+// one who supplied the URL and does not need it read back.+//+// url_set is what a client reads instead, so it can say a webhook is configured+// without being told what to. The rest of the webhook stays: type, title,+// events and the direct-message flag are configuration, not a credential, and a+// client still has to be able to list what is configured and edit it.+func TestConvertToProjectWithholdsTheWebhookURL(t *testing.T) {+ const storedURL = "https://hooks.slack.com/services/fixture-not-a-real-token"+ project := convertToProject(&store.ProjectMessage{+ ResourceID: "chat",+ Setting: &storepb.Project{},+ Webhooks: []*store.ProjectWebhookMessage{+ {+ ResourceID: "1",+ Payload: &storepb.ProjectWebhook{+ Type: storepb.WebhookType_SLACK,+ Title: "release channel",+ Url: storedURL,+ Activities: []storepb.Activity_Type{storepb.Activity_ISSUE_CREATED},+ },+ },+ {+ ResourceID: "2",+ Payload: &storepb.ProjectWebhook{Type: storepb.WebhookType_SLACK, Title: "no url yet"},+ },+ {+ // The one URL form direct messages bypass. The console hides+ // the option for it and cannot see the URL to know that.+ ResourceID: "3",+ Payload: &storepb.ProjectWebhook{+ Type: storepb.WebhookType_TEAMS,+ Title: "power automate flow",+ Url: "https://default1234.aa.environment.api.powerplatform.com/powerautomate/automations/direct/workflows/abc/triggers/manual/paths/invoke",+ },+ },+ },+ })++ require.Len(t, project.Webhooks, 3)+ require.Empty(t, project.Webhooks[0].Url,+ "the incoming-webhook URL is the credential; a read must not return it")+ require.True(t, project.Webhooks[0].UrlSet,+ "a configured webhook still reads back as configured")+ require.True(t, project.Webhooks[0].UrlSupportsDirectMessage,+ "and the console still learns what it can no longer work out from the URL")+ require.Equal(t, "release channel", project.Webhooks[0].Title)+ require.Equal(t, []v1pb.Activity_Type{v1pb.Activity_ISSUE_CREATED}, project.Webhooks[0].NotificationTypes)+ require.False(t, project.Webhooks[1].UrlSet,+ "a webhook with no URL must not read back as one that has one")+ require.False(t, project.Webhooks[2].UrlSupportsDirectMessage,+ "a Power Automate workflow endpoint is the URL direct messages bypass")+}++// TestStoredWebhookDeliveryFailure pins the other exit a webhook URL could+// leave by. Every poster wraps its failure with the URL it posted to, and+// TestWebhook hands that message to a caller the read path withholds the URL+// from, so a deliberately failing test would otherwise read it straight back.+//+// The inputs below are what a real client produced against a real server, and+// they are why the summary is built from what is recognised rather than by+// removing the URL: the last two carry the URL in a form with no scheme and no+// host, which no amount of removing URL-shaped text would have caught.+func TestStoredWebhookDeliveryFailure(t *testing.T) {+ const storedURL = "https://hooks.example.com/services/T00/B00/SUPERSECRETTOKEN"+ for _, tc := range []struct {+ name string+ err error+ want string+ }{+ {+ name: "a status code is what the caller can act on",+ err: errors.Errorf("failed to POST webhook to %s, status code: 404, response body: no_service", storedURL),+ want: "the stored webhook URL answered with status code 404",+ },+ {+ // The vendor sometimes echoes the request path into the body, so+ // the body does not come back even when a status code does.+ name: "and the response body does not come with it",+ err: errors.Errorf("failed to POST webhook to %s, status code: 404, response body: no_service for /services/T00/B00/SUPERSECRETTOKEN", storedURL),+ want: "the stored webhook URL answered with status code 404",+ },+ {+ name: "a transport failure has no status to report",+ err: errors.Errorf("failed to POST webhook to %s: Post %q: dial tcp 127.0.0.1:1: connect: connection refused", storedURL, storedURL),+ want: "the test notification could not be delivered to the stored webhook URL",+ },+ {+ // net/http prints a scheme-less, host-less URL when the host+ // answers a redirect with a relative Location, and for Slack,+ // Discord and Feishu that path is the whole credential.+ name: "a redirect loop names the path with no scheme or host",+ err: errors.Errorf(`failed to POST webhook to %s: Post "/services/T00/B00/SUPERSECRETTOKEN": stopped after 10 redirects`, storedURL),+ want: "the test notification could not be delivered to the stored webhook URL",+ },+ {+ // And so does a URL stored with a space in its path, which+ // url.Parse accepts and the poster wraps verbatim.+ name: "a stored URL with a space in its path",+ err: errors.New(`failed to POST webhook to https://hooks.example.com/services/T00 SUPERSECRETTOKEN: Post "https://hooks.example.com/services/T00%20SUPERSECRETTOKEN": context deadline exceeded`),+ want: "the test notification could not be delivered to the stored webhook URL",+ },+ } {+ t.Run(tc.name, func(t *testing.T) {+ got := storedWebhookDeliveryFailure(tc.err)+ require.Equal(t, tc.want, got)+ require.NotContains(t, got, "SUPERSECRETTOKEN",+ "the path is the credential for Slack, Discord and Feishu")+ require.NotContains(t, got, "hooks.example.com")+ })+ }+}diff --git a/backend/api/v1/testdata/mcp_method_classification.md b/backend/api/v1/testdata/mcp_method_classification.mdindex 1fa26fd37d..0fc8b08f02 100644--- a/backend/api/v1/testdata/mcp_method_classification.md+++ b/backend/api/v1/testdata/mcp_method_classification.md@@ -16,9 +16,9 @@ served by no ceiling.| Class | Methods | Meaning ||---|---|---|-| READ | 48 | served to a read-only session and above |+| READ | 56 | served to a read-only session and above || WRITE | 40 | served to a read-write session only |-| EXCLUDED | 93 | served by no ceiling this phase ships |+| EXCLUDED | 85 | served by no ceiling this phase ships || FORBIDDEN | 28 | never served, whatever the ceiling || MCP_METHOD_CLASS_UNSPECIFIED | 0 | unclassified — CI rejects this, and the gate refuses it || **total** | **209** | |@@ -82,15 +82,15 @@ served by no ceiling.| IdentityProviderService/ListIdentityProviders | EXCLUDED | ADMINISTERS_THE_WORKSPACE | — || IdentityProviderService/TestIdentityProvider | FORBIDDEN | MINTS_CREDENTIAL_FOR_OTHERS | bb.identityProviders.update || IdentityProviderService/UpdateIdentityProvider | FORBIDDEN | MINTS_CREDENTIAL_FOR_OTHERS | bb.identityProviders.update |-| InstanceRoleService/ListInstanceRoles | EXCLUDED | RETURNS_A_STORED_SECRET | bb.instanceRoles.list |+| InstanceRoleService/ListInstanceRoles | READ | — | bb.instanceRoles.list || InstanceService/AddDataSource | EXCLUDED | ADMINISTERS_THE_WORKSPACE | bb.instances.update || InstanceService/BatchSyncInstances | WRITE | — | bb.instances.sync || InstanceService/BatchUpdateInstances | EXCLUDED | ADMINISTERS_THE_WORKSPACE | bb.instances.update || InstanceService/CreateInstance | EXCLUDED | ADMINISTERS_THE_WORKSPACE | bb.instances.create || InstanceService/DeleteInstance | EXCLUDED | ADMINISTERS_THE_WORKSPACE | bb.instances.delete |-| InstanceService/GetInstance | EXCLUDED | RETURNS_A_STORED_SECRET | bb.instances.get |+| InstanceService/GetInstance | READ | — | bb.instances.get || InstanceService/ListInstanceDatabase | EXCLUDED | ADMINISTERS_THE_WORKSPACE | bb.instances.get |-| InstanceService/ListInstances | EXCLUDED | RETURNS_A_STORED_SECRET | bb.instances.list |+| InstanceService/ListInstances | READ | — | bb.instances.list || InstanceService/RemoveDataSource | EXCLUDED | ADMINISTERS_THE_WORKSPACE | bb.instances.update || InstanceService/SyncInstance | WRITE | — | bb.instances.sync || InstanceService/UndeleteInstance | EXCLUDED | ADMINISTERS_THE_WORKSPACE | bb.instances.undelete |@@ -123,14 +123,14 @@ served by no ceiling.| PlanService/UpdatePlan | WRITE | — | bb.plans.update || ProjectService/AddWebhook | EXCLUDED | ADMINISTERS_THE_WORKSPACE | bb.projects.update || ProjectService/BatchDeleteProjects | EXCLUDED | ADMINISTERS_THE_WORKSPACE | bb.projects.delete |-| ProjectService/BatchGetProjects | EXCLUDED | RETURNS_A_STORED_SECRET | bb.projects.get |+| ProjectService/BatchGetProjects | READ | — | bb.projects.get || ProjectService/CreateProject | EXCLUDED | ADMINISTERS_THE_WORKSPACE | bb.projects.create || ProjectService/DeleteProject | EXCLUDED | ADMINISTERS_THE_WORKSPACE | bb.projects.delete || ProjectService/GetIamPolicy | EXCLUDED | ADMINISTERS_THE_WORKSPACE | bb.projects.getIamPolicy |-| ProjectService/GetProject | EXCLUDED | RETURNS_A_STORED_SECRET | bb.projects.get |-| ProjectService/ListProjects | EXCLUDED | RETURNS_A_STORED_SECRET | bb.projects.list |+| ProjectService/GetProject | READ | — | bb.projects.get |+| ProjectService/ListProjects | READ | — | bb.projects.list || ProjectService/RemoveWebhook | EXCLUDED | ADMINISTERS_THE_WORKSPACE | bb.projects.update |-| ProjectService/SearchProjects | EXCLUDED | RETURNS_A_STORED_SECRET | — |+| ProjectService/SearchProjects | READ | — | — || ProjectService/SetIamPolicy | EXCLUDED | ADMINISTERS_THE_WORKSPACE | bb.projects.setIamPolicy || ProjectService/TestWebhook | EXCLUDED | SENDS_DATA_TO_A_THIRD_PARTY | bb.projects.update || ProjectService/UndeleteProject | EXCLUDED | ADMINISTERS_THE_WORKSPACE | bb.projects.undelete |@@ -214,7 +214,7 @@ served by no ceiling.| UserService/BatchGetUsers | EXCLUDED | ADMINISTERS_THE_WORKSPACE | bb.users.get || UserService/CreateUser | FORBIDDEN | MINTS_CREDENTIAL_FOR_OTHERS | bb.users.create || UserService/DeleteUser | EXCLUDED | ADMINISTERS_THE_WORKSPACE | — |-| UserService/GetCurrentUser | EXCLUDED | RETURNS_A_STORED_SECRET | — |+| UserService/GetCurrentUser | READ | — | — || UserService/GetUser | EXCLUDED | ADMINISTERS_THE_WORKSPACE | bb.users.get || UserService/ListUsers | EXCLUDED | ADMINISTERS_THE_WORKSPACE | bb.users.list || UserService/UndeleteUser | EXCLUDED | ADMINISTERS_THE_WORKSPACE | — |diff --git a/backend/api/v1/user_service.go b/backend/api/v1/user_service.goindex 61ff6a11da..7056c2b2c8 100644--- a/backend/api/v1/user_service.go+++ b/backend/api/v1/user_service.go@@ -489,7 +489,17 @@ func (s *UserService) UpdateUser(ctx context.Context, request *connect.Request[vreturn nil, connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to update user"))}- userResponse, err := convertToUser(ctx, s.iamManager, user)+ // Only the two requests that drive MFA enrollment answer with the+ // enrollment secrets. regenerate_temp_mfa_secret mints them, and the+ // otp_code verification is the step the console moves to the recovery-code+ // screen from, reading the codes out of that response. A title, phone or+ // password update happening to land inside an open enrollment window has no+ // business carrying a TOTP seed back.+ convertResponse := convertToUser+ if request.Msg.RegenerateTempMfaSecret || request.Msg.OtpCode != nil {+ convertResponse = convertToUserMintingMFAEnrollment+ }+ userResponse, err := convertResponse(ctx, s.iamManager, user)if err != nil {return nil, connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to convert user"))}@@ -702,6 +712,11 @@ func (s *UserService) UpdateEmail(ctx context.Context, request *connect.Request[return connect.NewResponse(v1User), nil}+// convertToUser converts a stored user for a read. The MFA enrollment secrets+// stay out: temp_otp_secret is the TOTP seed and temp_recovery_codes are the+// codes that get past the second factor, and a response that carries either+// hands a reader the account's second factor. Every caller but one is a read,+// so this is the default and the exception has to be asked for by name.func convertToUser(ctx context.Context, iamManager *iam.Manager, user *store.UserMessage) (*v1pb.User, error) {groups, err := iamManager.GetUserGroups(ctx, common.GetWorkspaceIDFromContext(ctx), user.Email)if err != nil {@@ -726,16 +741,54 @@ func convertToUser(ctx context.Context, iamManager *iam.Manager, user *store.Useif user.MFAConfig != nil {convertedUser.MfaEnabled = user.MFAConfig.OtpSecret != ""- // Only expose temporary MFA secrets and recovery codes to the user themselves+ // Only expose MFA enrollment state to the user themselves.if currentUser, ok := GetUserFromContext(ctx); ok && currentUser.ID == user.ID {- convertedUser.TempOtpSecret = user.MFAConfig.TempOtpSecret- convertedUser.TempRecoveryCodes = user.MFAConfig.TempRecoveryCodes- convertedUser.TempOtpSecretCreatedTime = user.MFAConfig.TempOtpSecretCreatedTime+ // The created time is not a secret. It says an enrollment is open+ // and when it expires, which is what the console counts down from,+ // and it is what tells a client the two fields below are missing+ // because they were redacted rather than because there is nothing+ // to enroll.+ //+ // An expired enrollment is not an open one, so it does not come+ // back. Nothing clears the stored timestamp when the window runs+ // out — the two writes are a commit, which nils it, and a+ // regenerate, which moves it — so an abandoned setup would+ // otherwise keep answering "still open" forever, and a client+ // holding the secrets from it would go on holding them. The rule+ // for what counts as expired stays in isMFATempSecretExpired, the+ // same one that refuses to verify against a stale seed.+ if !isMFATempSecretExpired(user.MFAConfig) {+ convertedUser.TempOtpSecretCreatedTime = user.MFAConfig.TempOtpSecretCreatedTime+ }}}return convertedUser, nil}+// convertToUserMintingMFAEnrollment is that exception: UpdateUser generates the+// temporary TOTP seed and recovery codes, and its response is the only place+// the human ever sees them — the console renders the QR code and the+// recovery-code list straight from it, and the server keeps no other way to+// hand them over. UpdateUser is FORBIDDEN to MCP, so an intact response here+// adds nothing an agent can reach.+//+// It adds the secrets exactly where the read exposed the created time, and asks+// nothing else. The read already decided who may see this enrollment and+// whether there is one: it sets the created time only when the subject is the+// caller and the window is open. Re-deriving that here would be a second copy+// of a rule that has to give the same answer.+func convertToUserMintingMFAEnrollment(ctx context.Context, iamManager *iam.Manager, user *store.UserMessage) (*v1pb.User, error) {+ converted, err := convertToUser(ctx, iamManager, user)+ if err != nil {+ return nil, err+ }+ if converted.TempOtpSecretCreatedTime != nil {+ converted.TempOtpSecret = user.MFAConfig.TempOtpSecret+ converted.TempRecoveryCodes = user.MFAConfig.TempRecoveryCodes+ }+ return converted, nil+}+func validateEndUserEmail(email string) error {if common.IsServiceAccountEmail(email) {return connect.NewError(connect.CodeInvalidArgument, errors.Errorf("email for end users cannot end with %v", common.ServiceAccountSuffix))diff --git a/backend/api/v1/user_service_mfa_enrollment_test.go b/backend/api/v1/user_service_mfa_enrollment_test.gonew file mode 100644index 0000000000..6957cc4233--- /dev/null+++ b/backend/api/v1/user_service_mfa_enrollment_test.go@@ -0,0 +1,160 @@+package v1++import (+ "context"+ "fmt"+ "testing"+ "time"++ "github.com/stretchr/testify/require"+ "google.golang.org/protobuf/types/known/timestamppb"++ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/testcontainer"+ "github.com/bytebase/bytebase/backend/component/iam"+ storepb "github.com/bytebase/bytebase/backend/generated-go/store"+ "github.com/bytebase/bytebase/backend/migrator"+ "github.com/bytebase/bytebase/backend/store"+)++const mfaEnrollmentTestWorkspace = "mfa-enrollment-test"++// newMFAEnrollmentFixture boots a migrated store with one workspace, because+// convertToUser resolves the subject's groups through the IAM manager and that+// needs somewhere real to look.+func newMFAEnrollmentFixture(t *testing.T) (*store.Store, *iam.Manager) {+ t.Helper()+ ctx := context.Background()+ container := testcontainer.GetTestPgContainer(ctx, t)+ t.Cleanup(func() { container.Close(ctx) })++ db := container.GetDB()+ require.NoError(t, migrator.MigrateSchema(ctx, db))+ _, err := db.ExecContext(ctx, fmt.Sprintf(+ `INSERT INTO workspace (resource_id) VALUES ('%s')`, mfaEnrollmentTestWorkspace))+ require.NoError(t, err)++ pgURL := fmt.Sprintf(+ "host=%s port=%s user=postgres password=root-password database=postgres",+ container.GetHost(), container.GetPort(),+ )+ stores, err := store.New(ctx, pgURL, false)+ require.NoError(t, err)+ iamManager, err := iam.NewManager(stores, nil, false)+ require.NoError(t, err)+ return stores, iamManager+}++// TestConvertToUserWithholdsAnExpiredEnrollment covers the third way an MFA+// enrollment window ends, and the only one nothing writes down.+//+// A commit nils temp_otp_secret_created_time and a regenerate moves it, so+// either is visible to a client comparing what it holds against what it reads.+// Expiry does neither: isMFATempSecretExpired decides it by comparing the+// stored timestamp with the clock, and nothing clears the row. So a setup the+// user abandoned would go on reporting an open window forever, and the console,+// which carries the enrollment secrets across a refresh for exactly as long as+// the window it holds is the window being read, would carry them forever with+// it.+//+// The rule for what counts as expired is not duplicated to get this: the+// converter asks the same function the OTP verification asks.+func TestConvertToUserWithholdsAnExpiredEnrollment(t *testing.T) {+ ctx := context.Background()+ stores, iamManager := newMFAEnrollmentFixture(t)++ enrolling := func(t *testing.T, email string, age time.Duration) (context.Context, *store.UserMessage) {+ t.Helper()+ user, err := stores.CreateUser(ctx, &store.UserMessage{+ Email: email,+ Name: email,+ Type: storepb.PrincipalType_END_USER,+ })+ require.NoError(t, err)++ // CreateUser answers with an empty MFAConfig whatever it was handed, so+ // the enrollment has to be written as an update. Getting this wrong+ // makes every assertion below pass for the wrong reason: an empty+ // config reads as expired, so nothing is exposed and the test proves+ // nothing.+ user, err = stores.UpdateUser(ctx, user, &store.UpdateUserMessage{+ MFAConfig: &storepb.MFAConfig{+ TempOtpSecret: "SEEDTHECONSOLEISSHOWING",+ TempRecoveryCodes: []string{"code-1", "code-2"},+ TempOtpSecretCreatedTime: timestamppb.New(time.Now().Add(-age)),+ },+ })+ require.NoError(t, err)+ require.NotNil(t, user.MFAConfig.TempOtpSecretCreatedTime,+ "precondition: the enrollment has to be stored for this to be testing anything")++ // The subject has to be the caller: the enrollment is only ever exposed+ // to the person enrolling.+ selfCtx := context.WithValue(ctx, common.WorkspaceIDContextKey, mfaEnrollmentTestWorkspace)+ selfCtx = context.WithValue(selfCtx, common.UserContextKey, user)+ return selfCtx, user+ }++ t.Run("an open window reads back open, without its secrets", func(t *testing.T) {+ selfCtx, user := enrolling(t, "[email protected]", time.Minute)++ got, err := convertToUser(selfCtx, iamManager, user)+ require.NoError(t, err)+ require.NotNil(t, got.TempOtpSecretCreatedTime,+ "the console counts down from this and it is not a secret")+ require.Empty(t, got.TempOtpSecret)+ require.Empty(t, got.TempRecoveryCodes)+ })++ t.Run("and the request that mints it gets the secrets too", func(t *testing.T) {+ selfCtx, user := enrolling(t, "[email protected]", time.Minute)++ got, err := convertToUserMintingMFAEnrollment(selfCtx, iamManager, user)+ require.NoError(t, err)+ require.Equal(t, "SEEDTHECONSOLEISSHOWING", got.TempOtpSecret)+ require.Len(t, got.TempRecoveryCodes, 2)+ })++ t.Run("an expired window reads back as no window at all", func(t *testing.T) {+ selfCtx, user := enrolling(t, "[email protected]", 6*time.Minute)++ got, err := convertToUser(selfCtx, iamManager, user)+ require.NoError(t, err)+ require.Nil(t, got.TempOtpSecretCreatedTime,+ "an abandoned setup must stop reporting an open enrollment, or the console holds its seed forever")+ require.Empty(t, got.TempOtpSecret)+ require.Empty(t, got.TempRecoveryCodes)+ })++ t.Run("and not even to the request that would have minted it", func(t *testing.T) {+ // UpdateUser refuses to verify against an expired seed, so a response+ // carrying one would be offering something the server will not accept.+ selfCtx, user := enrolling(t, "[email protected]", 6*time.Minute)++ got, err := convertToUserMintingMFAEnrollment(selfCtx, iamManager, user)+ require.NoError(t, err)+ require.Empty(t, got.TempOtpSecret)+ require.Empty(t, got.TempRecoveryCodes)+ require.Nil(t, got.TempOtpSecretCreatedTime)+ })++ t.Run("somebody else's enrollment is never exposed, open or not", func(t *testing.T) {+ selfCtx, subject := enrolling(t, "[email protected]", time.Minute)+ _ = selfCtx+ other, err := stores.CreateUser(ctx, &store.UserMessage{+ Email: "[email protected]",+ Name: "onlooker",+ Type: storepb.PrincipalType_END_USER,+ })+ require.NoError(t, err)++ otherCtx := context.WithValue(ctx, common.WorkspaceIDContextKey, mfaEnrollmentTestWorkspace)+ otherCtx = context.WithValue(otherCtx, common.UserContextKey, other)++ got, err := convertToUser(otherCtx, iamManager, subject)+ require.NoError(t, err)+ require.Nil(t, got.TempOtpSecretCreatedTime)+ require.Empty(t, got.TempOtpSecret)+ require.Empty(t, got.TempRecoveryCodes)+ })+}diff --git a/backend/generated-go/v1/annotation.pb.go b/backend/generated-go/v1/annotation.pb.goindex d45cf2adb5..8703c93f78 100644--- a/backend/generated-go/v1/annotation.pb.go+++ b/backend/generated-go/v1/annotation.pb.go@@ -242,6 +242,13 @@ const (// therefore the one that is meant to go away: fixing the leak moves the// method to READ, as a reviewed widening, rather than leaving a quiet// exposure the moment the ceiling starts serving.+ //+ // No method carries it. The three leaks it was written for — project+ // webhook URLs, the MySQL-family grant text, and the MFA enrollment+ // secrets — are redacted on the read path, and their eight methods are+ // READ. The value stays because the category is real and the next read+ // found leaking should carry it rather than an invented one, and because+ // retiring an enum value costs a reserved number for nothing.MCPDenialReason_RETURNS_A_STORED_SECRET MCPDenialReason = 13)diff --git a/backend/generated-go/v1/instance_role_service.pb.go b/backend/generated-go/v1/instance_role_service.pb.goindex b6cbad41a1..8f4f8374ae 100644--- a/backend/generated-go/v1/instance_role_service.pb.go+++ b/backend/generated-go/v1/instance_role_service.pb.go@@ -282,9 +282,9 @@ const file_v1_instance_role_service_proto_rawDesc = "" +"\x11_connection_limitB\x0e\n" +"\f_valid_untilB\f\n" +"\n" +- "_attribute2\xfe\x01\n" +- "\x13InstanceRoleService\x12\xe6\x01\n" +- "\x11ListInstanceRoles\x12%.bytebase.v1.ListInstanceRolesRequest\x1a&.bytebase.v1.ListInstanceRolesResponse\"\x81\x01\xdaA\x06parent\x8a\xea0\x15bb.instanceRoles.list\x90\xea0\x01\xa0\xea0\x04\xa8\xea0\r\x82\xd3\xe4\x93\x02MZ+\x12)/v1/{parent=projects/*/instances/*}/roles\x12\x1e/v1/{parent=instances/*}/rolesB\xae\x01\n" ++ "_attribute2\xf9\x01\n" ++ "\x13InstanceRoleService\x12\xe1\x01\n" ++ "\x11ListInstanceRoles\x12%.bytebase.v1.ListInstanceRolesRequest\x1a&.bytebase.v1.ListInstanceRolesResponse\"}\xdaA\x06parent\x8a\xea0\x15bb.instanceRoles.list\x90\xea0\x01\xa0\xea0\x01\x82\xd3\xe4\x93\x02MZ+\x12)/v1/{parent=projects/*/instances/*}/roles\x12\x1e/v1/{parent=instances/*}/rolesB\xae\x01\n" +"\x0fcom.bytebase.v1B\x18InstanceRoleServiceProtoP\x01Z4github.com/bytebase/bytebase/backend/generated-go/v1\xa2\x02\x03BXX\xaa\x02\vBytebase.V1\xca\x02\vBytebase\\V1\xe2\x02\x17Bytebase\\V1\\GPBMetadata\xea\x02\fBytebase::V1b\x06proto3"var (diff --git a/backend/generated-go/v1/instance_service.pb.go b/backend/generated-go/v1/instance_service.pb.goindex 776ccf39a3..ddadfb3fcf 100644--- a/backend/generated-go/v1/instance_service.pb.go+++ b/backend/generated-go/v1/instance_service.pb.go@@ -3359,10 +3359,10 @@ const file_v1_instance_service_proto_rawDesc = "" +"\x0eDataSourceType\x12\x1b\n" +"\x17DATA_SOURCE_UNSPECIFIED\x10\x00\x12\t\n" +"\x05ADMIN\x10\x01\x12\r\n" +- "\tREAD_ONLY\x10\x022\xb8\x16\n" +- "\x0fInstanceService\x12\xb1\x01\n" +- "\vGetInstance\x12\x1f.bytebase.v1.GetInstanceRequest\x1a\x15.bytebase.v1.Instance\"j\xdaA\x04name\x8a\xea0\x10bb.instances.get\x90\xea0\x01\xa0\xea0\x04\xa8\xea0\r\x82\xd3\xe4\x93\x02=Z#\x12!/v1/{name=projects/*/instances/*}\x12\x16/v1/{name=instances/*}\x12\xb6\x01\n" +- "\rListInstances\x12!.bytebase.v1.ListInstancesRequest\x1a\".bytebase.v1.ListInstancesResponse\"^\xdaA\x00\x8a\xea0\x11bb.instances.list\x90\xea0\x01\xa0\xea0\x04\xa8\xea0\r\x82\xd3\xe4\x93\x024Z#\x12!/v1/{parent=projects/*}/instances\x12\r/v1/instances\x12\xce\x01\n" ++ "\tREAD_ONLY\x10\x022\xb0\x16\n" ++ "\x0fInstanceService\x12\xad\x01\n" ++ "\vGetInstance\x12\x1f.bytebase.v1.GetInstanceRequest\x1a\x15.bytebase.v1.Instance\"f\xdaA\x04name\x8a\xea0\x10bb.instances.get\x90\xea0\x01\xa0\xea0\x01\x82\xd3\xe4\x93\x02=Z#\x12!/v1/{name=projects/*/instances/*}\x12\x16/v1/{name=instances/*}\x12\xb2\x01\n" ++ "\rListInstances\x12!.bytebase.v1.ListInstancesRequest\x1a\".bytebase.v1.ListInstancesResponse\"Z\xdaA\x00\x8a\xea0\x11bb.instances.list\x90\xea0\x01\xa0\xea0\x01\x82\xd3\xe4\x93\x024Z#\x12!/v1/{parent=projects/*}/instances\x12\r/v1/instances\x12\xce\x01\n" +"\x0eCreateInstance\x12\".bytebase.v1.CreateInstanceRequest\x1a\x15.bytebase.v1.Instance\"\x80\x01\xdaA\binstance\x8a\xea0\x13bb.instances.create\x90\xea0\x01\x98\xea0\x01\xa0\xea0\x04\xa8\xea0\t\x82\xd3\xe4\x93\x02H:\binstanceZ-:\binstance\"!/v1/{parent=projects/*}/instances\"\r/v1/instances\x12\xf5\x01\n" +"\x0eUpdateInstance\x12\".bytebase.v1.UpdateInstanceRequest\x1a\x15.bytebase.v1.Instance\"\xa7\x01\xdaA\x14instance,update_mask\x8a\xea0\x13bb.instances.update\x90\xea0\x01\x98\xea0\x01\xa0\xea0\x04\xa8\xea0\t\x82\xd3\xe4\x93\x02c:\binstanceZ6:\binstance2*/v1/{instance.name=projects/*/instances/*}2\x1f/v1/{instance.name=instances/*}\x12\xbf\x01\n" +"\x0eDeleteInstance\x12\".bytebase.v1.DeleteInstanceRequest\x1a\x16.google.protobuf.Empty\"q\xdaA\x04name\x8a\xea0\x13bb.instances.delete\x90\xea0\x01\x98\xea0\x01\xa0\xea0\x04\xa8\xea0\t\x82\xd3\xe4\x93\x02=Z#*!/v1/{name=projects/*/instances/*}*\x16/v1/{name=instances/*}\x12\xd6\x01\n" +diff --git a/backend/generated-go/v1/project_service.pb.go b/backend/generated-go/v1/project_service.pb.goindex 5528ad2e8a..125fd1c600 100644--- a/backend/generated-go/v1/project_service.pb.go+++ b/backend/generated-go/v1/project_service.pb.go@@ -1288,7 +1288,11 @@ type TestWebhookRequest struct {// The name of the project which owns the webhook to test.// Format: projects/{project}Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`- // The webhook to test. Identified by its url.+ // The webhook to test.+ //+ // The url is what gets posted to. Reads do not return a saved webhook's url,+ // so leave url empty and set name to test the one already stored; set url to+ // test a url before saving it.Webhook *Webhook `protobuf:"bytes,2,opt,name=webhook,proto3" json:"webhook,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache@@ -1394,7 +1398,29 @@ type Webhook struct {// title is the title of the webhook.Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`// url is the url of the webhook, should be unique within the project.+ //+ // Write-only: an incoming-webhook url is the whole credential for posting+ // into the customer's chat, so reads leave it empty, the same way a data+ // source's password and SSL material are left empty. Set it to change it;+ // read url_set to know whether one is configured.+ //+ // Required to create a webhook. Not required on TestWebhook, where an empty+ // url on a request that names a webhook means the one already stored, so the+ // field carries no REQUIRED behavior it would contradict there.Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"`+ // Whether a url is configured, since the url itself does not come back on+ // reads.+ UrlSet bool `protobuf:"varint,7,opt,name=url_set,json=urlSet,proto3" json:"url_set,omitempty"`+ // Whether the stored url's endpoint form can carry a direct message to the+ // users an event mentions, rather than only a post to the channel the url+ // names. False for a Microsoft Teams Power Automate workflow endpoint, which+ // direct messages bypass entirely: a webhook with direct_message set sends+ // them and returns, so the workflow post never happens.+ //+ // Reads do not return the url, so a client editing a saved webhook cannot+ // work this out for itself. It is a fact about the stored url and says+ // nothing about what the url is.+ UrlSupportsDirectMessage bool `protobuf:"varint,8,opt,name=url_supports_direct_message,json=urlSupportsDirectMessage,proto3" json:"url_supports_direct_message,omitempty"`// if direct_message is set, the notification is sent directly// to the persons and url will be ignored.// IM integration setting should be set for this function to work.@@ -1471,6 +1497,20 @@ func (x *Webhook) GetUrl() string {return ""}+func (x *Webhook) GetUrlSet() bool {+ if x != nil {+ return x.UrlSet+ }+ return false+}++func (x *Webhook) GetUrlSupportsDirectMessage() bool {+ if x != nil {+ return x.UrlSupportsDirectMessage+ }+ return false+}+func (x *Webhook) GetDirectMessage() bool {if x != nil {return x.DirectMessage@@ -1669,12 +1709,14 @@ const file_v1_project_service_proto_rawDesc = "" +"\x14bytebase.com/ProjectR\aproject\x123\n" +"\awebhook\x18\x02 \x01(\v2\x14.bytebase.v1.WebhookB\x03\xe0A\x02R\awebhook\"+\n" +"\x13TestWebhookResponse\x12\x14\n" +- "\x05error\x18\x01 \x01(\tR\x05error\"\xbb\x02\n" ++ "\x05error\x18\x01 \x01(\tR\x05error\"\x9d\x03\n" +"\aWebhook\x12\x12\n" +"\x04name\x18\x01 \x01(\tR\x04name\x121\n" +"\x04type\x18\x02 \x01(\x0e2\x18.bytebase.v1.WebhookTypeB\x03\xe0A\x02R\x04type\x12\x19\n" +"\x05title\x18\x03 \x01(\tB\x03\xe0A\x02R\x05title\x12\x15\n" +- "\x03url\x18\x04 \x01(\tB\x03\xe0A\x02R\x03url\x12%\n" ++ "\x03url\x18\x04 \x01(\tB\x03\xe0A\x04R\x03url\x12\x1c\n" ++ "\aurl_set\x18\a \x01(\bB\x03\xe0A\x03R\x06urlSet\x12B\n" ++ "\x1burl_supports_direct_message\x18\b \x01(\bB\x03\xe0A\x03R\x18urlSupportsDirectMessage\x12%\n" +"\x0edirect_message\x18\x06 \x01(\bR\rdirectMessage\x12N\n" +"\x12notification_types\x18\x05 \x03(\x0e2\x1a.bytebase.v1.Activity.TypeB\x03\xe0A\x06R\x11notificationTypes:@\xeaA=\n" +"\x14bytebase.com/Webhook\x12%projects/{project}/webhooks/{webhook}\"\xb6\x01\n" +@@ -1687,13 +1729,13 @@ const file_v1_project_service_proto_rawDesc = "" +"\x0fISSUE_SENT_BACK\x10\f\x12\x13\n" +"\x0fPIPELINE_FAILED\x10\r\x12\x16\n" +"\x12PIPELINE_COMPLETED\x10\x0e\x12\x12\n" +- "\x0eISSUE_APPROVED\x10\x0f\"\x04\b\x01\x10\t2\x90\x13\n" +- "\x0eProjectService\x12\x87\x01\n" ++ "\x0eISSUE_APPROVED\x10\x0f\"\x04\b\x01\x10\t2\x80\x13\n" ++ "\x0eProjectService\x12\x83\x01\n" +"\n" +- "GetProject\x12\x1e.bytebase.v1.GetProjectRequest\x1a\x14.bytebase.v1.Project\"C\xdaA\x04name\x8a\xea0\x0fbb.projects.get\x90\xea0\x01\xa0\xea0\x04\xa8\xea0\r\x82\xd3\xe4\x93\x02\x17\x12\x15/v1/{name=projects/*}\x12\x9d\x01\n" +- "\x10BatchGetProjects\x12$.bytebase.v1.BatchGetProjectsRequest\x1a%.bytebase.v1.BatchGetProjectsResponse\"<\x8a\xea0\x0fbb.projects.get\x90\xea0\x01\xa0\xea0\x04\xa8\xea0\r\x82\xd3\xe4\x93\x02\x17\x12\x15/v1/projects:batchGet\x12\x8c\x01\n" +- "\fListProjects\x12 .bytebase.v1.ListProjectsRequest\x1a!.bytebase.v1.ListProjectsResponse\"7\xdaA\x00\x8a\xea0\x10bb.projects.list\x90\xea0\x01\xa0\xea0\x04\xa8\xea0\r\x82\xd3\xe4\x93\x02\x0e\x12\f/v1/projects\x12\x88\x01\n" +- "\x0eSearchProjects\x12\".bytebase.v1.SearchProjectsRequest\x1a#.bytebase.v1.SearchProjectsResponse\"-\xdaA\x00\x90\xea0\x02\xa0\xea0\x04\xa8\xea0\r\x82\xd3\xe4\x93\x02\x18:\x01*\"\x13/v1/projects:search\x12\x90\x01\n" ++ "GetProject\x12\x1e.bytebase.v1.GetProjectRequest\x1a\x14.bytebase.v1.Project\"?\xdaA\x04name\x8a\xea0\x0fbb.projects.get\x90\xea0\x01\xa0\xea0\x01\x82\xd3\xe4\x93\x02\x17\x12\x15/v1/{name=projects/*}\x12\x99\x01\n" ++ "\x10BatchGetProjects\x12$.bytebase.v1.BatchGetProjectsRequest\x1a%.bytebase.v1.BatchGetProjectsResponse\"8\x8a\xea0\x0fbb.projects.get\x90\xea0\x01\xa0\xea0\x01\x82\xd3\xe4\x93\x02\x17\x12\x15/v1/projects:batchGet\x12\x88\x01\n" ++ "\fListProjects\x12 .bytebase.v1.ListProjectsRequest\x1a!.bytebase.v1.ListProjectsResponse\"3\xdaA\x00\x8a\xea0\x10bb.projects.list\x90\xea0\x01\xa0\xea0\x01\x82\xd3\xe4\x93\x02\x0e\x12\f/v1/projects\x12\x84\x01\n" ++ "\x0eSearchProjects\x12\".bytebase.v1.SearchProjectsRequest\x1a#.bytebase.v1.SearchProjectsResponse\")\xdaA\x00\x90\xea0\x02\xa0\xea0\x01\x82\xd3\xe4\x93\x02\x18:\x01*\"\x13/v1/projects:search\x12\x90\x01\n" +"\rCreateProject\x12!.bytebase.v1.CreateProjectRequest\x1a\x14.bytebase.v1.Project\"F\xdaA\x00\x8a\xea0\x12bb.projects.create\x90\xea0\x01\x98\xea0\x01\xa0\xea0\x04\xa8\xea0\t\x82\xd3\xe4\x93\x02\x17:\aproject\"\f/v1/projects\x12\xb4\x01\n" +"\rUpdateProject\x12!.bytebase.v1.UpdateProjectRequest\x1a\x14.bytebase.v1.Project\"j\xdaA\x13project,update_mask\x8a\xea0\x12bb.projects.update\x90\xea0\x01\x98\xea0\x01\xa0\xea0\x04\xa8\xea0\t\x82\xd3\xe4\x93\x02(:\aproject2\x1d/v1/{project.name=projects/*}\x12\x96\x01\n" +"\rDeleteProject\x12!.bytebase.v1.DeleteProjectRequest\x1a\x16.google.protobuf.Empty\"J\xdaA\x04name\x8a\xea0\x12bb.projects.delete\x90\xea0\x01\x98\xea0\x01\xa0\xea0\x04\xa8\xea0\t\x82\xd3\xe4\x93\x02\x17*\x15/v1/{name=projects/*}\x12\x9f\x01\n" +diff --git a/backend/generated-go/v1/project_service_equal.pb.go b/backend/generated-go/v1/project_service_equal.pb.goindex 9ed0ca0499..6803106969 100644--- a/backend/generated-go/v1/project_service_equal.pb.go+++ b/backend/generated-go/v1/project_service_equal.pb.go@@ -459,6 +459,12 @@ func (x *Webhook) Equal(y *Webhook) bool {if x.Url != y.Url {return false}+ if x.UrlSet != y.UrlSet {+ return false+ }+ if x.UrlSupportsDirectMessage != y.UrlSupportsDirectMessage {+ return false+ }if x.DirectMessage != y.DirectMessage {return false}diff --git a/backend/generated-go/v1/user_service.pb.go b/backend/generated-go/v1/user_service.pb.goindex 18422efca3..f5bd6b0615 100644--- a/backend/generated-go/v1/user_service.pb.go+++ b/backend/generated-go/v1/user_service.pb.go@@ -897,11 +897,11 @@ const file_v1_user_service_proto_rawDesc = "" +"\x0flast_login_time\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\rlastLoginTime\x12U\n" +"\x19last_change_password_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x16lastChangePasswordTime\x12\x16\n" +"\x06source\x18\x03 \x01(\tR\x06source:%\xeaA\"\n" +- "\x11bytebase.com/User\x12\rusers/{email}J\x04\b\x05\x10\x06J\x04\b\x0f\x10\x102\xac\t\n" ++ "\x11bytebase.com/User\x12\rusers/{email}J\x04\b\x05\x10\x06J\x04\b\x0f\x10\x102\xa8\t\n" +"\vUserService\x12x\n" +"\aGetUser\x12\x1b.bytebase.v1.GetUserRequest\x1a\x11.bytebase.v1.User\"=\xdaA\x04name\x8a\xea0\fbb.users.get\x90\xea0\x01\xa0\xea0\x04\xa8\xea0\t\x82\xd3\xe4\x93\x02\x14\x12\x12/v1/{name=users/*}\x12\x8e\x01\n" +- "\rBatchGetUsers\x12!.bytebase.v1.BatchGetUsersRequest\x1a\".bytebase.v1.BatchGetUsersResponse\"6\x8a\xea0\fbb.users.get\x90\xea0\x01\xa0\xea0\x04\xa8\xea0\t\x82\xd3\xe4\x93\x02\x14\x12\x12/v1/users:batchGet\x12a\n" +- "\x0eGetCurrentUser\x12\x16.google.protobuf.Empty\x1a\x11.bytebase.v1.User\"$\x80\xea0\x01\x90\xea0\x02\xa0\xea0\x04\xa8\xea0\r\x82\xd3\xe4\x93\x02\x0e\x12\f/v1/users/me\x12\x83\x01\n" ++ "\rBatchGetUsers\x12!.bytebase.v1.BatchGetUsersRequest\x1a\".bytebase.v1.BatchGetUsersResponse\"6\x8a\xea0\fbb.users.get\x90\xea0\x01\xa0\xea0\x04\xa8\xea0\t\x82\xd3\xe4\x93\x02\x14\x12\x12/v1/users:batchGet\x12]\n" ++ "\x0eGetCurrentUser\x12\x16.google.protobuf.Empty\x1a\x11.bytebase.v1.User\" \x80\xea0\x01\x90\xea0\x02\xa0\xea0\x01\x82\xd3\xe4\x93\x02\x0e\x12\f/v1/users/me\x12\x83\x01\n" +"\tListUsers\x12\x1d.bytebase.v1.ListUsersRequest\x1a\x1e.bytebase.v1.ListUsersResponse\"7\xdaA\x06parent\x8a\xea0\rbb.users.list\x90\xea0\x01\xa0\xea0\x04\xa8\xea0\t\x82\xd3\xe4\x93\x02\v\x12\t/v1/users\x12\x82\x01\n" +"\n" +"CreateUser\x12\x1e.bytebase.v1.CreateUserRequest\x1a\x11.bytebase.v1.User\"A\xdaA\x04user\x8a\xea0\x0fbb.users.create\x90\xea0\x01\x98\xea0\x01\xa0\xea0\x03\xa8\xea0\x06\x82\xd3\xe4\x93\x02\x11:\x04user\"\t/v1/users\x12\x89\x01\n" +diff --git a/backend/plugin/webhook/direct_message_test.go b/backend/plugin/webhook/direct_message_test.gonew file mode 100644index 0000000000..81ec7ba64b--- /dev/null+++ b/backend/plugin/webhook/direct_message_test.go@@ -0,0 +1,85 @@+package webhook++import (+ "testing"++ "github.com/stretchr/testify/require"++ storepb "github.com/bytebase/bytebase/backend/generated-go/store"+)++// TestURLSupportsDirectMessage pins the fact the console can no longer work out+// for a saved webhook, since reads stopped returning the URL. Getting it wrong+// in the false direction offers an option that diverts the customer's+// notifications away from the Power Automate flow they built, because+// teams.Post sends the direct messages and returns before it ever posts.+func TestURLSupportsDirectMessage(t *testing.T) {+ for _, tc := range []struct {+ name string+ webhookType storepb.WebhookType+ url string+ want bool+ }{+ {+ name: "a Power Automate workflow endpoint",+ webhookType: storepb.WebhookType_TEAMS,+ url: "https://default1234.aa.environment.api.powerplatform.com/powerautomate/automations/direct/workflows/abc/triggers/manual/paths/invoke",+ want: false,+ },+ {+ name: "and the legacy logic.azure.com spelling of one",+ webhookType: storepb.WebhookType_TEAMS,+ url: "https://prod-03.westus.logic.azure.com:443/workflows/abc/triggers/manual/paths/invoke?api-version=2016-06-01",+ want: false,+ },+ {+ // ValidateWebhookURL writes these domains with a leading dot and+ // accepts the apex as well as a subdomain, so a webhook on the+ // apex stores fine. It has to be recognised here too, or the+ // console offers direct messages on a URL that bypasses them.+ name: "and the apex of one, which the validator also accepts",+ webhookType: storepb.WebhookType_TEAMS,+ url: "https://powerplatform.com/powerautomate/automations/direct/workflows/abc",+ want: false,+ },+ {+ name: "and the apex of the legacy one",+ webhookType: storepb.WebhookType_TEAMS,+ url: "https://logic.azure.com/workflows/abc/triggers/manual/paths/invoke",+ want: false,+ },+ {+ name: "an Office 365 connector URL is the Teams form that does",+ webhookType: storepb.WebhookType_TEAMS,+ url: "https://example.webhook.office.com/webhookb2/abc/IncomingWebhook/def",+ want: true,+ },+ {+ // A domain that merely ends with the same text is a different+ // domain: the leading dot is a boundary, not a substring match.+ name: "a lookalike domain is not one of them",+ webhookType: storepb.WebhookType_TEAMS,+ url: "https://notpowerplatform.com/webhookb2/abc",+ want: true,+ },+ {+ // The restriction is Teams-specific. A Slack URL on a+ // powerplatform host is not a thing, and would not change what+ // slack.Post does anyway.+ name: "no other type has a URL-dependent restriction",+ webhookType: storepb.WebhookType_SLACK,+ url: "https://hooks.slack.com/services/fixture-not-a-real-token",+ want: true,+ },+ {+ name: "an unparseable URL is not assumed to be the special case",+ webhookType: storepb.WebhookType_TEAMS,+ url: "://not a url",+ want: true,+ },+ } {+ t.Run(tc.name, func(t *testing.T) {+ require.Equal(t, tc.want, URLSupportsDirectMessage(tc.webhookType, tc.url))+ })+ }+}diff --git a/backend/plugin/webhook/teams/teams.go b/backend/plugin/webhook/teams/teams.goindex e85953d658..c975e0f5a9 100644--- a/backend/plugin/webhook/teams/teams.go+++ b/backend/plugin/webhook/teams/teams.go@@ -16,8 +16,6 @@ import ("io""log/slog""net/http"- "net/url"- "strings""github.com/pkg/errors""go.uber.org/multierr"@@ -97,23 +95,12 @@ func (*Receiver) Post(context webhook.Context) error {return nil}}- if isPowerAutomateURL(context.URL) {+ if webhook.IsPowerAutomateURL(context.URL) {return postPowerAutomateMessage(context)}return postMessage(context)}-// isPowerAutomateURL returns true if the webhook URL is a Power Automate Workflow URL-// (*.powerplatform.com or legacy *.logic.azure.com) rather than a legacy Office 365 Connector URL.-func isPowerAutomateURL(webhookURL string) bool {- u, err := url.Parse(webhookURL)- if err != nil {- return false- }- hostname := strings.ToLower(u.Hostname())- return strings.HasSuffix(hostname, ".powerplatform.com") || strings.HasSuffix(hostname, ".logic.azure.com")-}-// postPowerAutomateMessage sends a webhook message to a Power Automate Workflow URL// using the Adaptive Card format wrapped in a message envelope.func postPowerAutomateMessage(context webhook.Context) error {diff --git a/backend/plugin/webhook/validator.go b/backend/plugin/webhook/validator.goindex 6125fcc5e6..acaef52d73 100644--- a/backend/plugin/webhook/validator.go+++ b/backend/plugin/webhook/validator.go@@ -126,3 +126,75 @@ func validateGoogleChatURL(u *url.URL) error {return nil}++// URLSupportsDirectMessage reports whether a webhook URL's endpoint form can+// carry a direct message to the users an event mentions, rather than only a+// post to the channel the URL names.+//+// The one form that cannot is a Microsoft Teams Power Automate workflow+// endpoint. teams.Post routes on the same fact at delivery time, and it decides+// the question before the URL does: a webhook with direct messages enabled and+// mentioned users sends them and returns, so the workflow post never happens.+// Enabling it on a Power Automate webhook therefore diverts the customer's+// notifications away from the flow they built, which is why the console hides+// the option for those URLs.+//+// The console cannot work this out for a saved webhook any more, because reads+// no longer return the URL. Webhook.url_supports_direct_message carries the+// answer instead, and this is where both callers get it from.+func URLSupportsDirectMessage(webhookType storepb.WebhookType, webhookURL string) bool {+ if webhookType != storepb.WebhookType_TEAMS {+ return true+ }+ return !IsPowerAutomateURL(webhookURL)+}++// powerAutomateDomains are the Teams destinations that take the Power Automate+// workflow payload rather than the Office 365 connector one. They are a subset+// of allowedDomains[TEAMS] above and are written in the same notation, so the+// same matching rule applies to both: a leading dot means the domain itself and+// any subdomain of it.+//+// Sharing the notation is the point. This list used to be a pair of+// strings.HasSuffix calls that accepted a subdomain and not the apex, while+// ValidateWebhookURL accepted both — so a webhook on powerplatform.com itself+// stored fine and then was not recognised as Power Automate.+var powerAutomateDomains = []string{+ ".powerplatform.com",+ // Legacy, retired November 2025.+ ".logic.azure.com",+}++// hostMatchesDomain applies the allowed-domain notation to a hostname: a+// leading dot matches the domain itself and any subdomain of it, and anything+// else matches exactly. Both the hostname and the domain are compared in lower+// case, which is the caller's job for the hostname.+func hostMatchesDomain(hostname, domain string) bool {+ domain = strings.ToLower(domain)+ if after, ok := strings.CutPrefix(domain, "."); ok {+ return hostname == after || strings.HasSuffix(hostname, domain)+ }+ return hostname == domain+}++// IsPowerAutomateURL reports whether the URL is a Power Automate workflow+// endpoint rather than an Office 365 connector URL. The two take different+// payload formats, and only the connector one carries a direct message.+//+// ProjectWebhookForm.tsx carries a copy of this rule, because the console has+// to answer it for a URL the server has never seen: everything on the create+// form, and anything typed over a saved URL. This is the authority, and the two+// have to agree.+func IsPowerAutomateURL(webhookURL string) bool {+ u, err := url.Parse(webhookURL)+ if err != nil {+ return false+ }+ hostname := strings.ToLower(u.Hostname())+ for _, domain := range powerAutomateDomains {+ if hostMatchesDomain(hostname, domain) {+ return true+ }+ }+ return false+}diff --git a/backend/plugin/webhook/validator_test.go b/backend/plugin/webhook/validator_test.goindex 6e4a1ab571..326fd30c26 100644--- a/backend/plugin/webhook/validator_test.go+++ b/backend/plugin/webhook/validator_test.go@@ -95,6 +95,24 @@ func TestValidateWebhookURL(t *testing.T) {webhookURL: "https://default1234.aa.environment.api.powerplatform.com:443/powerautomate/automations/direct/workflows/abc123/triggers/manual/paths/invoke",wantErr: false,},+ {+ // A leading dot in allowedDomains means the domain itself as well+ // as any subdomain of it. Every other dotted case here uses a+ // strict subdomain, and IsPowerAutomateURL now depends on the apex+ // being accepted too: if it were not, a URL it classifies as Power+ // Automate could never be stored, and the classification would be+ // about nothing.+ name: "valid teams apex powerplatform URL",+ webhookType: storepb.WebhookType_TEAMS,+ webhookURL: "https://powerplatform.com/powerautomate/automations/direct/workflows/abc123",+ wantErr: false,+ },+ {+ name: "valid teams apex logic.azure.com URL",+ webhookType: storepb.WebhookType_TEAMS,+ webhookURL: "https://logic.azure.com/workflows/abc123/triggers/manual/paths/invoke",+ wantErr: false,+ },{name: "invalid teams domain",webhookType: storepb.WebhookType_TEAMS,diff --git a/backend/tests/mcp_forbidden_credential_mints_test.go b/backend/tests/mcp_forbidden_credential_mints_test.goindex 34b1bbef8c..fcca40e283 100644--- a/backend/tests/mcp_forbidden_credential_mints_test.go+++ b/backend/tests/mcp_forbidden_credential_mints_test.go@@ -910,7 +910,6 @@ func TestMCPCredentialMintsLeaveDiscovery(t *testing.T) {{"ServiceAccountService", []string{"CreateServiceAccount", "UpdateServiceAccount", "GetServiceAccount"}},{"IdentityProviderService", []string{"CreateIdentityProvider", "UpdateIdentityProvider", "TestIdentityProvider"}},{"WorkloadIdentityService", []string{"CreateWorkloadIdentity", "UpdateWorkloadIdentity"}},- {"UserService", []string{"CreateUser", "UpdateEmail", "GetUser"}},{"SettingService", []string{"TestEmailSetting", "GetSetting"}},} {listing := searchAPIOnSession(ctx, t, session, map[string]any{"service": row.service})@@ -932,17 +931,31 @@ func TestMCPCredentialMintsLeaveDiscovery(t *testing.T) {a.NotContains(workspaceListing, "WorkspaceService/RotateDirectorySyncToken","search_api must not offer the token rotation, which the session can never call")+ // UserService is the second mixed case, and it moved here when+ // GetCurrentUser stopped returning the MFA enrollment secrets. Reading who+ // you are is the one thing an agent does on this service; creating a user,+ // redirecting an account's email and reading somebody else's profile stay+ // refused, and stay off the menu.+ userListing := searchAPIOnSession(ctx, t, session, map[string]any{"service": "UserService"})+ a.Contains(userListing, "UserService/GetCurrentUser",+ "the session reads its own identity, so the service is a menu with that on it")+ for _, method := range []string{"CreateUser", "UpdateEmail", "GetUser", "ListUsers"} {+ a.NotContains(userListing, "UserService/"+method,+ "search_api must not offer UserService/%s, which the session can never call", method)+ }+// The service list is the entry point into discovery, and a service whose// every method is refused drops out of it entirely.services := searchAPIOnSession(ctx, t, session, map[string]any{})for _, service := range []string{"ServiceAccountService", "IdentityProviderService", "WorkloadIdentityService",- "UserService", "SettingService",+ "SettingService",} {a.NotContains(services, service, "%s serves nothing, so it must not be listed", service)}a.Contains(services, "DatabaseService", "positive control: services the ceiling serves stay listed")a.Contains(services, "WorkspaceService", "a service keeping any served method stays listed")+ a.Contains(services, "UserService", "and so does the one that kept only GetCurrentUser")// Still resolvable by operation ID, and a call still reaches the gate.for _, operation := range []string{diff --git a/backend/tests/mcp_tool_parity_test.go b/backend/tests/mcp_tool_parity_test.goindex 4226b4190e..3d6fcb48ff 100644--- a/backend/tests/mcp_tool_parity_test.go+++ b/backend/tests/mcp_tool_parity_test.go@@ -43,10 +43,11 @@ func TestMCPToolCallParity(t *testing.T) {defer ctl.Close(ctx)// Parity baseline: the principal's direct v1 API view. The probe is- // ListWorkspaces rather than ListProjects because the project reads are- // EXCLUDED from the MCP ceiling (they return the incoming-webhook URL- // verbatim, BOT-60); a probe the gate refuses would test the gate, not- // parity. Any READ method whose result is scoped to the caller does.+ // ListWorkspaces, and any READ method whose result is scoped to the caller+ // would do. It was picked over ListProjects when the project reads were+ // EXCLUDED for returning the incoming-webhook URL, since a probe the gate+ // refuses tests the gate rather than parity; the URL is write-only now and+ // the project reads are READ, so the choice is no longer forced.direct, err := ctl.workspaceServiceClient.ListWorkspaces(ctx, connect.NewRequest(&v1pb.ListWorkspacesRequest{}))a.NoError(err)var directNames []stringdiff --git a/backend/tests/read_path_secret_test.go b/backend/tests/read_path_secret_test.gonew file mode 100644index 0000000000..d719068bf7--- /dev/null+++ b/backend/tests/read_path_secret_test.go@@ -0,0 +1,312 @@+package tests++import (+ "context"+ "strings"+ "testing"+ "time"++ "connectrpc.com/connect"+ "github.com/pquerna/otp/totp"+ "github.com/stretchr/testify/require"+ "google.golang.org/protobuf/types/known/emptypb"+ "google.golang.org/protobuf/types/known/fieldmaskpb"++ "github.com/bytebase/bytebase/backend/common"+ v1pb "github.com/bytebase/bytebase/backend/generated-go/v1"+)++// slackWebhookURL is a well-formed Slack incoming-webhook URL on the domain the+// validator allows, so AddWebhook accepts it without the test having to widen+// the allowed-domain table other tests share. Nothing posts to it here; the+// delivery half of the story is in TestWebhookIntegration, which owns that+// table and a server that answers.+const slackWebhookURL = "https://hooks.slack.com/services/read-path-secret-probe"++// TestReadPathHidesTheWebhookURL is the leak as a caller meets it. An+// incoming-webhook URL is a bearer credential: whoever holds it posts into the+// customer's chat as Bytebase. Every project read shares one converter, so the+// four of them are checked together rather than trusting that they still do.+func TestReadPathHidesTheWebhookURL(t *testing.T) {+ t.Parallel()+ a := require.New(t)+ ctx := context.Background()+ ctl := &controller{}+ ctx, err := ctl.StartServerWithExternalPg(ctx)+ a.NoError(err)+ defer ctl.Close(ctx)++ project := ctl.createTestProject(ctx, t, "webhook-redaction")+ added, err := ctl.projectServiceClient.AddWebhook(ctx, connect.NewRequest(&v1pb.AddWebhookRequest{+ Project: project.Name,+ Webhook: &v1pb.Webhook{+ Type: v1pb.WebhookType_SLACK,+ Title: "release channel",+ Url: slackWebhookURL,+ NotificationTypes: []v1pb.Activity_Type{v1pb.Activity_ISSUE_CREATED},+ },+ }))+ a.NoError(err)+ a.Len(added.Msg.Webhooks, 1)++ // The write RPC's own response goes through the same converter. The caller+ // supplied the URL, so losing it costs nothing, and keeping the rule in one+ // place is what stops a read from finding a way around it.+ a.Empty(added.Msg.Webhooks[0].Url)+ a.True(added.Msg.Webhooks[0].UrlSet)++ get, err := ctl.projectServiceClient.GetProject(ctx, connect.NewRequest(&v1pb.GetProjectRequest{Name: project.Name}))+ a.NoError(err)+ list, err := ctl.projectServiceClient.ListProjects(ctx, connect.NewRequest(&v1pb.ListProjectsRequest{}))+ a.NoError(err)+ batch, err := ctl.projectServiceClient.BatchGetProjects(ctx, connect.NewRequest(&v1pb.BatchGetProjectsRequest{+ Names: []string{project.Name},+ }))+ a.NoError(err)+ search, err := ctl.projectServiceClient.SearchProjects(ctx, connect.NewRequest(&v1pb.SearchProjectsRequest{}))+ a.NoError(err)++ // A client that reads a project and writes it straight back sends the URL it+ // never received, which has to be refused rather than saved over a working+ // webhook. The validator is what refuses it, and this is the RPC that has+ // to still be calling the validator.+ readBack, err := ctl.projectServiceClient.GetProject(ctx, connect.NewRequest(&v1pb.GetProjectRequest{Name: project.Name}))+ a.NoError(err)+ _, err = ctl.projectServiceClient.UpdateWebhook(ctx, connect.NewRequest(&v1pb.UpdateWebhookRequest{+ Webhook: readBack.Msg.Webhooks[0],+ UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"url"}},+ }))+ a.Equal(connect.CodeInvalidArgument, connect.CodeOf(err),+ "writing the read-back webhook back must be refused, not saved")++ stillThere, err := ctl.projectServiceClient.GetProject(ctx, connect.NewRequest(&v1pb.GetProjectRequest{Name: project.Name}))+ a.NoError(err)+ a.True(stillThere.Msg.Webhooks[0].UrlSet, "and the stored URL must still be there")++ read := map[string][]*v1pb.Project{+ "GetProject": {get.Msg},+ "ListProjects": list.Msg.Projects,+ "BatchGetProjects": batch.Msg.Projects,+ "SearchProjects": search.Msg.Projects,+ }+ for rpc, projects := range read {+ var found bool+ for _, p := range projects {+ if p.Name != project.Name {+ continue+ }+ found = true+ a.Len(p.Webhooks, 1, "%s", rpc)+ a.Empty(p.Webhooks[0].Url,+ "%s returns the webhook URL, which is the whole credential", rpc)+ a.True(p.Webhooks[0].UrlSet,+ "%s must still say the webhook has a URL configured", rpc)+ a.Equal("release channel", p.Webhooks[0].Title, "%s", rpc)+ }+ a.True(found, "%s did not return the project under test", rpc)+ }+}++// TestReadPathHidesTheMFAEnrollmentSecrets covers the third leak and the+// constraint that makes it awkward: one converter serves both the reads and the+// RPC that mints the enrollment. The mint has to keep the secrets — the console+// renders the QR code and the recovery codes out of that response and the+// server keeps no other copy to hand over — and every read has to lose them.+//+// GetUser is here beside GetCurrentUser because the leak was never+// GetCurrentUser's: the converter exposed the fields to any read whose subject+// was the caller, so reading your own profile through GetUser leaked the same+// TOTP seed. GetUser stays EXCLUDED for MCP on other grounds, which is exactly+// why the fix could not live in one RPC.+func TestReadPathHidesTheMFAEnrollmentSecrets(t *testing.T) {+ t.Parallel()+ a := require.New(t)+ ctx := context.Background()+ ctl := &controller{}+ ctx, err := ctl.StartServerWithExternalPg(ctx)+ a.NoError(err)+ defer ctl.Close(ctx)++ userName := common.FormatUserEmail("[email protected]")+ minted, err := ctl.userServiceClient.UpdateUser(ctx, connect.NewRequest(&v1pb.UpdateUserRequest{+ User: &v1pb.User{Name: userName},+ UpdateMask: &fieldmaskpb.FieldMask{},+ RegenerateTempMfaSecret: true,+ }))+ a.NoError(err)+ a.NotEmpty(minted.Msg.TempOtpSecret, "the minting response is the only place the console can read the TOTP seed")+ a.NotEmpty(minted.Msg.TempRecoveryCodes, "and the only place it can read the recovery codes")+ a.NotNil(minted.Msg.TempOtpSecretCreatedTime, "the countdown needs the moment the window opened")++ current, err := ctl.userServiceClient.GetCurrentUser(ctx, connect.NewRequest(&emptypb.Empty{}))+ a.NoError(err)+ self, err := ctl.userServiceClient.GetUser(ctx, connect.NewRequest(&v1pb.GetUserRequest{Name: userName}))+ a.NoError(err)++ for rpc, user := range map[string]*v1pb.User{"GetCurrentUser": current.Msg, "GetUser": self.Msg} {+ a.Empty(user.TempOtpSecret, "%s returns the TOTP seed of an open enrollment", rpc)+ a.Empty(user.TempRecoveryCodes, "%s returns the recovery codes of an open enrollment", rpc)+ a.NotNil(user.TempOtpSecretCreatedTime,+ "%s must still say an enrollment is open and when it expires; that is not a secret", rpc)+ }++ // An update that mints nothing does not answer with the enrollment either,+ // even though the window is open. UpdateUser is one RPC doing several jobs,+ // and only the two that drive the enrollment carry it back.+ renamed, err := ctl.userServiceClient.UpdateUser(ctx, connect.NewRequest(&v1pb.UpdateUserRequest{+ User: &v1pb.User{Name: userName, Title: "Demo Renamed"},+ UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"title"}},+ }))+ a.NoError(err)+ a.Equal("Demo Renamed", renamed.Msg.Title)+ a.Empty(renamed.Msg.TempOtpSecret, "a title update mints nothing and must carry nothing")+ a.Empty(renamed.Msg.TempRecoveryCodes)++ // The enrollment still completes, which is the whole point of leaving the+ // minting response alone: the seed the console was handed is the seed the+ // server validates against. The otp_code verification is the other request+ // that answers with the enrollment, because it is the step the console+ // moves to the recovery-code screen from.+ otp, err := totp.GenerateCode(minted.Msg.TempOtpSecret, time.Now())+ a.NoError(err)+ verified, err := ctl.userServiceClient.UpdateUser(ctx, connect.NewRequest(&v1pb.UpdateUserRequest{+ User: &v1pb.User{Name: userName},+ UpdateMask: &fieldmaskpb.FieldMask{},+ OtpCode: &otp,+ }))+ a.NoError(err)+ a.NotEmpty(verified.Msg.TempRecoveryCodes,+ "the console reads the recovery codes it asks the user to save out of this response")++ enabled, err := ctl.userServiceClient.UpdateUser(ctx, connect.NewRequest(&v1pb.UpdateUserRequest{+ User: &v1pb.User{Name: userName, MfaEnabled: true},+ UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"mfa_enabled"}},+ OtpCode: &otp,+ }))+ a.NoError(err)+ a.True(enabled.Msg.MfaEnabled)+}++// TestMCPServesTheReadsTheRedactionFreed is the regression this batch exists to+// close, checked where it bit: a live MCP session under the default ceiling.+// Since the gate shipped, every EXCLUDED method refuses under every ceiling,+// and the eight reads excluded only for a leak were among them — so an agent+// could not name a project or an instance, and therefore could not reach a+// database at all.+//+// The other half is that the widening stopped where it was meant to. The reads+// that are out for what they do are still out, and the responses the freed+// reads return no longer carry the secret that put them there.+func TestMCPServesTheReadsTheRedactionFreed(t *testing.T) {+ t.Parallel()+ a := require.New(t)+ ctx := context.Background()+ ctl := &controller{}+ ctx, err := ctl.StartServerWithExternalPg(ctx)+ a.NoError(err)+ defer ctl.Close(ctx)++ project, err := ctl.projectServiceClient.CreateProject(ctx, connect.NewRequest(&v1pb.CreateProjectRequest{+ ProjectId: "mcp-freed-reads",+ Project: &v1pb.Project{Title: "MCP freed reads"},+ }))+ a.NoError(err)+ projectName := project.Msg.Name++ _, err = ctl.projectServiceClient.AddWebhook(ctx, connect.NewRequest(&v1pb.AddWebhookRequest{+ Project: projectName,+ Webhook: &v1pb.Webhook{+ Type: v1pb.WebhookType_SLACK,+ Title: "release channel",+ Url: slackWebhookURL,+ NotificationTypes: []v1pb.Activity_Type{v1pb.Activity_ISSUE_CREATED},+ },+ }))+ a.NoError(err)++ _, err = ctl.userServiceClient.UpdateUser(ctx, connect.NewRequest(&v1pb.UpdateUserRequest{+ User: &v1pb.User{Name: common.FormatUserEmail("[email protected]")},+ UpdateMask: &fieldmaskpb.FieldMask{},+ RegenerateTempMfaSecret: true,+ }))+ a.NoError(err)++ // The two instance reads need something to read. A PostgreSQL instance is+ // what this suite can stand up cheaply, and PostgreSQL role attributes are+ // keyword lists, so nothing here can assert anything about the grant-text+ // mask: the credential it takes out is MariaDB's, and it is pinned against+ // real server output in the converter's own test. What these two rows are+ // for is the classification — the reads are served at all.+ pgContainer, err := provisionPgInstance(ctx, t)+ a.NoError(err)+ instance, err := ctl.instanceServiceClient.CreateInstance(ctx, connect.NewRequest(&v1pb.CreateInstanceRequest{+ InstanceId: "mcp-freed-instance",+ Instance: &v1pb.Instance{+ Title: "MCP freed instance",+ Engine: v1pb.Engine_POSTGRES,+ Environment: new("environments/prod"),+ Activation: true,+ DataSources: []*v1pb.DataSource{pgContainer.adminDataSource()},+ },+ }))+ a.NoError(err)+ instanceName := instance.Msg.Name++ session := openMCPSession(ctx, t, ctl, ctl.authInterceptor.token)+ defer session.Close()++ // Each row carries what the response has to contain as well as what it must+ // not. Without the positive control a change that emptied or rescoped a+ // payload would leave every leak assertion green for the wrong reason.+ //+ // ListInstanceRoles has no control, on purpose. Its response is the role+ // list, which CreateInstance fills in on a best-effort sync it swallows on+ // failure, so an empty body is a legitimate outcome and asserting anything+ // about the payload would make a slow container look like a redaction bug.+ // What that row is here for is the classification: the method is served.+ for _, tc := range []struct {+ operation string+ body map[string]any+ want string+ }{+ {"ProjectService/ListProjects", map[string]any{}, projectName},+ {"ProjectService/GetProject", map[string]any{"name": projectName}, projectName},+ {"ProjectService/BatchGetProjects", map[string]any{"names": []string{projectName}}, projectName},+ {"ProjectService/SearchProjects", map[string]any{}, projectName},+ {"InstanceService/GetInstance", map[string]any{"name": instanceName}, instanceName},+ {"InstanceService/ListInstances", map[string]any{}, instanceName},+ {"InstanceRoleService/ListInstanceRoles", map[string]any{"parent": instanceName}, ""},+ {"UserService/GetCurrentUser", map[string]any{}, "[email protected]"},+ } {+ got := callAPIOnSession(ctx, t, session, tc.operation, tc.body)+ a.Equal(200, got.Status, "%s must be served: %s", tc.operation, got.Error)+ if tc.want != "" {+ a.Contains(got.RawResponse, tc.want,+ "%s answered without the resource under test, so its leak assertions would pass vacuously", tc.operation)+ }+ a.NotContains(got.RawResponse, "read-path-secret-probe",+ "%s handed the agent the webhook credential", tc.operation)+ a.NotContains(got.RawResponse, "tempOtpSecret\":\"",+ "%s handed the agent an MFA enrollment secret", tc.operation)+ }++ // Excluded for what they do, not for a leak, so nothing here moved.+ for _, tc := range []struct {+ operation string+ reason string+ }{+ {"UserService/ListUsers", "administers the workspace"},+ {"UserService/GetUser", "administers the workspace"},+ {"QueryHistoryService/ListQueryHistories", "SQL that other people wrote"},+ {"ProjectService/TestWebhook", "third party"},+ // The deprecated SQLService alias of a refused method, which the MCP+ // spec indexes by its own operation ID and would otherwise be a way+ // round the canonical method's class.+ {"SQLService/ListQueryHistories", "SQL that other people wrote"},+ } {+ got := callAPIOnSession(ctx, t, session, tc.operation, map[string]any{})+ a.Equal(403, got.Status, "%s must stay refused", tc.operation)+ a.True(strings.Contains(got.Error, tc.reason),+ "%s must still be refused for what it does; got %q", tc.operation, got.Error)+ }+}diff --git a/backend/tests/webhook_test.go b/backend/tests/webhook_test.goindex 55b23c6418..21520f10e5 100644--- a/backend/tests/webhook_test.go+++ b/backend/tests/webhook_test.go@@ -184,6 +184,179 @@ func TestWebhookIntegration(t *testing.T) {require.NoError(t, err)instance := instanceResp.Msg+ t.Run("TestWebhookOnASavedWebhookPostsToTheStoredURL", func(t *testing.T) {+ // A saved webhook reads back with no URL, so the console cannot send+ // the real one to TestWebhook: it never received it. The button has to+ // keep working anyway, which it does by sending the webhook's name and+ // no URL and letting the server look the stored one up. Delivery+ // landing on this collector is what proves the lookup happened; without+ // it the empty URL would have been rejected as invalid instead.+ collector.reset()++ project := ctl.createTestProject(ctx, t, "webhook-redacted-test")+ addWebhookForEvents(ctx, t, ctl, project, webhookServer.URL, []v1pb.Activity_Type{v1pb.Activity_ISSUE_CREATED})++ projectResp, err := ctl.projectServiceClient.GetProject(ctx, connect.NewRequest(&v1pb.GetProjectRequest{+ Name: project.Name,+ }))+ require.NoError(t, err)+ require.Len(t, projectResp.Msg.Webhooks, 1)+ saved := projectResp.Msg.Webhooks[0]+ require.Empty(t, saved.Url, "the read path must not hand the URL back")+ require.True(t, saved.UrlSet, "and must still say one is configured")++ result, err := ctl.projectServiceClient.TestWebhook(ctx, connect.NewRequest(&v1pb.TestWebhookRequest{+ Project: project.Name,+ Webhook: saved,+ }))+ require.NoError(t, err)+ require.Empty(t, result.Msg.Error, "the test post has to reach the stored URL")+ require.Eventually(t, func() bool {+ for _, req := range collector.getRequests() {+ if strings.Contains(string(req.Body), "Test webhook") {+ return true+ }+ }+ return false+ }, webhookWaitTimeout, 200*time.Millisecond, "no test notification arrived at the webhook server")++ // A URL the caller typed is still tested as typed, which is what the+ // create form does before there is anything saved to look up.+ typed, err := ctl.projectServiceClient.TestWebhook(ctx, connect.NewRequest(&v1pb.TestWebhookRequest{+ Project: project.Name,+ Webhook: &v1pb.Webhook{+ Type: v1pb.WebhookType_SLACK,+ Title: "typed by hand",+ Url: webhookServer.URL,+ },+ }))+ require.NoError(t, err)+ require.Empty(t, typed.Msg.Error)+ })++ t.Run("TestWebhookRefusesToLookUpAWebhookItWasNotGiven", func(t *testing.T) {+ // Looking the stored URL up is what the caller cannot do for+ // themselves, so the three ways of asking for the wrong one are the+ // branches worth pinning. The cross-project case is the one that+ // matters: the ACL runs against the project in the request, not against+ // the project in the webhook name, so without the check a caller with+ // the permission on one project could make the server post through+ // another project's stored webhook.+ collector.reset()++ project := ctl.createTestProject(ctx, t, "webhook-lookup-guard")+ other := ctl.createTestProject(ctx, t, "webhook-lookup-other")+ addWebhookForEvents(ctx, t, ctl, other, webhookServer.URL, []v1pb.Activity_Type{v1pb.Activity_ISSUE_CREATED})++ otherResp, err := ctl.projectServiceClient.GetProject(ctx, connect.NewRequest(&v1pb.GetProjectRequest{+ Name: other.Name,+ }))+ require.NoError(t, err)+ require.Len(t, otherResp.Msg.Webhooks, 1)++ for _, tc := range []struct {+ name string+ webhook *v1pb.Webhook+ code connect.Code+ }{+ {+ name: "no URL and no name is not a request the server can complete",+ webhook: &v1pb.Webhook{Type: v1pb.WebhookType_SLACK, Title: "nameless"},+ code: connect.CodeInvalidArgument,+ },+ {+ name: "a webhook belonging to another project",+ webhook: &v1pb.Webhook{Name: otherResp.Msg.Webhooks[0].Name, Type: v1pb.WebhookType_SLACK, Title: "not mine"},+ code: connect.CodeInvalidArgument,+ },+ {+ name: "a webhook that does not exist",+ webhook: &v1pb.Webhook{+ Name: fmt.Sprintf("%s/webhooks/does-not-exist", project.Name),+ Type: v1pb.WebhookType_SLACK,+ Title: "gone",+ },+ code: connect.CodeNotFound,+ },+ } {+ t.Run(tc.name, func(t *testing.T) {+ _, err := ctl.projectServiceClient.TestWebhook(ctx, connect.NewRequest(&v1pb.TestWebhookRequest{+ Project: project.Name,+ Webhook: tc.webhook,+ }))+ require.Error(t, err)+ require.Equal(t, tc.code, connect.CodeOf(err))+ })+ }++ require.Empty(t, collector.getRequests(),+ "none of those may reach the other project's webhook")++ // The caller picks the type the stored URL gets validated against, and+ // the validator names the URL it rejects, so a deliberate mismatch was+ // a way of reading back a URL the read path withholds.+ _, err = ctl.projectServiceClient.TestWebhook(ctx, connect.NewRequest(&v1pb.TestWebhookRequest{+ Project: other.Name,+ Webhook: &v1pb.Webhook{+ Name: otherResp.Msg.Webhooks[0].Name,+ Type: v1pb.WebhookType_GOOGLE_CHAT,+ Title: "tell me where you post",+ },+ }))+ require.Error(t, err)+ require.Equal(t, connect.CodeInvalidArgument, connect.CodeOf(err))+ require.NotContains(t, err.Error(), "127.0.0.1",+ "the refusal must not name the stored URL the caller cannot read")+ require.Contains(t, err.Error(), "GOOGLE_CHAT",+ "it names the type instead, which is the half the caller supplied")+ })++ t.Run("TestWebhookReportsAFailureWithoutTheURL", func(t *testing.T) {+ // The posters wrap their failure with the URL they posted to, and this+ // response is the one place that error reaches a caller. Testing a+ // saved webhook that cannot be delivered to would otherwise read the+ // URL back out of the error, which is the read the redaction closed.+ // Port 1 on loopback refuses, so the failure is the transport one every+ // poster wraps.+ const deadURL = "http://127.0.0.1:1/services/unreachable-on-purpose"++ project := ctl.createTestProject(ctx, t, "webhook-error-redaction")+ addWebhookForEvents(ctx, t, ctl, project, deadURL, []v1pb.Activity_Type{v1pb.Activity_ISSUE_CREATED})++ projectResp, err := ctl.projectServiceClient.GetProject(ctx, connect.NewRequest(&v1pb.GetProjectRequest{+ Name: project.Name,+ }))+ require.NoError(t, err)+ require.Len(t, projectResp.Msg.Webhooks, 1)++ result, err := ctl.projectServiceClient.TestWebhook(ctx, connect.NewRequest(&v1pb.TestWebhookRequest{+ Project: project.Name,+ Webhook: projectResp.Msg.Webhooks[0],+ }))+ require.NoError(t, err)+ require.NotEmpty(t, result.Msg.Error, "the post has to have failed for this to be testing anything")+ require.NotContains(t, result.Msg.Error, "unreachable-on-purpose",+ "the failure must not hand back the URL the read path withheld")+ require.NotContains(t, result.Msg.Error, "127.0.0.1:1")+ require.Equal(t, "the test notification could not be delivered to the stored webhook URL",+ result.Msg.Error, "a transport failure has no status code to report")++ // The other half: a URL the caller typed comes back with the poster's+ // message intact, because there is nothing to withhold from the person+ // who supplied it.+ typedFailure, err := ctl.projectServiceClient.TestWebhook(ctx, connect.NewRequest(&v1pb.TestWebhookRequest{+ Project: project.Name,+ Webhook: &v1pb.Webhook{+ Type: v1pb.WebhookType_SLACK,+ Title: "typed by hand",+ Url: deadURL,+ },+ }))+ require.NoError(t, err)+ require.Contains(t, typedFailure.Msg.Error, "unreachable-on-purpose")+ require.Contains(t, typedFailure.Msg.Error, "connection refused")+ })+t.Run("IssueWithPlanWebhookPayload", func(t *testing.T) {collector.reset()diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex 730f46d07f..97ef6cf76a 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -2013,6 +2013,7 @@"success-updated-prompt": "Successfully updated webhook {{name}}.","test-webhook": "Test Webhook","triggering-activity": "Triggering activities",+ "url-hidden": "Hidden for security. Enter a new URL to replace it.","webhook-url": "Webhook URL"}},diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex c3d2a7a245..fd0f7e54ba 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -2013,6 +2013,7 @@"success-updated-prompt": "Webhook {{name}} actualizado exitosamente.","test-webhook": "Probar webhook","triggering-activity": "Actividades de disparo",+ "url-hidden": "Oculta por seguridad. Introduzca una nueva URL para reemplazarla.","webhook-url": "URL del webhook"}},diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex 96cd516dea..4bd5b323b0 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -2013,6 +2013,7 @@"success-updated-prompt": "{{name}} Webhook が正常に更新されました。","test-webhook": "Webhook のテスト","triggering-activity": "トリガーイベント",+ "url-hidden": "セキュリティのため非表示です。変更するには新しい URL を入力してください。","webhook-url": "Webhook URL"}},diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.jsonindex 6f2110a382..8837478863 100644--- a/frontend/src/locales/vi-VN.json+++ b/frontend/src/locales/vi-VN.json@@ -2013,6 +2013,7 @@"success-updated-prompt": "Đã cập nhật thành công webhook {{name}}.","test-webhook": "Kiểm tra Webhook","triggering-activity": "Hoạt động kích hoạt",+ "url-hidden": "Đã ẩn vì lý do bảo mật. Nhập URL mới để thay thế.","webhook-url": "URL Webhook"}},diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex 02f82a6b1e..f0a2ef2247 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -2013,6 +2013,7 @@"success-updated-prompt": "成功更新 {{name}} webhook.","test-webhook": "测试 Webhook","triggering-activity": "触发事件",+ "url-hidden": "出于安全考虑已隐藏。输入新的 URL 以替换。","webhook-url": "Webhook URL"}},diff --git a/frontend/src/routes/project/ProjectWebhookForm.tsx b/frontend/src/routes/project/ProjectWebhookForm.tsxindex 9472fd3dd3..3c797f2da6 100644--- a/frontend/src/routes/project/ProjectWebhookForm.tsx+++ b/frontend/src/routes/project/ProjectWebhookForm.tsx@@ -45,6 +45,7 @@ import type {import { WebhookSchema } from "@/types/proto-es/v1/project_service_pb";import { Setting_SettingName } from "@/types/proto-es/v1/setting_service_pb";import { extractProjectWebhookID } from "@/utils";+import { findAddedWebhook } from "./webhookCreation";interface Props {allowEdit?: boolean;@@ -116,6 +117,11 @@ export function ProjectWebhookForm({);}, [imSetting, selectedWebhook]);+ // Mirrors webhook.IsPowerAutomateURL in the backend, which is the authority:+ // both the apex and any subdomain, because ValidateWebhookURL accepts both.+ // The client needs its own copy for a URL the server has never seen, which is+ // every URL on the create form and any the user types over a saved one; for a+ // saved URL it uses the server's answer instead, below.const isPowerAutomateURL = useMemo(() => {try {const hostname = new URL(state.url).hostname.toLowerCase();@@ -130,9 +136,30 @@ export function ProjectWebhookForm({}}, [state.url]);+ // A saved webhook reads back with no URL and url_set true, since the URL is+ // the credential for posting into the customer's chat. The field is empty+ // until the user types a replacement, and testing an untouched webhook sends+ // no URL at all: the server posts to the one it has stored.+ const urlHidden = useMemo(+ () => !state.url && webhook.urlSet,+ [state.url, webhook.urlSet]+ );++ // Whether the URL in play rules direct messages out. For a saved webhook the+ // client cannot tell, because the read does not return the URL, so the server+ // says: url_supports_direct_message is false for a Power Automate workflow+ // endpoint, which direct messages bypass entirely. It describes the STORED+ // URL under its STORED type, so it only answers while both are untouched.+ const urlSupportsDirectMessage = useMemo(() => {+ if (urlHidden && state.type === webhook.type) {+ return webhook.urlSupportsDirectMessage;+ }+ return !isPowerAutomateURL;+ }, [urlHidden, state.type, webhook, isPowerAutomateURL]);+const webhookSupportDirectMessage = useMemo(- () => selectedWebhook?.supportDirectMessage && !isPowerAutomateURL,- [selectedWebhook, isPowerAutomateURL]+ () => selectedWebhook?.supportDirectMessage && urlSupportsDirectMessage,+ [selectedWebhook, urlSupportsDirectMessage]);const activitySupportDirectMessage = useMemo(@@ -223,20 +250,25 @@ export function ProjectWebhookForm({name: state.title,}),});- const createdWebhook = updatedProject.webhooks.find(- (wh) =>- wh.title === state.title &&- wh.type === state.type &&- wh.url === state.url+ // Straight to the new webhook when the response says which one it is,+ // and to the list when it does not. Guessing would open somebody else's+ // webhook for editing, and staying put would strand the user on a create+ // form for a webhook that already exists.+ const createdWebhook = findAddedWebhook(+ project.webhooks,+ updatedProject.webhooks,+ state+ );+ router.push(+ createdWebhook+ ? {+ name: PROJECT_V1_ROUTE_WEBHOOK_DETAIL,+ params: {+ webhookResourceId: extractProjectWebhookID(createdWebhook.name),+ },+ }+ : { name: PROJECT_V1_ROUTE_WEBHOOKS });- if (createdWebhook) {- router.push({- name: PROJECT_V1_ROUTE_WEBHOOK_DETAIL,- params: {- webhookResourceId: extractProjectWebhookID(createdWebhook.name),- },- });- }});}, [project, state, createProjectWebhook, t, withLoading]);@@ -419,6 +451,11 @@ export function ProjectWebhookForm({onChange={(e) => updateField("url", e.target.value)}disabled={!allowEdit}/>+ {urlHidden && (+ <div className="mt-1 text-sm text-control-light">+ {t("project.webhook.url-hidden")}+ </div>+ )}</div>{/* Triggering activities */}@@ -513,7 +550,7 @@ export function ProjectWebhookForm({<div className="mt-4"><Buttonappearance="outline"- disabled={!state.url || loading}+ disabled={(!state.url && !urlHidden) || loading}onClick={testWebhook}>{t("project.webhook.test-webhook")}diff --git a/frontend/src/routes/project/ProjectWebhooksPage.tsx b/frontend/src/routes/project/ProjectWebhooksPage.tsxindex 3a77117035..d8dd8cde4b 100644--- a/frontend/src/routes/project/ProjectWebhooksPage.tsx+++ b/frontend/src/routes/project/ProjectWebhooksPage.tsx@@ -184,7 +184,6 @@ function WebhookTable({<TableHeader><TableRow className="bg-control-bg"><TableHead className="w-60">{t("common.name")}</TableHead>- <TableHead>URL</TableHead><TableHead>{t("project.webhook.triggering-activity")}</TableHead>{allowEdit && <TableHead className="w-12" />}</TableRow>@@ -193,7 +192,7 @@ function WebhookTable({{webhooks.length === 0 ? (<TableRow><TableCell- colSpan={allowEdit ? 4 : 3}+ colSpan={allowEdit ? 3 : 2}className="py-8 text-center text-control-light">{t("common.no-data")}@@ -224,9 +223,6 @@ function WebhookTable({{webhook.title}</div></TableCell>- <TableCell className="truncate max-w-xs text-control-light">- {webhook.url}- </TableCell><TableCell><div className="flex flex-wrap gap-2">{activityTitles.map((title) => (diff --git a/frontend/src/routes/project/webhookCreation.test.ts b/frontend/src/routes/project/webhookCreation.test.tsnew file mode 100644index 0000000000..c8b890d7a3--- /dev/null+++ b/frontend/src/routes/project/webhookCreation.test.ts@@ -0,0 +1,86 @@+import { create } from "@bufbuild/protobuf";+import { describe, expect, test } from "vitest";+import { WebhookType } from "@/types/proto-es/v1/common_pb";+import { WebhookSchema } from "@/types/proto-es/v1/project_service_pb";+import { findAddedWebhook } from "./webhookCreation";++const webhook = (name: string, title: string, type = WebhookType.SLACK) =>+ create(WebhookSchema, { name, title, type });++const submitted = { title: "release channel", type: WebhookType.SLACK };++describe("findAddedWebhook", () => {+ test("finds the webhook a create call added", () => {+ const added = webhook("projects/p/webhooks/2", "release channel");+ expect(+ findAddedWebhook(+ [webhook("projects/p/webhooks/1", "alerts")],+ [webhook("projects/p/webhooks/1", "alerts"), added],+ submitted+ )+ ).toEqual(added);+ });++ test("finds it beside an existing one that shares its title", () => {+ const added = webhook("projects/p/webhooks/2", "release channel");+ expect(+ findAddedWebhook(+ [webhook("projects/p/webhooks/1", "release channel")],+ [webhook("projects/p/webhooks/1", "release channel"), added],+ submitted+ )+ ).toEqual(added);+ });++ test("finds the first webhook in a project that had none", () => {+ const added = webhook("projects/p/webhooks/1", "release channel");+ expect(findAddedWebhook([], [added], submitted)).toEqual(added);+ });++ test("ignores a webhook somebody else created while this form was open", () => {+ // Both names are new since the form loaded, so the name alone cannot tell+ // them apart and picking the first would navigate to the other webhook.+ const theirs = webhook("projects/p/webhooks/2", "somebody else's");+ const ours = webhook("projects/p/webhooks/3", "release channel");+ expect(findAddedWebhook([], [theirs, ours], submitted)).toEqual(ours);+ });++ test("ignores a new webhook of another type with the same title", () => {+ const theirs = webhook(+ "projects/p/webhooks/2",+ "release channel",+ WebhookType.DISCORD+ );+ const ours = webhook("projects/p/webhooks/3", "release channel");+ expect(findAddedWebhook([], [theirs, ours], submitted)).toEqual(ours);+ });++ test("returns undefined when nothing was added", () => {+ const existing = [webhook("projects/p/webhooks/1", "alerts")];+ expect(findAddedWebhook(existing, existing, submitted)).toBeUndefined();+ });++ test("refuses to guess when two clients created the same title and type", () => {+ // The response ordering is unspecified and both names are new, so either+ // pick is a coin flip. The caller sends the user to the list rather than+ // opening somebody else's webhook for editing.+ const ours = webhook("projects/p/webhooks/2", "release channel");+ const theirs = webhook("projects/p/webhooks/3", "release channel");+ expect(findAddedWebhook([], [ours, theirs], submitted)).toBeUndefined();+ expect(findAddedWebhook([], [theirs, ours], submitted)).toBeUndefined();+ });++ test("still answers when the concurrent webhook differs in title or type", () => {+ // Ambiguity is only ambiguity when the other webhook is indistinguishable.+ const ours = webhook("projects/p/webhooks/2", "release channel");+ const otherTitle = webhook("projects/p/webhooks/3", "somebody else's");+ const otherType = webhook(+ "projects/p/webhooks/4",+ "release channel",+ WebhookType.DISCORD+ );+ expect(+ findAddedWebhook([], [otherTitle, otherType, ours], submitted)+ ).toEqual(ours);+ });+});diff --git a/frontend/src/routes/project/webhookCreation.ts b/frontend/src/routes/project/webhookCreation.tsnew file mode 100644index 0000000000..d602eca460--- /dev/null+++ b/frontend/src/routes/project/webhookCreation.ts@@ -0,0 +1,35 @@+import type { Webhook } from "@/types/proto-es/v1/project_service_pb";++// findAddedWebhook picks out the webhook a create call added, so the form can+// navigate to it, and returns undefined when it cannot tell.+//+// AddWebhook answers with the project rather than the webhook it created, so+// the name the server generated has to be inferred from the response. Matching+// on the url used to do it and no longer can: reads do not return a webhook's+// url, because that url is the credential for posting into the customer's chat.+// What is left is a name absent from `before`, plus the title and type+// submitted. Neither half identifies it alone — somebody else creating a+// webhook while this form was open also has a name this client has not seen.+//+// Together they still do not identify it uniquely. Two clients creating+// webhooks with the same title and the same type are indistinguishable from+// here, and the response's ordering is not specified, so picking either one+// would be a guess. It is not a harmless guess: the caller navigates to the+// webhook's edit page, where a delete lands on whichever webhook was picked.+// So an ambiguous answer is no answer, and the caller sends the user to the+// list to choose. Identifying it properly needs the create RPC to return the+// name it generated (BOT-80).+export const findAddedWebhook = (+ before: Webhook[],+ after: Webhook[],+ created: Pick<Webhook, "title" | "type">+): Webhook | undefined => {+ const known = new Set(before.map((webhook) => webhook.name));+ const candidates = after.filter(+ (webhook) =>+ !known.has(webhook.name) &&+ webhook.title === created.title &&+ webhook.type === created.type+ );+ return candidates.length === 1 ? candidates[0] : undefined;+};diff --git a/frontend/src/stores/app/auth.ts b/frontend/src/stores/app/auth.tsindex a0d1e97858..15db6a2c16 100644--- a/frontend/src/stores/app/auth.ts+++ b/frontend/src/stores/app/auth.ts@@ -24,6 +24,7 @@ import type { User } from "@/types/proto-es/v1/user_service_pb";import { UNKNOWN_USER_NAME } from "@/types/v1/user";import { storageKeyResetPassword } from "@/utils/storage-keys";import type { AppSliceCreator, AuthSlice } from "./types";+import { keepMfaEnrollment } from "./utils";// `users/{email}` → `{email}`.function emailOf(currentUserName: string | undefined): string {@@ -145,7 +146,8 @@ export const createAuthSlice: AppSliceCreator<AuthSlice> = (set, get) => ({// the server — login/signup need the fresh authenticated user).fetchCurrentUser: async () => {try {- const user = await userServiceClientConnect.getCurrentUser({});+ const fresh = await userServiceClientConnect.getCurrentUser({});+ const user = keepMfaEnrollment(fresh, get().currentUser);set({ currentUser: user, currentUserName: user.name });return user;} catch {diff --git a/frontend/src/stores/app/index.test.ts b/frontend/src/stores/app/index.test.tsindex 07b910482e..c56f4aceaa 100644--- a/frontend/src/stores/app/index.test.ts+++ b/frontend/src/stores/app/index.test.ts@@ -1,4 +1,5 @@import { create as createProto } from "@bufbuild/protobuf";+import { TimestampSchema } from "@bufbuild/protobuf/wkt";import { beforeEach, describe, expect, test, vi } from "vitest";import { silentContextKey } from "@/api/context-key";import { isValidDatabaseGroupName, UNKNOWN_PROJECT_NAME } from "@/types";@@ -506,6 +507,139 @@ describe("useAppStore", () => {expect(store.getState().isLoggedIn()).toBe(true);});+ // The MFA enrollment secrets ride out only on the UpdateUser response that+ // mints them; the read the session revalidation makes no longer carries them.+ // That revalidation fires every five minutes, which is the whole enrollment+ // window, so the two tests below are the difference between a QR code the+ // user can finish scanning and one that disappears under them.+ test("session revalidation keeps the MFA enrollment secrets it cannot refetch", async () => {+ const enrolling = createProto(UserSchema, {+ ...user,+ tempOtpSecret: "SEEDFROMTHEMINT",+ tempRecoveryCodes: ["code-1", "code-2"],+ tempOtpSecretCreatedTime: createProto(TimestampSchema, { seconds: 1n }),+ });+ mocks.getCurrentUser.mockResolvedValue(+ createProto(UserSchema, {+ ...user,+ tempOtpSecretCreatedTime: createProto(TimestampSchema, { seconds: 1n }),+ })+ );+ const store = createAppStore();+ store.setState({ currentUser: enrolling, currentUserName: enrolling.name });++ await store.getState().fetchCurrentUser();++ expect(store.getState().currentUser?.tempOtpSecret).toBe("SEEDFROMTHEMINT");+ expect(store.getState().currentUser?.tempRecoveryCodes).toEqual([+ "code-1",+ "code-2",+ ]);+ });++ test("session revalidation drops them once the enrollment window closes", async () => {+ const enrolling = createProto(UserSchema, {+ ...user,+ tempOtpSecret: "SEEDFROMTHEMINT",+ tempRecoveryCodes: ["code-1"],+ tempOtpSecretCreatedTime: createProto(TimestampSchema, { seconds: 1n }),+ });+ // The server clears the created time when the enrollment commits, which is+ // what says the secrets are gone rather than merely redacted.+ mocks.getCurrentUser.mockResolvedValue(+ createProto(UserSchema, { ...user, mfaEnabled: true })+ );+ const store = createAppStore();+ store.setState({ currentUser: enrolling, currentUserName: enrolling.name });++ await store.getState().fetchCurrentUser();++ expect(store.getState().currentUser?.tempOtpSecret).toBe("");+ expect(store.getState().currentUser?.tempRecoveryCodes).toEqual([]);+ });++ test("session revalidation drops them when another client minted a new seed", async () => {+ const enrolling = createProto(UserSchema, {+ ...user,+ tempOtpSecret: "SEEDFROMTHEMINT",+ tempRecoveryCodes: ["code-1"],+ tempOtpSecretCreatedTime: createProto(TimestampSchema, { seconds: 1n }),+ });+ // A second tab regenerated: the read reports an open window, but a later+ // one, so the seed we hold is the one the server threw away.+ mocks.getCurrentUser.mockResolvedValue(+ createProto(UserSchema, {+ ...user,+ tempOtpSecretCreatedTime: createProto(TimestampSchema, { seconds: 2n }),+ })+ );+ const store = createAppStore();+ store.setState({ currentUser: enrolling, currentUserName: enrolling.name });++ await store.getState().fetchCurrentUser();++ expect(store.getState().currentUser?.tempOtpSecret).toBe("");+ expect(store.getState().currentUser?.tempRecoveryCodes).toEqual([]);+ });++ test("a non-minting self-update keeps the enrollment the console is showing", async () => {+ // The account page saves a title from the same screen that shows the+ // recovery codes, and that response no longer carries them.+ const window = createProto(TimestampSchema, { seconds: 1n });+ const enrolling = createProto(UserSchema, {+ ...user,+ tempOtpSecret: "SEEDFROMTHEMINT",+ tempRecoveryCodes: ["code-1"],+ tempOtpSecretCreatedTime: window,+ });+ mocks.getUser.mockResolvedValue(enrolling);+ mocks.updateUser.mockResolvedValue(+ createProto(UserSchema, {+ ...user,+ title: "Renamed",+ tempOtpSecretCreatedTime: window,+ })+ );+ const store = createAppStore();+ store.setState({ currentUser: enrolling, currentUserName: enrolling.name });++ await store.getState().updateUser({+ user: { name: user.name, title: "Renamed" },+ updateMask: { paths: ["title"] },+ } as never);++ expect(store.getState().currentUser?.title).toBe("Renamed");+ expect(store.getState().currentUser?.tempOtpSecret).toBe("SEEDFROMTHEMINT");+ expect(store.getState().currentUser?.tempRecoveryCodes).toEqual(["code-1"]);+ });++ test("and drops them for a reseed inside the same second", async () => {+ const enrolling = createProto(UserSchema, {+ ...user,+ tempOtpSecret: "SEEDFROMTHEMINT",+ tempRecoveryCodes: ["code-1"],+ tempOtpSecretCreatedTime: createProto(TimestampSchema, {+ seconds: 1n,+ nanos: 100,+ }),+ });+ mocks.getCurrentUser.mockResolvedValue(+ createProto(UserSchema, {+ ...user,+ tempOtpSecretCreatedTime: createProto(TimestampSchema, {+ seconds: 1n,+ nanos: 200,+ }),+ })+ );+ const store = createAppStore();+ store.setState({ currentUser: enrolling, currentUserName: enrolling.name });++ await store.getState().fetchCurrentUser();++ expect(store.getState().currentUser?.tempOtpSecret).toBe("");+ });+test("auto logout preserves the full current path for signin redirect", async () => {const fakeLocation = {pathname: "/sql-editor/projects/prod/instances/pg/databases/app",diff --git a/frontend/src/stores/app/user.ts b/frontend/src/stores/app/user.tsindex 699d8b8a49..5b1131c499 100644--- a/frontend/src/stores/app/user.ts+++ b/frontend/src/stores/app/user.ts@@ -25,6 +25,7 @@ import {} from "@/types/proto-es/v1/user_service_pb";import { ensureUserFullName } from "@/utils/v1/user";import type { AppSliceCreator, UserFilter, UserSlice } from "./types";+import { keepMfaEnrollment } from "./utils";const UNKNOWN_PROJECT_NAME_LEGACY = "projects/-";@@ -210,7 +211,7 @@ export const createUserSlice: AppSliceCreator<UserSlice> = (set, get) => {usersByName: { ...state.usersByName, [response.name]: response },currentUser:state.currentUser?.name === response.name- ? response+ ? keepMfaEnrollment(response, state.currentUser): state.currentUser,}));return response;diff --git a/frontend/src/stores/app/utils.ts b/frontend/src/stores/app/utils.tsindex 5bf74c39d1..9a55924d99 100644--- a/frontend/src/stores/app/utils.ts+++ b/frontend/src/stores/app/utils.ts@@ -278,3 +278,56 @@ export function projectResourceNameFromId(projectId: string | undefined) {export function getProjectResourceId(project: Project) {return getProjectName(project.name);}++// The MFA enrollment secrets come back only from the two UpdateUser requests+// that drive the enrollment. A GetCurrentUser read no longer carries them,+// because a TOTP seed in a read response is a stored secret handed to whoever+// can read the profile, and neither does an UpdateUser that mints nothing.+//+// Both of those overwrite the store's current user, and the enrollment window+// is five minutes: AuthGate revalidates the session on that same interval, and+// the account page saves a title or a phone number from the panel showing the+// recovery codes. A plain overwrite would blank what the user is halfway+// through saving, so both merges go through here.+//+// Carry them across while the response still describes the enrollment we hold.+// temp_otp_secret_created_time is not a secret and reads keep it, so it+// identifies the enrollment: it is nil once the enrollment commits, moves when+// a new seed is minted, and is withheld once the window expires. Any of the+// three stops what we hold from being carried, which is why there is no copy of+// the five-minute rule here — the server does not report an expired enrollment+// as an open one.+export function keepMfaEnrollment(+ fresh: User,+ previous: User | undefined+): User {+ if (!previous || previous.name !== fresh.name) return fresh;+ if (fresh.tempOtpSecret || fresh.tempRecoveryCodes.length > 0) return fresh;+ if (!previous.tempOtpSecret && previous.tempRecoveryCodes.length === 0) {+ return fresh;+ }+ // Carry them only while the read describes the same enrollment we hold. The+ // server keeps one enrollment per user and replaces the seed, the codes and+ // the created time together, so a created time that moved means another tab+ // or another device minted a new seed. Keeping ours then would render a QR+ // code the server has already discarded, and every code typed off it would+ // be rejected.+ const held = previous.tempOtpSecretCreatedTime;+ const read = fresh.tempOtpSecretCreatedTime;+ // Nanos as well as seconds: two mints inside the same wall-clock second are+ // rare and not impossible, and comparing only seconds would call the second+ // one the same enrollment and carry the seed it replaced.+ if (+ !held ||+ !read ||+ held.seconds !== read.seconds ||+ held.nanos !== read.nanos+ ) {+ return fresh;+ }+ return {+ ...fresh,+ tempOtpSecret: previous.tempOtpSecret,+ tempRecoveryCodes: previous.tempRecoveryCodes,+ };+}diff --git a/frontend/src/types/proto-es/v1/annotation_pb.d.ts b/frontend/src/types/proto-es/v1/annotation_pb.d.tsindex ad729f6eee..41a65ecf5d 100644--- a/frontend/src/types/proto-es/v1/annotation_pb.d.ts+++ b/frontend/src/types/proto-es/v1/annotation_pb.d.ts@@ -265,6 +265,13 @@ export enum MCPDenialReason {* method to READ, as a reviewed widening, rather than leaving a quiet* exposure the moment the ceiling starts serving.*+ * No method carries it. The three leaks it was written for — project+ * webhook URLs, the MySQL-family grant text, and the MFA enrollment+ * secrets — are redacted on the read path, and their eight methods are+ * READ. The value stays because the category is real and the next read+ * found leaking should carry it rather than an invented one, and because+ * retiring an enum value costs a reserved number for nothing.+ ** @generated from enum value: RETURNS_A_STORED_SECRET = 13;*/RETURNS_A_STORED_SECRET = 13,diff --git a/frontend/src/types/proto-es/v1/instance_role_service_pb.js b/frontend/src/types/proto-es/v1/instance_role_service_pb.jsindex 40be31b418..41658d236c 100644--- a/frontend/src/types/proto-es/v1/instance_role_service_pb.js+++ b/frontend/src/types/proto-es/v1/instance_role_service_pb.js@@ -13,7 +13,7 @@ import { file_v1_annotation } from "./annotation_pb";* Describes the file v1/instance_role_service.proto.*/export const file_v1_instance_role_service = /*@__PURE__*/- fileDesc("Ch52MS9pbnN0YW5jZV9yb2xlX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIoEBChhMaXN0SW5zdGFuY2VSb2xlc1JlcXVlc3QSLQoGcGFyZW50GAEgASgJQh3gQQL6QRcKFWJ5dGViYXNlLmNvbS9JbnN0YW5jZRIRCglwYW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Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_v1_annotation]);+ fileDesc("Ch52MS9pbnN0YW5jZV9yb2xlX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIoEBChhMaXN0SW5zdGFuY2VSb2xlc1JlcXVlc3QSLQoGcGFyZW50GAEgASgJQh3gQQL6QRcKFWJ5dGViYXNlLmNvbS9JbnN0YW5jZRIRCglwYWdlX3NpemUYAiABKAUSEgoKcGFnZV90b2tlbhgDIAEoCRIPCgdyZWZyZXNoGAQgASgIIl4KGUxpc3RJbnN0YW5jZVJvbGVzUmVzcG9uc2USKAoFcm9sZXMYASADKAsyGS5ieXRlYmFzZS52MS5JbnN0YW5jZVJvbGUSFwoPbmV4dF9wYWdlX3Rva2VuGAIgASgJItUCCgxJbnN0YW5jZVJvbGUSDAoEbmFtZRgBIAEoCRIRCglyb2xlX25hbWUYAiABKAkSGgoIcGFzc3dvcmQYAyABKAlCA+BBBEgAiAEBEh0KEGNvbm5lY3Rpb25fbGltaXQYBCABKAVIAYgBARIYCgt2YWxpZF91bnRpbBgFIAEoCUgCiAEBEhYKCWF0dHJpYnV0ZRgGIAEoCUgDiAEBOnfqQXQKGWJ5dGViYXNlLmNvbS9JbnN0YW5jZVJvbGUSIWluc3RhbmNlcy97aW5zdGFuY2V9L3JvbGVzL3tyb2xlfRI0cHJvamVjdHMve3Byb2plY3R9L2luc3RhbmNlcy97aW5zdGFuY2V9L3JvbGVzL3tyb2xlfUILCglfcGFzc3dvcmRCEwoRX2Nvbm5lY3Rpb25fbGltaXRCDgoMX3ZhbGlkX3VudGlsQgwKCl9hdHRyaWJ1dGUy+QEKE0luc3RhbmNlUm9sZVNlcnZpY2US4QEKEUxpc3RJbnN0YW5jZVJvbGVzEiUuYnl0ZWJhc2UudjEuTGlzdEluc3RhbmNlUm9sZXNSZXF1ZXN0GiYuYnl0ZWJhc2UudjEuTGlzdEluc3RhbmNlUm9sZXNSZXNwb25zZSJ92kEGcGFyZW50iuowFWJiLmluc3RhbmNlUm9sZXMubGlzdJDqMAGg6jABgtPkkwJNWisSKS92MS97cGFyZW50PXByb2plY3RzLyovaW5zdGFuY2VzLyp9L3JvbGVzEh4vdjEve3BhcmVudD1pbnN0YW5jZXMvKn0vcm9sZXNCrgEKD2NvbS5ieXRlYmFzZS52MUIYSW5zdGFuY2VSb2xlU2VydmljZVByb3RvUAFaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_v1_annotation]);/*** Describes the message bytebase.v1.ListInstanceRolesRequest.diff --git a/frontend/src/types/proto-es/v1/instance_service_pb.js b/frontend/src/types/proto-es/v1/instance_service_pb.jsindex 9024e0066b..892f61050a 100644--- a/frontend/src/types/proto-es/v1/instance_service_pb.js+++ b/frontend/src/types/proto-es/v1/instance_service_pb.js@@ -17,7 +17,7 @@ import { file_v1_instance_role_service } from "./instance_role_service_pb";* Describes the file v1/instance_service.proto.*/export const file_v1_instance_service = /*@__PURE__*/- fileDesc("Chl2MS9pbnN0YW5jZV9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSJBChJHZXRJbnN0YW5jZVJlcXVlc3QSKwoEbmFtZRgBIAEoCUId4EEC+kEXChVieXRlYmFzZS5jb20vSW5zdGFuY2UisQEKFExpc3RJbnN0YW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ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common, file_v1_instance_role_service]);+ fileDesc("Chl2MS9pbnN0YW5jZV9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSJBChJHZXRJbnN0YW5jZVJlcXVlc3QSKwoEbmFtZRgBIAEoCUId4EEC+kEXChVieXRlYmFzZS5jb20vSW5zdGFuY2UisQEKFExpc3RJbnN0YW5jZXNSZXF1ZXN0Ei8KBnBhcmVudBgGIAEoCUIa+kEXEhVieXRlYmFzZS5jb20vSW5zdGFuY2VIAIgBARIRCglwYWdlX3NpemUYASABKAUSEgoKcGFnZV90b2tlbhgCIAEoCRIUCgxzaG93X2RlbGV0ZWQYAyABKAgSDgoGZmlsdGVyGAQgASgJEhAKCG9yZGVyX2J5GAUgASgJQgkKB19wYXJlbnQiWgoVTGlzdEluc3RhbmNlc1Jlc3BvbnNlEigKCWluc3RhbmNlcxgBIAMoCzIVLmJ5dGViYXNlLnYxLkluc3RhbmNlEhcKD25leHRfcGFnZV90b2tlbhgCIAEoCSLNAQoVQ3JlYXRlSW5zdGFuY2VSZXF1ZXN0Ei8KBnBhcmVudBgFIAEoCUIa+kEXEhVieXRlYmFzZS5jb20vSW5zdGFuY2VIAIgBARIsCghpbnN0YW5jZRgBIAEoCzIVLmJ5dGViYXNlLnYxLkluc3RhbmNlQgPgQQISEwoLaW5zdGFuY2VfaWQYAiABKAkSFQoNdmFsaWRhdGVfb25seRgDIAEoCEIJCgdfcGFyZW50SgQIBBAFUhhpbml0aWFsX2RhdGFiY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lEpICChBVcGRhdGVEYXRhU291cmNlEiQuYnl0ZWJhc2UudjEuVXBkYXRlRGF0YVNvdXJjZVJlcXVlc3QaFS5ieXRlYmFzZS52MS5JbnN0YW5jZSLAAdpBF2RhdGFfc291cmNlLHVwZGF0ZV9tYXNriuowE2JiLmluc3RhbmNlcy51cGRhdGWQ6jABmOowAaDqMAOo6jAGgtPkkwJ5OgtkYXRhX3NvdXJjZVpBOgtkYXRhX3NvdXJjZTIyL3YxL3tuYW1lPXByb2plY3RzLyovaW5zdGFuY2VzLyp9OnVwZGF0ZURhdGFTb3VyY2UyJy92MS97bmFtZT1pbnN0YW5jZXMvKn06dXBkYXRlRGF0YVNvdXJjZUKqAQoPY29tLmJ5dGViYXNlLnYxQhRJbnN0YW5jZVNlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common, file_v1_instance_role_service]);/*** Describes the message bytebase.v1.GetInstanceRequest.diff --git a/frontend/src/types/proto-es/v1/project_service_pb.d.ts b/frontend/src/types/proto-es/v1/project_service_pb.d.tsindex 9667ce9fd0..75babc9cbb 100644--- a/frontend/src/types/proto-es/v1/project_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/project_service_pb.d.ts@@ -700,7 +700,11 @@ export declare type TestWebhookRequest = Message<"bytebase.v1.TestWebhookRequestproject: string;/**- * The webhook to test. Identified by its url.+ * The webhook to test.+ *+ * The url is what gets posted to. Reads do not return a saved webhook's url,+ * so leave url empty and set name to test the one already stored; set url to+ * test a url before saving it.** @generated from field: bytebase.v1.Webhook webhook = 2;*/@@ -761,10 +765,42 @@ export declare type Webhook = Message<"bytebase.v1.Webhook"> & {/*** url is the url of the webhook, should be unique within the project.*+ * Write-only: an incoming-webhook url is the whole credential for posting+ * into the customer's chat, so reads leave it empty, the same way a data+ * source's password and SSL material are left empty. Set it to change it;+ * read url_set to know whether one is configured.+ *+ * Required to create a webhook. Not required on TestWebhook, where an empty+ * url on a request that names a webhook means the one already stored, so the+ * field carries no REQUIRED behavior it would contradict there.+ ** @generated from field: string url = 4;*/url: string;+ /**+ * Whether a url is configured, since the url itself does not come back on+ * reads.+ *+ * @generated from field: bool url_set = 7;+ */+ urlSet: boolean;++ /**+ * Whether the stored url's endpoint form can carry a direct message to the+ * users an event mentions, rather than only a post to the channel the url+ * names. False for a Microsoft Teams Power Automate workflow endpoint, which+ * direct messages bypass entirely: a webhook with direct_message set sends+ * them and returns, so the workflow post never happens.+ *+ * Reads do not return the url, so a client editing a saved webhook cannot+ * work this out for itself. It is a fact about the stored url and says+ * nothing about what the url is.+ *+ * @generated from field: bool url_supports_direct_message = 8;+ */+ urlSupportsDirectMessage: boolean;+/*** if direct_message is set, the notification is sent directly* to the persons and url will be ignored.diff --git a/frontend/src/types/proto-es/v1/project_service_pb.js b/frontend/src/types/proto-es/v1/project_service_pb.jsindex 824e2893ef..f0df07b276 100644--- a/frontend/src/types/proto-es/v1/project_service_pb.js+++ b/frontend/src/types/proto-es/v1/project_service_pb.js@@ -18,7 +18,7 @@ import { file_v1_iam_policy } from "./iam_policy_pb";* Describes the file v1/project_service.proto.*/export const file_v1_project_service = /*@__PURE__*/- fileDesc("Chh2MS9wcm9qZWN0X3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIj8KEUdldFByb2plY3RSZXF1ZXN0EioKBG5hbWUYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1Byb2plY3QiRgoXQmF0Y2hHZXRQcm9qZWN0c1JlcXVlc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dHMudXBkYXRlkOowAZjqMAGg6jAEqOowCYLT5JMCQToHd2ViaG9vazI2L3YxL3t3ZWJob29rLm5hbWU9cHJvamVjdHMvKi93ZWJob29rcy8qfTp1cGRhdGVXZWJob29rErEBCg1SZW1vdmVXZWJob29rEiEuYnl0ZWJhc2UudjEuUmVtb3ZlV2ViaG9va1JlcXVlc3QaFC5ieXRlYmFzZS52MS5Qcm9qZWN0ImeK6jASYmIucHJvamVjdHMudXBkYXRlkOowAZjqMAGg6jAEqOowCYLT5JMCOzoBKiI2L3YxL3t3ZWJob29rLm5hbWU9cHJvamVjdHMvKi93ZWJob29rcy8qfTpyZW1vdmVXZWJob29rEqMBCgtUZXN0V2ViaG9vaxIfLmJ5dGViYXNlLnYxLlRlc3RXZWJob29rUmVxdWVzdBogLmJ5dGViYXNlLnYxLlRlc3RXZWJob29rUmVzcG9uc2UiUYrqMBJiYi5wcm9qZWN0cy51cGRhdGWQ6jABoOowBKjqMAyC0+STAik6ASoiJC92MS97cHJvamVjdD1wcm9qZWN0cy8qfTp0ZXN0V2ViaG9va0KpAQoPY29tLmJ5dGViYXNlLnYxQhNQcm9qZWN0U2VydmljZVByb3RvUAFaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_type_color, file_v1_annotation, file_v1_common, file_v1_iam_policy]);+ fileDesc("Chh2MS9wcm9qZWN0X3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIj8KEUdldFByb2plY3RSZXF1ZXN0EioKBG5hbWUYASABKAlCHOBBAvpBFgoUYnl0ZWJ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xIhLmJ5dGViYXNlLnYxLlVwZGF0ZVdlYmhvb2tSZXF1ZXN0GhQuYnl0ZWJhc2UudjEuUHJvamVjdCKDAdpBE3dlYmhvb2ssdXBkYXRlX21hc2uK6jASYmIucHJvamVjdHMudXBkYXRlkOowAZjqMAGg6jAEqOowCYLT5JMCQToHd2ViaG9vazI2L3YxL3t3ZWJob29rLm5hbWU9cHJvamVjdHMvKi93ZWJob29rcy8qfTp1cGRhdGVXZWJob29rErEBCg1SZW1vdmVXZWJob29rEiEuYnl0ZWJhc2UudjEuUmVtb3ZlV2ViaG9va1JlcXVlc3QaFC5ieXRlYmFzZS52MS5Qcm9qZWN0ImeK6jASYmIucHJvamVjdHMudXBkYXRlkOowAZjqMAGg6jAEqOowCYLT5JMCOzoBKiI2L3YxL3t3ZWJob29rLm5hbWU9cHJvamVjdHMvKi93ZWJob29rcy8qfTpyZW1vdmVXZWJob29rEqMBCgtUZXN0V2ViaG9vaxIfLmJ5dGViYXNlLnYxLlRlc3RXZWJob29rUmVxdWVzdBogLmJ5dGViYXNlLnYxLlRlc3RXZWJob29rUmVzcG9uc2UiUYrqMBJiYi5wcm9qZWN0cy51cGRhdGWQ6jABoOowBKjqMAyC0+STAik6ASoiJC92MS97cHJvamVjdD1wcm9qZWN0cy8qfTp0ZXN0V2ViaG9va0KpAQoPY29tLmJ5dGViYXNlLnYxQhNQcm9qZWN0U2VydmljZVByb3RvUAFaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_type_color, file_v1_annotation, file_v1_common, file_v1_iam_policy]);/*** Describes the message bytebase.v1.GetProjectRequest.diff --git a/frontend/src/types/proto-es/v1/user_service_pb.js b/frontend/src/types/proto-es/v1/user_service_pb.jsindex 64b7e68eab..7afca2a1be 100644--- a/frontend/src/types/proto-es/v1/user_service_pb.js+++ b/frontend/src/types/proto-es/v1/user_service_pb.js@@ -16,7 +16,7 @@ import { file_v1_common } from "./common_pb";* Describes the file v1/user_service.proto.*/export const file_v1_user_service = /*@__PURE__*/- fileDesc("ChV2MS91c2VyX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIjkKDkdldFVzZXJSZXF1ZXN0EicKBG5hbWUYASABKAlCGeBBAvpBEwoRYnl0ZWJhc2UuY29tL1VzZXIiQAoUQmF0Y2hHZXRVc2Vyc1JlcXVlc3QSKAoFbmFtZXMYASADKAlCGeBBAvpBEwoRYnl0ZWJhc2UuY29tL1VzZXIiOQoVQmF0Y2hHZXRVc2Vyc1Jlc3BvbnNlEiAKBXVzZXJzGAEgAygLMhEuYnl0ZWJhc2UudjEuVXNlciJfChBMaXN0VXNlcnNSZXF1ZXN0EhEKCXBhZ2Vfc2l6ZRgBIAEoBRISCgpwYWdlX3Rva2VuGAIgASgJEhQKDHNob3dfZGVsZXRlZBgDIAEoCBIOCgZmaWx0ZXIYBCABKAkiTgoRTGlzdFVzZXJzUmVzcG9uc2USIAoFdXNlcnMYASADKAsyES5ieXRlYmFzZS52MS5Vc2VyEhcKD25leHRfcGFnZV90b2tlbhgCIAEoCSI5ChFDcmVhdGVVc2VyUmVxdWVzdBIkCgR1c2VyGAEgASgLMhEuYnl0ZWJhc2UudjEuVXNlckID4EECIuwBChFVcGRhdGVVc2VyUmVxdWVzdBIkCgR1c2VyGAEgASgLMhEuYnl0ZWJhc2UudjEuVXNlckID4EECEi8KC3VwZGF0ZV9tYXNrGAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLkZpZWxkTWFzaxIVCghvdHBfY29kZRgDIAEoCUgAiAEBEiIKGnJlZ2VuZXJhdGVfd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udjEuVXNlciJI2kEQdXNlcix1cGRhdGVfbWFza5DqMAKY6jABoOowA6jqMAOC0+STAh86BHVzZXIyFy92MS97dXNlci5uYW1lPXVzZXJzLyp9EncKCkRlbGV0ZVVzZXISHi5ieXRlYmFzZS52MS5EZWxldGVVc2VyUmVxdWVzdBoWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eSIx2kEEbmFtZZDqMAKY6jABoOowBKjqMAmC0+STAhQqEi92MS97bmFtZT11c2Vycy8qfRJ7CgxVbmRlbGV0ZVVzZXISIC5ieXRlYmFzZS52MS5VbmRlbGV0ZVVzZXJSZXF1ZXN0GhEuYnl0ZWJhc2UudjEuVXNlciI2kOowApjqMAGg6jAEqOowCYLT5JMCIDoBKiIbL3YxL3tuYW1lPXVzZXJzLyp9OnVuZGVsZXRlEqEBCgtVcGRhdGVFbWFpbBIfLmJ5dGViYXNlLnYxLlVwZGF0ZUVtYWlsUmVxdWVzdBoRLmJ5dGViYXNlLnYxLlVzZXIiXtpBCm5hbWUsZW1haWyK6jAUYmIudXNlcnMudXBkYXRlRW1haWyQ6jABmOowAaDqMAOo6jAGgtPkkwIjOgEqIh4vdjEve25hbWU9dXNlcnMvKn06dXBkYXRlRW1haWxCpgEKD2NvbS5ieXRlYmFzZS52MUIQVXNlclNlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common]);+ fileDesc("ChV2MS91c2VyX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIjkKDkdldF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VsZXRlVXNlclJlcXVlc3QaES5ieXRlYmFzZS52MS5Vc2VyIjaQ6jACmOowAaDqMASo6jAJgtPkkwIgOgEqIhsvdjEve25hbWU9dXNlcnMvKn06dW5kZWxldGUSoQEKC1VwZGF0ZUVtYWlsEh8uYnl0ZWJhc2UudjEuVXBkYXRlRW1haWxSZXF1ZXN0GhEuYnl0ZWJhc2UudjEuVXNlciJe2kEKbmFtZSxlbWFpbIrqMBRiYi51c2Vycy51cGRhdGVFbWFpbJDqMAGY6jABoOowA6jqMAaC0+STAiM6ASoiHi92MS97bmFtZT11c2Vycy8qfTp1cGRhdGVFbWFpbEKmAQoPY29tLmJ5dGViYXNlLnYxQhBVc2VyU2VydmljZVByb3RvUAFaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common]);/*** Describes the message bytebase.v1.GetUserRequest.diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex c82e61e97a..64ff2d83b8 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -15145,7 +15145,12 @@ paths:properties:webhook:title: webhook- description: The webhook to test. Identified by its url.+ description: |-+ The webhook to test.++ The url is what gets posted to. Reads do not return a saved webhook's url,+ so leave url empty and set name to test the one already stored; set url to+ test a url before saving it.$ref: '#/components/schemas/bytebase.v1.Webhook'title: TestWebhookRequestrequired:@@ -31427,7 +31432,12 @@ components:Format: projects/{project}webhook:title: webhook- description: The webhook to test. Identified by its url.+ description: |-+ The webhook to test.++ The url is what gets posted to. Reads do not return a saved webhook's url,+ so leave url empty and set name to test the one already stored; set url to+ test a url before saving it.$ref: '#/components/schemas/bytebase.v1.Webhook'title: TestWebhookRequestrequired:@@ -32365,7 +32375,39 @@ components:url:type: stringtitle: url- description: url is the url of the webhook, should be unique within the project.+ description: |-+ url is the url of the webhook, should be unique within the project.++ Write-only: an incoming-webhook url is the whole credential for posting+ into the customer's chat, so reads leave it empty, the same way a data+ source's password and SSL material are left empty. Set it to change it;+ read url_set to know whether one is configured.++ Required to create a webhook. Not required on TestWebhook, where an empty+ url on a request that names a webhook means the one already stored, so the+ field carries no REQUIRED behavior it would contradict there.+ writeOnly: true+ urlSet:+ type: boolean+ title: url_set+ description: |-+ Whether a url is configured, since the url itself does not come back on+ reads.+ readOnly: true+ urlSupportsDirectMessage:+ type: boolean+ title: url_supports_direct_message+ description: |-+ Whether the stored url's endpoint form can carry a direct message to the+ users an event mentions, rather than only a post to the channel the url+ names. False for a Microsoft Teams Power Automate workflow endpoint, which+ direct messages bypass entirely: a webhook with direct_message set sends+ them and returns, so the workflow post never happens.++ Reads do not return the url, so a client editing a saved webhook cannot+ work this out for itself. It is a fact about the stored url and says+ nothing about what the url is.+ readOnly: truedirectMessage:type: booleantitle: direct_message@@ -32392,7 +32434,6 @@ components:required:- type- title- - urladditionalProperties: falsebytebase.v1.WebhookType:type: stringdiff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex bc514ab47d..ddb310bfe0 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -846,7 +846,9 @@ already keeps for the wording.| READS_OTHER_USERS_SQL | 10 | Returns SQL that other people wrote. The permission gating it reads as an ordinary list permission, so the exclusion is per method rather than per permission: these methods span the workspace or ignore the per-object sharing that keeps a saved query private. || OPENS_AN_ADMIN_CONNECTION | 11 | Opens an admin-credentialed connection to the customer's database and returns live session state from it — including other sessions' in-flight, unmasked SQL. It shares a plain read permission with sibling methods that only read Bytebase's own store. || SENDS_DATA_TO_A_THIRD_PARTY | 12 | Spends a stored workspace credential on an outbound call to a third party, which puts whatever the caller passes outside the product. |-| RETURNS_A_STORED_SECRET | 13 | Returns a stored secret in its response body today. These are ordinary reads that belong in a serving class on their merits, and each is here because of a leak that a redaction on the read path would close — the product already redacts the same values elsewhere. This reason is therefore the one that is meant to go away: fixing the leak moves the method to READ, as a reviewed widening, rather than leaving a quiet exposure the moment the ceiling starts serving. |+| RETURNS_A_STORED_SECRET | 13 | Returns a stored secret in its response body today. These are ordinary reads that belong in a serving class on their merits, and each is here because of a leak that a redaction on the read path would close — the product already redacts the same values elsewhere. This reason is therefore the one that is meant to go away: fixing the leak moves the method to READ, as a reviewed widening, rather than leaving a quiet exposure the moment the ceiling starts serving.++No method carries it. The three leaks it was written for — project webhook URLs, the MySQL-family grant text, and the MFA enrollment secrets — are redacted on the read path, and their eight methods are READ. The value stays because the category is real and the next read found leaking should carry it rather than an invented one, and because retiring an enum value costs a reserved number for nothing. |@@ -9909,7 +9911,9 @@ When paginating, all other parameters provided to `SearchProjects` must match th| Field | Type | Label | Description || ----- | ---- | ----- | ----------- || project | [string](#string) | | The name of the project which owns the webhook to test. Format: projects/{project} |-| webhook | [Webhook](#bytebase-v1-Webhook) | | The webhook to test. Identified by its url. |+| webhook | [Webhook](#bytebase-v1-Webhook) | | The webhook to test.++The url is what gets posted to. Reads do not return a saved webhook's url, so leave url empty and set name to test the one already stored; set url to test a url before saving it. |@@ -9993,7 +9997,15 @@ The project's `name` field is used to identify the project to update. Format| name | [string](#string) | | name is the name of the webhook, generated by the server. format: projects/{project}/webhooks/{webhook} || type | [WebhookType](#bytebase-v1-WebhookType) | | Webhook integration type. type is the type of the webhook. || title | [string](#string) | | title is the title of the webhook. |-| url | [string](#string) | | url is the url of the webhook, should be unique within the project. |+| url | [string](#string) | | url is the url of the webhook, should be unique within the project.++Write-only: an incoming-webhook url is the whole credential for posting into the customer's chat, so reads leave it empty, the same way a data source's password and SSL material are left empty. Set it to change it; read url_set to know whether one is configured.++Required to create a webhook. Not required on TestWebhook, where an empty url on a request that names a webhook means the one already stored, so the field carries no REQUIRED behavior it would contradict there. |+| url_set | [bool](#bool) | | Whether a url is configured, since the url itself does not come back on reads. |+| url_supports_direct_message | [bool](#bool) | | Whether the stored url's endpoint form can carry a direct message to the users an event mentions, rather than only a post to the channel the url names. False for a Microsoft Teams Power Automate workflow endpoint, which direct messages bypass entirely: a webhook with direct_message set sends them and returns, so the workflow post never happens.++Reads do not return the url, so a client editing a saved webhook cannot work this out for itself. It is a fact about the stored url and says nothing about what the url is. || direct_message | [bool](#bool) | | if direct_message is set, the notification is sent directly to the persons and url will be ignored. IM integration setting should be set for this function to work. || notification_types | [Activity.Type](#bytebase-v1-Activity-Type) | repeated | notification_types is the list of activities types that the webhook is interested in. Bytebase will only send notifications to the webhook if the activity type is in the list. It should not be empty, and should be a subset of the following: - ISSUE_CREATED - ISSUE_APPROVAL_REQUESTED - ISSUE_SENT_BACK - ISSUE_APPROVED - PIPELINE_FAILED - PIPELINE_COMPLETED |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex c66cfda091..97440613d4 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -3325,7 +3325,14 @@ because of a leak that a redaction on the read path would close — theproduct already redacts the same values elsewhere. This reason istherefore the one that is meant to go away: fixing the leak moves themethod to READ, as a reviewed widening, rather than leaving a quiet-exposure the moment the ceiling starts serving.</p></td>+exposure the moment the ceiling starts serving.++No method carries it. The three leaks it was written for — project+webhook URLs, the MySQL-family grant text, and the MFA enrollment+secrets — are redacted on the read path, and their eight methods are+READ. The value stays because the category is real and the next read+found leaking should carry it rather than an invented one, and because+retiring an enum value costs a reserved number for nothing.</p></td></tr></tbody>@@ -28145,7 +28152,11 @@ Format: projects/{project} </p></td><td>webhook</td><td><a href="#bytebase.v1.Webhook">Webhook</a></td><td></td>- <td><p>The webhook to test. Identified by its url. </p></td>+ <td><p>The webhook to test.++The url is what gets posted to. Reads do not return a saved webhook's url,+so leave url empty and set name to test the one already stored; set url to+test a url before saving it. </p></td></tr></tbody>@@ -28322,7 +28333,39 @@ type is the type of the webhook. </p></td><td>url</td><td><a href="#string">string</a></td><td></td>- <td><p>url is the url of the webhook, should be unique within the project. </p></td>+ <td><p>url is the url of the webhook, should be unique within the project.++Write-only: an incoming-webhook url is the whole credential for posting+into the customer's chat, so reads leave it empty, the same way a data+source's password and SSL material are left empty. Set it to change it;+read url_set to know whether one is configured.++Required to create a webhook. Not required on TestWebhook, where an empty+url on a request that names a webhook means the one already stored, so the+field carries no REQUIRED behavior it would contradict there. </p></td>+ </tr>++ <tr>+ <td>url_set</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether a url is configured, since the url itself does not come back on+reads. </p></td>+ </tr>++ <tr>+ <td>url_supports_direct_message</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether the stored url's endpoint form can carry a direct message to the+users an event mentions, rather than only a post to the channel the url+names. False for a Microsoft Teams Power Automate workflow endpoint, which+direct messages bypass entirely: a webhook with direct_message set sends+them and returns, so the workflow post never happens.++Reads do not return the url, so a client editing a saved webhook cannot+work this out for itself. It is a fact about the stored url and says+nothing about what the url is. </p></td></tr><tr>diff --git a/proto/v1/v1/annotation.proto b/proto/v1/v1/annotation.protoindex e11f2e029c..86cc603048 100644--- a/proto/v1/v1/annotation.proto+++ b/proto/v1/v1/annotation.proto@@ -168,5 +168,12 @@ enum MCPDenialReason {// therefore the one that is meant to go away: fixing the leak moves the// method to READ, as a reviewed widening, rather than leaving a quiet// exposure the moment the ceiling starts serving.+ //+ // No method carries it. The three leaks it was written for — project+ // webhook URLs, the MySQL-family grant text, and the MFA enrollment+ // secrets — are redacted on the read path, and their eight methods are+ // READ. The value stays because the category is real and the next read+ // found leaking should carry it rather than an invented one, and because+ // retiring an enum value costs a reserved number for nothing.RETURNS_A_STORED_SECRET = 13;}diff --git a/proto/v1/v1/instance_role_service.proto b/proto/v1/v1/instance_role_service.protoindex 9b6f3a68e4..700ce4c799 100644--- a/proto/v1/v1/instance_role_service.proto+++ b/proto/v1/v1/instance_role_service.proto@@ -22,8 +22,7 @@ service InstanceRoleService {option (google.api.method_signature) = "parent";option (bytebase.v1.permission) = "bb.instanceRoles.list";option (bytebase.v1.auth_method) = IAM;- option (bytebase.v1.mcp_method_class) = EXCLUDED;- option (bytebase.v1.mcp_denial_reason) = RETURNS_A_STORED_SECRET;+ option (bytebase.v1.mcp_method_class) = READ;}}diff --git a/proto/v1/v1/instance_service.proto b/proto/v1/v1/instance_service.protoindex de80c8abc1..f2f389662a 100644--- a/proto/v1/v1/instance_service.proto+++ b/proto/v1/v1/instance_service.proto@@ -29,8 +29,7 @@ service InstanceService {option (google.api.method_signature) = "name";option (bytebase.v1.permission) = "bb.instances.get";option (bytebase.v1.auth_method) = IAM;- option (bytebase.v1.mcp_method_class) = EXCLUDED;- option (bytebase.v1.mcp_denial_reason) = RETURNS_A_STORED_SECRET;+ option (bytebase.v1.mcp_method_class) = READ;}// Lists database instances, optionally within a project.@@ -43,8 +42,7 @@ service InstanceService {option (google.api.method_signature) = "";option (bytebase.v1.permission) = "bb.instances.list";option (bytebase.v1.auth_method) = IAM;- option (bytebase.v1.mcp_method_class) = EXCLUDED;- option (bytebase.v1.mcp_denial_reason) = RETURNS_A_STORED_SECRET;+ option (bytebase.v1.mcp_method_class) = READ;}// Creates a new database instance.diff --git a/proto/v1/v1/project_service.proto b/proto/v1/v1/project_service.protoindex d87f6649e6..1f6e4592d7 100644--- a/proto/v1/v1/project_service.proto+++ b/proto/v1/v1/project_service.proto@@ -26,8 +26,7 @@ service ProjectService {option (google.api.method_signature) = "name";option (bytebase.v1.permission) = "bb.projects.get";option (bytebase.v1.auth_method) = IAM;- option (bytebase.v1.mcp_method_class) = EXCLUDED;- option (bytebase.v1.mcp_denial_reason) = RETURNS_A_STORED_SECRET;+ option (bytebase.v1.mcp_method_class) = READ;}// BatchGetProjects retrieves multiple projects by their names.@@ -36,8 +35,7 @@ service ProjectService {option (google.api.http) = {get: "/v1/projects:batchGet"};option (bytebase.v1.permission) = "bb.projects.get";option (bytebase.v1.auth_method) = IAM;- option (bytebase.v1.mcp_method_class) = EXCLUDED;- option (bytebase.v1.mcp_denial_reason) = RETURNS_A_STORED_SECRET;+ option (bytebase.v1.mcp_method_class) = READ;}// Lists all projects in the workspace with optional filtering.@@ -47,8 +45,7 @@ service ProjectService {option (google.api.method_signature) = "";option (bytebase.v1.permission) = "bb.projects.list";option (bytebase.v1.auth_method) = IAM;- option (bytebase.v1.mcp_method_class) = EXCLUDED;- option (bytebase.v1.mcp_denial_reason) = RETURNS_A_STORED_SECRET;+ option (bytebase.v1.mcp_method_class) = READ;}// Searches for projects with advanced filtering capabilities.@@ -61,8 +58,7 @@ service ProjectService {option (google.api.method_signature) = "";option (bytebase.v1.auth_method) = CUSTOM;// TODO(d): secure it.- option (bytebase.v1.mcp_method_class) = EXCLUDED;- option (bytebase.v1.mcp_denial_reason) = RETURNS_A_STORED_SECRET;+ option (bytebase.v1.mcp_method_class) = READ;}// Creates a new project in the workspace.@@ -532,7 +528,11 @@ message TestWebhookRequest {(google.api.resource_reference) = {type: "bytebase.com/Project"}];- // The webhook to test. Identified by its url.+ // The webhook to test.+ //+ // The url is what gets posted to. Reads do not return a saved webhook's url,+ // so leave url empty and set name to test the one already stored; set url to+ // test a url before saving it.Webhook webhook = 2 [(google.api.field_behavior) = REQUIRED];}@@ -559,7 +559,31 @@ message Webhook {string title = 3 [(google.api.field_behavior) = REQUIRED];// url is the url of the webhook, should be unique within the project.- string url = 4 [(google.api.field_behavior) = REQUIRED];+ //+ // Write-only: an incoming-webhook url is the whole credential for posting+ // into the customer's chat, so reads leave it empty, the same way a data+ // source's password and SSL material are left empty. Set it to change it;+ // read url_set to know whether one is configured.+ //+ // Required to create a webhook. Not required on TestWebhook, where an empty+ // url on a request that names a webhook means the one already stored, so the+ // field carries no REQUIRED behavior it would contradict there.+ string url = 4 [(google.api.field_behavior) = INPUT_ONLY];++ // Whether a url is configured, since the url itself does not come back on+ // reads.+ bool url_set = 7 [(google.api.field_behavior) = OUTPUT_ONLY];++ // Whether the stored url's endpoint form can carry a direct message to the+ // users an event mentions, rather than only a post to the channel the url+ // names. False for a Microsoft Teams Power Automate workflow endpoint, which+ // direct messages bypass entirely: a webhook with direct_message set sends+ // them and returns, so the workflow post never happens.+ //+ // Reads do not return the url, so a client editing a saved webhook cannot+ // work this out for itself. It is a fact about the stored url and says+ // nothing about what the url is.+ bool url_supports_direct_message = 8 [(google.api.field_behavior) = OUTPUT_ONLY];// if direct_message is set, the notification is sent directly// to the persons and url will be ignored.diff --git a/proto/v1/v1/user_service.proto b/proto/v1/v1/user_service.protoindex 8d33c5223e..a13d0ce6ea 100644--- a/proto/v1/v1/user_service.proto+++ b/proto/v1/v1/user_service.proto@@ -46,8 +46,7 @@ service UserService {option (google.api.http) = {get: "/v1/users/me"};option (bytebase.v1.allow_without_credential) = true;option (bytebase.v1.auth_method) = CUSTOM;- option (bytebase.v1.mcp_method_class) = EXCLUDED;- option (bytebase.v1.mcp_denial_reason) = RETURNS_A_STORED_SECRET;+ option (bytebase.v1.mcp_method_class) = READ;}// List all users.