Skip to content

Conversation

@andrey18106
Copy link
Contributor

@andrey18106 andrey18106 commented May 26, 2025

Summary

This PR introduces new Declarative setting field attribute sensitive: true/false, available for Text and Password field types. Sensitive fields are encrypted on server side and the values are not exposed to the UI.

Declarative forms with handler (https://github.com/nextcloud/server/blob/master/lib/public/Settings/IDeclarativeSettingsFormWithHandlers.php) must implement this in their setValue, getValue methods, as well as external storage type (using events to handle getValue/setValue actions).

For ExApps AppAPI handles this automatically inside its event handlers.

TODO

  • Clarify design of sensitive fields if they need explicit mark

Checklist

Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

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

LGTM, just some suggestions for improvements.

@andrey18106 andrey18106 force-pushed the feat/sensitive-declarative-settings branch from a2912d4 to cd742aa Compare May 27, 2025 17:25
Copy link
Contributor

@susnux susnux left a comment

Choose a reason for hiding this comment

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

LGTM except from the sprintf

@andrey18106 andrey18106 force-pushed the feat/sensitive-declarative-settings branch from cd742aa to e570179 Compare May 27, 2025 18:09
Copy link
Contributor

@oleksandr-nc oleksandr-nc left a comment

Choose a reason for hiding this comment

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

overall it looks good

@andrey18106 andrey18106 force-pushed the feat/sensitive-declarative-settings branch from e570179 to ca17680 Compare May 28, 2025 17:13
@nextcloud-command nextcloud-command requested a review from a team as a code owner May 28, 2025 17:40
@andrey18106 andrey18106 force-pushed the feat/sensitive-declarative-settings branch from 7573fe6 to 7994332 Compare May 28, 2025 17:45
@andrey18106
Copy link
Contributor Author

/compile

Signed-off-by: nextcloud-command <[email protected]>
@AndyScherzinger AndyScherzinger added this to the Nextcloud 32 milestone May 28, 2025
@AndyScherzinger AndyScherzinger enabled auto-merge May 28, 2025 18:12
@AndyScherzinger AndyScherzinger merged commit 0f5db1b into master May 28, 2025
202 of 204 checks passed
@AndyScherzinger AndyScherzinger deleted the feat/sensitive-declarative-settings branch May 28, 2025 18:21
@skjnldsv skjnldsv mentioned this pull request Aug 19, 2025
@skjnldsv skjnldsv modified the milestones: Nextcloud 32, Nextcloud 33 Sep 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Save passwords as sensitive values

8 participants