From 27e500ac208cd6605bec9a9590ece75a0d21a550 Mon Sep 17 00:00:00 2001 From: Zeeshaun Date: Tue, 7 Apr 2026 09:55:58 -0500 Subject: [PATCH] Adding --- .../WebApp/ReserveManagementSystemUI/Program.cs | 1 + .../WebApp/ReserveManagementSystemUI/Startup.cs | 10 +++------- .../WebApp/ReserveManagementSystemUI/appsettings.json | 7 +++---- .../keyvaults/normal/set_secrets_deployment.yaml | 8 ++++++++ .../keyvaults/normal/set_secrets_provider.yaml | 4 ++++ .../overlays/prd/appsettings/appsettings.json | 10 ++++++++++ .../kustomize/overlays/qa/appsettings/appsettings.json | 2 +- .../overlays/uat/appsettings/appsettings.json | 10 ++++++++++ 8 files changed, 40 insertions(+), 12 deletions(-) diff --git a/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/ReserveManagementSystemUI/Program.cs b/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/ReserveManagementSystemUI/Program.cs index c07d528..81644fd 100644 --- a/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/ReserveManagementSystemUI/Program.cs +++ b/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/ReserveManagementSystemUI/Program.cs @@ -18,6 +18,7 @@ namespace ReserveManagementSystemUI .ConfigureAppConfiguration((_, config) => { config.AddJsonFile("/vault/secrets/reserve-management-system-ui-seq-api-key.json", true, true); + config.AddJsonFile("/vault/secrets/reserve-management-system-ui-azure-client-secret.json", true, true); }) .ConfigureWebHostDefaults(webBuilder => { diff --git a/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/ReserveManagementSystemUI/Startup.cs b/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/ReserveManagementSystemUI/Startup.cs index cd72350..b687b89 100644 --- a/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/ReserveManagementSystemUI/Startup.cs +++ b/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/ReserveManagementSystemUI/Startup.cs @@ -5,7 +5,6 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Identity.Web; using Microsoft.Identity.Web.UI; -using Microsoft.AspNetCore.HttpOverrides; using Blazored.Toast; using LCU.Library.Internal.Configuration; using LCU.Library.Internal.LcuHttpClient; @@ -33,8 +32,8 @@ namespace ReserveManagementSystemUI // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 public void ConfigureServices(IServiceCollection services) { - services.AddAzureAdGroupPolicyServices(Configuration.GetSection("AzureAd"), - Configuration.GetSection("Security")); + services.AddAzureAdGroupPolicyServicesWithToken(Configuration.GetSection("AzureAd"), + Configuration.GetSection("Security")); var appConfiguration = new AppConfiguration(); Configuration.GetSection("Primary").Bind(appConfiguration); @@ -93,10 +92,6 @@ namespace ReserveManagementSystemUI app.UseHttpsRedirection(); app.UseStaticFiles(); - app.UseForwardedHeaders(new ForwardedHeadersOptions - { - ForwardedHeaders = ForwardedHeaders.XForwardedProto - }); app.UseRouting(); app.UseAuthentication(); @@ -105,6 +100,7 @@ namespace ReserveManagementSystemUI app.UseEndpoints(endpoints => { endpoints.MapControllers(); + endpoints.MapRazorPages(); endpoints.MapBlazorHub(); endpoints.MapFallbackToPage("/_Host"); }); diff --git a/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/ReserveManagementSystemUI/appsettings.json b/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/ReserveManagementSystemUI/appsettings.json index ec0cd21..33e42e1 100644 --- a/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/ReserveManagementSystemUI/appsettings.json +++ b/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/ReserveManagementSystemUI/appsettings.json @@ -2,11 +2,10 @@ "AzureAd": { "Instance": "https://login.microsoftonline.com/", "Domain": "landmarkcu.onmicrosoft.com", - "TenantId": "00000000-0000-0000-0000-000000000000", - "ClientId": "00000000-0000-0000-0000-000000000000", + "TenantId": "63cd1554-2783-4a86-ae50-b9e6c21c9499", + "ClientId": "b4cf1858-115f-4c2a-bd70-91f5ea759f72", "CallbackPath": "/signin-oidc", - "ClientSecret": "VALUE-IN-KEYVAULT", - "AuthenticationUrl": "https://login.microsoftonline.com/landmarkcu.onmicrosoft.com/oauth2/v2.0/token" + "ClientSecret": "VALUE-IN-KEYVAULT" }, "Primary": { "AppName": "Reserve Management System", diff --git a/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/kustomize/components/keyvaults/normal/set_secrets_deployment.yaml b/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/kustomize/components/keyvaults/normal/set_secrets_deployment.yaml index baac36e..f47cf0a 100644 --- a/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/kustomize/components/keyvaults/normal/set_secrets_deployment.yaml +++ b/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/kustomize/components/keyvaults/normal/set_secrets_deployment.yaml @@ -15,4 +15,12 @@ mountPath: /vault/secrets/reserve-management-system-ui-seq-api-key.json readOnly: true subPath: reserve-management-system-ui-seq-api-key + +- op: add + path: /spec/template/spec/containers/0/volumeMounts/- + value: + name: reserve-management-system-ui-secrets + mountPath: /vault/secrets/reserve-management-system-ui-azure-client-secret.json + readOnly: true + subPath: reserve-management-system-ui-azure-client-secret \ No newline at end of file diff --git a/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/kustomize/components/keyvaults/normal/set_secrets_provider.yaml b/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/kustomize/components/keyvaults/normal/set_secrets_provider.yaml index 72e1064..4d9e1e3 100644 --- a/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/kustomize/components/keyvaults/normal/set_secrets_provider.yaml +++ b/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/kustomize/components/keyvaults/normal/set_secrets_provider.yaml @@ -5,4 +5,8 @@ - | objectName: reserve-management-system-ui-seq-api-key objectType: secret + objectVersion: "" + - | + objectName: reserve-management-system-ui-azure-client-secret + objectType: secret objectVersion: "" \ No newline at end of file diff --git a/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/kustomize/overlays/prd/appsettings/appsettings.json b/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/kustomize/overlays/prd/appsettings/appsettings.json index b625b04..59c349f 100644 --- a/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/kustomize/overlays/prd/appsettings/appsettings.json +++ b/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/kustomize/overlays/prd/appsettings/appsettings.json @@ -2,6 +2,9 @@ "Primary": { "SeqUrl": "https://seq.lcu-internal.com" }, + "AzureAd": { + "ClientId": "7fbbb4e3-a76f-4765-9bd2-0cc4b426575f" + }, "RmsUIConfiguration": { "AllowedHosts": "*", "NotificationsUrl": "https://notificationsapi.lcu-internal.com/api/", @@ -13,5 +16,12 @@ "DefaultImportTimeout": 10, "RMSAssociatesRoles": "Reserve Management System - Associates", "ReportServerUrl": "https://d2dtbetl01p.lcu-internal.com/reports/report/RMS/" + }, + "Security": { + "AccessPolicies": { + "IsRMSAssociate": { + "Groups": "Reserve Management System - Associates" + } + } } } diff --git a/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/kustomize/overlays/qa/appsettings/appsettings.json b/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/kustomize/overlays/qa/appsettings/appsettings.json index 42b47cb..de130d3 100644 --- a/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/kustomize/overlays/qa/appsettings/appsettings.json +++ b/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/kustomize/overlays/qa/appsettings/appsettings.json @@ -3,7 +3,7 @@ "SeqUrl": "https://qa-seq.lcu-internal.com" }, "AzureAd": { - "CallbackPath": "/signin-oidc" + "ClientId": "b4cf1858-115f-4c2a-bd70-91f5ea759f72" }, "RmsUIConfiguration": { "AllowedHosts": "*", diff --git a/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/kustomize/overlays/uat/appsettings/appsettings.json b/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/kustomize/overlays/uat/appsettings/appsettings.json index ee69b55..bf50038 100644 --- a/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/kustomize/overlays/uat/appsettings/appsettings.json +++ b/LCU.WebApps.Indirect.ReserveManagementSystem/WebApp/kustomize/overlays/uat/appsettings/appsettings.json @@ -2,6 +2,9 @@ "Primary": { "SeqUrl": "https://uat-seq.lcu-internal.com" }, + "AzureAd": { + "ClientId": "eec03f2b-45bc-48f4-be60-b7ba02c208d8" + }, "RmsUIConfiguration": { "AllowedHosts": "*", "NotificationsUrl": "https://uat-notificationsapi.lcu-internal.com/api/", @@ -13,5 +16,12 @@ "DefaultImportTimeout": 10, "RMSAssociatesRoles": "Reserve Management System - Associates", "ReportServerUrl": "https://d2dtbetl01u.lcu-internal.com/reports/report/RMS/" + }, + "Security": { + "AccessPolicies": { + "IsRMSAssociate": { + "Groups": "Reserve Management System - Associates" + } + } } }