<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sauhard Bhatt</title>
    <description>The latest articles on DEV Community by Sauhard Bhatt (@sauhard_bhatt_4e388e8624a).</description>
    <link>https://dev.to/sauhard_bhatt_4e388e8624a</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3697343%2Fc388c1c7-4c61-4929-9c5d-457c7e23502d.jpeg</url>
      <title>DEV Community: Sauhard Bhatt</title>
      <link>https://dev.to/sauhard_bhatt_4e388e8624a</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sauhard_bhatt_4e388e8624a"/>
    <language>en</language>
    <item>
      <title>Modernizing Legacy SSO with Microsoft Entra, Protect On-Prem Apps Without Rewriting Code</title>
      <dc:creator>Sauhard Bhatt</dc:creator>
      <pubDate>Mon, 16 Mar 2026 05:23:24 +0000</pubDate>
      <link>https://dev.to/sauhard_bhatt_4e388e8624a/modernizing-legacy-sso-with-microsoft-entra-protect-on-prem-apps-without-rewriting-code-3439</link>
      <guid>https://dev.to/sauhard_bhatt_4e388e8624a/modernizing-legacy-sso-with-microsoft-entra-protect-on-prem-apps-without-rewriting-code-3439</guid>
      <description>&lt;p&gt;Many enterprise applications still rely on legacy identity platforms such as SiteMinder or PingFederate. Rewriting these applications to support modern authentication can take years of engineering effort. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;what if you could modernize authentication using Microsoft Entra without changing the application code at all&lt;/strong&gt;?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Although many organizations have moved toward cloud-native architectures, critical legacy applications remain in many enterprise environments, hosted on platforms such as Oracle WebLogic, Tomcat, or Apache. Many of these applications are complex, tightly coupled systems, where modernizing microservices is not straightforward and can take a long time due to their complexity and security concerns. These applications were designed to work with previous identity solutions, such as &lt;strong&gt;CA SiteMinder or PingFederate&lt;/strong&gt;. A significant number of these applications use HTTP header-based authentication rather than more modern protocols such as OAuth2, OpenID Connect, and SAML. Rewriting legacy applications to support modern authentication protocols may take years of engineering effort and carry operational risk.&lt;/p&gt;

&lt;p&gt;Another important factor that enterprises consider during this transition is cost optimization. Legacy identity platforms such as Broadcom SiteMinder or PingFederate often require significant annual licensing and support renewals. In large enterprise environments, these renewal costs can become substantial. This creates a practical modernization in decision-making:&lt;br&gt;
• Continue paying &lt;strong&gt;high licensing costs&lt;/strong&gt; for legacy IAM platforms&lt;br&gt;
• Or undertake costly and &lt;strong&gt;time-consuming application rewrites&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A better approach is to &lt;strong&gt;modernize the identity control plane while preserving the existing authentication contract&lt;/strong&gt;. By using Microsoft Entra Application Proxy with header-based SSO, organizations can migrate authentication to Entra while keeping the legacy application unchanged. This allows enterprises to gradually retire legacy access management platforms and avoid expensive renewal cycles while modernization progresses.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Challenge with Legacy Authentication
&lt;/h2&gt;

&lt;p&gt;Modern cloud applications typically support:&lt;br&gt;
• OAuth2&lt;br&gt;
• OpenID Connect&lt;br&gt;
• SAML tokens&lt;br&gt;
• JWT validation&lt;/p&gt;

&lt;p&gt;Legacy enterprise applications were written long before these standards became common. Instead, they rely on trusted HTTP headers injected by an access gateway. For example, systems protected by SiteMinder often expect headers like:&lt;br&gt;
• SM_USER&lt;br&gt;
• SM_ROLE&lt;br&gt;
• SM_USERDN&lt;/p&gt;

&lt;p&gt;Once authentication occurs, the application simply trusts these headers to determine identity and authorization. Now, replacing SiteMinder or PingFederate can look like it requires a full application rewrite.&lt;br&gt;
However, &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;if the header remains unchanged, the application itself need not change&lt;br&gt;
.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Key Idea: Preserve the Header Contract
&lt;/h2&gt;

&lt;p&gt;Instead of rewriting the application, you replace the authentication layer in front of it. Microsoft Entra provides this capability through application Proxy with header-based SSO. In this architecture:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Users authenticate with Microsoft Entra ID&lt;/li&gt;
&lt;li&gt;Entra issues identity claims&lt;/li&gt;
&lt;li&gt;Application Proxy converts claims into HTTP headers&lt;/li&gt;
&lt;li&gt;Headers are forwarded to the on-prem application&lt;/li&gt;
&lt;li&gt;The application continues operating exactly as before&lt;/li&gt;
&lt;li&gt;From the application's perspective, nothing changed (e.g., it still receives: SM_USER=john.doe, SM_ROLE=Admin )&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This approach allows enterprises to:&lt;br&gt;
• Remove legacy federation infrastructure &lt;br&gt;
• Centralize authentication in Entra&lt;br&gt;
• Apply Conditional Access and MFA&lt;br&gt;
• Avoid rewriting applications&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fck8hlr1gonw0szj90lbv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fck8hlr1gonw0szj90lbv.png" alt="Modernizing legacy authentication using Microsoft Entra Application Proxy while preserving the header-based authentication model." width="451" height="643"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Platform Integration Considerations
&lt;/h2&gt;

