refactor(securestore): remove password-based authentication in favor of key-file only

Simplify SecureStore by removing MasterKeyEnvVar and password-based methods, leaving only key-file authentication for better security practices.
This commit is contained in:
Joseph Doherty
2026-01-23 00:17:19 -05:00
parent 9c4a184233
commit 1b7bb26def
22 changed files with 101 additions and 1421 deletions
@@ -4,8 +4,8 @@
x:Class="JdeScoping.ConfigManager.Views.Dialogs.NewStoreDialog"
x:DataType="vm:NewStoreDialogViewModel"
Title="Create New Secure Store"
Width="550" Height="480"
MinWidth="450" MinHeight="400"
Width="550" Height="350"
MinWidth="450" MinHeight="300"
Background="#151920"
WindowStartupLocation="CenterOwner"
CanResize="False"
@@ -56,28 +56,14 @@
</StackPanel>
</Border>
<!-- Encryption Method -->
<!-- Key File -->
<Border Background="#1C2128" BorderBrush="#2D3540" BorderThickness="1"
CornerRadius="4" Padding="16">
<StackPanel Spacing="8">
<TextBlock Text="Encryption Method" Foreground="#E6EDF5"
FontWeight="SemiBold" FontSize="14"/>
<RadioButton Content="Use Key File (recommended for production)"
IsChecked="{Binding UseKeyFile, Mode=TwoWay}"
Foreground="#9BA8B8" Margin="0,4"/>
<RadioButton Content="Use Password"
IsChecked="{Binding UsePassword, Mode=TwoWay}"
Foreground="#9BA8B8" Margin="0,4"/>
</StackPanel>
</Border>
<!-- Key File Settings -->
<Border Background="#1C2128" BorderBrush="#2D3540" BorderThickness="1"
CornerRadius="4" Padding="16"
IsVisible="{Binding UseKeyFile}">
<StackPanel Spacing="8">
<TextBlock Text="Key File" Foreground="#E6EDF5"
FontWeight="SemiBold" FontSize="14"/>
<TextBlock Text="The key file is required to encrypt and decrypt the store."
Foreground="#9BA8B8" FontSize="12" TextWrapping="Wrap"/>
<Grid ColumnDefinitions="*,Auto,Auto" Margin="0,4,0,0">
<TextBox Grid.Column="0"
Text="{Binding KeyFilePath, Mode=TwoWay}"
@@ -96,32 +82,6 @@
</StackPanel>
</Border>
<!-- Password Settings -->
<Border Background="#1C2128" BorderBrush="#2D3540" BorderThickness="1"
CornerRadius="4" Padding="16"
IsVisible="{Binding UsePassword}">
<StackPanel Spacing="8">
<TextBlock Text="Password" Foreground="#E6EDF5"
FontWeight="SemiBold" FontSize="14"/>
<Grid ColumnDefinitions="120,*" RowDefinitions="Auto,Auto" Margin="0,4,0,0">
<TextBlock Grid.Row="0" Grid.Column="0" Text="Password:"
Foreground="#9BA8B8" VerticalAlignment="Center" Margin="0,8"/>
<TextBox Grid.Row="0" Grid.Column="1"
PasswordChar="*"
Text="{Binding Password, Mode=TwoWay}"
Background="#0D0F12" Foreground="#E6EDF5"
BorderBrush="#3D4550" Padding="8" Margin="0,4"/>
<TextBlock Grid.Row="1" Grid.Column="0" Text="Confirm:"
Foreground="#9BA8B8" VerticalAlignment="Center" Margin="0,8"/>
<TextBox Grid.Row="1" Grid.Column="1"
PasswordChar="*"
Text="{Binding ConfirmPassword, Mode=TwoWay}"
Background="#0D0F12" Foreground="#E6EDF5"
BorderBrush="#3D4550" Padding="8" Margin="0,4"/>
</Grid>
</StackPanel>
</Border>
<!-- Validation Error -->
<TextBlock Text="{Binding ValidationError}"
Foreground="#FF6B6B" FontSize="12"
@@ -4,8 +4,8 @@
x:Class="JdeScoping.ConfigManager.Views.Dialogs.UnlockStoreDialog"
x:DataType="vm:UnlockStoreDialogViewModel"
Title="Unlock Secure Store"
Width="500" Height="400"
MinWidth="400" MinHeight="350"
Width="500" Height="320"
MinWidth="400" MinHeight="280"
Background="#151920"
WindowStartupLocation="CenterOwner"
CanResize="False"
@@ -49,28 +49,14 @@
</StackPanel>
</Border>
<!-- Decryption Method -->
<!-- Key File -->
<Border Background="#1C2128" BorderBrush="#2D3540" BorderThickness="1"
CornerRadius="4" Padding="16">
<StackPanel Spacing="8">
<TextBlock Text="Decryption Method" Foreground="#E6EDF5"
FontWeight="SemiBold" FontSize="14"/>
<RadioButton Content="Use Key File"
IsChecked="{Binding UseKeyFile, Mode=TwoWay}"
Foreground="#9BA8B8" Margin="0,4"/>
<RadioButton Content="Use Password"
IsChecked="{Binding UsePassword, Mode=TwoWay}"
Foreground="#9BA8B8" Margin="0,4"/>
</StackPanel>
</Border>
<!-- Key File Settings -->
<Border Background="#1C2128" BorderBrush="#2D3540" BorderThickness="1"
CornerRadius="4" Padding="16"
IsVisible="{Binding UseKeyFile}">
<StackPanel Spacing="8">
<TextBlock Text="Key File" Foreground="#E6EDF5"
FontWeight="SemiBold" FontSize="14"/>
<TextBlock Text="Select the key file used to encrypt this store."
Foreground="#9BA8B8" FontSize="12" TextWrapping="Wrap"/>
<Grid ColumnDefinitions="*,Auto" Margin="0,4,0,0">
<TextBox Grid.Column="0"
Text="{Binding KeyFilePath, Mode=TwoWay}"
@@ -85,25 +71,6 @@
</StackPanel>
</Border>
<!-- Password Settings -->
<Border Background="#1C2128" BorderBrush="#2D3540" BorderThickness="1"
CornerRadius="4" Padding="16"
IsVisible="{Binding UsePassword}">
<StackPanel Spacing="8">
<TextBlock Text="Password" Foreground="#E6EDF5"
FontWeight="SemiBold" FontSize="14"/>
<Grid ColumnDefinitions="100,*" Margin="0,4,0,0">
<TextBlock Text="Password:" Foreground="#9BA8B8"
VerticalAlignment="Center"/>
<TextBox Grid.Column="1"
PasswordChar="*"
Text="{Binding Password, Mode=TwoWay}"
Background="#0D0F12" Foreground="#E6EDF5"
BorderBrush="#3D4550" Padding="8" Margin="0,4"/>
</Grid>
</StackPanel>
</Border>
<!-- Validation Error -->
<TextBlock Text="{Binding ValidationError}"
Foreground="#FF6B6B" FontSize="12"