<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>Multi-Factor Authentication - Inero Software - Software Consulting</title>
	<atom:link href="https://inero-software.com/tag/multi-factor-authentication/feed/" rel="self" type="application/rss+xml" />
	<link>https://inero-software.com/tag/multi-factor-authentication/</link>
	<description>We unleash innovations using cutting-edge technologies, modern design and AI</description>
	<lastBuildDate>Tue, 16 Sep 2025 10:12:27 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://inero-software.com/wp-content/uploads/2018/11/inero-logo-favicon.png</url>
	<title>Multi-Factor Authentication - Inero Software - Software Consulting</title>
	<link>https://inero-software.com/tag/multi-factor-authentication/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">153509928</site>	<item>
		<title>Secure Email Delivery in Keycloak 26.2 Using XOAUTH2</title>
		<link>https://inero-software.com/secure-email-delivery-in-keycloak-26-2-using-xoauth2/</link>
		
		<dc:creator><![CDATA[Andrzej Chybicki]]></dc:creator>
		<pubDate>Mon, 15 Sep 2025 10:48:22 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Company]]></category>
		<category><![CDATA[Keycloak]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[keycloak]]></category>
		<category><![CDATA[Multi-Factor Authentication]]></category>
		<category><![CDATA[SMTP]]></category>
		<category><![CDATA[XOAUTH2]]></category>
		<guid isPermaLink="false">https://inero-software.com/?p=8141</guid>

					<description><![CDATA[<p>Secure Email Delivery in Keycloak 26.2 Using XOAUTH2 Email has been one of the oldest and most fundamental services on the internet, used for notifications, password resets, verifications, and more. Over time we’ve seen major improvements — encryption via TLS, then STARTTLS, and now many providers are moving away from&#8230;</p>
<p>Artykuł <a href="https://inero-software.com/secure-email-delivery-in-keycloak-26-2-using-xoauth2/">Secure Email Delivery in Keycloak 26.2 Using XOAUTH2</a> pochodzi z serwisu <a href="https://inero-software.com">Inero Software - Software Consulting</a>.</p>
]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="8141" class="elementor elementor-8141" data-elementor-post-type="post">
				<div class="elementor-element elementor-element-bb57bd9 e-flex e-con-boxed e-con e-parent" data-id="bb57bd9" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-437b6d1 elementor-widget elementor-widget-spacer" data-id="437b6d1" data-element_type="widget" data-widget_type="spacer.default">
				<div class="elementor-widget-container">
					<div class="elementor-spacer">
			<div class="elementor-spacer-inner"></div>
		</div>
				</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-db34a4b e-flex e-con-boxed e-con e-parent" data-id="db34a4b" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-641bb6a elementor-widget elementor-widget-spacer" data-id="641bb6a" data-element_type="widget" data-widget_type="spacer.default">
				<div class="elementor-widget-container">
					<div class="elementor-spacer">
			<div class="elementor-spacer-inner"></div>
		</div>
				</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-50bb99f e-flex e-con-boxed e-con e-parent" data-id="50bb99f" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-4a41088 elementor-widget elementor-widget-text-editor" data-id="4a41088" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<h1>Secure Email Delivery in Keycloak 26.2 Using XOAUTH2</h1><p>Email has been one of the oldest and most fundamental services on the internet, used for notifications, password resets, verifications, and more. Over time we’ve seen major improvements — encryption via TLS, then STARTTLS, and now many providers are moving away from basic password authentication in favor of modern token-based schemes like XOAUTH2. With Keycloak 26.2, this evolution has arrived: Keycloak now supports XOAUTH2 for outgoing SMTP mail, adding greater security and compatibility with providers who have deprecated legacy authentication</p>						</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-8c716d3 e-flex e-con-boxed e-con e-parent" data-id="8c716d3" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-45fb36f elementor-widget elementor-widget-spacer" data-id="45fb36f" data-element_type="widget" data-widget_type="spacer.default">
				<div class="elementor-widget-container">
					<div class="elementor-spacer">
			<div class="elementor-spacer-inner"></div>
		</div>
				</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-b657726 e-flex e-con-boxed e-con e-parent" data-id="b657726" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-a743437 elementor-widget elementor-widget-text-editor" data-id="a743437" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<h2>1. What is XOAUTH2, and Why It Matters</h2><p>XOAUTH2 is a means of authenticating to an SMTP (or other email-sending) server using an OAuth2 access token rather than a username + password. Some of the key benefits include:</p><ul><li style="list-style-type: none;"><ul><li>Improved Security: Tokens can be more tightly controlled, with limited scope and lifetime.</li><li>Compliance with Modern Providers: Many providers are disabling basic auth.</li><li>Centralised and Auditable Auth: Easier management and rotation. Each client&#8217;s access can be revoked independently of other clients&#8217; operations.</li><li>Reduced Risk of Credential Leakage: No raw passwords stored or transmitted.</li></ul></li></ul>						</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-49d6f0b e-flex e-con-boxed e-con e-parent" data-id="49d6f0b" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-761d03b elementor-widget elementor-widget-spacer" data-id="761d03b" data-element_type="widget" data-widget_type="spacer.default">
				<div class="elementor-widget-container">
					<div class="elementor-spacer">
			<div class="elementor-spacer-inner"></div>
		</div>
				</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-cac6421 e-flex e-con-boxed e-con e-parent" data-id="cac6421" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-dc1c0d3 elementor-widget elementor-widget-text-editor" data-id="dc1c0d3" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<h2>2. How XOAUTH2 is Implemented in Keycloak 26.2</h2><p>With version 26.2, Keycloak adds native support for XOAUTH2 when sending emails via SMTP. This means administrators can move away from static username and password credentials and instead configure Keycloak to obtain an OAuth2 access token at runtime.</p><p>In the Admin Console under Realm → Realm Settings → Email, you can now switch the Authentication Type from Password to Token (XOAUTH2). Once enabled, additional fields appear where you provide:</p><p>&#8211; Client ID and Client Secret from your identity provider (e.g., Azure AD).<br />&#8211; The OAuth2 Token Endpoint used to request an access token.<br />&#8211; Optional Scopes, depending on your provider (for Microsoft 365: https://outlook.office365.com/.default).<br />&#8211; A From address / SMTP username, which may still be required by the mail server.</p><p>Keycloak then handles the process of requesting and refreshing tokens using the Client Credentials Grant flow. You can use the “Test connection” button to verify that the configuration is correct and that emails can be sent successfully.</p><p>This approach aligns Keycloak with modern security standards and prepares deployments for providers that are phasing out legacy authentication.</p><p><img fetchpriority="high" decoding="async" data-attachment-id="8207" data-permalink="https://inero-software.com/image-12/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/09/image-12.png" data-orig-size="1235,1095" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="image (12)" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/09/image-12-300x266.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/09/image-12-1030x913.png" tabindex="0" role="button" class="aligncenter wp-image-8207 size-large" src="https://inero-software.com/wp-content/uploads/2025/09/image-12-1030x913.png" alt="" width="1030" height="913" srcset="https://inero-software.com/wp-content/uploads/2025/09/image-12-1030x913.png 1030w, https://inero-software.com/wp-content/uploads/2025/09/image-12-300x266.png 300w, https://inero-software.com/wp-content/uploads/2025/09/image-12-768x681.png 768w, https://inero-software.com/wp-content/uploads/2025/09/image-12-338x300.png 338w, https://inero-software.com/wp-content/uploads/2025/09/image-12.png 1235w" sizes="(max-width: 1030px) 100vw, 1030px" /></p><p><strong data-start="0" data-end="9" data-is-only-node="">Note:</strong> The <strong data-start="14" data-end="35">Enable Debug SMTP</strong> option (visible at the bottom of the form) activates extended logging for outgoing email. When enabled, Keycloak produces detailed debug output of the SMTP communication, which can be very useful for diagnosing integration issues such as authentication failures, token retrieval problems, or TLS misconfigurations. It is recommended to use this setting only in testing or troubleshooting scenarios, as it may expose sensitive information in the logs.</p>						</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-2e4203c e-flex e-con-boxed e-con e-parent" data-id="2e4203c" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-44a4294 elementor-widget elementor-widget-spacer" data-id="44a4294" data-element_type="widget" data-widget_type="spacer.default">
				<div class="elementor-widget-container">
					<div class="elementor-spacer">
			<div class="elementor-spacer-inner"></div>
		</div>
				</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-94072c9 e-flex e-con-boxed e-con e-parent" data-id="94072c9" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-802a36b elementor-widget__width-inherit elementor-invisible elementor-widget elementor-widget-text-editor" data-id="802a36b" data-element_type="widget" data-settings="{&quot;_animation&quot;:&quot;fadeIn&quot;}" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<h4 style="text-align: center;"><span style="color: #431773;">Retirement of Basic Authentication for SMTP AUTH (Client Submission) in Exchange Online</span></h4>						</div>
				</div>
				<div class="elementor-element elementor-element-5f3b86e elementor-widget elementor-widget-spacer" data-id="5f3b86e" data-element_type="widget" data-widget_type="spacer.default">
				<div class="elementor-widget-container">
					<div class="elementor-spacer">
			<div class="elementor-spacer-inner"></div>
		</div>
				</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-86a8aa1 e-flex e-con-boxed e-con e-parent" data-id="86a8aa1" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-2b76e0f elementor-widget elementor-widget-spacer" data-id="2b76e0f" data-element_type="widget" data-widget_type="spacer.default">
				<div class="elementor-widget-container">
					<div class="elementor-spacer">
			<div class="elementor-spacer-inner"></div>
		</div>
				</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-04082db e-flex e-con-boxed e-con e-parent" data-id="04082db" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-7185a3d elementor-countdown--label-inline elementor-widget elementor-widget-countdown" data-id="7185a3d" data-element_type="widget" data-settings="{&quot;motion_fx_motion_fx_scrolling&quot;:&quot;yes&quot;,&quot;motion_fx_devices&quot;:[&quot;desktop&quot;,&quot;tablet&quot;,&quot;mobile&quot;]}" data-widget_type="countdown.default">
				<div class="elementor-widget-container">
					<div class="elementor-countdown-wrapper" data-date="1772319600">
			<div class="elementor-countdown-item"><span class="elementor-countdown-digits elementor-countdown-days"></span> <span class="elementor-countdown-label">Days</span></div><div class="elementor-countdown-item"><span class="elementor-countdown-digits elementor-countdown-hours"></span> <span class="elementor-countdown-label">Hours</span></div>		</div>
				</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-846c707 e-flex e-con-boxed e-con e-parent" data-id="846c707" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-bfa7caf elementor-widget elementor-widget-spacer" data-id="bfa7caf" data-element_type="widget" data-widget_type="spacer.default">
				<div class="elementor-widget-container">
					<div class="elementor-spacer">
			<div class="elementor-spacer-inner"></div>
		</div>
				</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-0aa70e1 e-flex e-con-boxed e-con e-parent" data-id="0aa70e1" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-1d91819 elementor-widget elementor-widget-text-editor" data-id="1d91819" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<h2>3. Why This Matters for Microsoft Azure / Office 365 Users</h2><blockquote><p>Microsoft has announced the retirement of Basic Authentication for SMTP AUTH (Client Submission) in Exchange Online. Starting March 1, 2026, Microsoft will begin phasing out Basic Auth, and by April 30, 2026, it will be completely disabled. This change directly impacts Keycloak deployments where outgoing emails are sent via Office 365 / Exchange Online SMTP.</p></blockquote><p>If your Keycloak instance is still configured with a username and password for SMTP, it will stop working once Basic Auth is retired. The solution is to migrate to XOAUTH2 configuration in Keycloak 26.2.</p><p>By adopting XOAUTH2, you ensure:</p><ul><li style="list-style-type: none;"><ul><li>Continued compatibility with Microsoft email services</li><li>Stronger security and compliance</li><li>Reduced risk compared to static credentials</li></ul></li></ul>						</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-8ef377e e-flex e-con-boxed e-con e-parent" data-id="8ef377e" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-126b40c elementor-widget elementor-widget-spacer" data-id="126b40c" data-element_type="widget" data-widget_type="spacer.default">
				<div class="elementor-widget-container">
					<div class="elementor-spacer">
			<div class="elementor-spacer-inner"></div>
		</div>
				</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-0cdb0ae e-flex e-con-boxed e-con e-parent" data-id="0cdb0ae" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-8707cdb elementor-widget elementor-widget-text-editor" data-id="8707cdb" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<h2><b data-stringify-type="bold">4. Beyond XOAUTH2?</b></h2><p>There’s even more going on in modern email delivery. Many email delivery platforms steer away from traditional SMTP protocol towards API-based approach (e.g. MailJet, SendGrid or MailGun). This gives more flexibility to integrators and allows platform providers to offer additional features. API-based email sending is not jet supported by Keycloak out-of-the-box, but this support can be added via custom extensions. Contact us if you are interested in integrating Keycloak with API-based email delivery platforms.</p>						</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-cc7f0e5 e-flex e-con-boxed e-con e-parent" data-id="cc7f0e5" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-cbe5851 elementor-widget elementor-widget-spacer" data-id="cbe5851" data-element_type="widget" data-widget_type="spacer.default">
				<div class="elementor-widget-container">
					<div class="elementor-spacer">
			<div class="elementor-spacer-inner"></div>
		</div>
				</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-edbac9e e-flex e-con-boxed e-con e-parent" data-id="edbac9e" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-121b9ff elementor-widget elementor-widget-text-editor" data-id="121b9ff" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<h2>Conclusion</h2><p>The addition of XOAUTH2 support in Keycloak 26.2 is more than just a feature upgrade — it’s an essential step for organizations that rely on Office 365, Gmail, or other providers who are deprecating legacy authentication. By adopting XOAUTH2 today, you can future-proof your Keycloak deployment, comply with provider requirements, and improve overall email security.</p>						</div>
				</div>
					</div>
				</div>
				</div>
		<p>Artykuł <a href="https://inero-software.com/secure-email-delivery-in-keycloak-26-2-using-xoauth2/">Secure Email Delivery in Keycloak 26.2 Using XOAUTH2</a> pochodzi z serwisu <a href="https://inero-software.com">Inero Software - Software Consulting</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">8141</post-id>	</item>
		<item>
		<title>Setting Up Passwordless Login with Passkey on a Mobile Device</title>
		<link>https://inero-software.com/setting-up-passwordless-login-with-passkey-on-a-mobile-device/</link>
		
		<dc:creator><![CDATA[Marceli Formela]]></dc:creator>
		<pubDate>Wed, 12 Mar 2025 07:47:03 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Company]]></category>
		<category><![CDATA[Keycloak]]></category>
		<category><![CDATA[cybersecurity]]></category>
		<category><![CDATA[IAM]]></category>
		<category><![CDATA[keycloak]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[MFA]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[Mobile Device]]></category>
		<category><![CDATA[Multi-Factor Authentication]]></category>
		<category><![CDATA[Passkey]]></category>
		<category><![CDATA[Passwordless]]></category>
		<guid isPermaLink="false">https://inero-software.com/?p=7534</guid>

					<description><![CDATA[<p>This blog focuses on configuring Passkeys specifically for mobile devices, ensuring a seamless and secure passwordless experience.</p>
<p>Artykuł <a href="https://inero-software.com/setting-up-passwordless-login-with-passkey-on-a-mobile-device/">Setting Up Passwordless Login with Passkey on a Mobile Device</a> pochodzi z serwisu <a href="https://inero-software.com">Inero Software - Software Consulting</a>.</p>
]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="7534" class="elementor elementor-7534" data-elementor-post-type="post">
				<div class="elementor-element elementor-element-a40bff4 e-flex e-con-boxed e-con e-parent" data-id="a40bff4" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-8062b20 elementor-widget elementor-widget-html" data-id="8062b20" data-element_type="widget" data-widget_type="html.default">
				<div class="elementor-widget-container">
			 		</div>
				</div>
				<div class="elementor-element elementor-element-5dc3085 elementor-widget elementor-widget-text-editor" data-id="5dc3085" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<h4><strong>In our previous post, we demonstrated how to configure Passkeys in Keycloak, replacing traditional passwords with WebAuthn-based authentication. We covered the setup process, key advantages, and potential limitations, including the challenge of user adoption. This blog focuses on configuring Passkeys specifically for mobile devices, ensuring a seamless and secure passwordless experience.</strong></h4>						</div>
				</div>
				<div class="elementor-element elementor-element-8e87fa0 elementor-widget elementor-widget-text-editor" data-id="8e87fa0" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">Our first publication about Passkeys in Keycloak, you can find here: <a href="https://inero-software.com/an-introduction-to-passkey-with-keycloak/">An introduction to Passkey with Keycloak</a></span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-618f1e8 elementor-widget elementor-widget-text-editor" data-id="618f1e8" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">In this post, we’ll dive deeper into optimizing Passkey authentication in Keycloak, looking into a different approach, this time using more than one device.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-9754353 elementor-widget elementor-widget-heading" data-id="9754353" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h3 class="elementor-heading-title elementor-size-default">Using a Passkey stored on a phone</h3>		</div>
				</div>
				<div class="elementor-element elementor-element-f889420 elementor-widget elementor-widget-text-editor" data-id="f889420" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">When logging in on a different device, such as a laptop or desktop, users can authenticate using a Passkey stored on their phone. The process works as follows:</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-823577d elementor-widget elementor-widget-text-editor" data-id="823577d" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<ol><li><strong>Selecting Passkey Login</strong> <br />Instead of entering a password, users choose the Passkey authentication option. The laptop&#8217;s browser generates a request for authentication. Now we have to establish a secure connection between your phone (e.g., iPhone) and your laptop.</li><li><strong>Scanning a QR Code</strong><br />The login interface generates a QR code, which users scan using their phone’s camera. Then the laptop sends a cryptographic challenge to the phone, asking it to sign a request using the stored passkey. The phone communicates securely with the laptop over Bluetooth or other close-range communication protocols (like NFC).</li><li><strong>Confirming Identity</strong> <br />Once the phone receives the challenge, it asks the user for biometric authentication (e.g., Face ID or Touch ID). This verifies that the person attempting the login is the authorized user.</li><li><strong>Secure Authentication</strong> <br />The laptop checks the response from the phone, verifying the cryptographic signature against the public key registered with the service. If the verification is successful, the user is logged in without having to enter a password.</li></ol>						</div>
				</div>
				<div class="elementor-element elementor-element-5edfe44 elementor-widget elementor-widget-heading" data-id="5edfe44" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h3 class="elementor-heading-title elementor-size-default">Step by step: Configuring Passkey with a smartphone</h3>		</div>
				</div>
				<div class="elementor-element elementor-element-b53966d elementor-widget elementor-widget-text-editor" data-id="b53966d" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">Before we dive into our custom authentication flow, it&#8217;s important to check if the </span><b>Webauthn Register Passwordless</b><span style="font-weight: 400;"> required action is enabled in the realm (</span><b>Authentication</b><span style="font-weight: 400;"> -&gt; </span><b>Required actions</b><span style="font-weight: 400;"> tab).</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-6d213d0 elementor-widget elementor-widget-image" data-id="6d213d0" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img decoding="async" data-attachment-id="7536" data-permalink="https://inero-software.com/setting-up-passwordless-login-with-passkey-on-a-mobile-device/12025-03-11/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/03/12025-03-11.png" data-orig-size="773,180" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="12025-03-11" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/03/12025-03-11-300x70.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/03/12025-03-11.png" tabindex="0" role="button" width="773" height="180" src="https://inero-software.com/wp-content/uploads/2025/03/12025-03-11.png" class="attachment-large size-large wp-image-7536" alt="" srcset="https://inero-software.com/wp-content/uploads/2025/03/12025-03-11.png 773w, https://inero-software.com/wp-content/uploads/2025/03/12025-03-11-300x70.png 300w, https://inero-software.com/wp-content/uploads/2025/03/12025-03-11-768x179.png 768w" sizes="(max-width: 773px) 100vw, 773px" data-attachment-id="7536" data-permalink="https://inero-software.com/setting-up-passwordless-login-with-passkey-on-a-mobile-device/12025-03-11/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/03/12025-03-11.png" data-orig-size="773,180" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="12025-03-11" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/03/12025-03-11-300x70.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/03/12025-03-11.png" role="button" />													</div>
				</div>
				<div class="elementor-element elementor-element-271f72a elementor-widget elementor-widget-text-editor" data-id="271f72a" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">This gives us, for example, the ability to enforce passkey configuration from users after their next successful login. However, it’s important to remember that this is just one of many ways to configure multiple authentication methods.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-456b3a4 elementor-widget elementor-widget-image" data-id="456b3a4" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img decoding="async" data-attachment-id="7537" data-permalink="https://inero-software.com/setting-up-passwordless-login-with-passkey-on-a-mobile-device/22025-03-11/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/03/22025-03-11.png" data-orig-size="616,227" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="22025-03-11" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/03/22025-03-11-300x111.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/03/22025-03-11.png" tabindex="0" role="button" width="616" height="227" src="https://inero-software.com/wp-content/uploads/2025/03/22025-03-11.png" class="attachment-large size-large wp-image-7537" alt="" srcset="https://inero-software.com/wp-content/uploads/2025/03/22025-03-11.png 616w, https://inero-software.com/wp-content/uploads/2025/03/22025-03-11-300x111.png 300w" sizes="(max-width: 616px) 100vw, 616px" data-attachment-id="7537" data-permalink="https://inero-software.com/setting-up-passwordless-login-with-passkey-on-a-mobile-device/22025-03-11/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/03/22025-03-11.png" data-orig-size="616,227" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="22025-03-11" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/03/22025-03-11-300x111.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/03/22025-03-11.png" role="button" />													</div>
				</div>
				<div class="elementor-element elementor-element-a3f5cac elementor-widget elementor-widget-text-editor" data-id="a3f5cac" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">Once we confirm that this option is active, we can proceed with configuring the authentication flow.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-0950898 elementor-widget elementor-widget-image" data-id="0950898" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img loading="lazy" decoding="async" data-attachment-id="7538" data-permalink="https://inero-software.com/setting-up-passwordless-login-with-passkey-on-a-mobile-device/32025-03-11/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/03/32025-03-11.png" data-orig-size="770,452" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="32025-03-11" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/03/32025-03-11-300x176.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/03/32025-03-11.png" tabindex="0" role="button" width="770" height="452" src="https://inero-software.com/wp-content/uploads/2025/03/32025-03-11.png" class="attachment-large size-large wp-image-7538" alt="" srcset="https://inero-software.com/wp-content/uploads/2025/03/32025-03-11.png 770w, https://inero-software.com/wp-content/uploads/2025/03/32025-03-11-300x176.png 300w, https://inero-software.com/wp-content/uploads/2025/03/32025-03-11-768x451.png 768w, https://inero-software.com/wp-content/uploads/2025/03/32025-03-11-511x300.png 511w, https://inero-software.com/wp-content/uploads/2025/03/32025-03-11-512x300.png 512w" sizes="(max-width: 770px) 100vw, 770px" data-attachment-id="7538" data-permalink="https://inero-software.com/setting-up-passwordless-login-with-passkey-on-a-mobile-device/32025-03-11/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/03/32025-03-11.png" data-orig-size="770,452" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="32025-03-11" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/03/32025-03-11-300x176.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/03/32025-03-11.png" role="button" />													</div>
				</div>
				<div class="elementor-element elementor-element-87518d4 elementor-widget elementor-widget-text-editor" data-id="87518d4" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">This custom authentication flow for Keycloak is designed to demonstrate how users can choose between password-based authentication and passkey authentication (WebAuthn) during login. Here’s how it works:</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-d372519 elementor-widget elementor-widget-text-editor" data-id="d372519" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<ul><li style="list-style-type: none;"><ul><li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">Users are required to provide their username to proceed with authentication.</span></li><li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">This step enforces authentication, but users can choose between password-based login or passkey-based login.</span></li><li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">If the user opts for password authentication, they enter their credentials here.</span></li><li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">If the user prefers passwordless authentication using passkeys, they can authenticate using this method instead.</span></li></ul></li></ul>						</div>
				</div>
				<div class="elementor-element elementor-element-5a1acc1 elementor-widget elementor-widget-image" data-id="5a1acc1" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img loading="lazy" decoding="async" data-attachment-id="7539" data-permalink="https://inero-software.com/setting-up-passwordless-login-with-passkey-on-a-mobile-device/42025-03-11/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/03/42025-03-11.png" data-orig-size="643,279" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="42025-03-11" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/03/42025-03-11-300x130.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/03/42025-03-11.png" tabindex="0" role="button" width="643" height="279" src="https://inero-software.com/wp-content/uploads/2025/03/42025-03-11.png" class="attachment-large size-large wp-image-7539" alt="" srcset="https://inero-software.com/wp-content/uploads/2025/03/42025-03-11.png 643w, https://inero-software.com/wp-content/uploads/2025/03/42025-03-11-300x130.png 300w" sizes="(max-width: 643px) 100vw, 643px" data-attachment-id="7539" data-permalink="https://inero-software.com/setting-up-passwordless-login-with-passkey-on-a-mobile-device/42025-03-11/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/03/42025-03-11.png" data-orig-size="643,279" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="42025-03-11" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/03/42025-03-11-300x130.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/03/42025-03-11.png" role="button" />													</div>
				</div>
				<div class="elementor-element elementor-element-d065fdf elementor-widget elementor-widget-text-editor" data-id="d065fdf" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">In this step, users can enter their username or email to proceed with authentication. This is a required step, ensuring that the system identifies the user before offering authentication options.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-4b5d087 elementor-widget elementor-widget-image" data-id="4b5d087" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img loading="lazy" decoding="async" data-attachment-id="7540" data-permalink="https://inero-software.com/setting-up-passwordless-login-with-passkey-on-a-mobile-device/52025-03-11/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/03/52025-03-11.png" data-orig-size="644,292" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="52025-03-11" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/03/52025-03-11-300x136.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/03/52025-03-11.png" tabindex="0" role="button" width="644" height="292" src="https://inero-software.com/wp-content/uploads/2025/03/52025-03-11.png" class="attachment-large size-large wp-image-7540" alt="" srcset="https://inero-software.com/wp-content/uploads/2025/03/52025-03-11.png 644w, https://inero-software.com/wp-content/uploads/2025/03/52025-03-11-300x136.png 300w" sizes="(max-width: 644px) 100vw, 644px" data-attachment-id="7540" data-permalink="https://inero-software.com/setting-up-passwordless-login-with-passkey-on-a-mobile-device/52025-03-11/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/03/52025-03-11.png" data-orig-size="644,292" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="52025-03-11" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/03/52025-03-11-300x136.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/03/52025-03-11.png" role="button" />													</div>
				</div>
				<div class="elementor-element elementor-element-a1bfcfe elementor-widget elementor-widget-text-editor" data-id="a1bfcfe" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">At this stage, we can only use password authentication because we haven&#8217;t configured our Passkey (WebAuthn) yet. Once Passkey is set up, users will have the option to choose between password-based and passwordless authentication.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-c2348be elementor-widget elementor-widget-image" data-id="c2348be" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img loading="lazy" decoding="async" data-attachment-id="7541" data-permalink="https://inero-software.com/setting-up-passwordless-login-with-passkey-on-a-mobile-device/62025-03-11/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/03/62025-03-11.png" data-orig-size="655,236" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="62025-03-11" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/03/62025-03-11-300x108.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/03/62025-03-11.png" tabindex="0" role="button" width="655" height="236" src="https://inero-software.com/wp-content/uploads/2025/03/62025-03-11.png" class="attachment-large size-large wp-image-7541" alt="" srcset="https://inero-software.com/wp-content/uploads/2025/03/62025-03-11.png 655w, https://inero-software.com/wp-content/uploads/2025/03/62025-03-11-300x108.png 300w" sizes="(max-width: 655px) 100vw, 655px" data-attachment-id="7541" data-permalink="https://inero-software.com/setting-up-passwordless-login-with-passkey-on-a-mobile-device/62025-03-11/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/03/62025-03-11.png" data-orig-size="655,236" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="62025-03-11" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/03/62025-03-11-300x108.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/03/62025-03-11.png" role="button" />													</div>
				</div>
				<div class="elementor-element elementor-element-4a740ef elementor-widget elementor-widget-text-editor" data-id="4a740ef" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">Instead of registering a device PIN as mentioned earlier, we will use authentication via a phone, specifically an iPhone, in this example</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-8e0e308 elementor-widget elementor-widget-image" data-id="8e0e308" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img loading="lazy" decoding="async" data-attachment-id="7542" data-permalink="https://inero-software.com/setting-up-passwordless-login-with-passkey-on-a-mobile-device/72025-03-11/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/03/72025-03-11.png" data-orig-size="558,686" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="72025-03-11" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/03/72025-03-11-244x300.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/03/72025-03-11.png" tabindex="0" role="button" width="558" height="686" src="https://inero-software.com/wp-content/uploads/2025/03/72025-03-11.png" class="attachment-large size-large wp-image-7542" alt="" srcset="https://inero-software.com/wp-content/uploads/2025/03/72025-03-11.png 558w, https://inero-software.com/wp-content/uploads/2025/03/72025-03-11-244x300.png 244w" sizes="(max-width: 558px) 100vw, 558px" data-attachment-id="7542" data-permalink="https://inero-software.com/setting-up-passwordless-login-with-passkey-on-a-mobile-device/72025-03-11/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/03/72025-03-11.png" data-orig-size="558,686" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="72025-03-11" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/03/72025-03-11-244x300.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/03/72025-03-11.png" role="button" />													</div>
				</div>
				<div class="elementor-element elementor-element-512ac1c elementor-widget elementor-widget-image" data-id="512ac1c" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img loading="lazy" decoding="async" data-attachment-id="7543" data-permalink="https://inero-software.com/setting-up-passwordless-login-with-passkey-on-a-mobile-device/82025-03-11/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/03/82025-03-11.png" data-orig-size="554,704" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="82025-03-11" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/03/82025-03-11-236x300.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/03/82025-03-11.png" tabindex="0" role="button" width="554" height="704" src="https://inero-software.com/wp-content/uploads/2025/03/82025-03-11.png" class="attachment-large size-large wp-image-7543" alt="" srcset="https://inero-software.com/wp-content/uploads/2025/03/82025-03-11.png 554w, https://inero-software.com/wp-content/uploads/2025/03/82025-03-11-236x300.png 236w" sizes="(max-width: 554px) 100vw, 554px" data-attachment-id="7543" data-permalink="https://inero-software.com/setting-up-passwordless-login-with-passkey-on-a-mobile-device/82025-03-11/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/03/82025-03-11.png" data-orig-size="554,704" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="82025-03-11" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/03/82025-03-11-236x300.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/03/82025-03-11.png" role="button" />													</div>
				</div>
				<div class="elementor-element elementor-element-579c8d6 elementor-widget elementor-widget-text-editor" data-id="579c8d6" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">Now, a QR code should appear, allowing us to register a Passkey on our account. Let&#8217;s scan it using our phone&#8217;s camera and verify the operation, for example, using Face ID.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-e3e3a98 elementor-widget elementor-widget-image" data-id="e3e3a98" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img loading="lazy" decoding="async" data-attachment-id="7544" data-permalink="https://inero-software.com/setting-up-passwordless-login-with-passkey-on-a-mobile-device/92025-03-11/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/03/92025-03-11.png" data-orig-size="547,241" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="92025-03-11" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/03/92025-03-11-300x132.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/03/92025-03-11.png" tabindex="0" role="button" width="547" height="241" src="https://inero-software.com/wp-content/uploads/2025/03/92025-03-11.png" class="attachment-large size-large wp-image-7544" alt="" srcset="https://inero-software.com/wp-content/uploads/2025/03/92025-03-11.png 547w, https://inero-software.com/wp-content/uploads/2025/03/92025-03-11-300x132.png 300w" sizes="(max-width: 547px) 100vw, 547px" data-attachment-id="7544" data-permalink="https://inero-software.com/setting-up-passwordless-login-with-passkey-on-a-mobile-device/92025-03-11/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/03/92025-03-11.png" data-orig-size="547,241" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="92025-03-11" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/03/92025-03-11-300x132.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/03/92025-03-11.png" role="button" />													</div>
				</div>
				<div class="elementor-element elementor-element-48105ee elementor-widget elementor-widget-text-editor" data-id="48105ee" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">Now, our Passkey should be visible in the Credentials section.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-1d1bbc7 elementor-widget elementor-widget-image" data-id="1d1bbc7" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img loading="lazy" decoding="async" data-attachment-id="7545" data-permalink="https://inero-software.com/setting-up-passwordless-login-with-passkey-on-a-mobile-device/102025-03-11/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/03/102025-03-11.png" data-orig-size="776,486" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="102025-03-11" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/03/102025-03-11-300x188.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/03/102025-03-11.png" tabindex="0" role="button" width="776" height="486" src="https://inero-software.com/wp-content/uploads/2025/03/102025-03-11.png" class="attachment-large size-large wp-image-7545" alt="" srcset="https://inero-software.com/wp-content/uploads/2025/03/102025-03-11.png 776w, https://inero-software.com/wp-content/uploads/2025/03/102025-03-11-300x188.png 300w, https://inero-software.com/wp-content/uploads/2025/03/102025-03-11-768x481.png 768w, https://inero-software.com/wp-content/uploads/2025/03/102025-03-11-479x300.png 479w" sizes="(max-width: 776px) 100vw, 776px" data-attachment-id="7545" data-permalink="https://inero-software.com/setting-up-passwordless-login-with-passkey-on-a-mobile-device/102025-03-11/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/03/102025-03-11.png" data-orig-size="776,486" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="102025-03-11" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/03/102025-03-11-300x188.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/03/102025-03-11.png" role="button" />													</div>
				</div>
				<div class="elementor-element elementor-element-7b13102 elementor-widget elementor-widget-text-editor" data-id="7b13102" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">During the next login, we should see the option to choose between password authentication and Passkey authentication.</span></p><p> </p><p><span style="font-weight: 400;">This setup enhances user convenience by allowing them to pick their preferred authentication method. Passkeys provide a more secure and phishing-resistant login experience, while passwords remain available for users who prefer traditional authentication. With this flexibility, we can ensure both security and ease of access for different user preferences.</span></p><p> </p><p><span style="font-weight: 400;">It is worth remembering that traditional passwords are a weak link in digital security, often compromised through reuse, phishing, or data breaches. Passkeys offer a modern, passwordless authentication method that enhances security and usability by leveraging cryptographic key pairs managed by platform authenticators. They provide phishing resistance, seamless multi-device access, and compliance with multi-factor authentication (MFA) standards.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-4a97718 elementor-cta--skin-cover elementor-animated-content elementor-bg-transform elementor-bg-transform-zoom-in elementor-widget elementor-widget-call-to-action" data-id="4a97718" data-element_type="widget" data-widget_type="call-to-action.default">
				<div class="elementor-widget-container">
					<a class="elementor-cta" href="https://inero-software.com/best-keycloak-practices/">
					<div class="elementor-cta__bg-wrapper">
				<div class="elementor-cta__bg elementor-bg" style="background-image: url(https://inero-software.com/wp-content/uploads/2025/01/cta-wm-1-1030x579.png);" role="img" aria-label="cta wm (1)"></div>
				<div class="elementor-cta__bg-overlay"></div>
			</div>
							<div class="elementor-cta__content">
				
									<h2 class="elementor-cta__title elementor-cta__content-item elementor-content-item elementor-animated-item--grow">
						Best Practices in Keycloak: Secure Your System in 5 Steps					</h2>
				
				
									<div class="elementor-cta__button-wrapper elementor-cta__content-item elementor-content-item elementor-animated-item--grow">
					<span class="elementor-cta__button elementor-button elementor-size-">
						Read more 					</span>
					</div>
							</div>
						</a>
				</div>
				</div>
					</div>
				</div>
				</div>
		<p>Artykuł <a href="https://inero-software.com/setting-up-passwordless-login-with-passkey-on-a-mobile-device/">Setting Up Passwordless Login with Passkey on a Mobile Device</a> pochodzi z serwisu <a href="https://inero-software.com">Inero Software - Software Consulting</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7534</post-id>	</item>
		<item>
		<title>Behind the Scenes #2: Implementing email-based MFA in Keycloak</title>
		<link>https://inero-software.com/behind-the-scenes-2-implementing-email-based-mfa-in-keycloak/</link>
		
		<dc:creator><![CDATA[Marceli Formela]]></dc:creator>
		<pubDate>Thu, 13 Feb 2025 09:50:32 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Company]]></category>
		<category><![CDATA[Keycloak]]></category>
		<category><![CDATA[2FA]]></category>
		<category><![CDATA[emial]]></category>
		<category><![CDATA[IAM]]></category>
		<category><![CDATA[keycloak]]></category>
		<category><![CDATA[MFA]]></category>
		<category><![CDATA[Multi-Factor Authentication]]></category>
		<category><![CDATA[OTP]]></category>
		<guid isPermaLink="false">https://inero-software.com/?p=7042</guid>

					<description><![CDATA[<p>In this post, we’ll explore a custom MFA implementation that sends a one-time authentication code to the user’s email.</p>
<p>Artykuł <a href="https://inero-software.com/behind-the-scenes-2-implementing-email-based-mfa-in-keycloak/">Behind the Scenes #2: Implementing email-based MFA in Keycloak</a> pochodzi z serwisu <a href="https://inero-software.com">Inero Software - Software Consulting</a>.</p>
]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="7042" class="elementor elementor-7042" data-elementor-post-type="post">
				<div class="elementor-element elementor-element-091b893 e-flex e-con-boxed e-con e-parent" data-id="091b893" data-element_type="container">
					<div class="e-con-inner">
		<div class="elementor-element elementor-element-628ea76 e-con-full e-flex e-con e-child" data-id="628ea76" data-element_type="container">
				</div>
		<div class="elementor-element elementor-element-9ca8a9e e-con-full e-flex e-con e-child" data-id="9ca8a9e" data-element_type="container">
				<div class="elementor-element elementor-element-edd1fd0 elementor-widget elementor-widget-html" data-id="edd1fd0" data-element_type="widget" data-widget_type="html.default">
				<div class="elementor-widget-container">
			 		</div>
				</div>
				<div class="elementor-element elementor-element-3e56066 elementor-widget elementor-widget-text-editor" data-id="3e56066" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<h5><strong>Keycloak natively supports many secure login solutions and comes with built-in one-time password (OTP) mechanisms, such as authentication via mobile apps like Google Authenticator or our solution <a href="https://inero-software.com/introducing-authm8-a-free-cross-platform-2fa-solution-tailored-to-your-brand-for-secure-authentication/">AuthM8</a>. However, if we want to use other advanced authentication methods and for example send OTP codes via email, then similar to SMS multi factor authentication (more details <a href="https://inero-software.com/custom-sms-authenticator-with-keycloak/">HERE</a>), we need to implement this functionality ourselves. In this post, we’ll explore a custom MFA implementation that sends a one-time authentication code to the user’s email. </strong></h5>						</div>
				</div>
				<div class="elementor-element elementor-element-0994f82 elementor-widget elementor-widget-heading" data-id="0994f82" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h3 class="elementor-heading-title elementor-size-default">How does email-based MFA work?
</h3>		</div>
				</div>
				<div class="elementor-element elementor-element-8e8909e elementor-widget elementor-widget-text-editor" data-id="8e8909e" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>The authentication process consists of two main stages:</p>						</div>
				</div>
				<div class="elementor-element elementor-element-8435873 elementor-widget elementor-widget-text-editor" data-id="8435873" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<ul><li style="list-style-type: none;"><ul><li><b style="color: var( --e-global-color-text ); text-align: var(--text-align);">Generating and sending the MFA code</b></li></ul></li></ul><p><span style="font-weight: 400;">If the user already has an active cookie confirming a previous MFA verification, they should be immediately authenticated. Otherwise, Keycloak creates a new credential for the user and generates a one-time code based on configurable parameters like length or time-to-live.  The code is stored in the user’s credentials and then is emailed using the email provider.</span></p><p> </p><ul><li style="list-style-type: none;"><ul><li aria-level="1"><b>Verifying the entered code</b></li></ul></li></ul><p><span style="font-weight: 400;">When a user submits the code, KC retrieves the stored credential and compares the entered value. If the code is correct and still valid (not expired), authentication is successful, and a cookie is set to remember the verification. If the code is incorrect, the user is prompted to re-enter it and if the code has expired, an error message is shown and the process must be restarted.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-d65460b elementor-widget elementor-widget-image" data-id="d65460b" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img loading="lazy" decoding="async" data-attachment-id="7044" data-permalink="https://inero-software.com/behind-the-scenes-2-implementing-email-based-mfa-in-keycloak/email-based-two-factor-authentication-flowchart/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/02/EMAIL-BASED-TWO-FACTOR-AUTHENTICATION-FLOWCHART.png" data-orig-size="1920,1080" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="EMAIL-BASED TWO-FACTOR AUTHENTICATION FLOWCHART" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/02/EMAIL-BASED-TWO-FACTOR-AUTHENTICATION-FLOWCHART-300x169.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/02/EMAIL-BASED-TWO-FACTOR-AUTHENTICATION-FLOWCHART-1030x579.png" tabindex="0" role="button" width="1030" height="579" src="https://inero-software.com/wp-content/uploads/2025/02/EMAIL-BASED-TWO-FACTOR-AUTHENTICATION-FLOWCHART-1030x579.png" class="attachment-large size-large wp-image-7044" alt="" srcset="https://inero-software.com/wp-content/uploads/2025/02/EMAIL-BASED-TWO-FACTOR-AUTHENTICATION-FLOWCHART-1030x579.png 1030w, https://inero-software.com/wp-content/uploads/2025/02/EMAIL-BASED-TWO-FACTOR-AUTHENTICATION-FLOWCHART-300x169.png 300w, https://inero-software.com/wp-content/uploads/2025/02/EMAIL-BASED-TWO-FACTOR-AUTHENTICATION-FLOWCHART-768x432.png 768w, https://inero-software.com/wp-content/uploads/2025/02/EMAIL-BASED-TWO-FACTOR-AUTHENTICATION-FLOWCHART-1536x864.png 1536w, https://inero-software.com/wp-content/uploads/2025/02/EMAIL-BASED-TWO-FACTOR-AUTHENTICATION-FLOWCHART-533x300.png 533w, https://inero-software.com/wp-content/uploads/2025/02/EMAIL-BASED-TWO-FACTOR-AUTHENTICATION-FLOWCHART.png 1920w" sizes="(max-width: 1030px) 100vw, 1030px" data-attachment-id="7044" data-permalink="https://inero-software.com/behind-the-scenes-2-implementing-email-based-mfa-in-keycloak/email-based-two-factor-authentication-flowchart/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/02/EMAIL-BASED-TWO-FACTOR-AUTHENTICATION-FLOWCHART.png" data-orig-size="1920,1080" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="EMAIL-BASED TWO-FACTOR AUTHENTICATION FLOWCHART" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/02/EMAIL-BASED-TWO-FACTOR-AUTHENTICATION-FLOWCHART-300x169.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/02/EMAIL-BASED-TWO-FACTOR-AUTHENTICATION-FLOWCHART-1030x579.png" role="button" />													</div>
				</div>
				<div class="elementor-element elementor-element-5925a75 elementor-widget elementor-widget-heading" data-id="5925a75" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h3 class="elementor-heading-title elementor-size-default"><strong data-start="157" data-end="185">Email MFA: Pros and Cons</strong> </h3>		</div>
				</div>
				<div class="elementor-element elementor-element-3c6c4e2 elementor-widget elementor-widget-text-editor" data-id="3c6c4e2" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">Email-based MFA offers additional security when the primary factor, such as a password, has been compromised. This is particularly helpful in cases where passwords are brute-forced or easily guessed, such as with common combinations like 123456. Similarly, this solution offers protection against credential stuffing, where attackers use leaked passwords from other breaches to attempt logging into account.</span></p><p><span style="font-weight: 400;">There are several other benefits to using email as a MFA:</span></p><ul><li style="list-style-type: none;"><ul><li aria-level="1"><span style="font-weight: 400;">Email MFA does not require users to provide additional sensitive information, such as a phone number, reducing concerns about privacy.</span></li></ul></li></ul><ul><li style="list-style-type: none;"><ul><li aria-level="1"><span style="font-weight: 400;">It does not require users to install a separate app or complete a complicated setup, which simplifies the process.</span></li></ul></li></ul><ul><li style="list-style-type: none;"><ul><li aria-level="1"><span style="font-weight: 400;"> </span><span style="font-weight: 400;">Users are accustomed to providing their email for various purposes, such as receiving important account updates or resetting passwords. This familiarity makes it more accessible.</span></li></ul></li></ul><p><span style="font-weight: 400;">However, email as a delivery channel does have some drawbacks. If an attacker compromises your email (gains access to an email account through stolen credentials or by exploiting an active session.), they could potentially reset other accounts’ passwords as well. For users in vulnerable situations, such as those with access to shared devices, email-based MFA can still leave them exposed. As with any security measure, it’s essential to weigh the benefits against the potential risks and mix email MFA with other safeguards, such as strong passwords policy and secure email practices.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-4fd89fe elementor-widget elementor-widget-heading" data-id="4fd89fe" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h3 class="elementor-heading-title elementor-size-default">Implementing Email MFA</h3>		</div>
				</div>
				<div class="elementor-element elementor-element-cfc16d2 elementor-widget elementor-widget-image" data-id="cfc16d2" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img loading="lazy" decoding="async" data-attachment-id="7045" data-permalink="https://inero-software.com/behind-the-scenes-2-implementing-email-based-mfa-in-keycloak/zrzut-ekranu-2025-02-13-102335/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102335.png" data-orig-size="755,508" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Zrzut ekranu 2025-02-13 102335" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102335-300x202.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102335.png" tabindex="0" role="button" width="755" height="508" src="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102335.png" class="attachment-large size-large wp-image-7045" alt="" srcset="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102335.png 755w, https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102335-300x202.png 300w, https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102335-446x300.png 446w" sizes="(max-width: 755px) 100vw, 755px" data-attachment-id="7045" data-permalink="https://inero-software.com/behind-the-scenes-2-implementing-email-based-mfa-in-keycloak/zrzut-ekranu-2025-02-13-102335/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102335.png" data-orig-size="755,508" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Zrzut ekranu 2025-02-13 102335" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102335-300x202.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102335.png" role="button" />													</div>
				</div>
				<div class="elementor-element elementor-element-295f2c1 elementor-widget elementor-widget-text-editor" data-id="295f2c1" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">In this modified Browser Authentication Flow, we integrate our custom MFA as an additional authentication method. There are two new steps:</span></p><ul><li style="list-style-type: none;"><ul><li style="font-weight: 400;" aria-level="1"><b>MFA Email setup</b><span style="font-weight: 400;"> – this step ensures that email is set up and verified for the user before proceeding. If the user does not have a custom MFA Credential (which stores OTP codes as secrets), it will be set as well.</span></li></ul></li></ul>						</div>
				</div>
				<div class="elementor-element elementor-element-1cb9fd2 elementor-widget elementor-widget-text-editor" data-id="1cb9fd2" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<pre><span style="font-weight: 400;">public class MfaEmailSetupAuthenticator implements Authenticator, CredentialValidator&lt;MfaEmailCredentialProvider&gt; {</span><br /><span style="font-weight: 400;">@Override</span><br /><span style="font-weight: 400;">public void authenticate(AuthenticationFlowContext context) {</span><br /><span style="font-weight: 400;">[…]</span><br /><span style="font-weight: 400;">// Require email verification</span><br /><span style="font-weight: 400;">if (!userModel.isEmailVerified()) {</span><br /><span style="font-weight: 400;">userModel.addRequiredAction(UserModel.RequiredAction.VERIFY_EMAIL);</span><br /><span style="font-weight: 400;">}</span><br /><span style="font-weight: 400;">// Add MFA email credential if not present</span><br /><span style="font-weight: 400;">if (!getCredentialProvider(context.getSession()).isConfiguredFor(realmModel, userModel, MfaEmailCredentialModel.TYPE)) {</span><br /><span style="font-weight: 400;">userModel.credentialManager().createStoredCredential(new MfaEmailCredentialModel(new MfaEmailCredentialData()));</span><br /><span style="font-weight: 400;">}</span><br /><span style="font-weight: 400;">[…]</span></pre>						</div>
				</div>
				<div class="elementor-element elementor-element-6908dab elementor-widget__width-initial elementor-widget elementor-widget-image" data-id="6908dab" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img loading="lazy" decoding="async" data-attachment-id="7046" data-permalink="https://inero-software.com/behind-the-scenes-2-implementing-email-based-mfa-in-keycloak/zrzut-ekranu-2025-02-13-102520/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102520.png" data-orig-size="635,398" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Zrzut ekranu 2025-02-13 102520" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102520-300x188.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102520.png" tabindex="0" role="button" width="635" height="398" src="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102520.png" class="attachment-large size-large wp-image-7046" alt="" srcset="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102520.png 635w, https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102520-300x188.png 300w, https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102520-479x300.png 479w" sizes="(max-width: 635px) 100vw, 635px" data-attachment-id="7046" data-permalink="https://inero-software.com/behind-the-scenes-2-implementing-email-based-mfa-in-keycloak/zrzut-ekranu-2025-02-13-102520/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102520.png" data-orig-size="635,398" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Zrzut ekranu 2025-02-13 102520" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102520-300x188.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102520.png" role="button" />													</div>
				</div>
				<div class="elementor-element elementor-element-eafd6c8 elementor-widget elementor-widget-text-editor" data-id="eafd6c8" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<ul><li style="list-style-type: none;"><ul><li style="font-weight: 400;" aria-level="1"><b>MFA Email Authentication</b><span style="font-weight: 400;"> – this is the actual authentication step where a one-time code is sent via email. Marked as Alternative, meaning it can be used instead of other MFA methods like mobile app OTP.</span></li></ul></li></ul><p><span style="font-weight: 400;">Here, you can see how the configuration of this authenticator could look like in the Keycloak authentication flow.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-bdcf27f elementor-widget__width-initial elementor-widget elementor-widget-image" data-id="bdcf27f" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img loading="lazy" decoding="async" data-attachment-id="7047" data-permalink="https://inero-software.com/behind-the-scenes-2-implementing-email-based-mfa-in-keycloak/zrzut-ekranu-2025-02-13-102652/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102652.png" data-orig-size="473,622" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Zrzut ekranu 2025-02-13 102652" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102652-228x300.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102652.png" tabindex="0" role="button" width="473" height="622" src="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102652.png" class="attachment-large size-large wp-image-7047" alt="" srcset="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102652.png 473w, https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102652-228x300.png 228w" sizes="(max-width: 473px) 100vw, 473px" data-attachment-id="7047" data-permalink="https://inero-software.com/behind-the-scenes-2-implementing-email-based-mfa-in-keycloak/zrzut-ekranu-2025-02-13-102652/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102652.png" data-orig-size="473,622" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Zrzut ekranu 2025-02-13 102652" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102652-228x300.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-102652.png" role="button" />													</div>
				</div>
				<div class="elementor-element elementor-element-10b800d elementor-widget elementor-widget-text-editor" data-id="10b800d" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<ul><li style="list-style-type: none;"><ul><li style="font-weight: 400;" aria-level="1"><b>Max Cookie Age</b><span style="font-weight: 400;"> this setting determines how long the MFA session (cookie) is valid. If the cookie is still valid, the user won&#8217;t be prompted for MFA. </span></li><li style="font-weight: 400;" aria-level="1"><b>Time-to-live</b><span style="font-weight: 400;"> indicates the lifetime of the MFA code.</span></li></ul></li></ul><p> </p><p><span style="font-weight: 400;">Now let’s take a look at the code. </span></p><p> </p><p><span style="font-weight: 400;">The method below handles the MFA process itself. If a valid cookie exists (indicating that the user has already completed MFA), the method immediately returns success, meaning the authentication flow is complete without requiring additional actions.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-89fa524 elementor-widget elementor-widget-text-editor" data-id="89fa524" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<pre><span style="font-weight: 400;">@Override</span><br /><span style="font-weight: 400;">public void authenticate(AuthenticationFlowContext context) {</span><br /><span style="font-weight: 400;">if (hasValidCookie(context)) {</span><br /><span style="font-weight: 400;">context.success();</span><br /><span style="font-weight: 400;">return;</span><br /><span style="font-weight: 400;">}</span><br /><span style="font-weight: 400;">[…]</span></pre>						</div>
				</div>
				<div class="elementor-element elementor-element-55ff859 elementor-widget elementor-widget-text-editor" data-id="55ff859" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">If there is no cookie, we should try to retrieve the user’s existing MFA credential from the credential provider. If the user doesn’t have one, a new instance is created using the MfaEmailCredentialModel which just extends the built-in CredentialModel:</span><span style="font-weight: 400;"><br /></span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-0af0624 elementor-widget elementor-widget-text-editor" data-id="0af0624" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<pre><span style="font-weight: 400;">[…]</span><br /><span style="font-weight: 400;">// get existing credential or create a new one</span><br /><span style="font-weight: 400;">CredentialModel credentialModel = getCredentialProvider(session)</span><br /><span style="font-weight: 400;">.getDefaultCredential(session, context.getRealm(), user);</span><br /><span style="font-weight: 400;">if (credentialModel == null) {</span><br /><span style="font-weight: 400;">credentialModel = user.credentialManager().createStoredCredential(new MfaEmailCredentialModel(new MfaEmailCredentialData()));</span><br /><span style="font-weight: 400;">}</span><br /><span style="font-weight: 400;">[…]</span></pre>						</div>
				</div>
				<div class="elementor-element elementor-element-c7af14a elementor-widget elementor-widget-text-editor" data-id="c7af14a" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">Then the authenticate method reads configuration properties like code length and TTL (time-to-live). The code itself can be generated using some utils method and will be stored as the secretData in the credential model.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-6551375 elementor-widget elementor-widget-text-editor" data-id="6551375" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<pre><span style="font-weight: 400;">// generate and store code</span><br /><span style="font-weight: 400;">int length = Integer.parseInt(configMap.get(CONFIG_CODE_LENGTH));</span><br /><span style="font-weight: 400;">int ttl = Integer.parseInt(configMap.get(CONFIG_CODE_TTL));</span><br /><span style="font-weight: 400;">String code = MfaEmailCodesUtils.generateCode(length);</span><br /><span style="font-weight: 400;">credentialModel.setSecretData(code);</span><br /><span style="font-weight: 400;">user.credentialManager().updateStoredCredential(credentialModel);</span><br /><span style="font-weight: 400;">AuthenticationSessionModel authSession = context.getAuthenticationSession();</span><br /><span style="font-weight: 400;">authSession.setAuthNote("ttl", Long.toString(System.currentTimeMillis() + (ttl * 1000L)));</span></pre>						</div>
				</div>
				<div class="elementor-element elementor-element-b7f4d62 elementor-widget elementor-widget-text-editor" data-id="b7f4d62" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">In the end the sendCode method is called to send the generated code to the user’s email. If the email is sent successfully, the method presents the form where the user can enter the MFA code.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-dc63501 elementor-widget elementor-widget-text-editor" data-id="dc63501" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<pre><span style="font-weight: 400;">// send email and show input form</span><br /><span style="font-weight: 400;">try {</span><br /><span style="font-weight: 400;">MfaEmailCodesUtils.sendCode(session, user, ttl, code, configMap);</span><br /><span style="font-weight: 400;">context.challenge(context.form().setAttribute("realm", context.getRealm()).createForm(TPL_CODE));</span><br /><span style="font-weight: 400;">} catch (Exception e) {</span><br /><span style="font-weight: 400;">context.failureChallenge(AuthenticationFlowError.INTERNAL_ERROR,</span><br /><span style="font-weight: 400;">context.form().setError("mfaEmailNotSent", e.getMessage())  .createErrorPage(Response.Status.INTERNAL_SERVER_ERROR));</span><br /><span style="font-weight: 400;">}</span></pre>						</div>
				</div>
				<div class="elementor-element elementor-element-b41ad7b elementor-widget elementor-widget-text-editor" data-id="b41ad7b" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">The second major part of our Authenticator is the action method which handles the validation of the code entered by the user. It is invoked when the user submits the input form after receiving the email.  </span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-9551f9f elementor-widget__width-initial elementor-widget elementor-widget-image" data-id="9551f9f" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img loading="lazy" decoding="async" data-attachment-id="7048" data-permalink="https://inero-software.com/behind-the-scenes-2-implementing-email-based-mfa-in-keycloak/zrzut-ekranu-2025-02-13-103114/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-103114.png" data-orig-size="663,391" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Zrzut ekranu 2025-02-13 103114" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-103114-300x177.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-103114.png" tabindex="0" role="button" width="663" height="391" src="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-103114.png" class="attachment-large size-large wp-image-7048" alt="" srcset="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-103114.png 663w, https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-103114-300x177.png 300w, https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-103114-509x300.png 509w" sizes="(max-width: 663px) 100vw, 663px" data-attachment-id="7048" data-permalink="https://inero-software.com/behind-the-scenes-2-implementing-email-based-mfa-in-keycloak/zrzut-ekranu-2025-02-13-103114/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-103114.png" data-orig-size="663,391" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Zrzut ekranu 2025-02-13 103114" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-103114-300x177.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/02/Zrzut-ekranu-2025-02-13-103114.png" role="button" />													</div>
				</div>
				<div class="elementor-element elementor-element-460cfb7 elementor-widget elementor-widget-text-editor" data-id="460cfb7" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">The method retrieves the user’s credential from the provider and then the code is validated by checking it against the stored credential using the custom isValid method.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-ff19a7e elementor-widget elementor-widget-text-editor" data-id="ff19a7e" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<pre><span style="font-weight: 400;">[…]</span><br /><span style="font-weight: 400;">final MfaEmailCredentialModel credentialModel = getCredentialProvider(session)</span><br /><span style="font-weight: 400;">        .getDefaultCredential(session, context.getRealm(), user);</span><br /><span style="font-weight: 400;">boolean isValid = getCredentialProvider(session).isValid(context.getRealm(), user,</span><br /><span style="font-weight: 400;">    </span> <span style="font-weight: 400;">new UserCredentialModel(credentialModel.getId(), getCredentialProvider(context.getSession()).getType(), enteredCode));</span><br /><span style="font-weight: 400;">[…]</span></pre>						</div>
				</div>
				<div class="elementor-element elementor-element-7b502f8 elementor-widget elementor-widget-text-editor" data-id="7b502f8" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">If the code is valid, the next step is to check if it is expired. We can also set a cookie that stores the MFA session to prevent the user from </span><b>being prompted for MFA again</b><span style="font-weight: 400;"> during the cookie’s validity period.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-3db7437 elementor-widget elementor-widget-text-editor" data-id="3db7437" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<pre><span style="font-weight: 400;">[…]</span><br /><span style="font-weight: 400;">// valid</span><br /><span style="font-weight: 400;">HttpResponse response = context.getSession().getContext().getHttpResponse();</span><br /><span style="font-weight: 400;">response.setCookieIfAbsent(createCookie(context));</span><br /><span style="font-weight: 400;">context.success();</span><br /><span style="font-weight: 400;">[…]</span></pre><p><span style="font-weight: 400;"> </span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-83cf638 elementor-widget elementor-widget-text-editor" data-id="83cf638" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">Of course, in this post, we will not cover the entire topic, omitting implementation details such as sending the code, generating the code, validation, and creating our custom cookie.</span></p><p><span style="font-weight: 400;"><br></span></p>
<p><span style="font-weight: 400;">However, we have walked through the major steps of implementing 2FA using email-based codes. On the one hand, this approach offers a simple and accessible solution. Although it has its drawbacks, using it in solutions like Keycloak helps mitigate many of these vulnerabilities. Keycloak also provides the flexibility to combine email-based MFA with other security measures, creating a more layered and resilient authentication process that can help protect against evolving cybersecurity threats.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-a27180c elementor-cta--skin-cover elementor-animated-content elementor-bg-transform elementor-bg-transform-zoom-in elementor-widget elementor-widget-call-to-action" data-id="a27180c" data-element_type="widget" data-widget_type="call-to-action.default">
				<div class="elementor-widget-container">
					<div class="elementor-cta">
					<div class="elementor-cta__bg-wrapper">
				<div class="elementor-cta__bg elementor-bg" style="background-image: url(https://inero-software.com/wp-content/uploads/2024/11/tlo-popup-keycloak-1030x731.png);" role="img" aria-label="tło popup keycloak"></div>
				<div class="elementor-cta__bg-overlay"></div>
			</div>
							<div class="elementor-cta__content">
				
									<h3 class="elementor-cta__title elementor-cta__content-item elementor-content-item elementor-animated-item--grow">
						Do you need help configuring multi-factor authentication?					</h3>
				
									<div class="elementor-cta__description elementor-cta__content-item elementor-content-item elementor-animated-item--grow">
						Schedule a meeting to find out how we can help you.					</div>
				
									<div class="elementor-cta__button-wrapper elementor-cta__content-item elementor-content-item elementor-animated-item--grow">
					<a class="elementor-cta__button elementor-button elementor-size-" href="https://calendar.google.com/calendar/u/0/appointments/schedules/AcZssZ3e3C_1YeBkt1uCr_qfOnG_N298UgLFwORcSTXigrPfOk0ls3ok-Uw_dSeGCoLdtYsN13GMm-n-">
						Schedule a meeting					</a>
					</div>
							</div>
						</div>
				</div>
				</div>
				</div>
		<div class="elementor-element elementor-element-6bc7752 e-con-full e-flex e-con e-child" data-id="6bc7752" data-element_type="container">
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-091ddaf e-flex e-con-boxed e-con e-parent" data-id="091ddaf" data-element_type="container">
					<div class="e-con-inner">
					</div>
				</div>
				</div>
		<p>Artykuł <a href="https://inero-software.com/behind-the-scenes-2-implementing-email-based-mfa-in-keycloak/">Behind the Scenes #2: Implementing email-based MFA in Keycloak</a> pochodzi z serwisu <a href="https://inero-software.com">Inero Software - Software Consulting</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7042</post-id>	</item>
		<item>
		<title>Security Information and Event Management Systems: Why Is It Worth Adding Keycloak?</title>
		<link>https://inero-software.com/security-information-and-event-management-systems-why-is-it-worth-adding-keycloak/</link>
		
		<dc:creator><![CDATA[Marta Kuprasz]]></dc:creator>
		<pubDate>Thu, 06 Feb 2025 10:15:42 +0000</pubDate>
				<category><![CDATA[Company]]></category>
		<category><![CDATA[Keycloak]]></category>
		<category><![CDATA[BusinessProcessesOptimization]]></category>
		<category><![CDATA[cybersecurity]]></category>
		<category><![CDATA[IAM]]></category>
		<category><![CDATA[Identity and Access Management]]></category>
		<category><![CDATA[keycloak]]></category>
		<category><![CDATA[MFA]]></category>
		<category><![CDATA[Multi-Factor Authentication]]></category>
		<category><![CDATA[Security Information and Event Management]]></category>
		<category><![CDATA[SIEM]]></category>
		<guid isPermaLink="false">https://inero-software.com/?p=6930</guid>

					<description><![CDATA[<p>In this blog, you’ll learn how Keycloak can support your SIEM system.</p>
<p>Artykuł <a href="https://inero-software.com/security-information-and-event-management-systems-why-is-it-worth-adding-keycloak/">Security Information and Event Management Systems: Why Is It Worth Adding Keycloak?</a> pochodzi z serwisu <a href="https://inero-software.com">Inero Software - Software Consulting</a>.</p>
]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="6930" class="elementor elementor-6930" data-elementor-post-type="post">
				<div class="elementor-element elementor-element-3de08d1 e-flex e-con-boxed e-con e-parent" data-id="3de08d1" data-element_type="container">
					<div class="e-con-inner">
		<div class="elementor-element elementor-element-2840281 e-con-full e-flex e-con e-child" data-id="2840281" data-element_type="container">
				</div>
		<div class="elementor-element elementor-element-743954c e-con-full e-flex e-con e-child" data-id="743954c" data-element_type="container">
				<div class="elementor-element elementor-element-123bd75 elementor-widget elementor-widget-html" data-id="123bd75" data-element_type="widget" data-widget_type="html.default">
				<div class="elementor-widget-container">
			 		</div>
				</div>
				<div class="elementor-element elementor-element-e5f96e1 elementor-widget elementor-widget-text-editor" data-id="e5f96e1" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<h4><strong>Security Information and Event Management (SIEM) systems</strong> enable the collection and analysis of data on user activity, system access, and cybersecurity events to detect threats and respond to incidents in real time. <strong>Identity and Access Management (IAM)</strong> systems, in turn, provide insights into user activity. In this blog, you’ll learn how <strong>Keycloak</strong> can support your SIEM system.</h4>						</div>
				</div>
				<div class="elementor-element elementor-element-6d65b13 elementor-widget elementor-widget-text-editor" data-id="6d65b13" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>In the Report on the State of Cybersecurity in Poland for 2023 prepared by CSIRT GOV, it was indicated that among the threats persisting in the Polish cyberspace in 2023, which had a significant impact on risk assessment, social engineering attacks and brute-force attacks were particularly notable. Social engineering attacks involve manipulating users to gain unauthorized access to systems, while brute-force attacks rely on automatically attempting various password combinations to break security measures.</p><p>Proper identity management and log monitoring are key elements in protecting against such attacks. This is why integrating Keycloak with a SIEM system allows organizations to detect threats more effectively and respond to them immediately.</p>						</div>
				</div>
				<div class="elementor-element elementor-element-458b119 elementor-widget elementor-widget-heading" data-id="458b119" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h3 class="elementor-heading-title elementor-size-default">Why Is It Worth Integrating SIEM with Keycloak?</h3>		</div>
				</div>
				<div class="elementor-element elementor-element-df01dde elementor-widget elementor-widget-text-editor" data-id="df01dde" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Every organization using a SIEM system aims to detect as many threats as possible and respond to incidents as quickly as possible. Information about who attempted to access systems, from where, and when can be crucial in identifying attacks and unauthorized login attempts. This is where Keycloak—a popular open-source IAM platform—can significantly enhance the SIEM ecosystem by providing valuable data on authentication, authorization, and session management processes.</p><p>Keycloak, developed by the Red Hat community, offers comprehensive solutions for authenticating and authorizing users in web applications, mobile apps, and backend services. We’ve covered it in detail https://inero-software.com/keycloak-services/</p>						</div>
				</div>
				<div class="elementor-element elementor-element-cfe258a elementor-widget elementor-widget-text-editor" data-id="cfe258a" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><strong>Keycloak can provide data on:</strong></p><ul><li><strong>Login attempts</strong> – both successful and failed, along with information about the originating IP address.</li><li><strong>Forced password resets and changes in access policies</strong> – allowing for monitoring of potential account takeover attempts.</li><li><strong>User sessions</strong> – including unusual logins from new locations or devices.</li><li><strong>Detected threats</strong>, such as suspicious multiple login attempts (e.g., <strong>brute-force attacks</strong>, which involve cracking passwords or cryptographic keys by trying all possible combinations).</li></ul><hr /><p><strong>The SIEM system, in turn, can analyze this data and correlate it with other events, such as:</strong></p><ul><li><strong>Login attempts from unusual locations</strong> linked to suspicious network activity.</li><li><strong>Multiple failed login attempts from a single IP address</strong> – a sign of a brute-force attack.</li><li><strong>Sudden changes in user privileges</strong> associated with suspicious system access.</li></ul>						</div>
				</div>
				<div class="elementor-element elementor-element-4686a0e elementor-widget elementor-widget-text-editor" data-id="4686a0e" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>An example of effective integration can be seen in a situation where a user repeatedly enters an incorrect password within a short period. Keycloak logs this as suspicious activity. A SIEM system can then correlate this data with login attempts from different locations and take action, such as temporarily blocking the account or enforcing additional authentication.</p>						</div>
				</div>
				<div class="elementor-element elementor-element-96d9b04 elementor-widget elementor-widget-heading" data-id="96d9b04" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h3 class="elementor-heading-title elementor-size-default">How Do Keycloak and SIEM Work Together?</h3>		</div>
				</div>
				<div class="elementor-element elementor-element-3550cbc elementor-widget elementor-widget-text-editor" data-id="3550cbc" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Keycloak and Security Information and Event Management (SIEM) systems serve different purposes in identity management and IT security, but they complement each other perfectly.</p>						</div>
				</div>
				<div class="elementor-element elementor-element-22daa90 elementor-widget elementor-widget-text-editor" data-id="22daa90" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<table style="font-weight: 400;" data-tablestyle="MsoNormalTable" data-tablelook="1184" aria-rowcount="9">
<tbody>
<tr aria-rowindex="1">
<td data-celllook="4369">
<p><b><span data-contrast="auto">Feature</span></b></p>
</td>
<td data-celllook="4369">
<p><b><span data-contrast="auto">SIEM (Security Information and Event Management)</span></b></p>
</td>
<td data-celllook="4369">
<p><b><span data-contrast="auto">IAM (Identity and Access Management – Keycloak)</span></b></p>
</td>
</tr>
<tr aria-rowindex="2">
<td data-celllook="4369"><b><span data-contrast="auto">Main Function</span></b></td>
<td data-celllook="4369"><span data-contrast="auto">Monitoring and analyzing security events</span></td>
<td data-celllook="4369"><span data-contrast="auto">Managing user identities and access</span></td>
</tr>
<tr aria-rowindex="3">
<td data-celllook="4369"><b><span data-contrast="auto">Scope of Operation</span></b></td>
<td data-celllook="4369"><span data-contrast="auto">Log collection, incident analysis, threat detection</span></td>
<td data-celllook="4369"><span data-contrast="auto">Authentication, authorization, access control</span></td>
</tr>
<tr aria-rowindex="4">
<td data-celllook="4369"><b><span data-contrast="auto">Types of Data</span></b></td>
<td data-celllook="4369"><span data-contrast="auto">System logs, network traffic, security alerts</span></td>
<td data-celllook="4369"><span data-contrast="auto">User sessions, authentication logs, authorization requests</span></td>
</tr>
<tr aria-rowindex="5">
<td data-celllook="4369"><b><span data-contrast="auto">Mode of Operation</span></b></td>
<td data-celllook="4369"><span data-contrast="auto">Aggregation and correlation of events from multiple sources</span></td>
<td data-celllook="4369"><span data-contrast="auto">Verification of user identities and permissions</span></td>
</tr>
<tr aria-rowindex="6">
<td data-celllook="4369"><b><span data-contrast="auto">Primary Uses</span></b></td>
<td data-celllook="4369"><span data-contrast="auto">Anomaly detection, incident response, compliance</span></td>
<td data-celllook="4369"><span data-contrast="auto">Single Sign-On (SSO), identity federation, MFA</span></td>
</tr>
<tr aria-rowindex="7">
<td data-celllook="4369"><b><span data-contrast="auto">Examples of Threats</span></b></td>
<td data-celllook="4369"><span data-contrast="auto">DDoS attacks, malware, privilege escalation</span></td>
<td data-celllook="4369"><span data-contrast="auto">Brute-force attacks, account takeover, privilege misuse</span></td>
</tr>
<tr aria-rowindex="8">
<td data-celllook="4369"><b><span data-contrast="auto">Response to Threats</span></b></td>
<td data-celllook="4369"><span data-contrast="auto">Alert generation, automatic blocking, reporting</span></td>
<td data-celllook="4369"><span data-contrast="auto">Account blocking, enforcing MFA, session management</span></td>
</tr>
<tr aria-rowindex="9">
<td data-celllook="4369"><b><span data-contrast="auto">Integration with Other Systems</span></b></td>
<td data-celllook="4369"><span data-contrast="auto">Yes – collects logs from SIEM systems, IDS, firewalls</span></td>
<td data-celllook="4369"><span data-contrast="auto">Yes – integrates with LDAP, AD, databases, SIEM</span></td>
</tr>
</tbody>
</table>
						</div>
				</div>
				<div class="elementor-element elementor-element-b2b34d4 elementor-widget elementor-widget-heading" data-id="b2b34d4" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h3 class="elementor-heading-title elementor-size-default">How to Implement Keycloak?</h3>		</div>
				</div>
				<div class="elementor-element elementor-element-ff3536d elementor-widget elementor-widget-text-editor" data-id="ff3536d" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Integrating Keycloak with a SIEM system enhances IT security by providing additional information about users and their activities. This allows organizations to detect threats more effectively and respond to incidents more quickly.</p><p>If you&#8217;re wondering how to implement and configure Keycloak for your organization, be sure to check out these articles:</p><ul><li><a href="https://inero-software.com/hands-on-keycloak-sso-from-setup-to-integration/">Hands-On Keycloak SSO: From Setup to Integration</a></li><li><a href="https://inero-software.com/securing-java-spring-endpoints-with-keycloak/">Keycloak Integration Guide: Securing Java Spring Endpoints with Keycloak</a></li></ul><p>These resources provide practical guidance on configuring and integrating Keycloak with various systems. Importantly, one of Keycloak&#8217;s key features is its ability to integrate with Lightweight Directory Access Protocol (LDAP) directories, which we covered in detail here: <a href="https://inero-software.com/exporting-accounts-to-federated-realms/">Exporting accounts to federated realms: A guide to Keycloak and LDAP Integration</a></p><p>There are many SIEM solutions available on the market, so it’s worth conducting a security audit within your organization before making a decision. Identifying potential vulnerabilities will help guide the selection and implementation of an appropriate incident management system, enhanced with Keycloak integration, to better monitor threats and strengthen data protection across your organization.</p>						</div>
				</div>
				<div class="elementor-element elementor-element-de50613 elementor-cta--skin-cover elementor-animated-content elementor-bg-transform elementor-bg-transform-zoom-in elementor-widget elementor-widget-call-to-action" data-id="de50613" data-element_type="widget" data-widget_type="call-to-action.default">
				<div class="elementor-widget-container">
					<div class="elementor-cta">
					<div class="elementor-cta__bg-wrapper">
				<div class="elementor-cta__bg elementor-bg" style="background-image: url(https://inero-software.com/wp-content/uploads/2024/11/tlo-popup-keycloak-1030x731.png);" role="img" aria-label="tło popup keycloak"></div>
				<div class="elementor-cta__bg-overlay"></div>
			</div>
							<div class="elementor-cta__content">
				
									<h2 class="elementor-cta__title elementor-cta__content-item elementor-content-item elementor-animated-item--grow">
						Do You Want to Implement Keycloak?					</h2>
				
									<div class="elementor-cta__description elementor-cta__content-item elementor-content-item elementor-animated-item--grow">
						Benefit from our experience. We have completed numerous implementations for SMEs and large organizations. We’d be happy to discuss potential collaboration opportunities.					</div>
				
									<div class="elementor-cta__button-wrapper elementor-cta__content-item elementor-content-item elementor-animated-item--grow">
					<a class="elementor-cta__button elementor-button elementor-size-" href="https://calendar.google.com/calendar/u/0/appointments/schedules/AcZssZ3e3C_1YeBkt1uCr_qfOnG_N298UgLFwORcSTXigrPfOk0ls3ok-Uw_dSeGCoLdtYsN13GMm-n-">
						Schedule a Meeting					</a>
					</div>
							</div>
						</div>
				</div>
				</div>
				</div>
		<div class="elementor-element elementor-element-951e079 e-con-full e-flex e-con e-child" data-id="951e079" data-element_type="container">
				</div>
					</div>
				</div>
				</div>
		<p>Artykuł <a href="https://inero-software.com/security-information-and-event-management-systems-why-is-it-worth-adding-keycloak/">Security Information and Event Management Systems: Why Is It Worth Adding Keycloak?</a> pochodzi z serwisu <a href="https://inero-software.com">Inero Software - Software Consulting</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">6930</post-id>	</item>
		<item>
		<title>Keycloak Migration Made Easy: Tips and Best Practices</title>
		<link>https://inero-software.com/keycloak-migration-made-easy-tips-and-best-practices/</link>
		
		<dc:creator><![CDATA[Marceli Formela]]></dc:creator>
		<pubDate>Tue, 28 Jan 2025 12:57:28 +0000</pubDate>
				<category><![CDATA[Company]]></category>
		<category><![CDATA[Keycloak]]></category>
		<category><![CDATA[keycloak]]></category>
		<category><![CDATA[Keycloak Migration]]></category>
		<category><![CDATA[Multi-Factor Authentication]]></category>
		<guid isPermaLink="false">https://inero-software.com/?p=6799</guid>

					<description><![CDATA[<p>Here we’ll explore the most significant changes introduced in recent Keycloak releases and how they impact migration efforts. We’ll walk through practical examples to resolve common challenges, ensuring a smooth transition to newer versions. Whether it’s adapting to updated configurations or managing deprecated features, this post should provide additional tips&#8230;</p>
<p>Artykuł <a href="https://inero-software.com/keycloak-migration-made-easy-tips-and-best-practices/">Keycloak Migration Made Easy: Tips and Best Practices</a> pochodzi z serwisu <a href="https://inero-software.com">Inero Software - Software Consulting</a>.</p>
]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="6799" class="elementor elementor-6799" data-elementor-post-type="post">
				<div class="elementor-element elementor-element-bc9a077 e-flex e-con-boxed e-con e-parent" data-id="bc9a077" data-element_type="container">
					<div class="e-con-inner">
		<div class="elementor-element elementor-element-bef05bd e-con-full e-flex e-con e-child" data-id="bef05bd" data-element_type="container">
				</div>
		<div class="elementor-element elementor-element-27ad504 e-con-full e-flex e-con e-child" data-id="27ad504" data-element_type="container">
				<div class="elementor-element elementor-element-e3a7faf elementor-widget elementor-widget-html" data-id="e3a7faf" data-element_type="widget" data-widget_type="html.default">
				<div class="elementor-widget-container">
			 		</div>
				</div>
				<div class="elementor-element elementor-element-5d77ce3 elementor-widget elementor-widget-text-editor" data-id="5d77ce3" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<h4><span style="font-weight: 400;">Here we’ll explore the most significant changes introduced in recent Keycloak releases and how they impact migration efforts. We’ll walk through practical examples to resolve common challenges, ensuring a smooth transition to newer versions. Whether it’s adapting to updated configurations or managing deprecated features, this post should provide additional tips to streamline your Keycloak migration process.</span></h4>						</div>
				</div>
				<div class="elementor-element elementor-element-9055b0b elementor-widget elementor-widget-heading" data-id="9055b0b" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h3 class="elementor-heading-title elementor-size-default">Migrating to Quarkus distribution
</h3>		</div>
				</div>
				<div class="elementor-element elementor-element-c8c79fe elementor-widget elementor-widget-text-editor" data-id="c8c79fe" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">One of the most challenging migrations for many users has been the upgrade to Keycloak 17, where the underlying architecture shifted from WildFly to the Quarkus framework. This transition marked a significant departure from the traditional application server model, requiring users to adopt a more modern, lightweight approach tailored to Quarkus. The way Keycloak is configured has fundamentally changed &#8211; rather than deploying it on an external application server, it now operates as a standalone application, which simplifies deployment.</span></p><p><span style="font-weight: 400;">For example, custom providers, which were previously packaged dynamically as modules for WildFly, now need to be rebuilt and adapted (as runtime is immutable), involving changes to dependencies, classloading, and packaging methods. This design simplifies deployments in environments like Kubernetes but demands a shift in workflows for teams accustomed to the WildFly solutions. While the move to Quarkus offers performance gains and a more modern development experience, it still requires careful planning and testing to ensure a smooth migration.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-e39fb62 elementor-widget elementor-widget-heading" data-id="e39fb62" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h3 class="elementor-heading-title elementor-size-default">Key changes introduced in new releases
</h3>		</div>
				</div>
				<div class="elementor-element elementor-element-9267062 elementor-widget elementor-widget-text-editor" data-id="9267062" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">Migration introduces important changes that impact configuration, endpoints, and custom provider implementations:</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-4465d06 elementor-widget elementor-widget-text-editor" data-id="4465d06" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<ul><li><b>HTTPS requirement for production mode </b><span style="font-weight: 400;">&#8211; starting Keycloak with the command [keycloak_quarkus_root]/26.1.0/bin/kc.bat start now requires an HTTPS certificate, as the start option is intended for production use. For local development, the start-dev option should be used instead.</span></li><li><b>removal of /auth from base path</b><span style="font-weight: 400;"> &#8211; the /auth segment has been removed from the default base path. Applications relying on Keycloak endpoints must update their configurations to reflect this change. </span></li><li><b>realm ID changes </b><span style="font-weight: 400;">&#8211; in previous versions, the realm ID was identical to the realm name. Starting from Keycloak 21, the realm ID is now a unique, system-generated value. Applications relying on realm IDs should account for this change during migration.</span></li><li><b>deprecation of userLocalStorage</b><span style="font-weight: 400;"> &#8211; custom providers using the userLocalStorage method of the KeycloakSession interface must switch to the users method, as userLocalStorage was deprecated starting from Keycloak 19.</span></li><li><b>transport jdbc-ping as new default</b><span style="font-weight: 400;"> &#8211; in the latest version of Keycloak (26.1.0), the default method for discovering other nodes within a cluster has shifted to using its database, rather than relying on just multicast. This change eliminates the need for additional network configurations, particularly in cloud environments.</span></li></ul>						</div>
				</div>
				<div class="elementor-element elementor-element-f8db805 elementor-widget elementor-widget-heading" data-id="f8db805" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h3 class="elementor-heading-title elementor-size-default">Issues with major migrations</h3>		</div>
				</div>
				<div class="elementor-element elementor-element-c547a32 elementor-widget elementor-widget-text-editor" data-id="c547a32" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">When migrating Keycloak, it’s highly recommended to upgrade version by version, rather than jumping several releases at once. This incremental approach allows you to identify and resolve issues as they arise, minimizing the risk of unexpected complications. Upgrading across multiple versions—especially if spanning a dozen or more releases—can significantly complicate the process due to accumulated changes, deprecated features, and architectural shifts like the move to Quarkus. By addressing compatibility and configuration adjustments one step at a time, you ensure better control over the migration and reduce downtime or disruptions in production environments.</span></p><p><span style="font-weight: 400;">However, in many cases, a large one-time migration—such as moving from Keycloak 12 directly to Keycloak 26—is unavoidable and becomes a challenge that teams must address effectively. This process often involves significant changes to both the Keycloak server and dependent applications, particularly frontend clients that rely on its APIs. </span></p><p><span style="font-weight: 400;">In this guide, we’ll outline a practical step-by-step approach to such a major migration. </span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-45823ad elementor-widget elementor-widget-heading" data-id="45823ad" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h3 class="elementor-heading-title elementor-size-default">Dockerfile configuration</h3>		</div>
				</div>
				<div class="elementor-element elementor-element-ce32e89 elementor-widget elementor-widget-text-editor" data-id="ce32e89" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">In our example project, all custom themes and SPI (Service Provider Interface) extensions were directly copied into the base Keycloak image without a dedicated build process. So it was done in a standard Wildfly way.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-4796eb9 elementor-widget elementor-widget-text-editor" data-id="4796eb9" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<pre><span style="font-weight: 400;">FROM </span><span style="font-weight: 400;">quay.io</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">keycloak</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">keycloak:</span><span style="font-weight: 400;">12.0.2<br /></span><span style="font-weight: 400;"><br /></span><span style="font-weight: 400;">COPY </span><span style="font-weight: 400;">themes</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">custom-theme </span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">opt</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">jboss</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">keycloak</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">themes/custom-theme</span><span style="font-weight: 400;"><br /></span><span style="font-weight: 400;">COPY </span><span style="font-weight: 400;">api-extensions</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">target</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">spi-resource-0</span><span style="font-weight: 400;">.0.1</span><span style="font-weight: 400;">-</span><span style="font-weight: 400;">SNAPSHOT.jar<br /></span><span style="font-weight: 400;"><br /></span><span style="font-weight: 400;">ENTRYPOINT /</span><span style="font-weight: 400;">opt</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">jboss</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">tools</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">docker-entrypoint.sh </span><span style="font-weight: 400;">-</span><span style="font-weight: 400;">b </span><span style="font-weight: 400;">0.0.0.0</span></pre>						</div>
				</div>
				<div class="elementor-element elementor-element-b1c75ea elementor-widget elementor-widget-text-editor" data-id="b1c75ea" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">The new approach could use a multi-stage process with separate containers like:</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-2f2a2de elementor-widget elementor-widget-text-editor" data-id="2f2a2de" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<pre><span style="font-weight: 400;">FROM </span><span style="font-weight: 400;">eclipse-temurin:17-jdk as </span><i><span style="font-weight: 400;">spi_builder</span></i><br /><i><span style="font-weight: 400;">[…]</span></i><br /><span style="font-weight: 400;">FROM </span><span style="font-weight: 400;">quay.io</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">keycloak</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">keycloak:$</span><i><span style="font-weight: 400;">BASE_IMAGE_TAG </span></i><span style="font-weight: 400;">as </span><i><span style="font-weight: 400;">keycloak_builder</span></i><br /><span style="font-weight: 400;">[…]</span><br /><span style="font-weight: 400;">FROM </span><span style="font-weight: 400;">quay.io</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">keycloak</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">keycloak:$</span><i><span style="font-weight: 400;">BASE_IMAGE_TAG</span></i></pre>						</div>
				</div>
				<div class="elementor-element elementor-element-a527627 elementor-widget elementor-widget-text-editor" data-id="a527627" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">The SPI is built during the container build process using Maven. This approach ensures that the dependencies are fetched and the resulting JAR is optimized for deployment.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-0510f11 elementor-widget elementor-widget-text-editor" data-id="0510f11" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<pre><span style="font-weight: 400;">### Runtime dependencies build container</span><br /><span style="font-weight: 400;">FROM </span><span style="font-weight: 400;">registry.access.redhat.com</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">ubi9 </span><span style="font-weight: 400;">AS </span><i><span style="font-weight: 400;">runtime_dependencies_builder</span></i><br /><span style="font-weight: 400;">RUN </span><span style="font-weight: 400;">mkdir </span><span style="font-weight: 400;">-</span><span style="font-weight: 400;">p </span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">mnt</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">rootfs</span><br /><br /><span style="font-weight: 400;">RUN </span><span style="font-weight: 400;">dnf </span><span style="font-weight: 400;">install </span><span style="font-weight: 400;">--</span><span style="font-weight: 400;">installroot </span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">mnt</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">rootfs curl </span><span style="font-weight: 400;">--</span><span style="font-weight: 400;">releasever </span><span style="font-weight: 400;">9 </span><span style="font-weight: 400;">--</span><span style="font-weight: 400;">setopt install_weak_deps=false </span><span style="font-weight: 400;">--</span><span style="font-weight: 400;">nodocs </span><span style="font-weight: 400;">-</span><span style="font-weight: 400;">y \</span><br /><span style="font-weight: 400;">&amp;&amp; </span><span style="font-weight: 400;">dnf </span><span style="font-weight: 400;">--</span><span style="font-weight: 400;">installroot </span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">mnt</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">rootfs clean all</span><br /><br /><span style="font-weight: 400;">### SPI build container</span><br /><span style="font-weight: 400;">FROM </span><span style="font-weight: 400;">eclipse-temurin:17-jdk as </span><i><span style="font-weight: 400;">spi_builder</span></i><br /><span style="font-weight: 400;">ARG </span><i><span style="font-weight: 400;">BASE_IMAGE_TAG</span></i><br /><span style="font-weight: 400;">WORKDIR /</span><span style="font-weight: 400;">workspace</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">app</span><br /><br /><span style="font-weight: 400;">COPY </span><span style="font-weight: 400;">api-extensions</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">mvnw .</span><br /><span style="font-weight: 400;">COPY </span><span style="font-weight: 400;">api-extensions</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">.mvn .mvn</span><br /><span style="font-weight: 400;">COPY </span><span style="font-weight: 400;">api-extensions</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">pom.xml .</span><br /><br /><span style="font-weight: 400;"># dos2unix:</span><br /><span style="font-weight: 400;">RUN </span><span style="font-weight: 400;">sed </span><span style="font-weight: 400;">-</span><span style="font-weight: 400;">i </span><span style="font-weight: 400;">-</span><span style="font-weight: 400;">e </span><span style="font-weight: 400;">'s/\r//g' </span><span style="font-weight: 400;">mvnw</span><br /><span style="font-weight: 400;">RUN </span><span style="font-weight: 400;">./mvnw </span><span style="font-weight: 400;">dependency:go-offline</span><br /><span style="font-weight: 400;">COPY </span><span style="font-weight: 400;">api-extensions</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">src src</span><br /><span style="font-weight: 400;">RUN </span><span style="font-weight: 400;">./mvnw </span><span style="font-weight: 400;">-</span><span style="font-weight: 400;">o package </span><span style="font-weight: 400;">-</span><span style="font-weight: 400;">DskipTests</span><br /><span style="font-weight: 400;"> </span></pre>						</div>
				</div>
				<div class="elementor-element elementor-element-9851247 elementor-widget elementor-widget-text-editor" data-id="9851247" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">The new process copies multiple custom themes into the Quarkus-based Keycloak during the build stage, ensuring they are included in the final optimized runtime. So this approach improves startup performance and aligns with immutable container philosophy.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-0cd6583 elementor-widget elementor-widget-text-editor" data-id="0cd6583" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<pre><span style="font-weight: 400;">### Build container</span><br /><span style="font-weight: 400;">FROM </span><span style="font-weight: 400;">quay.io</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">keycloak</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">keycloak:$</span><i><span style="font-weight: 400;">BASE_IMAGE_TAG </span></i><span style="font-weight: 400;">as </span><i><span style="font-weight: 400;">keycloak_builder</span></i><br /><span style="font-weight: 400;">COPY --</span><span style="font-weight: 400;">from=</span><i><span style="font-weight: 400;">spi_builder </span></i><span style="font-weight: 400;">/</span><span style="font-weight: 400;">workspace</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">app</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">target</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">spi-resource-0</span><span style="font-weight: 400;">.0.1</span><span style="font-weight: 400;">-</span><span style="font-weight: 400;">SNAPSHOT-jar-with-dependencies.jar </span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">opt</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">keycloak</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">providers</span><span style="font-weight: 400;">/</span><br /><br /><span style="font-weight: 400;">#Copy custom themes</span><br /><span style="font-weight: 400;">COPY </span><span style="font-weight: 400;">themes</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">custom-theme </span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">opt</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">keycloak</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">themes</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">custom-theme</span><br /><br /><span style="font-weight: 400;">#Build an optimized server runtime</span><br /><span style="font-weight: 400;">RUN </span><span style="font-weight: 400;">/opt/keycloak/bin/kc.sh </span><span style="font-weight: 400;">build</span><br /><br /><span style="font-weight: 400;">### Runtime container</span><br /><span style="font-weight: 400;">FROM </span><a href="http://quay.io/keycloak/keycloak:$BASE_IMAGE_TAG"><span style="font-weight: 400;">quay.io/keycloak/keycloak:$</span><i><span style="font-weight: 400;">BASE_IMAGE_TAG</span></i></a><br /><span style="font-weight: 400;">COPY --</span><span style="font-weight: 400;">from=</span><i><span style="font-weight: 400;">keycloak_builder </span></i><span style="font-weight: 400;">/</span><span style="font-weight: 400;">opt</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">keycloak</span><span style="font-weight: 400;">/ /</span><span style="font-weight: 400;">opt</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">keycloak</span><span style="font-weight: 400;">/</span><br /><span style="font-weight: 400;">WORKDIR /</span><span style="font-weight: 400;">opt</span><span style="font-weight: 400;">/</span><span style="font-weight: 400;">keycloak</span><br /><span style="font-weight: 400;">ENTRYPOINT </span><span style="font-weight: 400;">[</span><span style="font-weight: 400;">"/opt/keycloak/bin/kc.sh"</span><span style="font-weight: 400;">]</span></pre>						</div>
				</div>
				<div class="elementor-element elementor-element-1dc220a elementor-widget elementor-widget-text-editor" data-id="1dc220a" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">Basically, by leveraging multi-stage builds and lightweight images, the new process aligns with best practices for containerized deployments. You can find more details about these steps here: </span><a href="https://www.keycloak.org/server/containers"><span style="font-weight: 400;">https://www.keycloak.org/server/containers</span></a><span style="font-weight: 400;">.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-15c9000 elementor-widget elementor-widget-heading" data-id="15c9000" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h3 class="elementor-heading-title elementor-size-default">Default /auth context path changed
</h3>		</div>
				</div>
				<div class="elementor-element elementor-element-2ff8164 elementor-widget elementor-widget-text-editor" data-id="2ff8164" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">With the transition to the Quarkus-based Keycloak distribution, the default context path has been modified—/auth is no longer part of the URL by default. This change aligns with Quarkus’s goal of providing a more streamlined and minimalistic approach to web applications, reducing unnecessary path prefixes.</span></p><p><span style="font-weight: 400;">For users or applications that still require the /auth context path, it can be reintroduced using the http-relative-path build option. For instance, running Keycloak with the following command restores the /auth context:</span></p><p><b><i>bin/kc.[sh|bat] start-dev &#8211;http-relative-path /auth</i></b></p><p><span style="font-weight: 400;">Or using a docker-compose way:</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-2ee41e2 elementor-widget elementor-widget-text-editor" data-id="2ee41e2" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<pre><span style="font-weight: 400;">KC_HTTP_RELATIVE_PATH</span><span style="font-weight: 400;">: /auth</span></pre>						</div>
				</div>
				<div class="elementor-element elementor-element-27a0144 elementor-widget elementor-widget-text-editor" data-id="27a0144" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">This allows for compatibility with existing clients or configurations that rely on the /auth prefix. With the relative path specified, Keycloak will still automatically redirect requests from the root (e.g., localhost:8080/) to the /auth path (e.g., localhost:8080/auth). This ensures that applications or users accustomed to the previous URL structure continue to function as expected without requiring major changes.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-24a1365 elementor-widget elementor-widget-heading" data-id="24a1365" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h3 class="elementor-heading-title elementor-size-default">Changes within provider management
</h3>		</div>
				</div>
				<div class="elementor-element elementor-element-557e06a elementor-widget elementor-widget-text-editor" data-id="557e06a" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">With the shift to the Quarkus-based Keycloak distribution, there are significant changes in how custom providers (SPIs) are deployed and managed. In the WildFly-based distribution, custom providers were deployed by copying them into the </span><b><i>standalone/deployments</i></b><span style="font-weight: 400;"> directory, and dependencies were also placed in specific locations within the WildFly server structure. However, in the new Quarkus distribution, this deployment model has been streamlined. Custom providers should now be copied into the </span><b><i>/providers</i></b><span style="font-weight: 400;"> directory.</span></p><p><span style="font-weight: 400;">Additionally, Quarkus does not support the EAR packaging format or the jboss-deployment-structure.xml files, which were commonly used in the WildFly distribution to configure deployments and manage dependencies. As a result, the packaging process is simplified, but custom configurations previously made through these files must now be handled differently.</span></p><p><span style="font-weight: 400;">Furthermore, if custom providers utilized JavaEE APIs, such as session or stateless beans, these will no longer be supported in the Quarkus distribution.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-7391d60 elementor-widget elementor-widget-heading" data-id="7391d60" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h3 class="elementor-heading-title elementor-size-default">Migrating custom themes
</h3>		</div>
				</div>
				<div class="elementor-element elementor-element-c0ccfee elementor-widget elementor-widget-text-editor" data-id="c0ccfee" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">Old Keycloak relied on the FreeMarker template engine for rendering dynamic content in themes. This approach is still used in new releases (especially in v1 and v2 themes), but there have been updates to the template syntax and theme structure to align with the new Quarkus architecture. Custom templates may need to be revised to ensure compatibility with newer versions of FreeMarker, as the theme structure may have evolved.</span></p><p><span style="font-weight: 400;">Additionally, certain legacy template functions and macros that were present in, for example Keycloak 12, might have been deprecated or replaced with new, more efficient alternatives.</span></p><p><span style="font-weight: 400;">Custom themes that were previously customized are likely not optimized for dark mode. To avoid complications without having to rewrite them from scratch, the simplest solution is to add the appropriate option </span><b><i>darkMode=false</i></b><span style="font-weight: 400;"> in the </span><b><i>theme.properties</i></b><span style="font-weight: 400;"> file. Additionally, starting from version 26.1.0, the &#8220;Themes&#8221; tab now includes switches that allow for enabling dark mode on a per-realm basis.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-a573147 elementor-widget elementor-widget-heading" data-id="a573147" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h3 class="elementor-heading-title elementor-size-default">Making new Keycloak server work with legacy frontend client
</h3>		</div>
				</div>
				<div class="elementor-element elementor-element-21c6dc8 elementor-widget elementor-widget-text-editor" data-id="21c6dc8" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><b>checkLoginIframe related issues</b></p><p><span style="font-weight: 400;">In one of our projects, we had to upgrade Keycloak by 14 versions. However, for various reasons, we couldn&#8217;t migrate the frontend, which was running on a rather old version of Angular and the keycloak-angular library. Therefore, we will now go through the tweaks we had to apply in order to restore the login process functionality.</span></p><p><span style="font-weight: 400;">Keycloak-angular is a wrapper library for keycloak-js that makes using it easier in Angular applications. It extends the original features with additional functionality and adds new methods to make it easier to use within an Angular app. It also provides a basic implementation of AuthGuard, allowing you to customize your logic by using the authentication logic. It’s also possible to use the HttpClient Interceptor, which adds an authorization header to selected HTTP requests.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-43ca3b8 elementor-widget elementor-widget-text-editor" data-id="43ca3b8" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<pre><span style="font-weight: 400;">"keycloak-angular"</span><span style="font-weight: 400;">: </span><span style="font-weight: 400;">"^8.1.0"</span><span style="font-weight: 400;">,</span><br /><span style="font-weight: 400;">"keycloak-js"</span><span style="font-weight: 400;">: </span><span style="font-weight: 400;">"^12.0.4"</span><span style="font-weight: 400;">,</span></pre>						</div>
				</div>
				<div class="elementor-element elementor-element-2699e08 elementor-widget elementor-widget-text-editor" data-id="2699e08" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">After integrating the new version of Keycloak (26.1.0) with the old frontend client, we encountered an issue after logging in, which manifested as follows:</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-81f2826 elementor-widget elementor-widget-image" data-id="81f2826" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img loading="lazy" decoding="async" data-attachment-id="6801" data-permalink="https://inero-software.com/keycloak-migration-made-easy-tips-and-best-practices/2025-01-28/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/01/2025-01-28.png" data-orig-size="538,317" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2025-01-28" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/01/2025-01-28-300x177.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/01/2025-01-28.png" tabindex="0" role="button" width="480" height="317" src="https://inero-software.com/wp-content/uploads/2025/01/2025-01-28-480x317.png" class="attachment-septera-lpbox-2 size-septera-lpbox-2 wp-image-6801" alt="" data-attachment-id="6801" data-permalink="https://inero-software.com/keycloak-migration-made-easy-tips-and-best-practices/2025-01-28/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/01/2025-01-28.png" data-orig-size="538,317" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2025-01-28" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/01/2025-01-28-300x177.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/01/2025-01-28.png" role="button" />													</div>
				</div>
				<div class="elementor-element elementor-element-91587be elementor-widget elementor-widget-text-editor" data-id="91587be" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">This option specifies whether Keycloak should check the login status using an iframe. It should be used with caution, as improper configuration may lead to issues such as continuous page reloads. Newer versions of Keycloak may have improved or changed session management, particularly around cross-site cookies, authentication flows, or iframe handling (setupCheckLoginIframe, check3pCookiesSupported). These changes could affect how the frontend handles login states, especially if it is using deprecated methods for checking login states or processing callbacks.</span></p><p><span style="font-weight: 400;">Given the significant version gap between the frontend and the server, one useful approach might be to </span><b>disable the setupCheckLoginIframe option</b><span style="font-weight: 400;">, which could also help in situations where infinite redirect loops occur after the upgrade.</span></p><p><span style="font-weight: 400;">Here’s an example of how to disable it in your initialization:</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-f530026 elementor-widget elementor-widget-text-editor" data-id="f530026" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<pre><span style="font-weight: 400;">function </span><span style="font-weight: 400;">initializeKeycloak</span><span style="font-weight: 400;">(keycloak: KeycloakService, permissionsService: PermissionsService) </span><br /><span style="font-weight: 400;">{</span><br /><span style="font-weight: 400;">  </span><span style="font-weight: 400;">return </span><span style="font-weight: 400;">() =&gt;</span><br /><span style="font-weight: 400;">    keycloak.</span><span style="font-weight: 400;">init</span><span style="font-weight: 400;">({</span><br /><br /><span style="font-weight: 400;">  </span> <span style="font-weight: 400;">config</span><span style="font-weight: 400;">: {</span><br /><span style="font-weight: 400;">    </span> <span style="font-weight: 400;">url</span><span style="font-weight: 400;">: </span><i><span style="font-weight: 400;">environment</span></i><span style="font-weight: 400;">.</span><span style="font-weight: 400;">keycloakUrl</span><span style="font-weight: 400;">,</span><br /><span style="font-weight: 400;">    </span> <span style="font-weight: 400;">realm</span><span style="font-weight: 400;">: </span><span style="font-weight: 400;">'test-realm'</span><span style="font-weight: 400;">,</span><br /><span style="font-weight: 400;">    </span> <span style="font-weight: 400;">clientId</span><span style="font-weight: 400;">: </span><span style="font-weight: 400;">'test-realm-web'</span><span style="font-weight: 400;">,</span><br /><span style="font-weight: 400;">  </span> <span style="font-weight: 400;">},</span><br /><span style="font-weight: 400;">  </span> <span style="font-weight: 400;">initOptions</span><span style="font-weight: 400;">: {</span><br /><span style="font-weight: 400;">        </span><span style="font-weight: 400;">checkLoginIframe</span><span style="font-weight: 400;">: </span><span style="font-weight: 400;">false</span><br /><span style="font-weight: 400;">  </span> <span style="font-weight: 400;">}</span><br /><span style="font-weight: 400;">}).</span><span style="font-weight: 400;">then</span><span style="font-weight: 400;">(() =&gt; permissionsService.</span><span style="font-weight: 400;">init</span><span style="font-weight: 400;">());</span><br /><span style="font-weight: 400;">}</span></pre>						</div>
				</div>
				<div class="elementor-element elementor-element-eaf0ada elementor-widget elementor-widget-heading" data-id="eaf0ada" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h3 class="elementor-heading-title elementor-size-default">Missing nonce claim
</h3>		</div>
				</div>
				<div class="elementor-element elementor-element-9e105aa elementor-widget elementor-widget-text-editor" data-id="9e105aa" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">In newer versions of Keycloak, in accordance with the OpenID Connect Core 1.0 specification, the nonce claim is now only added to the ID token if the parameter was included in the authorization request. According to the specification, the nonce claim is mandatory in the ID token but should not be included in tokens after a refresh request. Previously, nonce was added to all tokens (Access, Refresh, and ID) in all responses, including refresh responses.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-fc3ca51 elementor-widget elementor-widget-image" data-id="fc3ca51" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img loading="lazy" decoding="async" data-attachment-id="6802" data-permalink="https://inero-software.com/keycloak-migration-made-easy-tips-and-best-practices/2025-01-28-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/01/2025-01-28-2.png" data-orig-size="716,448" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2025-01-28 -2" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/01/2025-01-28-2-300x188.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/01/2025-01-28-2.png" tabindex="0" role="button" width="512" height="300" src="https://inero-software.com/wp-content/uploads/2025/01/2025-01-28-2-512x300.png" class="attachment-septera-featured-third size-septera-featured-third wp-image-6802" alt="" data-attachment-id="6802" data-permalink="https://inero-software.com/keycloak-migration-made-easy-tips-and-best-practices/2025-01-28-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/01/2025-01-28-2.png" data-orig-size="716,448" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2025-01-28 -2" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/01/2025-01-28-2-300x188.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/01/2025-01-28-2.png" role="button" />													</div>
				</div>
				<div class="elementor-element elementor-element-8016f49 elementor-widget elementor-widget-text-editor" data-id="8016f49" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">As a result, using an older version of the keycloak-js adapter may cause login issues, such as &#8220;Invalid nonce, clearing token&#8221; errors or an infinite redirection loop after login attempts. To resolve this, users can add the predefined &#8220;Nonce backwards compatible&#8221; mapper via the &#8220;By Configuration&#8221; button in the dedicated client scope. More information can be found in the official Keycloak documentation </span><span style="font-weight: 400;">(</span><a href="https://www.keycloak.org/docs/latest/upgrading/index.html#nonce-claim-is-only-added-to-the-id-token"><span style="font-weight: 400;">https://www.keycloak.org/docs/latest/upgrading/index.html#nonce-claim-is-only-added-to-the-id-token</span></a><span style="font-weight: 400;">)</span><span style="font-weight: 400;">.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-5c61c2e elementor-widget elementor-widget-heading" data-id="5c61c2e" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h3 class="elementor-heading-title elementor-size-default">Post-logout redirect URI issues
</h3>		</div>
				</div>
				<div class="elementor-element elementor-element-26180df elementor-widget elementor-widget-text-editor" data-id="26180df" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">According to the release notes for version 18, Keycloak no longer supports the redirect_uri parameter for logging out. Instead, you need to use post_logout_redirect_uri along with either the client_id or id_token_hint parameter. In practice, this means when calling the logout function, you must replace redirect_uri with post_logout_redirect_uri. In our case (with legacy keycloak-js), the logout process can be implemented like this:</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-a8f685a elementor-widget elementor-widget-text-editor" data-id="a8f685a" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<pre><i><span style="font-weight: 400;">window</span></i><span style="font-weight: 400;">.</span><span style="font-weight: 400;">location</span><span style="font-weight: 400;">.</span><span style="font-weight: 400;">replace</span><span style="font-weight: 400;">(</span><span style="font-weight: 400;">this</span><span style="font-weight: 400;">.</span><span style="font-weight: 400;">keycloak</span><span style="font-weight: 400;">[</span><span style="font-weight: 400;">'_instance'</span><span style="font-weight: 400;">][</span><span style="font-weight: 400;">'endpoints'</span><span style="font-weight: 400;">].</span><span style="font-weight: 400;">logout</span><span style="font-weight: 400;">() +</span><span style="font-weight: 400;"><br /></span><span style="font-weight: 400;">   </span><span style="font-weight: 400;">'?post_logout_redirect_uri=' </span><span style="font-weight: 400;">+ </span><span style="font-weight: 400;">encodeURIComponent</span><span style="font-weight: 400;">(</span><i><span style="font-weight: 400;">window</span></i><span style="font-weight: 400;">.</span><span style="font-weight: 400;">location</span><span style="font-weight: 400;">.</span><span style="font-weight: 400;">origin</span><span style="font-weight: 400;">) +</span><span style="font-weight: 400;"><br /></span><span style="font-weight: 400;">   </span><span style="font-weight: 400;">'&amp;client_id=test-realm-web'</span><span style="font-weight: 400;">);</span></pre>						</div>
				</div>
				<div class="elementor-element elementor-element-d4ca7eb elementor-widget elementor-widget-text-editor" data-id="d4ca7eb" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">This change should resolve the most common issues with redirects after logging out of the application.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-20e2094 elementor-widget elementor-widget-heading" data-id="20e2094" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h3 class="elementor-heading-title elementor-size-default">Summary
</h3>		</div>
				</div>
				<div class="elementor-element elementor-element-5633025 elementor-widget elementor-widget-text-editor" data-id="5633025" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">Over the past few years, Keycloak has undergone significant changes, particularly with the breaking changes introduced during the migration from WildFly to Quarkus. These changes were necessary for performance improvements, more efficient resource usage, and better scalability.</span></p><p><span style="font-weight: 400;">While the migration process can appear challenging, it is generally achievable, even when working with older clients. However, the ease of migration largely depends on the specific use case, especially the level of customization involved. For instance, if themes were highly customized in the previous version of Keycloak, adapting them to newer distributions may require more time and effort, as the structure and templating engines have evolved.</span></p><p><span style="font-weight: 400;">Similarly, integrations with legacy systems might need careful planning to ensure compatibility with newer versions of Keycloak. On the other hand, for standard setups with minimal customization, the transition is often smoother and quicker. The process of migration can also be supported by detailed documentation and a strong community, which has grown significantly in recent years.</span></p><p><span style="font-weight: 400;">Overall, while each migration project has its own challenges, with proper planning and testing, transitioning to a newer version of Keycloak is generally not so complicated, and the long-term benefits of the upgrade, such as improved performance and security features, make it worth the effort.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-c667383 elementor-cta--skin-cover elementor-animated-content elementor-bg-transform elementor-bg-transform-zoom-in elementor-widget elementor-widget-call-to-action" data-id="c667383" data-element_type="widget" data-widget_type="call-to-action.default">
				<div class="elementor-widget-container">
					<div class="elementor-cta">
					<div class="elementor-cta__bg-wrapper">
				<div class="elementor-cta__bg elementor-bg" style="background-image: url(https://inero-software.com/wp-content/uploads/2024/12/1-1030x1030.png);" role="img" aria-label="1"></div>
				<div class="elementor-cta__bg-overlay"></div>
			</div>
							<div class="elementor-cta__content">
				
									<h2 class="elementor-cta__title elementor-cta__content-item elementor-content-item elementor-animated-item--grow">
						Are you planning to implement Keycloak in your organization? 					</h2>
				
									<div class="elementor-cta__description elementor-cta__content-item elementor-content-item elementor-animated-item--grow">
						If you're looking for a partner to provide comprehensive support in this process, be sure to contact us.					</div>
				
									<div class="elementor-cta__button-wrapper elementor-cta__content-item elementor-content-item elementor-animated-item--grow">
					<a class="elementor-cta__button elementor-button elementor-size-" href="https://calendar.app.google/CiGcgpfTyvVHDizZ8">
						Schedule a conversation					</a>
					</div>
							</div>
						</div>
				</div>
				</div>
				</div>
		<div class="elementor-element elementor-element-bece524 e-con-full e-flex e-con e-child" data-id="bece524" data-element_type="container">
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-54593f6 e-flex e-con-boxed e-con e-parent" data-id="54593f6" data-element_type="container">
					<div class="e-con-inner">
					</div>
				</div>
				</div>
		<p>Artykuł <a href="https://inero-software.com/keycloak-migration-made-easy-tips-and-best-practices/">Keycloak Migration Made Easy: Tips and Best Practices</a> pochodzi z serwisu <a href="https://inero-software.com">Inero Software - Software Consulting</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">6799</post-id>	</item>
		<item>
		<title>Step-by-Step Guide to Enabling Multi-Factor Authentication (MFA) in Keycloak</title>
		<link>https://inero-software.com/multi-factor-authentication-in-keycloak/</link>
		
		<dc:creator><![CDATA[Marceli Formela]]></dc:creator>
		<pubDate>Wed, 05 Jun 2024 09:51:42 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Company]]></category>
		<category><![CDATA[Keycloak]]></category>
		<category><![CDATA[Email-based OTP]]></category>
		<category><![CDATA[keycloak]]></category>
		<category><![CDATA[MFA]]></category>
		<category><![CDATA[Multi-Factor Authentication]]></category>
		<category><![CDATA[OTP]]></category>
		<category><![CDATA[OTP via Authenticator Apps]]></category>
		<category><![CDATA[push notifications]]></category>
		<category><![CDATA[SMS-based OTP]]></category>
		<guid isPermaLink="false">https://inero-software.com/?p=5794</guid>

					<description><![CDATA[<p>Artykuł <a href="https://inero-software.com/multi-factor-authentication-in-keycloak/">Step-by-Step Guide to Enabling Multi-Factor Authentication (MFA) in Keycloak</a> pochodzi z serwisu <a href="https://inero-software.com">Inero Software - Software Consulting</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<div class="row"><div class="col-sm-1"></div><div class="col-sm-10">
<p><span style="font-weight: 400;">In today&#8217;s digital age, the importance of securing online resources has never been greater. As these threats continue to evolve, the traditional method of relying on passwords has proven insufficient in protecting sensitive information. This escalation underscored the necessity for more sophisticated security measures, leading to the widespread adoption of Multi-Factor-Authentication (MFA). In this blog post, we will explore still growing online threats and how MFA serves as a defense mechanism for our applications.</span></p>
<h3><b>What is MFA?</b></h3>
<p><span style="font-weight: 400;">Multi-Factor Authentication (MFA) enhances the security of your applications by requiring users to provide multiple forms of identification before granting access. Of course, tools like Keycloak support MFA and allow administrators to configure it with ease. This guide offers a detailed, step-by-step procedure to enable MFA in Keycloak, ensuring that your user authentication processes are more secure.</span></p>
<p><span style="font-weight: 400;">MFA is designed to protect users against the vulnerabilities associated with single-factor authentication, where a user only needs to provide one form of authentication, typically a password. MFA adds layers of security by requiring users to present multiple pieces of evidence (factors) that confirm their identity.</span></p>
<p><span style="font-weight: 400;">Authentication factor user in MFA are typically categorized into three types:</span></p>
<ol>
<li><span style="font-weight: 400;">     </span><span style="font-weight: 400;">Knowledge Factors (something you know)</span></li>
</ol>
<ul>
<li style="list-style-type: none;">
<ul>
<li><span style="font-weight: 400;">         </span><span style="font-weight: 400;">Passwords</span></li>
<li><span style="font-weight: 400;">         </span><span style="font-weight: 400;">PINs</span></li>
<li><span style="font-weight: 400;">         </span><span style="font-weight: 400;">Security questions</span></li>
</ul>
</li>
</ul>
<ol start="2">
<li><span style="font-weight: 400;">     </span><span style="font-weight: 400;">Possession Factors (something you have)</span></li>
</ol>
<ul>
<li style="list-style-type: none;">
<ul>
<li><span style="font-weight: 400;">         </span><span style="font-weight: 400;">OTP (One-Time Password) generated by an authenticator app</span></li>
<li><span style="font-weight: 400;">         </span><span style="font-weight: 400;">SMS codes</span></li>
<li><span style="font-weight: 400;">         </span><span style="font-weight: 400;">Email codes</span></li>
<li><span style="font-weight: 400;">         </span><span style="font-weight: 400;">Hardware tokens</span></li>
</ul>
</li>
</ul>
<ol start="3">
<li><span style="font-weight: 400;">     </span><span style="font-weight: 400;">Inherence Factors (something you are)</span></li>
</ol>
<ul>
<li style="list-style-type: none;">
<ul>
<li><span style="font-weight: 400;">         </span><span style="font-weight: 400;">Biometric verification (facial recognition, fingerprint etc.)</span></li>
</ul>
</li>
</ul>
<p><a href="https://inero-software.com/contact-inero-software-rd-software-house/"><img loading="lazy" decoding="async" data-attachment-id="5832" data-permalink="https://inero-software.com/multi-factor-authentication-in-keycloak/2-6/" data-orig-file="https://inero-software.com/wp-content/uploads/2024/06/2-2.png" data-orig-size="1200,100" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2024/06/2-2-300x25.png" data-large-file="https://inero-software.com/wp-content/uploads/2024/06/2-2-1030x86.png" tabindex="0" role="button" class="alignnone wp-image-5832 size-full" src="https://inero-software.com/wp-content/uploads/2024/06/2-2.png" alt="" width="1200" height="100" srcset="https://inero-software.com/wp-content/uploads/2024/06/2-2.png 1200w, https://inero-software.com/wp-content/uploads/2024/06/2-2-300x25.png 300w, https://inero-software.com/wp-content/uploads/2024/06/2-2-1030x86.png 1030w, https://inero-software.com/wp-content/uploads/2024/06/2-2-768x64.png 768w" sizes="(max-width: 1200px) 100vw, 1200px" /></a></p>
<p><span style="font-weight: 400;">The first step is always initial authentication, when the user enters username and password (so called knowledge factor). After the initial authentication, the user is prompted to provide a second form of authentication and this could be an OTP sent to the phone, a biometric scan, or another form of possession/inherence factor. If both factors are successfully verified, the user is granted access to the application. Now let’s take a look at a few example types of authentication and their pros/cons.</span></p>
<h4 style="padding-left: 40px;"><b>Email-based OTP</b></h4>
<p style="padding-left: 80px;"><span style="font-weight: 400;">In this method, a temporary code is sent to the user’s registered email address, which they must enter to complete the login process. Users receive the OTP directly in the email and it does not require to install or configure any additional apps. But we should remember that email accounts can be compromised, and intercepted emails could be a significant security risk.</span></p>
<h4 style="padding-left: 40px;"><b>SMS-based OTP</b></h4>
<p style="padding-left: 80px;"><span style="font-weight: 400;">Receiving an OTP via SMS is straightforward and familiar to most users, also requiring no additional app installation. It should work on any mobile phone, making it accessible to a broader range of users. But they can be also vulnerable to interception and SIM swapping attacks, making them less secure compared to other methods. SMS delivery can also be delayed or even fail due to network issues. We’ll take a closer look at its pros and cons in the next post which covers custom authenticator development.</span></p>
<h4 style="padding-left: 40px;"><b>Push notifications</b></h4>
<p style="padding-left: 80px;"><span style="font-weight: 400;">Push notifications involve sending a real-time alert to a user’s registered mobile device, asking them to approve or deny an authentication attempt. Users are instantly notified of any login attempts, allowing them to quickly respond to any unauthorized access attempts. They also do not need to enter a one-time password (OTP), which simplified the authentication process. This method of course requires an active internet connection. But remember that infected devices could potentially compromise the security of this feature and that users basically need to be educated about recognizing legitimate push notifications to avoid accidental approvals of attack attempts.</span></p>
<h4 style="padding-left: 40px;"><b>OTP via Authenticator Apps</b></h4>
<p style="padding-left: 80px;"><span style="font-weight: 400;">OTPs generated by authenticators like Google are highly secure as they are time-based and difficult to predict. They can generate OTPs without an internet connection, making them reliable even when users are offline. In this case, users need to have access to their mobile device to generate the OTP and initial setup very often requires scanning a QR code and configuring authenticator app, which might be challenging for non-technical users.</span></p>
<p><a href="https://inero-software.com/best-keycloak-practices/"><img loading="lazy" decoding="async" data-attachment-id="5833" data-permalink="https://inero-software.com/multi-factor-authentication-in-keycloak/4-4/" data-orig-file="https://inero-software.com/wp-content/uploads/2024/06/4-2.png" data-orig-size="1200,100" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="4" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2024/06/4-2-300x25.png" data-large-file="https://inero-software.com/wp-content/uploads/2024/06/4-2-1030x86.png" tabindex="0" role="button" class="alignnone wp-image-5833 size-full" src="https://inero-software.com/wp-content/uploads/2024/06/4-2.png" alt="" width="1200" height="100" srcset="https://inero-software.com/wp-content/uploads/2024/06/4-2.png 1200w, https://inero-software.com/wp-content/uploads/2024/06/4-2-300x25.png 300w, https://inero-software.com/wp-content/uploads/2024/06/4-2-1030x86.png 1030w, https://inero-software.com/wp-content/uploads/2024/06/4-2-768x64.png 768w" sizes="(max-width: 1200px) 100vw, 1200px" /></a></p>
<h3><b>How to configure OTP (via mobile authenticator) in Keycloak</b></h3>
<p><span style="font-weight: 400;">Now we can go to the Keycloak console and try to set up some basic OTP in our realm. Before attempting to enable MFA in Keycloak, ensure you have a running instance of Keycloak, administrative access to the server, and a basic understanding of realm, client, user management concepts from previous posts.</span></p>
<h4><b>Step 1: OTP Policy</b></h4>
<p><span style="font-weight: 400;">From the side menu select the realm where you want to enable MFA. In the realm settings, navigate to the Authentication section and select the OTP Policy tab. Configure settings according to your security requirements. You can select default values that are provided by the server.</span></p>
<p><img loading="lazy" decoding="async" data-attachment-id="5797" data-permalink="https://inero-software.com/multi-factor-authentication-in-keycloak/2-4/" data-orig-file="https://inero-software.com/wp-content/uploads/2024/06/2.png" data-orig-size="1920,1080" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2024/06/2-300x169.png" data-large-file="https://inero-software.com/wp-content/uploads/2024/06/2-1030x579.png" tabindex="0" role="button" class="wp-image-5797 aligncenter" src="https://inero-software.com/wp-content/uploads/2024/06/2-300x169.png" alt="" width="703" height="396" srcset="https://inero-software.com/wp-content/uploads/2024/06/2-300x169.png 300w, https://inero-software.com/wp-content/uploads/2024/06/2-1030x579.png 1030w, https://inero-software.com/wp-content/uploads/2024/06/2-768x432.png 768w, https://inero-software.com/wp-content/uploads/2024/06/2-1536x864.png 1536w, https://inero-software.com/wp-content/uploads/2024/06/2-533x300.png 533w, https://inero-software.com/wp-content/uploads/2024/06/2.png 1920w" sizes="(max-width: 703px) 100vw, 703px" /></p>
<h4><b>Step 2: Required actions</b></h4>
<p><span style="font-weight: 400;">In the Authentication settings, go to the Required Actions tab. Now you can activate OTP as default action for every new user.</span></p>
<p><img loading="lazy" decoding="async" data-attachment-id="5796" data-permalink="https://inero-software.com/multi-factor-authentication-in-keycloak/1-3/" data-orig-file="https://inero-software.com/wp-content/uploads/2024/06/1.png" data-orig-size="1920,1080" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="1" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2024/06/1-300x169.png" data-large-file="https://inero-software.com/wp-content/uploads/2024/06/1-1030x579.png" tabindex="0" role="button" class="wp-image-5796 aligncenter" src="https://inero-software.com/wp-content/uploads/2024/06/1-300x169.png" alt="" width="701" height="395" srcset="https://inero-software.com/wp-content/uploads/2024/06/1-300x169.png 300w, https://inero-software.com/wp-content/uploads/2024/06/1-1030x579.png 1030w, https://inero-software.com/wp-content/uploads/2024/06/1-768x432.png 768w, https://inero-software.com/wp-content/uploads/2024/06/1-1536x864.png 1536w, https://inero-software.com/wp-content/uploads/2024/06/1-533x300.png 533w, https://inero-software.com/wp-content/uploads/2024/06/1.png 1920w" sizes="(max-width: 701px) 100vw, 701px" /></p>
<p><img loading="lazy" decoding="async" data-attachment-id="5798" data-permalink="https://inero-software.com/multi-factor-authentication-in-keycloak/3-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2024/06/3.png" data-orig-size="1920,1080" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="3" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2024/06/3-300x169.png" data-large-file="https://inero-software.com/wp-content/uploads/2024/06/3-1030x579.png" tabindex="0" role="button" class="wp-image-5798 aligncenter" src="https://inero-software.com/wp-content/uploads/2024/06/3-300x169.png" alt="" width="701" height="395" srcset="https://inero-software.com/wp-content/uploads/2024/06/3-300x169.png 300w, https://inero-software.com/wp-content/uploads/2024/06/3-1030x579.png 1030w, https://inero-software.com/wp-content/uploads/2024/06/3-768x432.png 768w, https://inero-software.com/wp-content/uploads/2024/06/3-1536x864.png 1536w, https://inero-software.com/wp-content/uploads/2024/06/3-533x300.png 533w, https://inero-software.com/wp-content/uploads/2024/06/3.png 1920w" sizes="(max-width: 701px) 100vw, 701px" /></p>
<p><span style="font-weight: 400;">Therefore, we have already configured MFA and each newly registered user will have to use it. Of course, this configuration could be modified through in-the-app account settings so that users only use MFA if they specifically request it.</span></p>
<p><img loading="lazy" decoding="async" data-attachment-id="5799" data-permalink="https://inero-software.com/multi-factor-authentication-in-keycloak/4-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2024/06/4.png" data-orig-size="1920,1080" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="4" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2024/06/4-300x169.png" data-large-file="https://inero-software.com/wp-content/uploads/2024/06/4-1030x579.png" tabindex="0" role="button" class="wp-image-5799 aligncenter" src="https://inero-software.com/wp-content/uploads/2024/06/4-300x169.png" alt="" width="701" height="395" srcset="https://inero-software.com/wp-content/uploads/2024/06/4-300x169.png 300w, https://inero-software.com/wp-content/uploads/2024/06/4-1030x579.png 1030w, https://inero-software.com/wp-content/uploads/2024/06/4-768x432.png 768w, https://inero-software.com/wp-content/uploads/2024/06/4-1536x864.png 1536w, https://inero-software.com/wp-content/uploads/2024/06/4-533x300.png 533w, https://inero-software.com/wp-content/uploads/2024/06/4.png 1920w" sizes="(max-width: 701px) 100vw, 701px" /></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">As we can see, MFA is a powerful tool for protecting sensitive information and enhancing the security of web applications. By requiring multiple forms of verification, it makes it significantly harder for unauthorized users to access accounts and systems, mitigating risks associated with password-only authentication. Implementing this mechanism is surely helping organizations comply with regulations and protect against still-evolving web threats.</span></p>
<p><span style="font-weight: 400;">In the next article, we will take a closer look at a custom SMS authenticator for Keycloak, exploring its pros and cons.</span></p>
<p></p></div><div class="col-sm-1"></div></div>
<p>Artykuł <a href="https://inero-software.com/multi-factor-authentication-in-keycloak/">Step-by-Step Guide to Enabling Multi-Factor Authentication (MFA) in Keycloak</a> pochodzi z serwisu <a href="https://inero-software.com">Inero Software - Software Consulting</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5794</post-id>	</item>
		<item>
		<title>Best Practices in Keycloak: Secure Your System in 5 Steps</title>
		<link>https://inero-software.com/best-keycloak-practices/</link>
		
		<dc:creator><![CDATA[Marta Kuprasz]]></dc:creator>
		<pubDate>Mon, 13 May 2024 13:55:51 +0000</pubDate>
				<category><![CDATA[Company]]></category>
		<category><![CDATA[Keycloak]]></category>
		<category><![CDATA[SOLUTIONS]]></category>
		<category><![CDATA[BusinessProcessesOptimization]]></category>
		<category><![CDATA[HTTPS]]></category>
		<category><![CDATA[IAM]]></category>
		<category><![CDATA[keycloak]]></category>
		<category><![CDATA[MFA]]></category>
		<category><![CDATA[Multi-Factor Authentication]]></category>
		<category><![CDATA[password policies]]></category>
		<category><![CDATA[RBAC]]></category>
		<category><![CDATA[Role-Based Access Control]]></category>
		<category><![CDATA[SSO]]></category>
		<guid isPermaLink="false">https://inero-software.com/?p=5732</guid>

					<description><![CDATA[<p>Keycloak is a tool for managing identity and access that ensures the security of applications and web services. To maximally secure your environment using it, it&#8217;s important to implement best practices. Here are 5 key steps that will help you in this process. Enable HTTPS and Use Strong Certificates The&#8230;</p>
<p>Artykuł <a href="https://inero-software.com/best-keycloak-practices/">Best Practices in Keycloak: Secure Your System in 5 Steps</a> pochodzi z serwisu <a href="https://inero-software.com">Inero Software - Software Consulting</a>.</p>
]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="5732" class="elementor elementor-5732" data-elementor-post-type="post">
				<div class="elementor-element elementor-element-4e9a5df1 e-flex e-con-boxed e-con e-parent" data-id="4e9a5df1" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-33821c92 elementor-widget elementor-widget-html" data-id="33821c92" data-element_type="widget" data-widget_type="html.default">
				<div class="elementor-widget-container">
					</div>
				</div>
				<div class="elementor-element elementor-element-7c928cdb elementor-widget elementor-widget-text-editor" data-id="7c928cdb" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<h4>Keycloak is a tool for managing identity and access that ensures the security of applications and web services. To maximally secure your environment using it, it&#8217;s important to implement best practices. Here are 5 key steps that will help you in this process.</h4>						</div>
				</div>
				<div class="elementor-element elementor-element-640efc79 elementor-widget elementor-widget-heading" data-id="640efc79" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h3 class="elementor-heading-title elementor-size-default">Enable HTTPS and Use Strong Certificates
</h3>		</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-3e2e44d7 e-flex e-con-boxed e-con e-parent" data-id="3e2e44d7" data-element_type="container">
					<div class="e-con-inner">
		<div class="elementor-element elementor-element-6ff80538 e-con-full e-flex e-con e-child" data-id="6ff80538" data-element_type="container">
				<div class="elementor-element elementor-element-48cb0587 elementor-widget elementor-widget-image" data-id="48cb0587" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img loading="lazy" decoding="async" data-attachment-id="5733" data-permalink="https://inero-software.com/best-keycloak-practices/a-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2024/05/A-1.png" data-orig-size="300,300" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="A" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2024/05/A-1.png" data-large-file="https://inero-software.com/wp-content/uploads/2024/05/A-1.png" tabindex="0" role="button" width="300" height="300" src="https://inero-software.com/wp-content/uploads/2024/05/A-1.png" class="attachment-large size-large wp-image-5733" alt="" srcset="https://inero-software.com/wp-content/uploads/2024/05/A-1.png 300w, https://inero-software.com/wp-content/uploads/2024/05/A-1-80x80.png 80w, https://inero-software.com/wp-content/uploads/2024/05/A-1-75x75.png 75w, https://inero-software.com/wp-content/uploads/2024/05/A-1-50x50.png 50w" sizes="(max-width: 300px) 100vw, 300px" data-attachment-id="5733" data-permalink="https://inero-software.com/best-keycloak-practices/a-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2024/05/A-1.png" data-orig-size="300,300" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="A" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2024/05/A-1.png" data-large-file="https://inero-software.com/wp-content/uploads/2024/05/A-1.png" role="button" />													</div>
				</div>
				</div>
		<div class="elementor-element elementor-element-66669028 e-con-full e-flex e-con e-child" data-id="66669028" data-element_type="container">
				<div class="elementor-element elementor-element-1143e95c elementor-widget elementor-widget-text-editor" data-id="1143e95c" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>The first and most crucial step is to ensure all communication with the Keycloak server is done through the secure HTTPS protocol. Using SSL/TLS certificates from trusted providers protects against data interception and manipulation.</p><p><strong>In this step:</strong></p><ul><li style="list-style-type: none;"><ul><li>Configure the Keycloak Server: Set the server to use only HTTPS, rejecting all unencrypted HTTP requests.</li><li>Update Certificates: Regularly renew and update SSL/TLS certificates to avoid the risk of exploiting outdated keys.</li></ul></li></ul>						</div>
				</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-279981c2 e-flex e-con-boxed e-con e-parent" data-id="279981c2" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-68fbf093 elementor-widget elementor-widget-heading" data-id="68fbf093" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h3 class="elementor-heading-title elementor-size-default">Implement Multi-Factor Authentication (MFA)</h3>		</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-1f058e7f e-flex e-con-boxed e-con e-parent" data-id="1f058e7f" data-element_type="container">
					<div class="e-con-inner">
		<div class="elementor-element elementor-element-7650b8d8 e-con-full e-flex e-con e-child" data-id="7650b8d8" data-element_type="container">
				<div class="elementor-element elementor-element-3955e36d elementor-widget elementor-widget-image" data-id="3955e36d" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img loading="lazy" decoding="async" data-attachment-id="5734" data-permalink="https://inero-software.com/best-keycloak-practices/b-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2024/05/B-1.png" data-orig-size="300,300" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="B" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2024/05/B-1.png" data-large-file="https://inero-software.com/wp-content/uploads/2024/05/B-1.png" tabindex="0" role="button" width="300" height="300" src="https://inero-software.com/wp-content/uploads/2024/05/B-1.png" class="attachment-large size-large wp-image-5734" alt="" srcset="https://inero-software.com/wp-content/uploads/2024/05/B-1.png 300w, https://inero-software.com/wp-content/uploads/2024/05/B-1-80x80.png 80w, https://inero-software.com/wp-content/uploads/2024/05/B-1-75x75.png 75w, https://inero-software.com/wp-content/uploads/2024/05/B-1-50x50.png 50w" sizes="(max-width: 300px) 100vw, 300px" data-attachment-id="5734" data-permalink="https://inero-software.com/best-keycloak-practices/b-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2024/05/B-1.png" data-orig-size="300,300" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="B" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2024/05/B-1.png" data-large-file="https://inero-software.com/wp-content/uploads/2024/05/B-1.png" role="button" />													</div>
				</div>
				</div>
		<div class="elementor-element elementor-element-20d76839 e-con-full e-flex e-con e-child" data-id="20d76839" data-element_type="container">
				<div class="elementor-element elementor-element-75519313 elementor-widget elementor-widget-text-editor" data-id="75519313" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>This feature adds a layer of security by simultaneously using multiple methods to verify a user&#8217;s identity. 2FA (Two-Factor Authentication) is a popular form of MFA that often requires users to enter a password and confirm their identity with a second factor, such as a code from an authentication app.</p><p><strong>In this step:</strong></p><ul><li style="list-style-type: none;"><ul><li>Activate Multi-Factor Authentication in Keycloak: Enable MFA for all users, especially those with administrative access and access to sensitive data.</li><li>Choose Authentication Methods: Keycloak supports various MFA methods; commonly used ones include authentication apps (e.g., Microsoft Authenticator).</li></ul></li></ul>						</div>
				</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-6be692a3 e-flex e-con-boxed e-con e-parent" data-id="6be692a3" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-6fcbca49 elementor-widget elementor-widget-text-editor" data-id="6fcbca49" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><strong>Read also:</strong></p><ul><li style="list-style-type: none;"><ul><li><p><a href="https://inero-software.com/custom-sms-authenticator-with-keycloak/">Behind the Scenes: Custom SMS Authenticator with Keycloak</a></p></li><li><p><a href="https://inero-software.com/behind-the-scenes-2-implementing-email-based-mfa-in-keycloak/">Behind the Scenes #2: Implementing email-based MFA in Keycloak</a></p></li><li><p><a href="https://inero-software.com/multi-factor-authentication-in-keycloak/">Step-by-Step Guide to Enabling Multi-Factor Authentication (MFA) in Keycloak</a></p></li></ul></li></ul>						</div>
				</div>
				<div class="elementor-element elementor-element-7426ce1d elementor-widget elementor-widget-heading" data-id="7426ce1d" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h3 class="elementor-heading-title elementor-size-default">Implement strong password policies and session management</h3>		</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-5451df16 e-flex e-con-boxed e-con e-parent" data-id="5451df16" data-element_type="container">
					<div class="e-con-inner">
		<div class="elementor-element elementor-element-aa76bd2 e-con-full e-flex e-con e-child" data-id="aa76bd2" data-element_type="container">
				<div class="elementor-element elementor-element-2843e4f7 elementor-widget elementor-widget-image" data-id="2843e4f7" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img loading="lazy" decoding="async" data-attachment-id="5735" data-permalink="https://inero-software.com/best-keycloak-practices/c-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2024/05/C-1.png" data-orig-size="300,300" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="C" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2024/05/C-1.png" data-large-file="https://inero-software.com/wp-content/uploads/2024/05/C-1.png" tabindex="0" role="button" width="300" height="300" src="https://inero-software.com/wp-content/uploads/2024/05/C-1.png" class="attachment-large size-large wp-image-5735" alt="" srcset="https://inero-software.com/wp-content/uploads/2024/05/C-1.png 300w, https://inero-software.com/wp-content/uploads/2024/05/C-1-80x80.png 80w, https://inero-software.com/wp-content/uploads/2024/05/C-1-75x75.png 75w, https://inero-software.com/wp-content/uploads/2024/05/C-1-50x50.png 50w" sizes="(max-width: 300px) 100vw, 300px" data-attachment-id="5735" data-permalink="https://inero-software.com/best-keycloak-practices/c-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2024/05/C-1.png" data-orig-size="300,300" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="C" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2024/05/C-1.png" data-large-file="https://inero-software.com/wp-content/uploads/2024/05/C-1.png" role="button" />													</div>
				</div>
				</div>
		<div class="elementor-element elementor-element-2b5cbff9 e-con-full e-flex e-con e-child" data-id="2b5cbff9" data-element_type="container">
				<div class="elementor-element elementor-element-1290ccc4 elementor-widget elementor-widget-text-editor" data-id="1290ccc4" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Password and session management are key to protecting user identities and preventing unauthorized access. They are the first line of defense against attacks such as brute force or phishing. Keycloak provides a wide range of configurable password policy settings from the administrative console.</p><p><strong>In this step:</strong></p><ul><li style="list-style-type: none;"><ul><li>Configure the password policy: Set precise rules for password selection to require specific lengths, complexity (e.g., the presence of special characters, uppercase and lowercase letters), and define the password&#8217;s lifespan and history.</li><li>Limit session lifespan: Set short but practical session and token lifespan to minimize the window for potential attacks. Automatically logging out users after a specified period of inactivity is important for preventing accidentally leaving sessions open on shared or public devices.</li></ul></li></ul>						</div>
				</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-e707ac4 e-flex e-con-boxed e-con e-parent" data-id="e707ac4" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-56e0aecf elementor-widget elementor-widget-text-editor" data-id="56e0aecf" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><strong>Read also:</strong></p><ul><li style="list-style-type: none;"><ul><li><p><a href="https://inero-software.com/an-introduction-to-passkey-with-keycloak/">An introduction to Passkey with Keycloak</a></p></li><li><p><a href="https://inero-software.com/hands-on-keycloak-sso-from-setup-to-integration/">Hands-On Keycloak SSO: From Setup to Integration</a></p></li></ul></li></ul>						</div>
				</div>
				<div class="elementor-element elementor-element-550fb0e5 elementor-widget elementor-widget-heading" data-id="550fb0e5" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h3 class="elementor-heading-title elementor-size-default">Secure API endpoints and use Role-Based Access Control (RBAC)</h3>		</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-6a6f7976 e-flex e-con-boxed e-con e-parent" data-id="6a6f7976" data-element_type="container">
					<div class="e-con-inner">
		<div class="elementor-element elementor-element-6209077a e-con-full e-flex e-con e-child" data-id="6209077a" data-element_type="container">
				<div class="elementor-element elementor-element-365ac0a5 elementor-widget elementor-widget-image" data-id="365ac0a5" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img loading="lazy" decoding="async" data-attachment-id="5736" data-permalink="https://inero-software.com/best-keycloak-practices/d-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2024/05/D-1.png" data-orig-size="300,300" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="D" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2024/05/D-1.png" data-large-file="https://inero-software.com/wp-content/uploads/2024/05/D-1.png" tabindex="0" role="button" width="300" height="300" src="https://inero-software.com/wp-content/uploads/2024/05/D-1.png" class="attachment-large size-large wp-image-5736" alt="" srcset="https://inero-software.com/wp-content/uploads/2024/05/D-1.png 300w, https://inero-software.com/wp-content/uploads/2024/05/D-1-80x80.png 80w, https://inero-software.com/wp-content/uploads/2024/05/D-1-75x75.png 75w, https://inero-software.com/wp-content/uploads/2024/05/D-1-50x50.png 50w" sizes="(max-width: 300px) 100vw, 300px" data-attachment-id="5736" data-permalink="https://inero-software.com/best-keycloak-practices/d-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2024/05/D-1.png" data-orig-size="300,300" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="D" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2024/05/D-1.png" data-large-file="https://inero-software.com/wp-content/uploads/2024/05/D-1.png" role="button" />													</div>
				</div>
				</div>
		<div class="elementor-element elementor-element-74f10df2 e-con-full e-flex e-con e-child" data-id="74f10df2" data-element_type="container">
				<div class="elementor-element elementor-element-1d5e23e elementor-widget elementor-widget-text-editor" data-id="1d5e23e" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Role-Based Access Control (RBAC) allows for defining roles, assigning them to users, and managing permissions, enabling control over API operations depending on the role.</p><p><strong>In this step:</strong></p><ul><li style="list-style-type: none;"><ul><li>Securing API endpoints: To secure API endpoints, it is crucial to apply appropriate authorization and authentication mechanisms:</li><li>Authentication: Implement authentication protocols such as OAuth 2.0 and OpenID Connect, so users and applications must prove their identity before gaining access to the API. Access tokens: Use access tokens, which contain information about user permissions, to verify access rights to various API resources. HTTPS: Ensure that all requests to the API are sent over HTTPS, protecting data from interception and modification. Role-Based Access Control (RBAC): Role-Based Access Control allows for managing user permissions based on their roles in the organization:</li><li>Defining roles: Establish roles that reflect different access levels in the application, e.g., administrator, user, guest, etc. Assigning roles: Assign roles to users that specify which resources and operations they can access. Managing permissions: Configure access policies in Keycloak to control which operations can be performed by users with a given role at specific API endpoints.</li></ul></li></ul>						</div>
				</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-4202f6c3 e-flex e-con-boxed e-con e-parent" data-id="4202f6c3" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-56b07dfe elementor-widget elementor-widget-text-editor" data-id="56b07dfe" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><strong>Read also:</strong> </p><ul><li style="list-style-type: none;"><ul><li><p><a href="https://inero-software.com/exporting-accounts-to-federated-realms/">Exporting accounts to federated realms: A guide to Keycloak and LDAP Integration</a></p></li><li><p><a href="https://inero-software.com/organizations-in-keycloak-management-and-customization-of-authentication/">Organizations in Keycloak: Management and Customization of Authentication</a></p></li><li><p><a href="https://inero-software.com/keycloak-integration-guide-enabling-social-login-with-multiple-platforms-like-google/">Keycloak Integration Guide: Enabling Social Login with Multiple Platforms like Google</a></p></li><li><p><a href="https://inero-software.com/securing-java-spring-endpoints-with-keycloak/">Keycloak Integration Guide: Securing Java Spring Endpoints with Keycloak</a></p></li></ul></li></ul>						</div>
				</div>
				<div class="elementor-element elementor-element-7e2f75bc elementor-widget elementor-widget-heading" data-id="7e2f75bc" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h3 class="elementor-heading-title elementor-size-default">Regularly update and monitor the environment</h3>		</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-604a8f95 e-flex e-con-boxed e-con e-parent" data-id="604a8f95" data-element_type="container">
					<div class="e-con-inner">
		<div class="elementor-element elementor-element-aa37f1d e-con-full e-flex e-con e-child" data-id="aa37f1d" data-element_type="container">
				<div class="elementor-element elementor-element-32c70947 elementor-widget elementor-widget-image" data-id="32c70947" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img loading="lazy" decoding="async" data-attachment-id="5737" data-permalink="https://inero-software.com/best-keycloak-practices/e-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2024/05/E-1.png" data-orig-size="300,300" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="E" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2024/05/E-1.png" data-large-file="https://inero-software.com/wp-content/uploads/2024/05/E-1.png" tabindex="0" role="button" width="300" height="300" src="https://inero-software.com/wp-content/uploads/2024/05/E-1.png" class="attachment-large size-large wp-image-5737" alt="" srcset="https://inero-software.com/wp-content/uploads/2024/05/E-1.png 300w, https://inero-software.com/wp-content/uploads/2024/05/E-1-80x80.png 80w, https://inero-software.com/wp-content/uploads/2024/05/E-1-75x75.png 75w, https://inero-software.com/wp-content/uploads/2024/05/E-1-50x50.png 50w" sizes="(max-width: 300px) 100vw, 300px" data-attachment-id="5737" data-permalink="https://inero-software.com/best-keycloak-practices/e-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2024/05/E-1.png" data-orig-size="300,300" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="E" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2024/05/E-1.png" data-large-file="https://inero-software.com/wp-content/uploads/2024/05/E-1.png" role="button" />													</div>
				</div>
				</div>
		<div class="elementor-element elementor-element-30809f8e e-con-full e-flex e-con e-child" data-id="30809f8e" data-element_type="container">
				<div class="elementor-element elementor-element-551283d9 elementor-widget elementor-widget-text-editor" data-id="551283d9" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Updating and continuously monitoring the Keycloak environment is essential to maintain high protection against new threats and security vulnerabilities. Keycloak updates appear every few months, and <a href="https://www.keycloak.org/">information about them can be found on the official project website or in the Keycloak documentation.</a></p><p><strong>In this step:</strong></p><ul><li style="list-style-type: none;"><ul><li>Updates: Regularly update Keycloak to the latest stable versions.</li><li>Monitoring and logging: Use monitoring tools to track any unusual behavior and respond quickly to potential security incidents. Set up logging systems to collect key information about system operation. For example, using Kubernetes, you can efficiently manage and scale monitoring and logging tools such as Prometheus and ELK Stack. Kubernetes facilitates the deployment and management of containers with these tools, automating their deployment, scaling, and repair, which is crucial for maintaining continuity of operation and security in distributed systems.</li><li>Choose a proven partner: If implementing Keycloak best practices seems like a labor-intensive process that will heavily burden your team at this stage, seek help from specialists in this field.</li></ul></li></ul>						</div>
				</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-120f3af2 e-flex e-con-boxed e-con e-parent" data-id="120f3af2" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-28f8a86 elementor-widget elementor-widget-text-editor" data-id="28f8a86" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><strong>Read also:</strong></p><ul><li style="list-style-type: none;"><ul><li><p><a href="https://inero-software.com/how-to-create-and-apply-custom-themes-in-keycloak/">Customizing Your User Experience: How to Create and Apply Custom Themes in Keycloak</a></p></li><li><p><a href="https://inero-software.com/monitoring-and-securing-keycloak-performance-and-phishing-attack-protection/">Keycloak: Smart Tips for Monitoring and Protection with Built-in Configuration Tools</a></p></li><li><p><a href="https://inero-software.com/keycloak-migration-made-easy-tips-and-best-practices/">Keycloak Migration Made Easy: Tips and Best Practices</a></p></li></ul></li></ul>						</div>
				</div>
				<div class="elementor-element elementor-element-6ad5e2ef elementor-widget elementor-widget-text-editor" data-id="6ad5e2ef" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Inero Software has extensive experience in implementing advanced cybersecurity solutions. We create comprehensive systems for managing users and their roles, tailored to complex IT infrastructures and meeting high corporate standards. Our team, consisting of cybersecurity experts, implements advanced authorization schemes in accordance with renowned security standards. Thanks to our knowledge and experience, we provide effective protection against threats and compliance with corporate security policies.</p>						</div>
				</div>
					</div>
				</div>
				</div>
		<p>Artykuł <a href="https://inero-software.com/best-keycloak-practices/">Best Practices in Keycloak: Secure Your System in 5 Steps</a> pochodzi z serwisu <a href="https://inero-software.com">Inero Software - Software Consulting</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5732</post-id>	</item>
	</channel>
</rss>
