diff --git a/packages/agentvault/policy.go b/packages/agentvault/policy.go index d3b0103e..02c52127 100644 --- a/packages/agentvault/policy.go +++ b/packages/agentvault/policy.go @@ -22,7 +22,7 @@ func errPersonalValuesMissing(svc *resolvedService) error { if svc.native != nil { what = "username or password" } - return fmt.Errorf("service %q needs your own %s, which isn't set up yet: %w. Set it up on access bundle %q in Infisical Agent Vault, or for a machine identity, start the session on behalf of a user who has set it up. It can take a few minutes to apply.", svc.name, what, errPolicyBlocked, svc.accessBundleName) + return fmt.Errorf("service %q needs your own %s, which isn't set up yet: %w. Set it up under Services in Infisical Agent Vault, or for a machine identity, start the session on behalf of a user who has set it up. It can take a few minutes to apply.", svc.name, what, errPolicyBlocked) } func checkServicePolicy(svc *resolvedService, req *http.Request) error { diff --git a/packages/agentvault/policy_test.go b/packages/agentvault/policy_test.go index 47dcce92..6019c569 100644 --- a/packages/agentvault/policy_test.go +++ b/packages/agentvault/policy_test.go @@ -343,7 +343,7 @@ func TestPersonalValuesMissing(t *testing.T) { t.Fatalf("a service missing the owner's personal values should be blocked, got %v", err) } if !strings.Contains(err.Error(), `service "github" needs your own credential or sign-in`) || - !strings.Contains(err.Error(), `access bundle "on-call" in Infisical Agent Vault`) || + !strings.Contains(err.Error(), "under Services in Infisical Agent Vault") || !strings.Contains(err.Error(), "It can take a few minutes to apply") { t.Fatalf("the refusal should say what to set up, where, and that saving takes a poll to apply: %q", err.Error()) } diff --git a/packages/agentvault/upstream_auth.go b/packages/agentvault/upstream_auth.go index 777d9679..a60a91e9 100644 --- a/packages/agentvault/upstream_auth.go +++ b/packages/agentvault/upstream_auth.go @@ -35,14 +35,14 @@ func upstreamAuthBody(code, message string) string { // For a credential the user stored, which only they can replace. func staticCredentialRejectedBody(svc *resolvedService) string { if svc.memberProvided { - return upstreamAuthBody("upstream_auth_failed", fmt.Sprintf("The %s service rejected your credential. Update your personal value on access bundle %q in Infisical Agent Vault.", svc.name, svc.accessBundleName)) + return upstreamAuthBody("upstream_auth_failed", fmt.Sprintf("The %s service rejected your credential. Update your personal value for it under Services in Infisical Agent Vault.", svc.name)) } return upstreamAuthBody("upstream_auth_failed", fmt.Sprintf("The %s service's credential was rejected. Update it in Infisical Agent Vault.", svc.name)) } func reauthorizationNeededBody(svc *resolvedService) string { if svc.memberProvided { - return upstreamAuthBody("upstream_auth_failed", fmt.Sprintf("Reconnect your account for the %s service on access bundle %q in Infisical Agent Vault.", svc.name, svc.accessBundleName)) + return upstreamAuthBody("upstream_auth_failed", fmt.Sprintf("Reconnect your account for the %s service under Services in Infisical Agent Vault.", svc.name)) } return upstreamAuthBody("upstream_auth_failed", fmt.Sprintf("The %s service needs to be reauthorized in Infisical Agent Vault.", svc.name)) } diff --git a/packages/agentvault/upstream_auth_test.go b/packages/agentvault/upstream_auth_test.go index d0314431..9d103940 100644 --- a/packages/agentvault/upstream_auth_test.go +++ b/packages/agentvault/upstream_auth_test.go @@ -474,7 +474,7 @@ func TestAMemberProvidedRejectionTellsTheMemberWhatToFix(t *testing.T) { }, acceptOnly("nothing")) resp, body := doWith(t, client, http.MethodPost, fmt.Sprintf("https://%s/mcp", host), "application/json", strings.NewReader(mcpCallBody)) - assertUpstreamAuthFailed(t, resp, body, `{"error":"upstream_auth_failed","message":"The linear service rejected your credential. Update your personal value on access bundle \"bundle\" in Infisical Agent Vault."}`) + assertUpstreamAuthFailed(t, resp, body, `{"error":"upstream_auth_failed","message":"The linear service rejected your credential. Update your personal value for it under Services in Infisical Agent Vault."}`) }) t.Run("oauth needs reauthorization", func(t *testing.T) { @@ -486,7 +486,7 @@ func TestAMemberProvidedRejectionTellsTheMemberWhatToFix(t *testing.T) { }, acceptOnly("nothing")) resp, body := doWith(t, client, http.MethodGet, fmt.Sprintf("https://%s/mcp", host), "", nil) - assertUpstreamAuthFailed(t, resp, body, `{"error":"upstream_auth_failed","message":"Reconnect your account for the linear service on access bundle \"bundle\" in Infisical Agent Vault."}`) + assertUpstreamAuthFailed(t, resp, body, `{"error":"upstream_auth_failed","message":"Reconnect your account for the linear service under Services in Infisical Agent Vault."}`) }) }