&lt;p&gt;While the overall architecture remains the same, the exact integration approach may vary by application platform. For example:&lt;/p&gt;

&lt;p&gt;•** WebLogic applications**&lt;br&gt;
Many enterprise WebLogic applications already support SAML-based authentication through container-managed security. In these environments, WebLogic can be configured to act as a SAML Service Provider (SP) and redirect unauthenticated users to Microsoft Entra for authentication.&lt;/p&gt;

&lt;p&gt;• &lt;strong&gt;Tomcat or JBoss applications&lt;/strong&gt;&lt;br&gt;
For applications running on Tomcat or JBoss that rely primarily on header-based authentication, a lightweight Servlet Filter can intercept incoming requests. The filter checks whether the required authentication headers are present and, if not, redirects the user to the Entra authentication flow through the Application Proxy. &lt;/p&gt;

&lt;h2&gt;
  
  
  Implementing Header-Based SSO
&lt;/h2&gt;

&lt;p&gt;To enable &lt;strong&gt;header-based SSO&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Publish the on-prem application via Microsoft Entra Application Proxy&lt;/li&gt;
&lt;li&gt;Enable Pre-authentication with Entra ID&lt;/li&gt;
&lt;li&gt;Configure Header-based Single Sign-On&lt;/li&gt;
&lt;li&gt;Map identity claims to headers &lt;/li&gt;
&lt;li&gt;The proxy then injects those headers when forwarding the request to the backend application. 
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx8eya1lqlhmyn3mzj7o3.png" alt="Entra claims" width="492" height="106"&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Optional: Header Translation Layer - In some environments, applications expect very specific legacy headers. For example: SM_USER, SM_ROLE&lt;/p&gt;

&lt;p&gt;For such environments, you can introduce a lightweight Servlet Filter that translates modern headers into legacy ones. Servlet filters intercept HTTP requests before the application processes them. Below is a simplified example filter that translates Entra headers into SiteMinder-compatible headers. Below is an example of a WebLogic filter&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw04hp387dx42folm423y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw04hp387dx42folm423y.png" alt="weblogic-filter.java" width="588" height="625"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Register the filter in web.xml&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyiqg3lltitw3oyr382mj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyiqg3lltitw3oyr382mj.png" alt="web.xml" width="748" height="238"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This allows the backend application to continue reading the same legacy headers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Handling Authorization at Scale
&lt;/h2&gt;

&lt;p&gt;Many legacy applications depend heavily on group membership. However, identity tokens have limits on the number of groups they can include.  Instead of sending large group lists, a better approach is:&lt;br&gt;
Use Application Roles - Define roles in Entra: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Admin&lt;/li&gt;
&lt;li&gt;Approver&lt;/li&gt;
&lt;li&gt;Reviewer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Assign users or groups to these roles, then pass them as a header: X-ENTRA-ROLES=Admin&lt;br&gt;
Your WebLogic filter can translate this to SM_ROLE=Admin&lt;br&gt;
This keeps the header size small and authorization manageable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Security Considerations
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Header-based authentication&lt;/strong&gt; must be implemented carefully. A critical rule is: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Only trusted infrastructure should be allowed to send authentication headers.&lt;/li&gt;
&lt;li&gt;Recommended controls:&lt;/li&gt;
&lt;li&gt;Restrict backend access to Application Proxy connector IPs&lt;/li&gt;
&lt;li&gt;Block direct internet access to application servers&lt;/li&gt;
&lt;li&gt;Use Entra Pre-authentication&lt;/li&gt;
&lt;li&gt;Enable Conditional Access and MFA&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When implemented correctly, this architecture can improve security posture compared to legacy access gateways.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits of This Approach
&lt;/h2&gt;

&lt;p&gt;This architecture allows enterprises to modernize identity without disrupting legacy systems. Key benefits include: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Elimination of expensive legacy IAM platforms&lt;/li&gt;
&lt;li&gt;No application code rewrite&lt;/li&gt;
&lt;li&gt;Centralized identity using Microsoft Entra&lt;/li&gt;
&lt;li&gt;Reduced infrastructure complexity&lt;/li&gt;
&lt;li&gt;MFA and Conditional Access support&lt;/li&gt;
&lt;li&gt;Improved security posture&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most importantly, it enables organizations to modernize authentication across hundreds of legacy applications with minimal risk.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Many organizations assume modernizing identity requires rewriting legacy applications. The fastest path is preserving the application's existing identity contract while modernizing the authentication layer. By combining &lt;strong&gt;Microsoft Entra Application Proxy, header-based SSO, and lightweight compatibility filters&lt;/strong&gt;, enterprises can move legacy applications into a modern identity ecosystem without major redevelopment. If you're responsible for modernizing enterprise identity architecture, this approach can &lt;strong&gt;save years of engineering effort and millions in IAM platform costs&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Next Steps
&lt;/h2&gt;

&lt;p&gt;In a follow-up article, I will walk through the detailed configuration steps for implementing this architecture in enterprise Java environments, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Configuring WebLogic as a SAML Service Provider with Microsoft Entra&lt;/li&gt;
&lt;li&gt;Implementing Servlet-based request interception for Tomcat and JBoss applications &lt;/li&gt;
&lt;li&gt; Mapping Entra identity claims to legacy header contracts&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>azure</category>
      <category>security</category>
      <category>architecture</category>
      <category>java</category>
    </item>
  </channel>
</rss>
