Skip to content

Commit

Permalink
add state to index
Browse files Browse the repository at this point in the history
andreasisnes committed Sep 29, 2024
1 parent 167534f commit 2b3d749
Showing 4 changed files with 53 additions and 62 deletions.
104 changes: 47 additions & 57 deletions Altinn.Authorization.sln
Original file line number Diff line number Diff line change
@@ -3,37 +3,33 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{8F607B2D-3D3A-47F1-A8C2-5EC002A8AD89}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{1AD3069C-A57B-417E-A958-1148816D635C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libs", "libs", "{B768FB8E-04F2-4D42-92C8-693EE0D521FA}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libs", "libs", "{5082E04E-A2C3-4B43-AE52-116C3868AE9E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Altinn.Authorization.Hosting", "Altinn.Authorization.Hosting", "{12FAA6AF-9061-4792-B42E-6E7938A77C78}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Altinn.Authorization.Hosting", "Altinn.Authorization.Hosting", "{E52E89E0-283A-423E-B853-1A68A54A52D3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{AFE8C2B9-F54A-4EF9-8950-BA2E01921453}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{64EEC2E8-5708-45B3-8F14-B72B4166519B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Altinn.Authorization.Hosting", "src\libs\Altinn.Authorization.Hosting\src\Altinn.Authorization.Hosting\Altinn.Authorization.Hosting.csproj", "{74F11941-D3AB-4360-8811-0303C2FCF9BE}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Altinn.Authorization.Hosting", "src\libs\Altinn.Authorization.Hosting\src\Altinn.Authorization.Hosting\Altinn.Authorization.Hosting.csproj", "{AD6F8B4C-48C4-4ED9-870D-910F875A872B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Altinn.Authorization.Configuration", "Altinn.Authorization.Configuration", "{3227BEB9-0695-4318-B328-BAFBC5F965D7}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Altinn.Authorization.Configuration", "Altinn.Authorization.Configuration", "{263A8F1D-8B78-408E-A197-CA82F322D2A4}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{78E4B525-4041-4F2E-976C-E4889930B650}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{8F3FAA16-21FB-4510-9CC2-4CF840EE05E6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Altinn.Authorization.Configuration", "src\libs\Altinn.Authorization.Configuration\src\Altinn.Authorization.Configuration\Altinn.Authorization.Configuration.csproj", "{72313703-CEB9-4876-BF14-8B2A54D93AE1}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Altinn.Authorization.Configuration", "src\libs\Altinn.Authorization.Configuration\src\Altinn.Authorization.Configuration\Altinn.Authorization.Configuration.csproj", "{4DE116C0-E6A3-4403-B3DB-9DD00D675E84}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Altinn.Authorization.Configuration.OpenTelemetry", "src\libs\Altinn.Authorization.Configuration\src\Altinn.Authorization.Configuration.OpenTelemetry\Altinn.Authorization.Configuration.OpenTelemetry.csproj", "{0E2D9F7D-4D69-46E5-A713-E9B3E31F77FA}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Altinn.Authorization.Configuration.OpenTelemetry", "src\libs\Altinn.Authorization.Configuration\src\Altinn.Authorization.Configuration.OpenTelemetry\Altinn.Authorization.Configuration.OpenTelemetry.csproj", "{84FD6802-89F3-4DE3-A245-691A54154601}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Altinn.Authorization.Configuration.Postgres", "src\libs\Altinn.Authorization.Configuration\src\Altinn.Authorization.Configuration.Postgres\Altinn.Authorization.Configuration.Postgres.csproj", "{1B05CB52-811D-420F-BFDD-75BDD750827F}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Altinn.Authorization.Configuration.Postgres", "src\libs\Altinn.Authorization.Configuration\src\Altinn.Authorization.Configuration.Postgres\Altinn.Authorization.Configuration.Postgres.csproj", "{F9A3EB88-BF6A-4154-8494-38EAB28C5D81}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "apps", "apps", "{0C399B70-F1DF-4FD7-AD0B-CF0F6B94396E}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "apps", "apps", "{F8DA5018-5742-4BEA-A551-3B305A5AB659}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Altinn.Authorization.Index", "Altinn.Authorization.Index", "{AD0B758D-C039-4EA1-9B97-C1CD7F52BA52}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Altinn.Authorization.Index", "Altinn.Authorization.Index", "{09801B86-9A48-4A05-89E1-3703B45C4A6F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{944A5320-B924-4440-A2EF-5A382EB9710B}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{5F86156D-1840-4A7B-AB18-517C45D5938B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Altinn.Authorization.Index", "src\apps\Altinn.Authorization.Index\src\Altinn.Authorization.Index\Altinn.Authorization.Index.csproj", "{3B03E9AC-6C4C-400B-B051-0ED53153DFEB}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{3FECDE46-14C3-4723-8A30-8C5DD49B0F57}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Altinn.Garfield.Tests", "src\apps\Altinn.Authorization.Index\tests\Altinn.Garfield.Tests\Altinn.Garfield.Tests.csproj", "{1A1EA533-62C8-4CB6-A1BD-6ECA5EC2DC7A}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Altinn.Authorization.Index", "src\apps\Altinn.Authorization.Index\src\Altinn.Authorization.Index\Altinn.Authorization.Index.csproj", "{951BFBC5-4D71-4162-83CE-93D48EF16D9D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -44,46 +40,40 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{74F11941-D3AB-4360-8811-0303C2FCF9BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{74F11941-D3AB-4360-8811-0303C2FCF9BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{74F11941-D3AB-4360-8811-0303C2FCF9BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{74F11941-D3AB-4360-8811-0303C2FCF9BE}.Release|Any CPU.Build.0 = Release|Any CPU
{72313703-CEB9-4876-BF14-8B2A54D93AE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{72313703-CEB9-4876-BF14-8B2A54D93AE1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{72313703-CEB9-4876-BF14-8B2A54D93AE1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{72313703-CEB9-4876-BF14-8B2A54D93AE1}.Release|Any CPU.Build.0 = Release|Any CPU
{0E2D9F7D-4D69-46E5-A713-E9B3E31F77FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0E2D9F7D-4D69-46E5-A713-E9B3E31F77FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0E2D9F7D-4D69-46E5-A713-E9B3E31F77FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0E2D9F7D-4D69-46E5-A713-E9B3E31F77FA}.Release|Any CPU.Build.0 = Release|Any CPU
{1B05CB52-811D-420F-BFDD-75BDD750827F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1B05CB52-811D-420F-BFDD-75BDD750827F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1B05CB52-811D-420F-BFDD-75BDD750827F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1B05CB52-811D-420F-BFDD-75BDD750827F}.Release|Any CPU.Build.0 = Release|Any CPU
{3B03E9AC-6C4C-400B-B051-0ED53153DFEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3B03E9AC-6C4C-400B-B051-0ED53153DFEB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3B03E9AC-6C4C-400B-B051-0ED53153DFEB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3B03E9AC-6C4C-400B-B051-0ED53153DFEB}.Release|Any CPU.Build.0 = Release|Any CPU
{1A1EA533-62C8-4CB6-A1BD-6ECA5EC2DC7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1A1EA533-62C8-4CB6-A1BD-6ECA5EC2DC7A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1A1EA533-62C8-4CB6-A1BD-6ECA5EC2DC7A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1A1EA533-62C8-4CB6-A1BD-6ECA5EC2DC7A}.Release|Any CPU.Build.0 = Release|Any CPU
{AD6F8B4C-48C4-4ED9-870D-910F875A872B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AD6F8B4C-48C4-4ED9-870D-910F875A872B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AD6F8B4C-48C4-4ED9-870D-910F875A872B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AD6F8B4C-48C4-4ED9-870D-910F875A872B}.Release|Any CPU.Build.0 = Release|Any CPU
{4DE116C0-E6A3-4403-B3DB-9DD00D675E84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4DE116C0-E6A3-4403-B3DB-9DD00D675E84}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4DE116C0-E6A3-4403-B3DB-9DD00D675E84}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4DE116C0-E6A3-4403-B3DB-9DD00D675E84}.Release|Any CPU.Build.0 = Release|Any CPU
{84FD6802-89F3-4DE3-A245-691A54154601}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{84FD6802-89F3-4DE3-A245-691A54154601}.Debug|Any CPU.Build.0 = Debug|Any CPU
{84FD6802-89F3-4DE3-A245-691A54154601}.Release|Any CPU.ActiveCfg = Release|Any CPU
{84FD6802-89F3-4DE3-A245-691A54154601}.Release|Any CPU.Build.0 = Release|Any CPU
{F9A3EB88-BF6A-4154-8494-38EAB28C5D81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F9A3EB88-BF6A-4154-8494-38EAB28C5D81}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F9A3EB88-BF6A-4154-8494-38EAB28C5D81}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F9A3EB88-BF6A-4154-8494-38EAB28C5D81}.Release|Any CPU.Build.0 = Release|Any CPU
{951BFBC5-4D71-4162-83CE-93D48EF16D9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{951BFBC5-4D71-4162-83CE-93D48EF16D9D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{951BFBC5-4D71-4162-83CE-93D48EF16D9D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{951BFBC5-4D71-4162-83CE-93D48EF16D9D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{B768FB8E-04F2-4D42-92C8-693EE0D521FA} = {8F607B2D-3D3A-47F1-A8C2-5EC002A8AD89}
{12FAA6AF-9061-4792-B42E-6E7938A77C78} = {B768FB8E-04F2-4D42-92C8-693EE0D521FA}
{AFE8C2B9-F54A-4EF9-8950-BA2E01921453} = {12FAA6AF-9061-4792-B42E-6E7938A77C78}
{74F11941-D3AB-4360-8811-0303C2FCF9BE} = {AFE8C2B9-F54A-4EF9-8950-BA2E01921453}
{3227BEB9-0695-4318-B328-BAFBC5F965D7} = {B768FB8E-04F2-4D42-92C8-693EE0D521FA}
{78E4B525-4041-4F2E-976C-E4889930B650} = {3227BEB9-0695-4318-B328-BAFBC5F965D7}
{72313703-CEB9-4876-BF14-8B2A54D93AE1} = {78E4B525-4041-4F2E-976C-E4889930B650}
{0E2D9F7D-4D69-46E5-A713-E9B3E31F77FA} = {78E4B525-4041-4F2E-976C-E4889930B650}
{1B05CB52-811D-420F-BFDD-75BDD750827F} = {78E4B525-4041-4F2E-976C-E4889930B650}
{0C399B70-F1DF-4FD7-AD0B-CF0F6B94396E} = {8F607B2D-3D3A-47F1-A8C2-5EC002A8AD89}
{AD0B758D-C039-4EA1-9B97-C1CD7F52BA52} = {0C399B70-F1DF-4FD7-AD0B-CF0F6B94396E}
{944A5320-B924-4440-A2EF-5A382EB9710B} = {AD0B758D-C039-4EA1-9B97-C1CD7F52BA52}
{3B03E9AC-6C4C-400B-B051-0ED53153DFEB} = {944A5320-B924-4440-A2EF-5A382EB9710B}
{3FECDE46-14C3-4723-8A30-8C5DD49B0F57} = {AD0B758D-C039-4EA1-9B97-C1CD7F52BA52}
{1A1EA533-62C8-4CB6-A1BD-6ECA5EC2DC7A} = {3FECDE46-14C3-4723-8A30-8C5DD49B0F57}
{5082E04E-A2C3-4B43-AE52-116C3868AE9E} = {1AD3069C-A57B-417E-A958-1148816D635C}
{E52E89E0-283A-423E-B853-1A68A54A52D3} = {5082E04E-A2C3-4B43-AE52-116C3868AE9E}
{64EEC2E8-5708-45B3-8F14-B72B4166519B} = {E52E89E0-283A-423E-B853-1A68A54A52D3}
{AD6F8B4C-48C4-4ED9-870D-910F875A872B} = {64EEC2E8-5708-45B3-8F14-B72B4166519B}
{263A8F1D-8B78-408E-A197-CA82F322D2A4} = {5082E04E-A2C3-4B43-AE52-116C3868AE9E}
{8F3FAA16-21FB-4510-9CC2-4CF840EE05E6} = {263A8F1D-8B78-408E-A197-CA82F322D2A4}
{4DE116C0-E6A3-4403-B3DB-9DD00D675E84} = {8F3FAA16-21FB-4510-9CC2-4CF840EE05E6}
{84FD6802-89F3-4DE3-A245-691A54154601} = {8F3FAA16-21FB-4510-9CC2-4CF840EE05E6}
{F9A3EB88-BF6A-4154-8494-38EAB28C5D81} = {8F3FAA16-21FB-4510-9CC2-4CF840EE05E6}
{F8DA5018-5742-4BEA-A551-3B305A5AB659} = {1AD3069C-A57B-417E-A958-1148816D635C}
{09801B86-9A48-4A05-89E1-3703B45C4A6F} = {F8DA5018-5742-4BEA-A551-3B305A5AB659}
{5F86156D-1840-4A7B-AB18-517C45D5938B} = {09801B86-9A48-4A05-89E1-3703B45C4A6F}
{951BFBC5-4D71-4162-83CE-93D48EF16D9D} = {5F86156D-1840-4A7B-AB18-517C45D5938B}
EndGlobalSection
EndGlobal
4 changes: 2 additions & 2 deletions infra/modules/container_app_api/main.tf
Original file line number Diff line number Diff line change
@@ -129,11 +129,11 @@ resource "azurerm_container_app" "app" {
container {
env {
name = "EntraId__UserAssignedIdentities__PostgresAdmin__ClientId"
value = data.azurerm_user_assigned_identity.postgres_admin.principal_id
value = data.azurerm_user_assigned_identity.postgres_admin.client_id
}
env {
name = "EntraId__UserAssignedIdentities__Service__ClientId"
value = azurerm_user_assigned_identity.app.principal_id
value = azurerm_user_assigned_identity.app.rgindex001at21
}
env {
name = "AppConfiguration__Endpoint"
Original file line number Diff line number Diff line change
@@ -44,11 +44,11 @@ public static IHostApplicationBuilder AddAltinnDefaultPostgresConnection(this IH
altinnAppSettings.EntraId.Identities.PostgresAdmin.TokenCredential;
});
}

configureOptions?.Invoke(options);
});
}

/// <summary>
/// Adds and configures PostgreSQL connection support to the application, based on the provided options.
/// Supports both Managed Identity and Username/Password authentication methods.
@@ -74,4 +74,4 @@ public static IHostApplicationBuilder AddAltinnPostgresConnection(this IHostAppl
return builder;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -48,6 +48,7 @@ public static IHostApplicationBuilder AddAltinnAppConfiguration(this IHostApplic
{
var options = new AltinnAppConfigurationOptions(configureOptions);
var altinnAppSettings = new AltinnAppSettings(builder.Configuration);
Console.WriteLine(altinnAppSettings.EntraId.Identities.Service.ClientId);

opts.Connect(altinnAppSettings.AppConfiguration.Endpoint, altinnAppSettings.EntraId.Identities.Service.TokenCredential);
opts.ConfigureKeyVault(keyvault => keyvault.SetCredential(altinnAppSettings.EntraId.Identities.Service.TokenCredential));

0 comments on commit 2b3d749

Please sign in to comment.