<?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>password policies - Inero Software - Software Consulting</title>
	<atom:link href="https://inero-software.com/tag/password-policies/feed/" rel="self" type="application/rss+xml" />
	<link>https://inero-software.com/tag/password-policies/</link>
	<description>We unleash innovations using cutting-edge technologies, modern design and AI</description>
	<lastBuildDate>Tue, 01 Apr 2025 09:31:39 +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>password policies - Inero Software - Software Consulting</title>
	<link>https://inero-software.com/tag/password-policies/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">153509928</site>	<item>
		<title>Configuring Password Policies in Keycloak</title>
		<link>https://inero-software.com/configuring-password-policies-in-keycloak/</link>
		
		<dc:creator><![CDATA[Marceli Formela]]></dc:creator>
		<pubDate>Thu, 20 Mar 2025 12:10:07 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Company]]></category>
		<category><![CDATA[Keycloak]]></category>
		<category><![CDATA[IAM]]></category>
		<category><![CDATA[keycloak]]></category>
		<category><![CDATA[Password]]></category>
		<category><![CDATA[password management]]></category>
		<category><![CDATA[password policies]]></category>
		<guid isPermaLink="false">https://inero-software.com/?p=7635</guid>

					<description><![CDATA[<p>In this blog, we will first take a look at the built-in Keycloak mechanisms for password policy management. Then, we will explore the possibilities for customizing these mechanisms to better fit specific requirements.</p>
<p>Artykuł <a href="https://inero-software.com/configuring-password-policies-in-keycloak/">Configuring Password Policies 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="7635" class="elementor elementor-7635" data-elementor-post-type="post">
				<div class="elementor-element elementor-element-949c242 e-flex e-con-boxed e-con e-parent" data-id="949c242" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-a9078db elementor-widget elementor-widget-html" data-id="a9078db" data-element_type="widget" data-widget_type="html.default">
				<div class="elementor-widget-container">
			 
		</div>
				</div>
				<div class="elementor-element elementor-element-cc34f5b elementor-widget elementor-widget-text-editor" data-id="cc34f5b" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<h4><strong>Effective password management is an important aspect of securing user accounts, and Keycloak provides tools to enforce strong authentication policies. By configuring password rules, administrators can ensure that credentials meet security standards, reducing the risk of unauthorized access. The framework offers flexible options, allowing you to set requirements for password length, complexity, expiration, and reuse prevention. </strong></h4>						</div>
				</div>
				<div class="elementor-element elementor-element-0df981b elementor-widget elementor-widget-text-editor" data-id="0df981b" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">In this blog, we will first take a look at the built-in Keycloak mechanisms for password policy management. Then, we will explore the possibilities for customizing these mechanisms to better fit specific requirements.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-ad5f7b2 elementor-widget elementor-widget-image" data-id="ad5f7b2" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img fetchpriority="high" decoding="async" data-attachment-id="7638" data-permalink="https://inero-software.com/configuring-password-policies-in-keycloak/attachment/115856/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/03/115856.png" data-orig-size="775,411" 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="115856" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/03/115856-300x159.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/03/115856.png" tabindex="0" role="button" width="775" height="411" src="https://inero-software.com/wp-content/uploads/2025/03/115856.png" class="attachment-large size-large wp-image-7638" alt="" srcset="https://inero-software.com/wp-content/uploads/2025/03/115856.png 775w, https://inero-software.com/wp-content/uploads/2025/03/115856-300x159.png 300w, https://inero-software.com/wp-content/uploads/2025/03/115856-768x407.png 768w, https://inero-software.com/wp-content/uploads/2025/03/115856-566x300.png 566w" sizes="(max-width: 775px) 100vw, 775px" data-attachment-id="7638" data-permalink="https://inero-software.com/configuring-password-policies-in-keycloak/attachment/115856/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/03/115856.png" data-orig-size="775,411" 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="115856" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/03/115856-300x159.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/03/115856.png" role="button" />													</div>
				</div>
				<div class="elementor-element elementor-element-b583771 elementor-widget elementor-widget-heading" data-id="b583771" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h3 class="elementor-heading-title elementor-size-default">Built-in policies</h3>		</div>
				</div>
				<div class="elementor-element elementor-element-b2a2079 elementor-widget elementor-widget-text-editor" data-id="b2a2079" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">These built-in password policies in Keycloak allow administrators to enforce security rules to strengthen user authentication. Here’s a brief description of each policy:</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-1dcf64f elementor-widget elementor-widget-text-editor" data-id="1dcf64f" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<ol><li aria-level="1"><strong>Expire Password</strong> <span style="font-weight: 400;">– Forces users to change their password after a specified period.</span></li><li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;"><strong>Hashing Iterations</strong> – Determines the number of iterations for password hashing to enhance security.</span></li><li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;"><strong>Not Recently Used</strong> – Prevents users from reusing their recent passwords.</span></li><li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;"><strong>Password Blacklist</strong> – Blocks specific passwords from being used, typically to prevent weak or common passwords.</span></li><li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;"><strong>Regular Expression</strong> – Allows enforcing a custom regex pattern for password validation.</span></li><li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;"><strong>Minimum Length</strong> – Sets the minimum number of characters required in a password.</span></li><li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;"><strong>Not Username</strong> – Prevents users from setting their username as a password.</span></li><li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;"><strong>Not Email</strong> – Prevents users from using their email address as a password.</span></li><li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;"><strong>Not Recently Used</strong> (In Days) – Prevents password reuse within a specified number of days.</span></li><li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;"><strong>Not Contains Username</strong> – Ensures the password does not include the username as part of it.</span></li><li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;"><strong>Special Character</strong>s – Requires passwords to contain at least one special character.</span></li><li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;"><strong>Uppercase Characters</strong> – Enforces at least one uppercase letter in the password.</span></li><li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;"><strong>Lowercase Characters</strong> – Requires at least one lowercase letter in the password.</span></li><li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;"><strong>Digits</strong> – Ensures the password includes at least one numeric digit.</span></li><li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;"><strong>Maximum Authentication Age</strong> – Sets a limit on how long authentication remains valid before requiring reauthentication.</span></li><li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;"><strong>Hashing Algorithm</strong> – Specifies the hashing algorithm used for password encryption.</span></li><li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;"><strong>Maximum Length</strong> – Defines the maximum allowable length for passwords.</span></li></ol>						</div>
				</div>
				<div class="elementor-element elementor-element-95da107 elementor-widget elementor-widget-heading" data-id="95da107" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">Implementing custom policy using SPI</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-86f9385 elementor-widget elementor-widget-text-editor" data-id="86f9385" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">To implement a custom password policy in Keycloak, we should use the Service Provider Interface (SPI).</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-efcfbc7 elementor-widget elementor-widget-text-editor" data-id="efcfbc7" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">In this case, we define a custom password policy provider by implementing the PasswordPolicyProviderFactory interface:</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-a47d185 elementor-widget elementor-widget-code-highlight" data-id="a47d185" data-element_type="widget" data-widget_type="code-highlight.default">
				<div class="elementor-widget-container">
					<div class="prismjs-default copy-to-clipboard ">
			<pre data-line="" class="highlight-height language-javascript line-numbers">
				<code readonly="true" class="language-javascript">
					<xmp>public class PasswordCustomPolicyProviderFactory implements PasswordPolicyProviderFactory {

	public static final Integer DEFAULT_VALUE = 1;
	public static final String MIN_PASSWORD_LIFETIME_ID = "minimumPasswordLifetime";

	@Override
	public String getId() {
    	return MIN_PASSWORD_LIFETIME_ID;
	}

	@Override
	public PasswordPolicyProvider create(KeycloakSession session) {
    	return new PasswordCustomPolicyProvider(session);
	}
[...]
}

</xmp>
				</code>
			</pre>
		</div>
				</div>
				</div>
				<div class="elementor-element elementor-element-75140a5 elementor-widget elementor-widget-text-editor" data-id="75140a5" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">Factory instantiates and returns a new instance of <strong>PasswordCustomPolicyProvider</strong>, which contains the actual validation logic for enforcing the minimum password lifetime. The <strong>MIN_PASSWORD_LIFETIME_ID</strong> constant serves as the unique identifier for this custom policy </span><span style="font-weight: 400;">and <strong>DEFAULT_VALUE</strong> constant represents the default minimum password lifetime (in days) if no custom value is configured via admin console.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-3c1cd5b elementor-widget elementor-widget-code-highlight" data-id="3c1cd5b" data-element_type="widget" data-widget_type="code-highlight.default">
				<div class="elementor-widget-container">
					<div class="prismjs-default copy-to-clipboard ">
			<pre data-line="" class="highlight-height language-javascript line-numbers">
				<code readonly="true" class="language-javascript">
					<xmp>public class PasswordCustomPolicyProvider implements PasswordPolicyProvider {
np.
   private static final String POLICY_VIOLATION_MESSAGE = "passwordLifetimeViolation";


   private final KeycloakSession keycloakSession;

   public PasswordCustomPolicyProvider(KeycloakSession keycloakSession) {
   	this.keycloakSession = keycloakSession;
   }


   @Override
   public PolicyError validate(RealmModel realm, UserModel user, String password) {
   	PasswordCredentialProvider credentialProvider = new PasswordCredentialProvider(keycloakSession);
   	PasswordCredentialModel credentialModel = credentialProvider.getPassword(realm, user);

   	if (credentialModel == null) {
       	return null;
   	}

   	long passwordCreationTime = credentialModel.getCreatedDate();
   	long currentTime = Time.currentTimeMillis();
   	long elapsedTime = currentTime - passwordCreationTime;

   	PasswordPolicy passwordPolicy = realm.getPasswordPolicy();
   	int minPasswordLifetimeDays = passwordPolicy.getPolicyConfig(PasswordCustomPolicyProviderFactory.MIN_PASSWORD_LIFETIME_ID);
   	long minPasswordLifetimeMillis = TimeUnit.DAYS.toMillis(minPasswordLifetimeDays);
   	return elapsedTime >= minPasswordLifetimeMillis ? null : new PolicyError(POLICY_VIOLATION_MESSAGE, minPasswordLifetimeDays);
   }
[...]
}
</xmp>
				</code>
			</pre>
		</div>
				</div>
				</div>
				<div class="elementor-element elementor-element-7cd9848 elementor-widget elementor-widget-text-editor" data-id="7cd9848" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">The <strong>PasswordCredentialProvider</strong> can access the stored password creation timestamp via the <strong>PasswordCredentialModel</strong> instance. It then computes <strong>elapsedTime</strong> as the difference between this timestamp and the current system time, representing how long the password has been in use.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-c8ec00f elementor-widget elementor-widget-text-editor" data-id="c8ec00f" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">Next, the PasswordPolicy object retrieves the password policy for the realm, extracts the minimum required password lifetime in days (minPasswordLifetimeDays), and converts it to milliseconds (minPasswordLifetimeMillis). The policy ensures that the password has been in use for at least the required duration. If this requirement is not met, a PolicyError is returned. The error message key is stored in <strong>POLICY_VIOLATION_MESSAGE</strong>, and its content can be customized within our theme. This allows us to define a user-friendly message that informs the user why the password change is restricted and how much time remains before a new password can be set.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-5c8b84b elementor-widget elementor-widget-image" data-id="5c8b84b" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img decoding="async" data-attachment-id="7639" data-permalink="https://inero-software.com/configuring-password-policies-in-keycloak/attachment/122254/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/03/122254.png" data-orig-size="711,443" 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="122254" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/03/122254-300x187.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/03/122254.png" tabindex="0" role="button" width="711" height="443" src="https://inero-software.com/wp-content/uploads/2025/03/122254.png" class="attachment-large size-large wp-image-7639" alt="" srcset="https://inero-software.com/wp-content/uploads/2025/03/122254.png 711w, https://inero-software.com/wp-content/uploads/2025/03/122254-300x187.png 300w, https://inero-software.com/wp-content/uploads/2025/03/122254-481x300.png 481w" sizes="(max-width: 711px) 100vw, 711px" data-attachment-id="7639" data-permalink="https://inero-software.com/configuring-password-policies-in-keycloak/attachment/122254/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/03/122254.png" data-orig-size="711,443" 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="122254" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/03/122254-300x187.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/03/122254.png" role="button" />													</div>
				</div>
				<div class="elementor-element elementor-element-a18d447 elementor-widget elementor-widget-text-editor" data-id="a18d447" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">In this way, we can define custom password policies in Keycloak when the default set of policies is insufficient for specific requirements. This flexibility allows for more granular control over user authentication and password management when we need it.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-ed723ca elementor-widget elementor-widget-heading" data-id="ed723ca" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h3 class="elementor-heading-title elementor-size-default">Customizing UI to improve user experience</h3>		</div>
				</div>
				<div class="elementor-element elementor-element-0d876c8 elementor-widget elementor-widget-text-editor" data-id="0d876c8" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">By default, Keycloak displays unsatisfied password policies</span><b> individually </b><span style="font-weight: 400;">on the login page. This can be problematic for many users, especially when there are multiple policies that are not met. It can lead to a cluttered interface and make it harder for users to understand all the password requirements at once. To address this, you can customize the login screen to display a collective list of all unsatisfied password policies together, providing a clearer and more user-friendly experience.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-129921c elementor-widget elementor-widget-code-highlight" data-id="129921c" data-element_type="widget" data-widget_type="code-highlight.default">
				<div class="elementor-widget-container">
					<div class="prismjs-default copy-to-clipboard ">
			<pre data-line="" class="highlight-height language-javascript line-numbers">
				<code readonly="true" class="language-javascript">
					<xmp>public class CustomFreeMarkerLoginFormsProvider extends FreeMarkerLoginFormsProvider {
/**
* Mapping between password policy provider IDs and custom messages
* Note: contains only standard policies that must be displayed in the UI
*/
private final Map<String, String> policyPropertyMessages = Map.of(
LengthPasswordPolicyProviderFactory.ID, MINIMUM_LENGTH_MESSAGE,
MaximumLengthPasswordPolicyProviderFactory.ID, MAXIMUM_LENGTH_MESSAGE,
DigitsPasswordPolicyProviderFactory.ID, MINIMUM_DIGIT_MESSAGE,
SpecialCharsPasswordPolicyProviderFactory.ID, MINIMUM_SPECIAL_CHAR_MESSAGE,
UpperCasePasswordPolicyProviderFactory.ID, MINIMUM_UPPERCASE_MESSAGE,
LowerCasePasswordPolicyProviderFactory.ID, MINIMUM_LOWERCASE_MESSAGE,
NotUsernamePasswordPolicyProviderFactory.ID, NOT_USERNAME_MESSAGE,
NotContainsUsernamePasswordPolicyProviderFactory.ID, NOT_CONTAINS_USERNAME_MESSAGE,
NotEmailPasswordPolicyProviderFactory.ID, NOT_EMAIL_MESSAGE
);

[...]

@Override
protected void createCommonAttributes(Theme theme, Locale locale, Properties messagesBundle,
UriBuilder baseUriBuilder, LoginFormsPages page) {
super.createCommonAttributes(theme, locale, messagesBundle, baseUriBuilder, page);
if (realm != null && realm.getPasswordPolicy() != null) {
attributes.put("passwordPolicies", getPasswordPolicyMessages(realm.getPasswordPolicy(), messagesBundle));
}}

[...]

private Map<String, String> getPasswordPolicyMessages(PasswordPolicy passwordPolicy, Properties messagesBundle) {
Map<String, String> policyMessages = new HashMap<>();
PasswordPolicy.Builder builder = passwordPolicy.toBuilder();
for (String policyName : passwordPolicy.getPolicies()) {
var value = builder.get(policyName);
String message = extractPolicyMessage(policyName, value, messagesBundle);
if (message != null) {
policyMessages.put(policyName, message);
}
}
return policyMessages;
}

[...]

/**
* Extracts a message for a given password policy from the messages bundle
* Note: Policy message is constructed by replacing the {0} placeholder with the policy value
*/
private String extractPolicyMessage(String policy, String value, Properties messagesBundle) {
String property = policyPropertyMessages.get(policy);
if (property == null) {
return null;
}
String policyMessage = messagesBundle.getProperty(property);
return policyMessage != null ? policyMessage.replace("{0}", value) : null;
}
</xmp>
				</code>
			</pre>
		</div>
				</div>
				</div>
				<div class="elementor-element elementor-element-e47c0c6 elementor-widget elementor-widget-text-editor" data-id="e47c0c6" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">The getPasswordPolicyMessages() function already collects the password policies from the PasswordPolicy and maps them to the appropriate messages from the message bundle. You can extend this function to display all unsatisfied policies in one collective message.</span></p><p> </p><p><span style="font-weight: 400;">Password policies such as minimum length, required digits, special characters, etc., are mapped to messages via the extractPolicyMessage() method. Our service implementation will iterate through each policy and check if it&#8217;s satisfied. If not, the corresponding message will be displayed.</span></p><p> </p><p><span style="font-weight: 400;">In your update-password.ftl page, you can display these unsatisfied policies as a list using FreeMarker.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-e70d98c elementor-widget elementor-widget-code-highlight" data-id="e70d98c" data-element_type="widget" data-widget_type="code-highlight.default">
				<div class="elementor-widget-container">
					<div class="prismjs-default copy-to-clipboard ">
			<pre data-line="" class="highlight-height language-javascript line-numbers">
				<code readonly="true" class="language-javascript">
					<xmp>
    	<#if passwordPolicies?has_content>
        	<div class="${properties.kcAlertClass}">
            	<div class="${properties.kcAlertIconWrapperClass}">
                	<span class="${properties.kcAlertIconClass}"></span>
            	</div>
            	<span class="${properties.kcAlertTitleClass}">
            	${msg("passwordInstruction")} <br>
            	<#list passwordPolicies?keys as key>
                	<span class="${properties.kcAlertTitleClass}">&#x2022; ${passwordPolicies[key]}</span><br/>
            	</#list>
            	</span>
        	</div>
    	</#if>

</xmp>
				</code>
			</pre>
		</div>
				</div>
				</div>
				<div class="elementor-element elementor-element-358fd5c elementor-widget elementor-widget-image" data-id="358fd5c" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img decoding="async" data-attachment-id="7640" data-permalink="https://inero-software.com/configuring-password-policies-in-keycloak/attachment/123206/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/03/123206.png" data-orig-size="648,510" 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="123206" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/03/123206-300x236.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/03/123206.png" tabindex="0" role="button" width="648" height="510" src="https://inero-software.com/wp-content/uploads/2025/03/123206.png" class="attachment-large size-large wp-image-7640" alt="" srcset="https://inero-software.com/wp-content/uploads/2025/03/123206.png 648w, https://inero-software.com/wp-content/uploads/2025/03/123206-300x236.png 300w, https://inero-software.com/wp-content/uploads/2025/03/123206-381x300.png 381w, https://inero-software.com/wp-content/uploads/2025/03/123206-380x300.png 380w" sizes="(max-width: 648px) 100vw, 648px" data-attachment-id="7640" data-permalink="https://inero-software.com/configuring-password-policies-in-keycloak/attachment/123206/" data-orig-file="https://inero-software.com/wp-content/uploads/2025/03/123206.png" data-orig-size="648,510" 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="123206" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2025/03/123206-300x236.png" data-large-file="https://inero-software.com/wp-content/uploads/2025/03/123206.png" role="button" />													</div>
				</div>
				<div class="elementor-element elementor-element-6d7a6c0 elementor-widget elementor-widget-heading" data-id="6d7a6c0" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h3 class="elementor-heading-title elementor-size-default">Real world policy examples
</h3>		</div>
				</div>
				<div class="elementor-element elementor-element-776740f elementor-widget elementor-widget-text-editor" data-id="776740f" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">Let&#8217;s see how password policies look in large companies.</span></p><p><span style="font-weight: 400;"> </span></p><p><b>Apple</b><span style="font-weight: 400;"> requires passwords to be at least eight characters long and must include both letters and numbers. Additionally, passwords cannot contain three or more consecutive identical characters and cannot be commonly used passwords.</span></p><p><span style="font-weight: 400;"> </span></p><p><b>Facebook</b><span style="font-weight: 400;"> enforces a minimum password length of more than six characters, although longer passwords are recommended. While Meta does not require the use of special characters or digits, it encourages creating complex passwords.</span></p><p><span style="font-weight: 400;"> </span></p><p><b>Microsoft</b><span style="font-weight: 400;"> passwords must be at least 8 characters long and contain at least two of the following types of characters: uppercase letters, lowercase letters, digits, and symbols. Additionally, it may block the ability to set a password that is too similar to the previous one.</span></p><p><span style="font-weight: 400;">Although these companies use different tools for authentication, it&#8217;s important to consider the security standards implemented in big real-world systems.</span></p><p><span style="font-weight: 400;"> </span></p><p><span style="font-weight: 400;">And despite the fact that these password policies are not extremely restrictive, users should still avoid using sensitive personal information, such as names, birthdates, or phone numbers, in their passwords. Additionally, it&#8217;s essential to avoid reusing passwords across different services, as this can lead to vulnerabilities in case one account is compromised. Employing two-factor authentication (2FA) and periodically reviewing password security are further steps users can take to enhance their protection.</span></p>						</div>
				</div>
				<div class="elementor-element elementor-element-d64b6d9 elementor-widget elementor-widget-heading" data-id="d64b6d9" 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-911c3a6 elementor-widget elementor-widget-text-editor" data-id="911c3a6" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><span style="font-weight: 400;">As you can see now, Keycloak provides a set of default password policies that cover standard security rules, such as minimum length, complexity requirements, and password history. These built-in policies are sufficient in many cases, but if needed, there is the option to customize them to meet specific organizational requirements. Keycloak also allows the creation of custom password policies, providing greater control over security.</span></p><p><span style="font-weight: 400;">In addition to customizing policies, Keycloak enables modification of the user interface, which is especially useful when the default display of password policy violations, such as showing unmet requirements individually, does not meet our needs. In such cases, we can change how errors are presented or enrich the messages with additional details to make them more user-friendly.</span></p><p> </p><p><span style="font-weight: 400;">With these options, Keycloak demonstrates a high level of flexibility, allowing full control over security policies and the user interface, making it a versatile solution for identity and access management. The ability to define custom rules and adjust components ensures that Keycloak is a scalable tool that can be easily tailored to the specific needs of an organization.</span></p>						</div>
				</div>
					</div>
				</div>
				</div>
		<p>Artykuł <a href="https://inero-software.com/configuring-password-policies-in-keycloak/">Configuring Password Policies 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">7635</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>
