1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-21 12:05:42 +01:00

Improve local dev setup for SSO project (#1664)

* Add default SSO appsettings for development

* Add Sso project to setup_secrets.ps1 script

* Use hashmap instead of array
This commit is contained in:
Thomas Rittson 2021-11-03 07:12:43 +10:00 committed by GitHub
parent e57bef6af4
commit 98c167b1c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 7 deletions

View File

@ -13,6 +13,15 @@
"internalApi": "http://localhost:4000", "internalApi": "http://localhost:4000",
"internalVault": "http://localhost:4001", "internalVault": "http://localhost:4001",
"internalSso": "http://localhost:51822" "internalSso": "http://localhost:51822"
},
"events": {
"connectionString": "UseDevelopmentStorage=true"
},
"notifications": {
"connectionString": "UseDevelopmentStorage=true"
},
"storage": {
"connectionString": "UseDevelopmentStorage=true"
} }
} }
} }

View File

@ -11,11 +11,26 @@ if (!(Test-Path "secrets.json")) {
exit; exit;
} }
$projects = "Admin", "Api", "Billing", "Events", "EventsProcessor", "Icons", "Identity", "Notifications"; if ($clear -eq $true) {
Write-Output "Deleting all existing user secrets"
foreach ($projects in $projects) { }
if ($clear -eq $true) {
dotnet user-secrets clear -p "../src/$projects" $projects = @{
} Admin = "../src/Admin"
Get-Content secrets.json | & dotnet user-secrets set -p "../src/$projects" Api = "../src/Api"
Billing = "../src/Billing"
Events = "../src/Events"
EventsProcessor = "../src/EventsProcessor"
Icons = "../src/Icons"
Identity = "../src/Identity"
Notifications = "../src/Notifications"
Sso = "../bitwarden_license/src/Sso"
}
foreach ($key in $projects.keys) {
if ($clear -eq $true) {
dotnet user-secrets clear -p $projects[$key]
}
$output = Get-Content secrets.json | & dotnet user-secrets set -p $projects[$key]
Write-Output "$output - $key"
} }