Skip to content

Stop subscribing users to security updates on setup - #10484

Merged
nopcoder merged 3 commits into
masterfrom
chore/security-updates
Jul 22, 2026
Merged

Stop subscribing users to security updates on setup#10484
nopcoder merged 3 commits into
masterfrom
chore/security-updates

Conversation

@nopcoder

@nopcoder nopcoder commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Problem

The setup flow collected a "security updates" preference and forwarded it, along with the user's email, to an external comms endpoint to subscribe them to security-update communications. We no longer want to send that subscription. The securityUpdates field must remain in the API for backward compatibility, so it stays in the schema but is marked deprecated and ignored by the server.

Prompt log

on setup we communicate subscribe to security update. remove the code from the client and the server

Explored the "comm prefs" feature end to end (webui setup form, /setup_lakefs and /setup_comm_prefs handlers, auth metadata KV, stats collector/sender). Removed securityUpdates handling from the server and the webui, and dropped "security" from the setup checkbox label.

at this point keep the api/swagger.yml and just comment the field as deprecated

Kept securityUpdates in the Setup and CommPrefsInput schemas, marked deprecated: true with a note that the server ignores it, and regenerated the Go code and the Python/Java/Rust SDKs.

removing a required field is an api break, so lets keep it where it is a required and just pass false. the server can keep ignore it as it is marked as deprecated

Restored securityUpdates to the CommPrefsInput required list to avoid the contract break; the webui now always sends securityUpdates: false, which the server accepts and ignores.

review the github pull request checks that failed and see if we need to update the tests

The E2E setup-validation and Quickstart jobs timed out at setupPage.ts:37 because the Playwright POM still located the opt-in checkbox by its old label. Updated the POM locator to the new "I'd like to receive product and feature updates" text; both jobs pass now.

Related Issue

Closes #10485

Test plan

  • go build ./...
  • go vet on pkg/api, pkg/auth, pkg/stats
  • golangci-lint on affected packages — 0 issues
  • go test on pkg/api (setup/comm-prefs), pkg/auth, pkg/stats — pass
  • make gen-api + SDK regen stable and idempotent
  • webui npm run lint — passes clean
  • All CI checks green (57 pass, 2 skipped), including E2E DynamoDB / Quickstart and the full Go test suite

The setup flow collected a "security updates" preference and forwarded it,
along with the user's email, to an external comms endpoint to subscribe them
to security update communications. We no longer want to send that
subscription. The securityUpdates field stays in the API for backward
compatibility but is marked deprecated and ignored by the server.

> on setup we communicate subscribe to security update. remove the code from
> the client and the server
Explored the "comm prefs" feature end to end (webui setup form, /setup_lakefs
and /setup_comm_prefs handlers, auth metadata, stats collector/sender). Removed
the securityUpdates handling from the server (controller, metadata KV, stats)
and from the webui, and dropped "security" from the checkbox label.

> at this point keep the api/swagger.yml and just comment the field as
> deprecated
Kept securityUpdates in the Setup and CommPrefsInput schemas, marked
deprecated: true with a note that the server ignores it, and regenerated the
Go code and the Python/Java/Rust SDKs.

> removing a required field is an api break, so lets keep it where it is a
> required and just pass false. the server can keep ignore it as it is marked
> as deprecated
Restored securityUpdates to the CommPrefsInput required list to avoid the
contract break; the webui now always sends securityUpdates: false, which the
server accepts and ignores.
@nopcoder nopcoder added include-changelog PR description should be included in next release changelog mostly-ai labels Jul 21, 2026
@nopcoder nopcoder self-assigned this Jul 21, 2026
@github-actions github-actions Bot added area/API Improvements or additions to the API area/testing Improvements or additions to tests area/UI Improvements or additions to UI area/auth IAM, authorization, authentication, audit, AAA, and integrations with all those area/sdk/python labels Jul 21, 2026
@nopcoder
nopcoder requested a review from a team July 22, 2026 11:14
The E2E setup-validation and quickstart checks failed: SetupPage.fillForm
still located the opt-in checkbox by its old label ("...security, product and
feature updates"), which no longer exists after dropping "security" from the
label, so locator.check timed out on every setup test.

> review the github pull request checks that failed and see if we need to
> update the tests
The two failing E2E jobs both timed out at setupPage.ts:37 waiting for the old
label. Updated the POM locator to the new "I'd like to receive product and
feature updates" text.

@N-o-Z N-o-Z left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
One comment

Comment thread pkg/auth/metadata.go Outdated
@@ -148,12 +138,11 @@ func (m *KVMetadataManager) GetCommPrefs(ctx context.Context) (CommPrefs, error)
}

return CommPrefs{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a blocker - but this method is no longer called anywhere. Might as well remove it altogether

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — removed GetCommPrefs and its now-orphaned helper getOptionalMetadataValue in a04b5bf.

After dropping the securityUpdates handling, KVMetadataManager.GetCommPrefs had
no callers and is not part of the MetadataManager interface. Its only helper,
getOptionalMetadataValue, was used solely by it. Both are dead code now.

> review the pull-request comments - any change is needed?
Reviewer flagged GetCommPrefs as no longer called anywhere. Confirmed it (and
getOptionalMetadataValue, which would otherwise become an unused function) have
no remaining references, and removed them.
@nopcoder
nopcoder merged commit 34b1cbe into master Jul 22, 2026
61 checks passed
@nopcoder
nopcoder deleted the chore/security-updates branch July 22, 2026 13:05
kingster added a commit to kingster/lakeFS that referenced this pull request Jul 23, 2026
* upstream/master:
  Refresh webui lock file with transitive dependency updates (treeverse#10494)
  Report data read/write size through lakeFS API and S3 gateway (treeverse#10487)
  Stop subscribing users to security updates on setup (treeverse#10484)

# Conflicts:
#	pkg/api/apigen/lakefs.gen.go
nopcoder added a commit that referenced this pull request Jul 23, 2026
- SetCommPrefsOnce: once-only via SetIf; write data first, flip
  comm_prefs_set last as the commit point so a failed write stays
  retryable and concurrent writers can't double-commit
- skip the not-initialized gate for external RBAC to match GetSetupState
- keep the in-memory cache in sync with KV; a nil update un-sticks a
  previously cached true (Setup retry divergence)
- validate email before any KV access
- treat 409 as success in the webui setup client (double-submit/retry)
- drop security_updates handling, removed in #10484
nopcoder added a commit that referenced this pull request Jul 23, 2026
Adds the v1.84.0 section to CHANGELOG.md with the two user-facing
changes from the recent release cycle: BI usage reporting improvements
(#10487) and the removal of the security-update subscription prompt
(#10484).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/API Improvements or additions to the API area/auth IAM, authorization, authentication, audit, AAA, and integrations with all those area/sdk/python area/testing Improvements or additions to tests area/UI Improvements or additions to UI include-changelog PR description should be included in next release changelog mostly-ai

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecate the security update subscription on setup

2 participants