Skip to content

Allow configuring mandatory share expiration #11545

@waza-ari

Description

@waza-ari

Is your feature request related to a problem? Please describe.

After having maintained a Nextcloud installation for more than 10 years, it became pretty apparent that, over time, public shares get created and forgotten. Especially in an environment where people come and go (e.g. a non profit organization such as ours), that ends up various problems.

For example, we regularly have questions like:

  • who again created the share of document XYZ linked on the homepage?
  • this shared link XYZ on Wiki page ABC no longer works, who created it and which file did it refer to?
  • someone shared a folder they were not supposed to share, and the link somehow got to people that should not have access to the files

Ultimately, we end up with a plethora of shared public link shares, often so files that are sensitive, with no overview who created them, what they were used for, and if its a security issue or not. At the

Describe the solution you'd like

We would like to propose adding an ability further administrative control to public link shares. As of today, it is possible to enforce a password to be set, however that applies to all link shares and lacks flexibility.

Ideally, we'd be able to add an administrative setting that - if enabled - enforces the user to set an expiration date. The maximum duration is configurable using a second setting.

  • Option 1: two environment variables applying to everything, e.g. SHARING_PUBLIC_SHARE_MUST_HAVE_EXPIRY_DATE and SHARING_PUBLIC_SHARE_MAX_SHARE_DURATION or similar. The frontend would need to be adjusted to handle those cases, I'm not sure how that would affect sharing on the app side
  • Option 2: even more flexibility would be possible by allowing these settings on a per Storage Space level. This way, user spaces could retain the freedom they currently have, while it would be possible to define stricter policy for spaces containing more sensitive data.

Describe alternatives you've considered

Alternatively it could be possible to handle this as part of user permissions - e.g. have a certain role that is allowed to create shares with unlimited duration, others would be forced to set an expiration date.

Additional context

In the past, the open sharing policy has led to security incidents, where share links have been handled without proper care by some users, leading to files being publicly available that should not have been. While this is ultimately within the responsibility of the user creating the share, having a forced expiration would help reducing this risk significantly.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions