mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 08:32:50 -05:00
Make development easier (#3504)
* Remove Certificate Steps from Setup * Add Helpers to VSCode Tasks * Force Ephermal Key in Integration Tests * Add Property to Interface
This commit is contained in:
@ -80,6 +80,7 @@ public class GlobalSettings : IGlobalSettings
|
||||
public virtual IPasswordlessAuthSettings PasswordlessAuth { get; set; } = new PasswordlessAuthSettings();
|
||||
public virtual IDomainVerificationSettings DomainVerification { get; set; } = new DomainVerificationSettings();
|
||||
public virtual ILaunchDarklySettings LaunchDarkly { get; set; } = new LaunchDarklySettings();
|
||||
public virtual string DevelopmentDirectory { get; set; }
|
||||
|
||||
public string BuildExternalUri(string explicitValue, string name)
|
||||
{
|
||||
@ -401,7 +402,7 @@ public class GlobalSettings : IGlobalSettings
|
||||
/// <value></value>
|
||||
public string CertificatePassword { get; set; }
|
||||
/// <summary>
|
||||
/// The thumbprint of the certificate in the X.509 certificate store for personal certificates for the user account running Bitwarden.
|
||||
/// The thumbprint of the certificate in the X.509 certificate store for personal certificates for the user account running Bitwarden.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string CertificateThumbprint { get; set; }
|
||||
|
@ -23,4 +23,5 @@ public interface IGlobalSettings
|
||||
IPasswordlessAuthSettings PasswordlessAuth { get; set; }
|
||||
IDomainVerificationSettings DomainVerification { get; set; }
|
||||
ILaunchDarklySettings LaunchDarkly { get; set; }
|
||||
string DevelopmentDirectory { get; set; }
|
||||
}
|
||||
|
@ -25,6 +25,7 @@
|
||||
},
|
||||
"storage": {
|
||||
"connectionString": "UseDevelopmentStorage=true"
|
||||
}
|
||||
},
|
||||
"developmentDirectory": "../../dev"
|
||||
}
|
||||
}
|
||||
|
@ -511,6 +511,11 @@ public static class ServiceCollectionExtensions
|
||||
{
|
||||
identityServerBuilder.AddSigningCredential(certificate);
|
||||
}
|
||||
else if (env.IsDevelopment() && !string.IsNullOrEmpty(globalSettings.DevelopmentDirectory))
|
||||
{
|
||||
var developerSigningKeyPath = Path.Combine(globalSettings.DevelopmentDirectory, "signingkey.jwk");
|
||||
identityServerBuilder.AddDeveloperSigningCredential(true, developerSigningKeyPath);
|
||||
}
|
||||
else if (env.IsDevelopment())
|
||||
{
|
||||
identityServerBuilder.AddDeveloperSigningCredential(false);
|
||||
|
Reference in New Issue
Block a user