---
title: 4biz auto-login - SSO
slug: admin-en/4biz-auto-login-sso
description: Learn how to create a user in Active Directory and configure the Wildfly server for SSO authentication through SPNEGO. This comprehensive document outlines step-by-step instructions, including creating a user in Active Directory, modifying user account pr
createdAt: 2021-10-11T15:38:08.000Z
---

**Branchs**:

   Sso (itsm)

   Spnego 1.0 (artifactory)

## Create user AD

1. Access `Create a user in Users and Computers of the Active Directory`, as in the image below:

::Image[]{src="https://api.archbee.com/api/optimize/pu5VMc-2TW3GQX4ly5Xp7/c1QH31u_Ib-8Plt8U6zyV_image.png" size="66" width="574" height="684" position="center" showCaption="false"}

2\. Create a password: 

::Image[]{src="https://api.archbee.com/api/optimize/pu5VMc-2TW3GQX4ly5Xp7/WhjLKs4PL5DU_YIienSZm_image.png" size="54" width="397" height="306" position="center" showCaption="false"}

3\. Click on the right side of the mouse, in the button user/properties:

::Image[]{src="https://api.archbee.com/api/optimize/pu5VMc-2TW3GQX4ly5Xp7/1AatG2X_KaROu2q7hFx0j_image.png" size="54" width="472" height="488" position="center" showCaption="false"}



4\. Select the option "**This account supports 256-bit encryption**", apply it and check "**OK**", as shown below:

::Image[]{src="https://api.archbee.com/api/optimize/pu5VMc-2TW3GQX4ly5Xp7/-zYKhBwRcxvJ0TorEgdOA_image.png" size="54" width="408" height="459" position="center" showCaption="false"}

5\. Open the "**ADSI Edit**". Then, connect in the AD, click on users and locate the user newly created, as below:

![](https://api.archbee.com/api/optimize/pu5VMc-2TW3GQX4ly5Xp7/F_r3ohjTEy7fsTt1JYaww_image.png)

6\. Click the right mouse button and select the option Properties. Then, search for the **servicePrincipalName** (SPN);

7\. Add <font color="#2166ae"><u>**HTTP/hom-itsm.4biz.com.br**</u></font>, click on "**OK**", as in the image below:

![](https://api.archbee.com/api/optimize/pu5VMc-2TW3GQX4ly5Xp7/08ThADsVpY4Y2utXj_1wb_image.png)

8\. Open the **CMD&#xA0;**&#x61;s Administrator and put the following commands. Remember that the first sets the **SPN&#x20;**&#x61;nd the second creates the **Keytab&#x20;**(which will be used in the Wildfly):

- setspn -s HTTP/hom-itsm.4biz.com.br 4biz2
- ktpass / princ HTTP/hom-itsm.4biz.com.br /mapuser 4biz2  /pass  central\@123 /ptype KRB5\_NT\_Principal/out4biz2.keytab /crypto ALL

9\. Making the steps above, the **AD&#x20;**&#x77;ill be configured. 

## Configure the Wildfly server

1. Copy the **war** generated from the **sso** branch;
2. Copy the file login.conf (validate the information according to the AD) to the folder standalone / configuration (wildfly):

:::BlockQuote
\[libdefaults]
default\_tkt\_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 rc4-hmac
default\_tgs\_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 rc4-hmac
permitted\_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 rc4-hmac
\[realms]
:::

:::BlockQuote
citgosrv004.cit.local  = \{
kdc = 4bizsrv.run2bizsrv.bigdata-team.com
default\_domain = 4bizsrv.run2bizsrv.bigdata-team.com }    &#x20;
:::

:::BlockQuote
\[domain\_realm]
.4bizsrv.run2bizsrv.bigdata-team.com = run2bizsrv.run2bizsrv.bigdata-team.com
:::

1. Copy the lightkeytab.keytab file (generated by the command in AD) to the standalone / configuration (wildfly) folder;

:::BlockQuote
custom-client \{
com.sun.security.auth.module.Krb5LoginModule required
storeKey=true
useKeyTab=true
keyTab="file:///opt/wildfly-12.0.0.Final/standalone/configuration/lightkeytab.keytab"
principal=HTTP/light-desenvolvimento.cloud4biz.com\\@4bizSRV.BIGDATA-TEAM.COM;
};
:::

1. Copy the lightkeytab.keytab file (generated by the command in AD) to the standalone/configuration (wildfly) folder;
2. Fix the standalone.xlm when adding the following information:
   1. ****<font color="#2166ae">**In \\&lt;system-properties&gt;**</font>****

:::BlockQuote
\\\<property name="sun.security.krb5.debug" value="true"/\\>
\\\<property name="java.security.krb5.kdc" value="4bizSRV.BIGDATA-TEAM.COM"/\\>
\\\<property name="java.security.krb5.realm"value="4bizSRV.BIGDATA-TEAM.COM"/\\>
\\\<property name="java.security.krb5.conf"value="/opt/wildfly-12.0.0.Final/standalone/configuration/krb5.conf"/\\>
\\\<property name="java.security.auth.login.config"value="/opt/wildfly-12.0.0.Final/standalone/configuration/login.conf"/\\>
\\\<property name="krb.keyTab"value="/opt/wildfly-12.0.0.Final/standalone/configuration/lightkeytab.keytab"/\\>
\\\<property name="krb.principal"value="HTTP/light-desenvolvimento.cloud4biz.com\\@4bizSRV.BIGDATA-TEAM.COM"/\\>
:::

1. ****<font color="#2166ae">**In \\&lt;security-domains&gt;**</font>****

:::BlockQuote
\\\<security-domain name="spnego-server"\\>
\\\<authentication\\>
\\\<login-module code="com.sun.security.auth.module.Krb5LoginModule"flag="required"\\>
\\\<module-option name="storeKey" value="true"/\\>
\\\<module-option name="useKeyTab" value="true"/\\>
\\\<module-option name="keyTab" value="\\$&#x7B;krb.keyTab}"/\\>
\\\<module-option name="principal" value="\\$&#x7B;krb.principal}"/\\>
\\\<module-option name="isInitiator" value="false"/\\>
\\\</login-module\\>
\\\</authentication\\>
\\\</security-domain\\>
\\\<security-domain name="SPNEGO" cache-type="default"\\>
\\\<authentication\\>
\\\<login-module code="Kerberos" flag="required"\\>
\\\<module-option name="storeKey" value="true"/\\>
\\\<module-option name="refreshKrb5Config" value="true"/\\>
\\\<module-option name="useKeyTab" value="true"/\\>
\\\<module-option name="doNotPrompt" value="true"/\\>
\\\</login-module\\>
\\\</authentication\\>
\\\</security-domain\\>
:::

1. If you haven't changed JAVA'S jar policy (JCE - Java Cryptography Extension), download the files and put in <u>*jdk/jre/lib/security/policy/limited and jdk/jre/lib/security/policy/unlimited*</u>;
2. Import (synchronize) users of LDAP in ITSM.

:::hint{type="warning"}
⚠ <u>**Attention**</u>**!**

The DN Alias should be the same as the network domain (example: CIT\user), than the DN Alias = CIT, as below:
:::

![](https://api.archbee.com/api/optimize/pu5VMc-2TW3GQX4ly5Xp7/XCgQUOOoozIrRLxftu1bS_image.png)

:::hint{type="warning"}
⚠ <u>**Attention**</u>**!**

It is recommended that you read the following supporting materials:

[https://ss64.com/nt/setspn.html](https://ss64.com/nt/setspn.html) and [http://spnego.sourceforge.net/](http://spnego.sourceforge.net/)
:::

