Skip to content

feat(webpush): Add admin setting to allow opt-in and out of webpush #2850

Merged
nickvergessen merged 4 commits intomasterfrom
feat/noid/admin-config
Mar 31, 2026
Merged

feat(webpush): Add admin setting to allow opt-in and out of webpush #2850
nickvergessen merged 4 commits intomasterfrom
feat/noid/admin-config

Conversation

@nickvergessen
Copy link
Copy Markdown
Member

@nickvergessen nickvergessen commented Mar 12, 2026

image

Comment thread src/views/AdminSettings.vue Outdated
@nickvergessen nickvergessen force-pushed the feat/noid/admin-config branch from 4aaee1c to 5b72aa1 Compare March 16, 2026 10:33
@nickvergessen nickvergessen marked this pull request as draft March 16, 2026 10:33
Comment thread lib/Controller/SettingsController.php
Comment thread src/views/AdminSettings.vue Outdated
Comment thread src/views/AdminSettings.vue Outdated
Comment thread src/views/AdminSettings.vue Outdated
@p1gp1g
Copy link
Copy Markdown
Contributor

p1gp1g commented Mar 17, 2026

I think web push should be enabled by default, just like proxy push is enabled by default, because it doesn't goes against Nextcloud default threat model (cf SSRF, Version disclosure).

In details, compare to other Nextcloud features, web push doesn't really add privacy concern. Concretely, we are talking about one potential risk for hidden instances, not exposed on the Internet, without any federation or email feature, that would exposed their existence to the web push servers used by the users.

So, this hidden instance exposes its existence to the browser provider, which likely already know the instance existence with the browsing history.

This kind of setup must already set outbound connection protection (VPN/Tor), and probably be served as a hidden service too

We are explicitly not talking about the risk that communications would be correlated by a push provider, which isn't in the threat model, because it is already possible with proxy-push and email notifications: we would need a setting to block proxy-push as well.

BTW, every other self-hostable service I know don't even provide a way to disable push.

Anyway, I think an option to disabling web push/push in general is nice to have. I think the config file should be enough for that, I don't know if it is worth a UI setting which is better to avoid when the default is good enough

@nickvergessen
Copy link
Copy Markdown
Member Author

I think web push should be enabled by default, just like proxy push is enabled by default, because it doesn't goes against Nextcloud default threat model (cf SSRF, Version disclosure).

Not security-wise, but our GDPR office made that call, my hands are tied a bit.

Concretely, we are talking about one potential risk for hidden instances, not exposed on the Internet, without any federation or email feature, that would exposed their existence to the web push servers used by the users.

This is quite a common thing. But yeah I guess we should follow https://github.com/nextcloud/server/blob/bb4c9ecc0e316782227570257856891995b1e369/config/config.sample.php#L985-L990 with it. At least for the browser part.

For mobile apps aka. unified push, it might even be okay as such an organization could set up a local unified push and people then get push notifications via a server that is inside the offline/air-gapped setup? Would that work?

We are explicitly not talking about the risk that communications would be correlated by a push provider, which isn't in the threat model, because it is already possible with proxy-push and email notifications: we would need a setting to block proxy-push as well.

This can and is done via build options in the mobile clients and e.g. by installing the Android apps from F-Droid rather then Google Play.

@p1gp1g
Copy link
Copy Markdown
Contributor

p1gp1g commented Mar 17, 2026

I think web push should be enabled by default, just like proxy push is enabled by default, because it doesn't goes against Nextcloud default threat model (cf SSRF, Version disclosure).

Not security-wise, but our GDPR office made that call, my hands are tied a bit.

Oh, OK. This is indeed a good thing to think about.

The push server is given by the user, and push notifications don't contains PII (everything is encrypted, the origin IP isn't the user's one, nor the receiving IP). But we know advanced attacks may be done to correlate activities between 2 "users"/push sessions. This the responsibility of the push server the user has registered to with their browser, independently of Nextcloud.

But we should be transparent to the user: in this case, it would be better to get the user consent when they enable push notifications, before registering on the server. There could be a dialog informing that the feature makes the server sharing to the browser service information regarding when they receive a notification.

For example:

  1. User opens notifications view
  2. Browser ask for notification permission
  3. If granted, we show a dialog like "Push notifications allows you to be notified when you have new activity even if Nextcloud isn't opened. The notifications are encrypted but gives information about when you have activity to your browser remote service. Would you like to continue ?"
  4. If refused => continue without push, else => register to Nextcloud

Concretely, we are talking about one potential risk for hidden instances, not exposed on the Internet, without any federation or email feature, that would exposed their existence to the web push servers used by the users.

This is quite a common thing. But yeah I guess we should follow https://github.com/nextcloud/server/blob/bb4c9ecc0e316782227570257856891995b1e369/config/config.sample.php#L985-L990 with it. At least for the browser part.

That's a good idea. We can also have another feature push_notifications that has the same value than has_internet_connection by default, but can be different (for the point below)

For mobile apps aka. unified push, it might even be okay as such an organization could set up a local unified push and people then get push notifications via a server that is inside the offline/air-gapped setup? Would that work?

Yes, this is one of the edge-cases covered by decentralized push systems like UnifiedPush: they work in air-gapped setups

@nickvergessen nickvergessen force-pushed the feat/noid/admin-config branch 2 times, most recently from f5780c1 to b3e2092 Compare March 27, 2026 08:29
@p1gp1g
Copy link
Copy Markdown
Contributor

p1gp1g commented Mar 31, 2026

I'm thinking about the GDPR concern: it would apply to https://push-notifications.nextcloud.com/ * too as it works the same way, but in addition, it isn't provided by the user

* And all mobile applications that use push notifications

@nickvergessen
Copy link
Copy Markdown
Member Author

as it works the same way, but in addition, it isn't provided by the user

The GDPR concern is mostly about the default case, not about opt-in like using a mobile app. The self-hosted unified push is less an issue compared to the "by default as soon as your browser is subscribed you send meta info to Apple, Google, Microsoft, Mozilla, …"

The user simply opts-in by granting the browser the notification permission. But we want to keep an admin opt to control this.

The default value of the bool config is a quick change afterwards and I will discuss it again with the relevant people once the feature is ready for testing (with frontend and everything merged)

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen force-pushed the feat/noid/admin-config branch from b3e2092 to b16f1cb Compare March 31, 2026 10:19
@nickvergessen nickvergessen marked this pull request as ready for review March 31, 2026 10:20
@nickvergessen
Copy link
Copy Markdown
Member Author

/compile amend

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen force-pushed the feat/noid/admin-config branch from 4fd5021 to 1f93059 Compare March 31, 2026 10:34
Copy link
Copy Markdown
Collaborator

@Antreesy Antreesy left a comment

Choose a reason for hiding this comment

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

Looks good

@nickvergessen nickvergessen merged commit ab1c4f1 into master Mar 31, 2026
47 checks passed
@nickvergessen nickvergessen deleted the feat/noid/admin-config branch March 31, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants