[pve-devel] [RFC pve-storage master v2 3/10] api: plugins/storage/plugin: mark sensitive properties in schema
Max R. Carrara
m.carrara at proxmox.com
Fri Nov 21 17:58:32 CET 2025
Signed-off-by: Max R. Carrara <m.carrara at proxmox.com>
---
src/PVE/API2/Plugins/Storage/Plugin.pm | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/PVE/API2/Plugins/Storage/Plugin.pm b/src/PVE/API2/Plugins/Storage/Plugin.pm
index 573d3e4..757ae1e 100644
--- a/src/PVE/API2/Plugins/Storage/Plugin.pm
+++ b/src/PVE/API2/Plugins/Storage/Plugin.pm
@@ -42,6 +42,7 @@ my sub get_schema_for_plugin : prototype($) ($plugin) {
return $PLUGIN_SCHEMAS->{$type} if defined($PLUGIN_SCHEMAS->{$type});
my $options = $plugin->options();
+ my $plugindata = $plugin->plugindata();
my $schema = {};
$PLUGIN_SCHEMAS->{$type} = $schema;
@@ -52,6 +53,8 @@ my sub get_schema_for_plugin : prototype($) ($plugin) {
# shallow copy
my $property = { $prop_schema->%* };
+ $property->{sensitive} = defined($plugindata->{'sensitive-properties'}->{$option}) || 0;
+
$schema->{$option} = $property;
for my $opt_key (keys $options->{$option}->%*) {
--
2.47.3
More information about the pve-devel
mailing list