<?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/"
	>

<channel>
	<title>Instalasi EJBCA 6.15.2.1 dengan SoftHSM - GoBlog</title>
	<atom:link href="https://blog.goreinnamah.com/blog/tag/instalasi-ejbca-6-15-2-1-dengan-softhsm/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.goreinnamah.com</link>
	<description>LOG ALL LOGS</description>
	<lastBuildDate>Mon, 02 Dec 2019 08:43:10 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://blog.goreinnamah.com/wp-content/uploads/2017/01/cropped-1-150x150.jpg</url>
	<title>Instalasi EJBCA 6.15.2.1 dengan SoftHSM - GoBlog</title>
	<link>https://blog.goreinnamah.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Instalasi EJBCA 6.15.2.1 dengan SoftHSM pada Ubuntu Server 18.04</title>
		<link>https://blog.goreinnamah.com/blog/2019/12/02/ejbca-6-15-2-1/</link>
		
		<dc:creator><![CDATA[Darius Go Reinnamah]]></dc:creator>
		<pubDate>Mon, 02 Dec 2019 08:43:10 +0000</pubDate>
				<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[EJBCA 6.15.2.1]]></category>
		<category><![CDATA[EJBCA 6.15.2.1 dengan SoftHSM]]></category>
		<category><![CDATA[Instalasi EJBCA 6.15.2.1]]></category>
		<category><![CDATA[Instalasi EJBCA 6.15.2.1 dengan SoftHSM]]></category>
		<guid isPermaLink="false">https://blog.goreinnamah.com/?p=4175</guid>

					<description><![CDATA[<p>EJBCA sudah mengeluarkan versi terbaru dari Community Edition milik mereka, yaitu EJBCA 6.15.2.1. Sayang sekali rasanya kalau saya tidak mencoba versi[...]</p>
<p>The post <a href="https://blog.goreinnamah.com/blog/2019/12/02/ejbca-6-15-2-1/">Instalasi EJBCA 6.15.2.1 dengan SoftHSM pada Ubuntu Server 18.04</a> first appeared on <a href="https://blog.goreinnamah.com">GoBlog</a>.</p>]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;">EJBCA sudah mengeluarkan versi terbaru dari <em>Community Edition </em>milik mereka, yaitu EJBCA 6.15.2.1. Sayang sekali rasanya kalau saya tidak mencoba versi terbaru dari <em>communtity edition </em>tersebut dan melihat perubahan apa saja yang terjadi pada versi itu.</p>
<p style="text-align: justify;">Sebenarnya cara instalasi dan konfigurasinya sama dengan beberapa versi sebelumnya. Namun agar semakin lengkap tulisan dari setiap versinya, berikut ini saya tuliskan cara melakukan instalasi EJBCA 6.15.2.1 dengan SoftHSM 2.5.0 pada Ubuntu Server 18.04</p>
<h3 style="text-align: justify;"><strong>Alat dan Bahan</strong></h3>
<ol style="text-align: justify;">
<li>EJBCA 6.15.1.2 → Download <a href="https://sourceforge.net/projects/ejbca/files/ejbca6/ejbca_6_15_2_1/ejbca_ce_6_15_2_1.zip/download"><strong>DI SINI</strong></a></li>
<li>Wildfly 10.0.0 Final → Download <a href="http://download.jboss.org/wildfly/10.0.0.Final/wildfly-10.0.0.Final.zip"><strong>DI SINI</strong></a></li>
<li>SoftHSM 2.5.0 → Download <a href="https://dist.opendnssec.org/source/softhsm-2.5.0.tar.gz"><strong>DI SINI</strong></a></li>
<li>MariaDB 10.4 (Stable) → Cara install <a href="https://downloads.mariadb.org/mariadb/repositories/#distro=Ubuntu&amp;distro_release=bionic--ubuntu_bionic&amp;mirror=nixnet&amp;version=10.4"><strong>DI SINI</strong></a></li>
<li>MariaDB Java Client 2.1.0 → Download <a href="http://central.maven.org/maven2/org/mariadb/jdbc/mariadb-java-client/2.1.0/mariadb-java-client-2.1.0.jar"><strong>DI SINI</strong></a></li>
<li>OpenJDK 8</li>
<li>JCE Policy 8 → Download <a href="https://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip?AuthParam=1521531388_8329e84a9d4f3bdefb8c877c2832cccc"><strong>DI SINI</strong></a></li>
</ol>
<h3 style="text-align: justify;"><strong>Spek Server yang Digunakan</strong></h3>
<ol style="text-align: justify;">
<li>RAM = 8 GB</li>
<li>CPUs = 4</li>
<li>Harddisk = 50 GB</li>
</ol>
<h3 style="text-align: justify;"><strong>Konfigurasi Firewall</strong></h3>
<p style="text-align: justify;">EJBCA 6.15.2.1 menggunakan port 8080, 8442, 8443 untuk servis CA. Yang lainnya merupakan port internal (3306 untuk MySQL, 9990 untuk JBoss Admin, dll). Kita tidak perlu mengubah port tersebut pada aplikasi EJBCAnya langsung.</p>
<p style="text-align: justify;">Jika kita mau menggunakan port standar yang digunakan WEB, silahkan atur <em>Port Forwarding</em> pada iptables. Kita bisa melakukannya dengan cara:</p>
<pre><strong>sudo vi /etc/iptables.rules</strong></pre>
<p style="text-align: justify;">kemudian masukkan:</p>
<pre><strong>### Start iptables ###</strong>

<strong># Firewall configuration written by system-config-firewall</strong>
<strong># Manual customization of this file is not recommended.</strong>
<strong>*mangle</strong>
<strong>:PREROUTING ACCEPT [0:0]</strong>
<strong>:INPUT ACCEPT [0:0]</strong>
<strong>:FORWARD ACCEPT [0:0]</strong>
<strong>:OUTPUT ACCEPT [0:0]</strong>
<strong>:POSTROUTING ACCEPT [0:0]</strong>
<strong>-A PREROUTING -i ens32 -p tcp --dport 80 -j MARK --set-mark 0x64</strong>
<strong>-A PREROUTING -i ens32 -p tcp --dport 442 -j MARK --set-mark 0x65</strong>
<strong>-A PREROUTING -i ens32 -p tcp --dport 443 -j MARK --set-mark 0x66</strong>
<strong>COMMIT</strong>
<strong>*nat</strong>
<strong>:PREROUTING ACCEPT [0:0]</strong>
<strong>:OUTPUT ACCEPT [0:0]</strong>
<strong>:POSTROUTING ACCEPT [0:0]</strong>
<strong>-A PREROUTING -i ens32 -p tcp --dport 80 -m mark --mark 0x64 -j DNAT --to-destination :8080</strong>
<strong>-A PREROUTING -i ens32 -p tcp --dport 442 -m mark --mark 0x65 -j DNAT --to-destination :8442</strong>
<strong>-A PREROUTING -i ens32 -p tcp --dport 443 -m mark --mark 0x66 -j DNAT --to-destination :8443</strong>
<strong>COMMIT</strong>

<strong>*filter</strong>
<strong>:INPUT ACCEPT [0:0]</strong>
<strong>:FORWARD ACCEPT [0:0]</strong>
<strong>:OUTPUT ACCEPT [0:0]</strong>
<strong>-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT</strong>
<strong>-A INPUT -p icmp -j ACCEPT</strong>
<strong>-A INPUT -i lo -j ACCEPT</strong>
<strong>-A INPUT -i ens32 -m state --state NEW -m tcp -p tcp --dport 8080 -m mark --mark 0x64 -j ACCEPT</strong>
<strong>-A INPUT -i ens32 -m state --state NEW -m tcp -p tcp --dport 8442 -m mark --mark 0x65 -j ACCEPT</strong>
<strong>-A INPUT -i ens32 -m state --state NEW -m tcp -p tcp --dport 8443 -m mark --mark 0x66 -j ACCEPT</strong>
<strong>-A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT</strong>
<strong>-A INPUT -m state --state NEW -m tcp -p tcp --dport 2244 -j ACCEPT</strong>
<strong>-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT</strong>
<strong>-A INPUT -m state --state NEW -m tcp -p tcp --dport 9990 -j ACCEPT</strong>
<strong>-A INPUT -m state --state NEW -m tcp -p tcp --dport 442 -j ACCEPT</strong>
<strong>-A INPUT -j REJECT --reject-with icmp-host-prohibited</strong>
<strong>-A FORWARD -j REJECT --reject-with icmp-host-prohibited</strong>
<strong>COMMIT</strong></pre>
<figure id="attachment_4177" aria-describedby="caption-attachment-4177" style="width: 775px" class="wp-caption aligncenter"><img fetchpriority="high" decoding="async" class="size-full wp-image-4177" src="https://blog.goreinnamah.com/wp-content/uploads/2019/11/0-iptables.png" alt="" width="775" height="631" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/11/0-iptables.png 775w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/0-iptables-300x244.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/0-iptables-768x625.png 768w" sizes="(max-width: 775px) 100vw, 775px" /><figcaption id="caption-attachment-4177" class="wp-caption-text">konfigurasi iptables</figcaption></figure>
<p style="text-align: justify;">Agar <em>iptables</em> tersebut berjalan secara otomatis pada saat kita merestart server, maka kita perlu menambahkannya ke dalam <strong>rc.local</strong>. Caranya:</p>
<pre><strong>sudo vi /etc/rc.local</strong></pre>
<p style="text-align: justify;">kemudian masukkan perintah berikut sebelum <strong>exit 0</strong>:</p>
<pre><strong>iptables-restore &lt; /etc/iptables.rules
</strong></pre>
<figure id="attachment_1444" class="wp-caption aligncenter" style="text-align: justify;" aria-describedby="caption-attachment-1444"><figcaption id="caption-attachment-1444" class="wp-caption-text">
<figure id="attachment_4178" aria-describedby="caption-attachment-4178" style="width: 576px" class="wp-caption aligncenter"><img decoding="async" class="size-full wp-image-4178" src="https://blog.goreinnamah.com/wp-content/uploads/2019/11/0-1-iptables-restore.png" alt="" width="576" height="247" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/11/0-1-iptables-restore.png 576w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/0-1-iptables-restore-300x129.png 300w" sizes="(max-width: 576px) 100vw, 576px" /><figcaption id="caption-attachment-4178" class="wp-caption-text">Menambahkan iptables rules ke dalam rc.local</figcaption></figure>
</figcaption></figure>
<p style="text-align: justify;"><em>Restart</em> Server dan iptables tersebut otomatis akan aktif.</p>
<h3 style="text-align: justify;"><strong>Instalasi Beberapa Paket</strong></h3>
<p style="text-align: justify;">Seperti namanya <strong>EJBCA (Enterprise Java Bean Certification Authority)</strong>, maka kita membutuhkan java agar software ini dapat berjalan. Versi OpenJDK yang harus diinstal adalah versi 8. Cara memasangnya:</p>
<pre><strong>sudo apt-get install openjdk-8-jdk</strong></pre>
<figure id="attachment_4180" aria-describedby="caption-attachment-4180" style="width: 616px" class="wp-caption aligncenter"><img decoding="async" class="size-full wp-image-4180" src="https://blog.goreinnamah.com/wp-content/uploads/2019/11/1-java-version.png" alt="" width="616" height="210" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/11/1-java-version.png 616w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/1-java-version-300x102.png 300w" sizes="(max-width: 616px) 100vw, 616px" /><figcaption id="caption-attachment-4180" class="wp-caption-text">instalasi openjdk-8</figcaption></figure>
<p style="text-align: justify;">Usai menyelesaikan instalasi <strong>openjdk-8</strong>, kita akan sedikit me-<em>replace</em> beberapa file yang ada di <strong>/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/security. </strong>2 file yang harus di <em>replace </em>adalah <strong>local_policy.jar </strong>dan <strong>US_export_policy.jar.</strong></p>
<p style="text-align: justify;">Bagaimana cara me-<em>replace-</em>nya?</p>
<ol style="text-align: justify;">
<li>Download JCE pada link yang sudah saya sertakan di atas.</li>
<li>Setelah berhasil di download, ekstrak file tersebut dan kamu akan menemukan sebuah folder bernama <strong>jce_policy-8. </strong>Cara ekstraknya adalah seperti berikut:
<pre><b>cd /home/user/Downloads
unzip jce_policy-8.zip</b></pre>
<p><figure id="attachment_4197" aria-describedby="caption-attachment-4197" style="width: 748px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4197" src="https://blog.goreinnamah.com/wp-content/uploads/2019/11/16-JCE-Policy.png" alt="" width="748" height="155" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/11/16-JCE-Policy.png 748w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/16-JCE-Policy-300x62.png 300w" sizes="auto, (max-width: 748px) 100vw, 748px" /><figcaption id="caption-attachment-4197" class="wp-caption-text">unzip JCE Policy</figcaption></figure></li>
<li>Setelah berhasil di ekstrak, copy-kan 2 file yang sudah saya sebutkan di atas ke dalam folder <strong>/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/security. </strong>Caranya:
<pre><strong>cp jce_policy-8/UnlimitedJCEPolicyJDK8/local_policy.jar</strong> <strong>/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/security
cp jce_policy-8/UnlimitedJCEPolicyJDK8/US_export_policy.jar /usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/security
</strong></pre>
<p><figure id="attachment_4198" aria-describedby="caption-attachment-4198" style="width: 1011px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4198" src="https://blog.goreinnamah.com/wp-content/uploads/2019/11/17-copy-JCE.png" alt="" width="1011" height="51" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/11/17-copy-JCE.png 1011w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/17-copy-JCE-300x15.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/17-copy-JCE-768x39.png 768w" sizes="auto, (max-width: 1011px) 100vw, 1011px" /><figcaption id="caption-attachment-4198" class="wp-caption-text">Proses copy</figcaption></figure></li>
</ol>
<p style="text-align: justify;">Berikutnya kita akan memasang beberapa paket tambahan yaitu <strong>ant, ant-optional,</strong> dan <strong>unzip</strong>. Caranya:</p>
<pre><strong>sudo apt-get install ant ant-optional unzip</strong></pre>
<figure id="attachment_4181" aria-describedby="caption-attachment-4181" style="width: 509px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4181" src="https://blog.goreinnamah.com/wp-content/uploads/2019/11/2-ant-unzip.png" alt="" width="509" height="155" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/11/2-ant-unzip.png 509w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/2-ant-unzip-300x91.png 300w" sizes="auto, (max-width: 509px) 100vw, 509px" /><figcaption id="caption-attachment-4181" class="wp-caption-text">instalasi paket tambahan</figcaption></figure>
<p style="text-align: justify;">Setelah melakukan instalasi openjdk-8 dan beberapa paket lainnya, ada baiknya memeriksa versi java terlebih dahulu apakah sudah sesuai dengan yang kita inginkan atau belum. Caranya:</p>
<pre><strong>java -version</strong></pre>
<figure id="attachment_1449" class="wp-caption aligncenter" style="text-align: justify;" aria-describedby="caption-attachment-1449"><img loading="lazy" decoding="async" class="size-full wp-image-1449" src="https://blog.goreinnamah.com/wp-content/uploads/2017/10/7.png" sizes="auto, (max-width: 771px) 100vw, 771px" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/10/7.png 771w, https://blog.goreinnamah.com/wp-content/uploads/2017/10/7-300x28.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/10/7-768x73.png 768w" alt="" width="771" height="73" /><figcaption id="caption-attachment-1449" class="wp-caption-text">Cara memeriksa versi java yang terpasang</figcaption></figure>
<p style="text-align: justify;">Dari hasil di atas didapatkan kalau versi yang terinstal adalah versi 8.</p>
<h3 style="text-align: justify;"><strong>Instalasi dan Konfigurasi MariaDB</strong></h3>
<p style="text-align: justify;">Tahap selanjutnya adalah melakukan instalasi <em>database</em> kemudian mengonfigurasinya. Konfigurasi yang saya lakukan disini hanyalah konfigurasi biasa, tanpa <em>Security </em>yang cukup baik (hanya untuk keperluan percobaan).</p>
<p style="text-align: justify;">Untuk kalian yang ingin mengimplementasikannya di production, pastikan mengamankan direktori mysql dan meng-<em>update </em> <strong>/etc/mysql/my.cnf</strong> sebelum menjalankan <em>service database</em>. Konfigurasi ini juga menggunakan utf-8 encoding. Mari kita mulai instalasinya terlebih dahulu:</p>
<p style="text-align: justify;">Untuk melakukan instalasi mariaDB 10.4 (stable) pada Ubuntu Server 18.04. Tambahkan dulu repositorinya dengan cara:</p>
<pre><strong>sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://mirrors.n-ix.net/mariadb/repo/10.4/ubuntu bionic main'
</strong></pre>
<figure id="attachment_4185" aria-describedby="caption-attachment-4185" style="width: 1180px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4185" src="https://blog.goreinnamah.com/wp-content/uploads/2019/11/3-mariadb-repo.png" alt="" width="1180" height="518" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/11/3-mariadb-repo.png 1180w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/3-mariadb-repo-300x132.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/3-mariadb-repo-1024x450.png 1024w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/3-mariadb-repo-768x337.png 768w" sizes="auto, (max-width: 1180px) 100vw, 1180px" /><figcaption id="caption-attachment-4185" class="wp-caption-text">Penambahan repository MariaDB 10.4</figcaption></figure>
<p style="text-align: justify;">Sesudah itu, <em>update</em> paket ubuntu dan install MariaDB 10.4 Server. Caranya:</p>
<pre><strong>sudo apt-get update
sudo apt-get install mariadb-server
sudo mysql_secure_installation</strong></pre>
<figure id="attachment_4186" aria-describedby="caption-attachment-4186" style="width: 1842px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-4186" src="https://blog.goreinnamah.com/wp-content/uploads/2019/11/4-installing-mariadb-server.png" alt="" width="1842" height="332" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/11/4-installing-mariadb-server.png 1842w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/4-installing-mariadb-server-300x54.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/4-installing-mariadb-server-1024x185.png 1024w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/4-installing-mariadb-server-768x138.png 768w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/4-installing-mariadb-server-1536x277.png 1536w" sizes="auto, (max-width: 1842px) 100vw, 1842px" /><figcaption id="caption-attachment-4186" class="wp-caption-text">Instalasi MariaDB Server</figcaption></figure>
<figure id="attachment_4187" aria-describedby="caption-attachment-4187" style="width: 660px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4187" src="https://blog.goreinnamah.com/wp-content/uploads/2019/11/5-secure-installation.png" alt="" width="660" height="1014" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/11/5-secure-installation.png 660w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/5-secure-installation-195x300.png 195w" sizes="auto, (max-width: 660px) 100vw, 660px" /><figcaption id="caption-attachment-4187" class="wp-caption-text">secure installation</figcaption></figure>
<p style="text-align: justify;">Setelah MariaDB selesai terinstal, tahap selanjutnya adalah mengubah beberapa konfigurasi yang ada pada <em>my.cnf.</em> Salah satunya adalah menambahkan <em>binlog_format=row. </em>Kalau menggunakan MariaDB, kemungkinan servicenya menolak untuk berjalan karena InnoDB tidak bisa memproses log binary-nya. Tambahkan <em>binlog_format=row </em>seperti konfigurasi di bawah untuk memecahkan masalah tersebut. Tambahkan juga beberapa item lain yang belum ada di <em>my.cnf  </em>kalian ya.</p>
<pre><strong>sudo vi /etc/mysql/my.cnf</strong></pre>
<pre><strong>
[client]
 port                    = 3306
 socket                  = /var/run/mysqld/mysqld.sock
 default-character-set   = utf8

[mysqld]
 user                    = mysql
 socket                  = /var/run/mysqld/mysqld.sock
 port                    = 3306
 basedir                 = /usr
 datadir                 = /var/lib/mysql
 tmpdir                  = /tmp
 lc_messages_dir         = /usr/share/mysql
 lc_messages             = en_US
 skip-external-locking

#UTF-8
 character-set-server    = utf8
 collation-server        = utf8_unicode_ci
 init-connect            = 'SET NAMES utf8'

bind-address             = 127.0.0.1
#Binary Logging
 log_bin                 = /var/log/mysql/mariadb-bin
 log_bin_index           = /var/log/mysql/mariadb-bin.index
 binlog_format           = ROW
 expire_logs_days        = 10
 max_binlog_size         = 100M
 server-id               = 1
 slow_query_log_file     = /var/log/mysql/mariadb-slow.log
 long_query_time         = 10
</strong></pre>
<p style="text-align: justify;">Kalau sudah beres, jangan lupa untuk mengubah kepemilikan my.cnf tersebut menjadi milik mysql. caranya:</p>
<pre><strong>sudo chown mysql:mysql /etc/mysql/my.cnf</strong></pre>
<figure id="attachment_4188" aria-describedby="caption-attachment-4188" style="width: 500px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4188" src="https://blog.goreinnamah.com/wp-content/uploads/2019/11/6-mysql-owner-conf.png" alt="" width="500" height="36" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/11/6-mysql-owner-conf.png 500w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/6-mysql-owner-conf-300x22.png 300w" sizes="auto, (max-width: 500px) 100vw, 500px" /><figcaption id="caption-attachment-4188" class="wp-caption-text">Mengganti kepemilikan</figcaption></figure>
<p style="text-align: justify;">Pada konfigurasi <em>my.cnf </em>di atas, kita memasukkan lokasi untuk meletakkan <strong>log</strong>. Guna mengamankan log tersebut (karena log tersebut mengandung data sertifikat kita), maka kita harus mengatur izin yang terbatas soal siapa yang bisa mengaksesnya. Caranya:</p>
<pre><strong>chown -R mysql:mysql /var/log/mysql
chmod -R 750 /var/log/mysql/</strong></pre>
<figure id="attachment_4189" aria-describedby="caption-attachment-4189" style="width: 554px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4189" src="https://blog.goreinnamah.com/wp-content/uploads/2019/11/7-mysql-log.png" alt="" width="554" height="183" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/11/7-mysql-log.png 554w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/7-mysql-log-300x99.png 300w" sizes="auto, (max-width: 554px) 100vw, 554px" /><figcaption id="caption-attachment-4189" class="wp-caption-text">log mysql</figcaption></figure>
<p style="text-align: justify;">Setelah MariaDB terpasang dan konfigurasinya selesai dilakukan, tahap berikutnya adalah membuat <em>database</em> untuk EJBCA 6.15.2.1 dan juga sebuah user untuk mengakses <em>database</em> EJBCA 6.15.2.1 tersebut (jangan menggunakan user root untuk EJBCA 6.15.2.1 dalam mengakses <em>database</em>-nya). Caranya:</p>
<pre><strong>mysql -u root -p
create database &lt;nama_db&gt;;
grant all privileges on &lt;nama_db&gt;.* to '&lt;user&gt;'@'&lt;ip&gt;' identified by '&lt;password&gt;';
flush privileges;
exit</strong></pre>
<figure id="attachment_4190" aria-describedby="caption-attachment-4190" style="width: 950px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4190" src="https://blog.goreinnamah.com/wp-content/uploads/2019/11/8.png" alt="" width="950" height="360" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/11/8.png 950w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/8-300x114.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/8-768x291.png 768w" sizes="auto, (max-width: 950px) 100vw, 950px" /><figcaption id="caption-attachment-4190" class="wp-caption-text">Membuat database untuk EJBCA 6.15.2.1 dan user untuk mengaksesnya</figcaption></figure>
<p style="text-align: justify;">Jika sudah, lakukan verifikasi dengan cara <em>login</em> dengan menggunakan <em>user</em> yang baru saja dibuat tadi dan test aksesnya. Caranya:</p>
<pre><strong>mysql -u &lt;user_db&gt; -p</strong>
<strong>use &lt;db_ejbca&gt;;</strong>
<strong>show grants for '&lt;user_db&gt;@'&lt;ip&gt;';</strong>
<strong>exit</strong></pre>
<figure id="attachment_4191" aria-describedby="caption-attachment-4191" style="width: 975px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4191" src="https://blog.goreinnamah.com/wp-content/uploads/2019/11/9.png" alt="" width="975" height="424" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/11/9.png 975w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/9-300x130.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/9-768x334.png 768w" sizes="auto, (max-width: 975px) 100vw, 975px" /><figcaption id="caption-attachment-4191" class="wp-caption-text">Menguji user yang baru saja dibuat</figcaption></figure>
<p style="text-align: justify;">Pada bagian akhir, <em>restart</em> <em>service database</em> tersebut dengan perintah:</p>
<pre><strong>sudo service mysql restart</strong></pre>
<figure id="attachment_1461" class="wp-caption aligncenter" style="text-align: justify;" aria-describedby="caption-attachment-1461">
<p><figure id="attachment_4192" aria-describedby="caption-attachment-4192" style="width: 1862px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4192" src="https://blog.goreinnamah.com/wp-content/uploads/2019/11/10-restart-mysql.png" alt="" width="1862" height="505" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/11/10-restart-mysql.png 1862w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/10-restart-mysql-300x81.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/10-restart-mysql-1024x278.png 1024w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/10-restart-mysql-768x208.png 768w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/10-restart-mysql-1536x417.png 1536w" sizes="auto, (max-width: 1862px) 100vw, 1862px" /><figcaption id="caption-attachment-4192" class="wp-caption-text">restarting MariaDB Service</figcaption></figure></figure>
<h3 style="text-align: justify;"><strong>Instalasi dan Konfigurasi </strong><strong>Wildfly</strong></h3>
<p style="text-align: justify;">Untuk instalasi dan konfigurasi Wildfly, silakan buka <em>link </em><a href="https://blog.goreinnamah.com/blog/2019/05/14/script-wildfly/"><strong>INI</strong></a>.</p>
<p style="text-align: justify;">Ketika sudah selesai melakukan instalasi Wildfly dengan menggunakan <em>script, </em>sekarang saatnya untuk melakukan sedikit konfigurasi. Yang akan diatur pertama adalah <strong>JAVA_HOME</strong> dan <strong>JAVA_OPTS</strong>.</p>
<p style="text-align: justify;">Ubah kedua parameter tersebut dengan cara:</p>
<pre><strong>vi /opt/wildfly/bin/standalone.conf</strong></pre>
<pre><strong>JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
JAVA_OPTS="-Xms2048m -Xmx2048m -Djava.net.preferIPv4Stack=true"</strong></pre>
<figure id="attachment_4194" aria-describedby="caption-attachment-4194" style="width: 601px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4194" src="https://blog.goreinnamah.com/wp-content/uploads/2019/11/15-java-home.png" alt="" width="601" height="88" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/11/15-java-home.png 601w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/15-java-home-300x44.png 300w" sizes="auto, (max-width: 601px) 100vw, 601px" /><figcaption id="caption-attachment-4194" class="wp-caption-text">Mengubah direktori JAVA_HOME</figcaption></figure>
<p style="text-align: justify;">Jika sudah, berikutnya adalah menambahkan <em>database driver </em>ke dalam Wildfly. Caranya adalah dengan meng-<em>copy file driver </em>MariaDB (yang bisa kalian unduh pada <em>link </em>di atas) ke dalam salah satu direktori wildfly. Tahapannya:</p>
<pre><strong>cp mariadb-java-client-2.1.0.jar /opt/wildfly/standalone/deployments/mariadb-java-client.jar
ls</strong></pre>
<figure id="attachment_4196" aria-describedby="caption-attachment-4196" style="width: 920px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4196" src="https://blog.goreinnamah.com/wp-content/uploads/2019/11/18-deployed-maria-jar.png" alt="" width="920" height="71" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/11/18-deployed-maria-jar.png 920w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/18-deployed-maria-jar-300x23.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/18-deployed-maria-jar-768x59.png 768w" sizes="auto, (max-width: 920px) 100vw, 920px" /><figcaption id="caption-attachment-4196" class="wp-caption-text">Meng-copy mariadb-java-client</figcaption></figure>
<p style="text-align: justify;">tambahkan juga beberapa konfigurasi berikut pada <strong><em>bashrc. </em></strong>Caranya:</p>
<pre><strong>vi /home/$nama_user/.bashrc</strong></pre>
<pre><strong>export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/
</strong><strong>export PATH=$JAVA_HOME/bin:$PATH
</strong><strong>export JBOSS_HOME=/opt/wildfly
</strong><strong>export PATH=$PATH:$JBOSS_HOME/bin:$PATH
</strong><strong>export APPSRV_HOME=/opt/wildfly
</strong><strong>export PATH=$JBOSS_HOME/bin:$PATH
</strong><strong>export EJBCA_HOME=/opt/ejbca
</strong><strong>export PATH=$EJBCA_HOME/bin:$PATH
</strong><strong>export CLASSPATH=$JAVA_HOME/jre/lib/ext:$CLASSPATH</strong></pre>
<figure id="attachment_4195" aria-describedby="caption-attachment-4195" style="width: 465px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4195" src="https://blog.goreinnamah.com/wp-content/uploads/2019/11/14-bashrc.png" alt="" width="465" height="191" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/11/14-bashrc.png 465w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/14-bashrc-300x123.png 300w" sizes="auto, (max-width: 465px) 100vw, 465px" /><figcaption id="caption-attachment-4195" class="wp-caption-text">tambahan pada bashrc</figcaption></figure>
<p style="text-align: justify;">Jika sudah selesai, <em>restart service wildfly </em>dan pastikan <em>service-</em>nya berjalan dengan normal. Caranya:</p>
<pre><strong>sudo service widlfly restart</strong>
<strong>sudo service wildfly status</strong></pre>
<figure id="attachment_4199" aria-describedby="caption-attachment-4199" style="width: 1154px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4199" src="https://blog.goreinnamah.com/wp-content/uploads/2019/11/12-wildfly-restart.png" alt="" width="1154" height="235" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/11/12-wildfly-restart.png 1154w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/12-wildfly-restart-300x61.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/12-wildfly-restart-1024x209.png 1024w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/12-wildfly-restart-768x156.png 768w" sizes="auto, (max-width: 1154px) 100vw, 1154px" /><figcaption id="caption-attachment-4199" class="wp-caption-text">restarting wildfly</figcaption></figure>
<h3 style="text-align: justify;"><strong>Konfigurasi User Admin untuk Wildfly Web</strong></h3>
<p style="text-align: justify;">Jika kita mengakses <strong>console Wildfly via web</strong> pada tahap ini melalui <strong>http://&lt;ip atau domain&gt;:9990 </strong>maka yang tampil adalah seperti berikut:</p>
<figure id="attachment_2318" class="wp-caption aligncenter" style="text-align: justify;" aria-describedby="caption-attachment-2318"><img loading="lazy" decoding="async" class="size-full wp-image-2318" src="https://blog.goreinnamah.com/wp-content/uploads/2018/03/3-2.png" sizes="auto, (max-width: 1243px) 100vw, 1243px" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/3-2.png 1243w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/3-2-300x238.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/3-2-768x610.png 768w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/3-2-1024x814.png 1024w" alt="" width="1243" height="988" /><figcaption id="caption-attachment-2318" class="wp-caption-text">Jboss console via web tapi masih belum memiliki admin</figcaption></figure>
<p style="text-align: justify;">Hal itu disebabkan oleh belum adanya <strong>Admin User</strong> yang dibuat untuk mengakses console tersebut. Untuk itu kita perlu membuatnya. Caranya:</p>
<pre><strong>cd /opt/wildfly/bin
sh add-user.sh</strong></pre>
<p style="text-align: justify;">Maka akan muncul pertanyaan seperti berikut:</p>
<pre><strong>What type of user do you wish to add?</strong>
<strong> a) Management User (mgmt-users.properties)</strong>
<strong> b) Application User (application-users.properties)</strong>
<strong>(a):</strong>

<strong>Enter the details of the new user to add.</strong>
<strong>Using realm 'ManagementRealm' as discovered from the existing property files.</strong>
<strong>Username : xxxx</strong>
<strong>Password recommendations are listed below. To modify these restrictions edit the add-user.properties configuration file.</strong>
<strong> - The password should be different from the username</strong>
<strong> - The password should not be one of the following restricted values {root, admin, administrator}</strong>
<strong> - The password should contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), 1 non-alphanumeric symbol(s)</strong>
<strong>Password :</strong>
<strong>WFLYDM0101: Password should have at least 1 digit.</strong>
<strong>Are you sure you want to use the password entered yes/no? yes</strong>
<strong>Re-enter Password :</strong>
<strong>What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[ ]:</strong>
<strong>About to add user 'jadmin' for realm 'ManagementRealm'</strong>
<strong>Is this correct yes/no? yes</strong>
<strong>Added user 'xxxx' to file '/opt/wildfly-10.0.0.Final/standalone/configuration/mgmt-users.properties'</strong>
<strong>Added user 'xxxx' to file '/opt/wildfly-10.0.0.Final/domain/configuration/mgmt-users.properties'</strong>
<strong>Added user 'xxxx' with groups to file '/opt/wildfly-10.0.0.Final/standalone/configuration/mgmt-groups.properties'</strong>
<strong>Added user 'xxxx' with groups to file '/opt/wildfly-10.0.0.Final/domain/configuration/mgmt-groups.properties'</strong>
<strong>Is this new user going to be used for one AS process to connect to another AS process?</strong>
<strong>e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.</strong>
<strong>yes/no? no</strong></pre>
<ul style="text-align: justify;">
<li>“What type of user do you wish to add?”<b> → </b>isi dengan “a”</li>
<li>“Realm” <b>→</b> enter saja.</li>
<li>“username” <b>→</b> Isi dengan username yang kalian mau.</li>
<li>“Password” <b>→</b> Isi dengan password yang kalian mau.</li>
<li>“Re-Enter Password” <b>→</b> Ulangi kembali dengan password yang sama.</li>
<li>“is this correct” <b>→</b> pilih “yes”</li>
<li>“is this new user going to …..” <b>→</b> pilih “no”</li>
</ul>
<p style="text-align: justify;">Pada saat ini seharusnya kita sudah bisa mengakses interface dari <strong>Wildfly Web Console</strong> dan mengganti beberapa item. Namun pada saat ini, kita belum perlu untuk mengganti apapun:</p>
<ul style="text-align: justify;">
<li>Ini adalah user spesifik untuk JBoss yang tidak digunakan dimanapun.</li>
<li>Ini adalah tahapan yang bagus untuk mengambil snapshot vm.</li>
</ul>
<p style="text-align: justify;">Sekarang mari kita coba user tersebut. caranya masuk ke browser dan ketikkan <strong>http://&lt;ip atau domain&gt;:9990/console/App.html. </strong>Maka akan muncul tampilan seperti berikut:</p>
<figure id="attachment_2319" class="wp-caption aligncenter" style="text-align: justify;" aria-describedby="caption-attachment-2319"><img loading="lazy" decoding="async" class="size-full wp-image-2319" src="https://blog.goreinnamah.com/wp-content/uploads/2018/03/4-2.png" sizes="auto, (max-width: 894px) 100vw, 894px" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/4-2.png 894w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/4-2-300x95.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/4-2-768x244.png 768w" alt="" width="894" height="284" /><figcaption id="caption-attachment-2319" class="wp-caption-text">Wildfly web console</figcaption></figure>
<p style="text-align: justify;">Masukkan username dan password sesuai dengan yang baru saja kita input. Apabila benar maka akan muncul tampilan seperti berikut:</p>
<figure id="attachment_2320" class="wp-caption aligncenter" style="text-align: justify;" aria-describedby="caption-attachment-2320"><img loading="lazy" decoding="async" class="size-full wp-image-2320" src="https://blog.goreinnamah.com/wp-content/uploads/2018/03/5-2.png" sizes="auto, (max-width: 1446px) 100vw, 1446px" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/5-2.png 1446w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/5-2-300x178.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/5-2-768x455.png 768w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/5-2-1024x606.png 1024w" alt="" width="1446" height="856" /><figcaption id="caption-attachment-2320" class="wp-caption-text">Wildfly web login</figcaption></figure>
<h3 style="text-align: justify;"><strong>Menambahkan Data Source</strong></h3>
<p style="text-align: justify;">Sekarang <em>service</em> Wildfly sudah berjalan, kini kita bisa menambahkan <em>data source</em>. Kita akan melakukan ini melalui CLI-nya JBoss, yang akan mengupdate konfigurasi yang berada pada file <strong>Standalone.xml</strong>. Sebelum melakukan perubahan maka ada baiknya kita membackup konfigurasi awal terlebih dahulu. Caranya (masih dengan user jboss):</p>
<pre><strong>cd /opt/wildfly/standalone/configuration
cp standalone.xml standalone.xml.bak</strong></pre>
<p style="text-align: justify;">Sekarang kita akan menuju JBoss CLI dan melakukan beberapa perubahan. Caranya:</p>
<pre><strong>cd /opt/wildfly/bin
sh jboss-cli.sh
connect</strong></pre>
<p style="text-align: justify;">Lalu jalankan perintah berikut:</p>
<pre><strong>data-source add --name=ejbcads --driver-name="mariadb-java-client.jar" --connection-url="jdbc:mysql://127.0.0.1:3306/&lt;nama_db&gt;" --jndi-name="java:/EjbcaDS" --use-ccm=true --driver-class="org.mariadb.jdbc.Driver" --user-name="&lt;nama_user&gt;" --password="&lt;password_user&gt;" --validate-on-match=true --background-validation=false --prepared-statements-cache-size=50 --share-prepared-statements=true --min-pool-size=5 --max-pool-size=150 --pool-prefill=true --transaction-isolation=TRANSACTION_READ_COMMITTED --check-valid-connection-sql="select 1;"</strong>
<strong>:reload</strong></pre>
<p style="text-align: justify;">Setelah perintah tersebut dieksekusi maka hasil keluarannya adalah “<strong>Success</strong>” (seperti pada gambar di bawah).</p>
<figure id="attachment_4201" aria-describedby="caption-attachment-4201" style="width: 979px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4201" src="https://blog.goreinnamah.com/wp-content/uploads/2019/11/20.png" alt="" width="979" height="280" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/11/20.png 979w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/20-300x86.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/20-768x220.png 768w" sizes="auto, (max-width: 979px) 100vw, 979px" /><figcaption id="caption-attachment-4201" class="wp-caption-text">Sukses Menambahkan Data Source</figcaption></figure>
<p style="text-align: justify;">Hal yang kita lakukan pada CLI ini mendefinisikan <em>driver mariadb</em> dan koneksi yang ada pada <strong>/opt/wildfly/standalone/configuration/standalone.xml</strong>, kemudian me-reload JBoss.</p>
<p style="text-align: justify;">Hasilnya akan terlihat pada <strong>standalone.xml</strong> seperti gambar berikut:</p>
<figure id="attachment_4202" aria-describedby="caption-attachment-4202" style="width: 629px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4202" src="https://blog.goreinnamah.com/wp-content/uploads/2019/11/21.png" alt="" width="629" height="386" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/11/21.png 629w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/21-300x184.png 300w" sizes="auto, (max-width: 629px) 100vw, 629px" /><figcaption id="caption-attachment-4202" class="wp-caption-text">Perubahan pada standalone.xml</figcaption></figure>
<p style="text-align: justify;">Sebagai bukti lagi kalau <em>connector</em> tersebut sudah masuk, kita akan melihat pada log yang tertera di file <strong>server.log</strong> yang ada pada folder <strong>/opt/wildfly/standalone/log/</strong>. Namun sebelumnya kita harus me-restart service wildfly yang sedang berjalan. Caranya:</p>
<pre><strong>service wildfly restart</strong></pre>
<p style="text-align: justify;">Ketika kalian menemukan <strong>mariadb-java-client.jar, </strong>maka datasource tersebut sudah dapat dipastikan masuk.</p>
<figure id="attachment_4203" aria-describedby="caption-attachment-4203" style="width: 1504px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-4203" src="https://blog.goreinnamah.com/wp-content/uploads/2019/11/22-mariadb-jar.png" alt="" width="1504" height="63" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/11/22-mariadb-jar.png 1504w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/22-mariadb-jar-300x13.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/22-mariadb-jar-1024x43.png 1024w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/22-mariadb-jar-768x32.png 768w" sizes="auto, (max-width: 1504px) 100vw, 1504px" /><figcaption id="caption-attachment-4203" class="wp-caption-text">Sudah masuk</figcaption></figure>
<h3 style="text-align: justify;"><strong>Konfigurasi WildFly Remoting</strong></h3>
<p style="text-align: justify;">EJBCA 6.15.2.1 perlu menggunakan <strong>JBOSS Remoting</strong> untuk <strong>EJBCA CLI</strong> agar bisa bekerja. Nah, kita akan mengkonfigurasi JBOSS Remoting tersebut. Kita akan menggunakan port yang berbeda dan memulainya dengan menghapus konfigurasi yang dulu pernah ada. Caranya:</p>
<pre class="code"><strong>cd /opt/wildfly/bin
sh jboss-cli.sh 
connect</strong></pre>
<pre class="code"><strong>/subsystem=remoting/http-connector=http-remoting-connector:remove
/subsystem=remoting/http-connector=http-remoting-connector:add(connector-ref="remoting",security-realm="ApplicationRealm")
/socket-binding-group=standard-sockets/socket-binding=remoting:add(port="4447")
/subsystem=undertow/server=default-server/http-listener=remoting:add(socket-binding=remoting)
:reload</strong></pre>
<div class="subsubsection" style="text-align: justify;">
<figure id="attachment_4204" aria-describedby="caption-attachment-4204" style="width: 988px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4204" src="https://blog.goreinnamah.com/wp-content/uploads/2019/11/23-wildfly-remoting.png" alt="" width="988" height="311" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/11/23-wildfly-remoting.png 988w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/23-wildfly-remoting-300x94.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2019/11/23-wildfly-remoting-768x242.png 768w" sizes="auto, (max-width: 988px) 100vw, 988px" /><figcaption id="caption-attachment-4204" class="wp-caption-text">remoting</figcaption></figure>
<p>Tunggu sampai proses reload selesai dengan cara mengecek log yang ada pada <strong>server.log, </strong>baru kemudian lanjutkan ke proses berikutnya</p>
<h3><strong>Konfigurasi Logging</strong></h3>
<p>Untuk mengkonfigurasi <em>log </em>yang ada pada Wildfly, Kita harus bisa mengganti log secara dinamis. Pada contoh ini <strong>DEBUG </strong>akan diaktifkan</p>
</div>
<pre class="code"><strong>cd /opt/wildfly/bin
sh jboss-cli.sh 
connect</strong></pre>
<pre class="code"><strong>/subsystem=logging/logger=org.ejbca:add
/subsystem=logging/logger=org.ejbca:write-attribute(name=level, value=DEBUG)
/subsystem=logging/logger=org.cesecore:add
/subsystem=logging/logger=org.cesecore:write-attribute(name=level, value=DEBUG)</strong></pre>
<figure id="attachment_4207" aria-describedby="caption-attachment-4207" style="width: 888px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4207" src="https://blog.goreinnamah.com/wp-content/uploads/2019/12/24-konfigurasi-logging.png" alt="" width="888" height="211" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/12/24-konfigurasi-logging.png 888w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/24-konfigurasi-logging-300x71.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/24-konfigurasi-logging-768x182.png 768w" sizes="auto, (max-width: 888px) 100vw, 888px" /><figcaption id="caption-attachment-4207" class="wp-caption-text">enable debug</figcaption></figure>
<h2 style="text-align: justify;"><strong>Instalasi EJBCA 6.15.2.1</strong></h2>
<p style="text-align: justify;">Sebelum kita melanjutkan, kalian perlu tahu bahwa konfigurasi awal EJBCA 6.15.2.1 dapat dibagi kedalam beberapa bagian yaitu:</p>
<ul style="text-align: justify;">
<li>file-file <strong>.properties</strong> yang ada dalam folder <strong>/opt/ejbca/conf</strong></li>
<li>file keystore awal yang terdapat pada folder <strong>/opt/ejbca/p12</strong></li>
<li>config Wildfly di <strong>standalone.xml</strong></li>
</ul>
<p style="text-align: justify;">Kalian juga perlu tahu bahwa beberapa aturan umum untuk bekerja dengan konfigurasi EJBCA 6.15,2,1, diantaranya:</p>
<ul style="text-align: justify;">
<li>Pertama, anggap bahwa tidak akan ada konfigurasi yang berubah selama proses deploy dan hanya file <strong>ejbca.ear</strong> yang tersentuh dalam aksi kali ini.</li>
<li>Database mariaDB akan terisi secara otomatis saat pertama kali kita melakukan proses deploy, tapi sebaliknya tidak akan tersentuh oleh script <strong>ant</strong> apapun.</li>
<li>Database tidak akan menyimpan data konfigurasi apapun, tetapi akan berpengaruh jika ada perubahan pada konfigurasi yang kita buat.</li>
<li>Perintah <strong>ant.install</strong> mencoba untuk membuat file keystore setiap kali perintah tersebut dijalankan, meskipun file-file tersebut ada.</li>
<li>porsi dari <strong>standalone.xml</strong> dapat diubah baik oleh <strong>ant build</strong> atau <strong>ant install</strong>, tetapi hal tersebut hanya menanggapi perubahan yang kita buat pada file <strong>*.properties.</strong></li>
<li>Setelah instalasi awal selesai, <strong>ant</strong> tidak akan mengubah <strong>standalone.xml</strong> kecuali  kita telah mengubah sebuah file <strong>.properties</strong>.</li>
</ul>
<h3 style="text-align: justify;"><strong>File Properties pada EJBCA 6.15.2.1</strong></h3>
<p style="text-align: justify;">EJBCA 6.15.2.1 menggunakan text biasa pada file “<strong>.properties</strong>” untuk konfigurasi utamanya. File-file ini akan menjadi rujukan ketika kita meng-compile <strong>ejbca.ear</strong> dengan perintah <strong>ant</strong>, dan tidak menjadi referensi oleh aplikasi yang sedang berjalan.</p>
<ul style="text-align: justify;">
<li>file <strong>install.properties</strong> hanya digunakan ketika menjalankan perintah <strong>ant install</strong>, dan bukan saat menjalankan <strong>ant deployear.</strong></li>
<li>Beberapa file sebenarnya berisi paremeter yang menyediakan parsing <em>runtime</em> dari variabel-variabel pada file properties tersebut, tetapi fungsi ini di non-aktifkan secara default.</li>
</ul>
<p style="text-align: justify;">Pertama, EJBCA memiliki beberapa contoh dari semua file properties yang ada pada direktori <strong>/opt/ejbca/conf</strong>. Yang kita butuhkan adalah:</p>
<p style="text-align: justify;">
<table id="tablepress-18" class="tablepress tablepress-id-18">
<thead>
<tr class="row-1">
	<th class="column-1"> Properties</th><th class="column-2">Penjelasan</th>
</tr>
</thead>
<tbody class="row-striping row-hover">
<tr class="row-2">
	<td class="column-1">certstore.properties</td><td class="column-2">mendefinisikan variabel penyimpanan sertifikat</td>
</tr>
<tr class="row-3">
	<td class="column-1">cesecore.properties</td><td class="column-2">mendefinisikan variabel core security engine</td>
</tr>
<tr class="row-4">
	<td class="column-1">crlstore.properties</td><td class="column-2">mendefinisikan variabel penyimpanan CRL</td>
</tr>
<tr class="row-5">
	<td class="column-1">database.properties</td><td class="column-2">mendefinisikan bagaimana EJBCA akan mengakses database<br />
</td>
</tr>
<tr class="row-6">
	<td class="column-1">ejbca.properties</td><td class="column-2">mendefinisikan variabel basic untuk EJBCA itu sendiri</td>
</tr>
<tr class="row-7">
	<td class="column-1">install.properties</td><td class="column-2">digunakan oleh "ant install" selama instalasi</td>
</tr>
<tr class="row-8">
	<td class="column-1">mail.properties</td><td class="column-2">mendefinisikan bagaiman EJBCA SMTP connector akan berfungsi</td>
</tr>
<tr class="row-9">
	<td class="column-1">ocsp.properties</td><td class="column-2">mendefinisikan bagaimana OCSP itu akan bekerja</td>
</tr>
<tr class="row-10">
	<td class="column-1">va.properties</td><td class="column-2">mendefinisikan bagaimana validation authority akan bekerja</td>
</tr>
<tr class="row-11">
	<td class="column-1">va-publisher.properties</td><td class="column-2">mendefinisikan bagaimana validation authority akan mengakses database</td>
</tr>
<tr class="row-12">
	<td class="column-1">web.properties</td><td class="column-2">mendefinisikan variabel untuk web interface EJBCA</td>
</tr>
<tr class="row-13">
	<td class="column-1">externalra.properties</td><td class="column-2">Mendefinisikan variabel untuk mengaktifkan ra yang berdiri sendiri (di luar EJBCA)</td>
</tr>
<tr class="row-14">
	<td class="column-1">externalra-gui.properties</td><td class="column-2">Mendefinisikan variabel untuk mengaktikan RA Eksternal dengan GUI</td>
</tr>
</tbody>
</table>
<!-- #tablepress-18 from cache --></p>
<p style="text-align: justify;">Ada beberapa file <strong>jndi.*</strong> dalam folder conf tersebut. Mereka dibutuhkan, namun tidak akan diotak-atik lebih jauh, dan bisa diabaikan saja. Ada juga 2 folder lainnya yaitu <strong>logdevices</strong> dan <strong>plugins</strong>, yang bisa diabaikan juga.</p>
<p style="text-align: justify;">Pertama, kita akan membuat direktori baru yang disebut <strong>/opt/ejbca/conf/sample</strong> dan memindahkan semua file <strong>.sample</strong> ke dalam folder tersebut untuk tujuan backup. Caranya:</p>
<pre><strong>cd /opt/ejbca/conf
</strong><strong>mkdir sample
</strong><strong>mv *.sample sample/</strong></pre>
<p style="text-align: justify;">Lalu kemudian kita akan meng-copy beberapa file yang dibutuhkan ke direktori utamanya. Caranya:</p>
<pre><strong>cp sample/certstore.properties.sample certstore.properties
</strong><strong>cp sample/cesecore.properties.sample cesecore.properties</strong>
<strong>cp sample/crlstore.properties.sample crlstore.properties</strong>
<strong>cp sample/database.properties.sample database.properties</strong>
<strong>cp sample/ejbca.properties.sample ejbca.properties</strong>
<strong>cp sample/install.properties.sample install.properties
</strong><strong>cp sample/ocsp.properties.sample ocsp.properties</strong>
<strong>cp sample/mail.properties.sample mail.properties</strong>
<strong>cp sample/web.properties.sample web.properties
</strong></pre>
<figure id="attachment_4212" aria-describedby="caption-attachment-4212" style="width: 780px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4212" src="https://blog.goreinnamah.com/wp-content/uploads/2019/12/28-properties-ejbca.png" alt="" width="780" height="256" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/12/28-properties-ejbca.png 780w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/28-properties-ejbca-300x98.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/28-properties-ejbca-768x252.png 768w" sizes="auto, (max-width: 780px) 100vw, 780px" /><figcaption id="caption-attachment-4212" class="wp-caption-text">properties ejbca</figcaption></figure>
<p style="text-align: justify;">Kita akan mengkonfigurasi file-file ini kemudian menguji coba instalasinya sebelum melakukan tindakan. Dengan hanya file di atas tersebut maka EJBCA 6.15.2.1 akan beroperasi tanpa <strong>Validation Authority</strong>.</p>
<p style="text-align: justify;">Mari kita mulai:</p>
<h3 style="text-align: justify;"><span style="color: #00ffff;"><strong>certstore.properties</strong></span></h3>
<p style="text-align: justify;"><strong>### Start certstore.properties ###</strong></p>
<p style="text-align: justify;"><strong># ———— RFC 4387 Certificate store configuration ———————</strong><br />
<span style="color: #ff0000;"><strong>certstore.enabled=true</strong></span></p>
<p style="text-align: justify;"><strong># This is the web directory that the web interface for the cert store will use. </strong></p>
<p style="text-align: justify;"><strong># This is an unused alternate location</strong><br />
<span style="color: #ff0000;"><strong>certstore.contextroot=/ejbca/publicweb/certificates</strong></span></p>
<h4 style="text-align: justify;"><b>### End certstore.properties ###</b></h4>
<figure id="attachment_4215" aria-describedby="caption-attachment-4215" style="width: 580px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4215" src="https://blog.goreinnamah.com/wp-content/uploads/2019/12/29-certstore-properties.png" alt="" width="580" height="125" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/12/29-certstore-properties.png 580w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/29-certstore-properties-300x65.png 300w" sizes="auto, (max-width: 580px) 100vw, 580px" /><figcaption id="caption-attachment-4215" class="wp-caption-text">certstore.properties</figcaption></figure>
<h3 style="text-align: justify;"><span style="color: #00ffff;"><strong>cesecore.properties</strong></span></h3>
<p style="text-align: justify;"><strong>### Start cesecore.properties ###</strong></p>
<p style="text-align: justify;"><span style="color: #ff0000;"><strong>allow.external-dynamic.configuration=true</strong></span></p>
<p style="text-align: justify;"><strong><span style="color: #ff0000;">ca.keystorepass=!secret!</span> #ganti dengan yang kamu inginkan</strong></p>
<p style="text-align: justify;"><strong>#ca.rngalgorithm=SHA1PRNG</strong><br />
<span style="color: #ff0000;"><strong>ca.serialnumberoctetsize=8</strong></span></p>
<p style="text-align: justify;"><span style="color: #ff0000;"><strong>ca.toolateexpiredate=80000000<br />
</strong><strong>certificate.validityoffset=-10m</strong></span><br />
<strong>#ca.toolateexpiredate=2038-01-19 03:14:08+00:00</strong></p>
<p style="text-align: justify;"><strong>#ca.doPermitExtractablePrivateKeys=true</strong></p>
<p style="text-align: justify;"><span style="color: #ff0000;"><strong>ca.serialnumberoctetsize=20</strong></span></p>
<p style="text-align: justify;"><strong>#forbidden.characters = \n\r;!\u0000%`?$~</strong><br />
<strong>#intresources.preferredlanguage=EN</strong><br />
<strong>#intresources.secondarylanguage=SE</strong></p>
<p style="text-align: justify;"><strong>#These variables will enable explicit logging. You can turn them off later</strong><br />
<span style="color: #ff0000;"><strong>securityeventsaudit.implementation.X=org.cesecore.audit.impl.log4j.Log4jDevice</strong></span><br />
<span style="color: #ff0000;"><strong>securityeventsaudit.implementation.X=org.cesecore.audit.impl.integrityprotected.IntegrityProtectedDevice</strong></span></p>
<p style="text-align: justify;"><strong>#securityeventsaudit.implementation.0=null</strong><br />
<strong>#securityeventsaudit.implementation.1=null</strong></p>
<p style="text-align: justify;"><strong>#securityeventsaudit.exporter.X=org.cesecore.audit.impl.AuditExporterDummy (default)</strong><br />
<strong>#securityeventsaudit.exporter.X=org.cesecore.audit.impl.AuditExportCsv</strong><br />
<strong>#securityeventsaudit.exporter.X=org.cesecore.audit.impl.AuditExporterXml</strong><br />
<strong>#securityeventsaudit.deviceproperty.X.key.subkey=value</strong></p>
<p style="text-align: justify;"><strong># More log config below </strong><br />
<strong><span style="color: #ff0000;">securityeventsaudit.implementation.0=org.cesecore.audit.impl.log4j.Log4jDevice</span></strong><br />
<span style="color: #ff0000;"><strong>securityeventsaudit.implementation.1=org.cesecore.audit.impl.integrityprotected.IntegrityProtectedDevice</strong></span><br />
<span style="color: #ff0000;"><strong>securityeventsaudit.exporter.1=org.cesecore.audit.impl.AuditExporterXml</strong></span></p>
<p style="text-align: justify;"><strong>#securityeventsaudit.deviceproperty.1.export.dir=/tmp/</strong><br />
<strong>#securityeventsaudit.deviceproperty.1.export.fetchsize=1000</strong><br />
<strong>#securityeventsaudit.deviceproperty.1.validate.fetchsize=1000</strong></p>
<p style="text-align: justify;"><strong>#ecdsa.implicitlyca.q=883423532389192164791648750360308885314476597252960362792450860609699839</strong><br />
<strong>#ecdsa.implicitlyca.a=7fffffffffffffffffffffff7fffffffffff8000000000007ffffffffffc</strong><br />
<strong>#ecdsa.implicitlyca.b=6b016c3bdcf18941d0d654921475ca71a9db2fb27d1d37796185c2942c0a</strong><br />
<strong>#ecdsa.implicitlyca.g=020ffa963cdca8816ccc33b8642bedf905c3d358573d3f27fbbd3b3cb9aaaf</strong><br />
<strong>#ecdsa.implicitlyca.n=883423532389192164791648750360308884807550341691627752275345424702807307</strong></p>
<h3 style="text-align: justify;"><strong>End cesecore.properties ###</strong></h3>
<figure id="attachment_4217" aria-describedby="caption-attachment-4217" style="width: 769px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4217" src="https://blog.goreinnamah.com/wp-content/uploads/2019/12/30-cesecore-serialnumber-octet.png" alt="" width="769" height="77" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/12/30-cesecore-serialnumber-octet.png 769w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/30-cesecore-serialnumber-octet-300x30.png 300w" sizes="auto, (max-width: 769px) 100vw, 769px" /><figcaption id="caption-attachment-4217" class="wp-caption-text">cesecore serialnumber octet</figcaption></figure>
<h3 style="text-align: justify;"><span style="color: #00ffff;"><strong>crlstore.properties</strong></span></h3>
<p style="text-align: justify;"><strong>### Start crlstore.properties ###</strong></p>
<p style="text-align: justify;"><strong># This is all very similar to certstore.properties</strong><br />
<strong># ———— RFC 4387 CRL store configuration ———————</strong><br />
<span style="color: #ff0000;"><strong>crlstore.enabled=true</strong></span><br />
<strong>#crlstore.contextroot=/crls</strong><br />
<span style="color: #ff0000;"><strong>crlstore.contextroot=/ejbca/publicweb/crls</strong></span></p>
<h3 style="text-align: justify;"><strong>#### End crlstore.properties ###</strong></h3>
<figure id="attachment_4218" aria-describedby="caption-attachment-4218" style="width: 555px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4218" src="https://blog.goreinnamah.com/wp-content/uploads/2019/12/31-crlstore-properties.png" alt="" width="555" height="120" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/12/31-crlstore-properties.png 555w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/31-crlstore-properties-300x65.png 300w" sizes="auto, (max-width: 555px) 100vw, 555px" /><figcaption id="caption-attachment-4218" class="wp-caption-text">crlstore properties</figcaption></figure>
<h3 style="text-align: justify;"><span style="color: #00ffff;"><strong>database.properties</strong></span></h3>
<p style="text-align: justify;"><strong>### Start database.properties ###</strong></p>
<p style="text-align: justify;"><strong># ————- Database configuration ————————</strong></p>
<p style="text-align: justify;"><strong>#This variable is used in our standalone.xml &lt;datasource&gt; stanza</strong><br />
<span style="color: #ff0000;"><strong>datasource.jndi-name=EjbcaDS</strong></span></p>
<p style="text-align: justify;"><strong># This is the TYPE of db, not the NAME OF the db</strong><br />
<span style="color: #ff0000;"><strong>database.name=mysql</strong></span></p>
<p style="text-align: justify;"><strong># Be sure to use utf-8</strong><br />
<span style="color: #ff0000;"><strong>database.url=jdbc:mysql://127.0.0.1:3306/&lt;nama_db&gt;?characterEncoding=UTF-8  </strong></span><br />
<span style="color: #ff0000;"><strong>database.driver=org.mariadb.jdbc.Driver</strong></span></p>
<p style="text-align: justify;"><strong>#username mysql yang sudah kamu buat:<br />
</strong><span style="color: #ff0000;"><strong>database.username=ejbcadbuser</strong></span></p>
<p style="text-align: justify;"><strong># password mysql yang sudah kamu buat: </strong><br />
<span style="color: #ff0000;"><strong>database.password=pumpkin</strong></span></p>
<h4 style="text-align: justify;"><strong>#### End database.properties ###</strong></h4>
<figure id="attachment_4220" aria-describedby="caption-attachment-4220" style="width: 839px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4220" src="https://blog.goreinnamah.com/wp-content/uploads/2019/12/32-DB-Properties.png" alt="" width="839" height="917" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/12/32-DB-Properties.png 839w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/32-DB-Properties-274x300.png 274w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/32-DB-Properties-768x839.png 768w" sizes="auto, (max-width: 839px) 100vw, 839px" /><figcaption id="caption-attachment-4220" class="wp-caption-text">database properties</figcaption></figure>
<h3 style="text-align: justify;"><span style="color: #00ffff;"><strong>ejbca.properties</strong></span></h3>
<p style="text-align: justify;"><strong>###Start ejbca.properties ###</strong></p>
<p style="text-align: justify;"><strong># The next two variables are very important… </strong><br />
<span style="color: #ff0000;"><strong>appserver.home=/opt/wildfly</strong></span><br />
<span style="color: #ff0000;"><strong>appserver.type=jboss</strong></span></p>
<p style="text-align: justify;"><strong># Initially, we will set this to false. Once the install is complete, we change</strong><br />
<strong># this to true.</strong><br />
<strong>#ejbca.productionmode=true</strong><br />
<span style="color: #ff0000;"><strong>ejbca.productionmode=false</strong></span></p>
<p style="text-align: justify;"><span style="color: #ff0000;"><strong>allow.external-dynamic.configuration=true</strong></span></p>
<p style="text-align: justify;"><strong># Don’t set these!</strong><br />
<strong>#ca.xkmskeystorepass=</strong><br />
<strong>#ca.cmskeystorepass=</strong></p>
<p style="text-align: justify;"><span style="color: #ff0000;"><strong>approval.defaultrequestvalidity=28800</strong></span><br />
<span style="color: #ff0000;"><strong>approval.defaultapprovalvalidity=28800</strong></span><br />
<strong>#approval.excludedClasses=org.ejbca.extra.caservice.ExtRACAServiceWorker</strong><br />
<strong>#approval.excludedClasses=org.ejbca.core.protocol.cmp.CmpMessageDispatcherSessionBean</strong><br />
<strong>#approval.excludedClasses=org.ejbca.core.protocol.cmp.RevocationMessageHandler</strong><br />
<strong>#approval.excludedClasses=</strong></p>
<p style="text-align: justify;"><span style="color: #ff0000;"><strong>healthcheck.amountfreemem=32</strong></span><br />
<span style="color: #ff0000;"><strong>healthcheck.dbquery=Select 1 From CertificateData where fingerprint=’XX’</strong></span><br />
<span style="color: #ff0000;"><strong>healthcheck.authorizedips=127.0.0.1</strong></span><br />
<span style="color: #ff0000;"><strong>healthcheck.catokensigntest=true</strong></span><br />
<span style="color: #ff0000;"><strong>healthcheck.publisherconnections=true</strong></span><br />
<strong>#healthcheck.maintenancefile=~/maintenance.properties</strong><br />
<strong>#healthcheck.maintenancepropertyname=DOWN_FOR_MAINTENANCE</strong><br />
<span style="color: #ff0000;"><strong>healthcheck.okmessage=ALLOK</strong></span><br />
<span style="color: #ff0000;"><strong>healthcheck.sendservererror=true</strong></span><br />
<strong>#healthcheck.customerrormessage=EJBCANOTOK</strong></p>
<p style="text-align: justify;"><strong># It’s important to change this to 8:</strong><br />
<span style="color: #ff0000;"><strong>ejbca.passwordlogrounds=8</strong></span></p>
<p style="text-align: justify;"><strong>#——————- CLI settings ————-</strong><br />
<span style="color: #ff0000;"><strong>ejbca.cli.defaultusername=apaaja</strong></span><br />
<span style="color: #ff0000;"><strong>ejbca.cli.defaultpassword=bebaspokoknya</strong></span></p>
<p style="text-align: justify;"><strong>### End ejbca.properties ###</strong></p>
<figure id="attachment_4221" aria-describedby="caption-attachment-4221" style="width: 1004px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4221" src="https://blog.goreinnamah.com/wp-content/uploads/2019/12/33-ejbca-prop.png" alt="" width="1004" height="809" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/12/33-ejbca-prop.png 1004w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/33-ejbca-prop-300x242.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/33-ejbca-prop-768x619.png 768w" sizes="auto, (max-width: 1004px) 100vw, 1004px" /><figcaption id="caption-attachment-4221" class="wp-caption-text">ejbca properties (1)</figcaption></figure>
<figure id="attachment_4222" aria-describedby="caption-attachment-4222" style="width: 1013px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4222" src="https://blog.goreinnamah.com/wp-content/uploads/2019/12/34-ejbca-prop-2.png" alt="" width="1013" height="860" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/12/34-ejbca-prop-2.png 1013w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/34-ejbca-prop-2-300x255.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/34-ejbca-prop-2-768x652.png 768w" sizes="auto, (max-width: 1013px) 100vw, 1013px" /><figcaption id="caption-attachment-4222" class="wp-caption-text">ejbca properties (2)</figcaption></figure>
<h3 style="text-align: justify;"><span style="color: #00ffff;"><strong>install.properties</strong></span></h3>
<p style="text-align: justify;"><strong>### This file is essentially an “answer file” used when running the “ant install” command.</strong><br />
<strong>### The variables listed here are *not* used by ejbca while it is running.</strong></p>
<p style="text-align: justify;"><strong>### Start install.properties ###</strong></p>
<p style="text-align: justify;"><strong># In every case that “CA” is mentioned in this file, it refers to the “management” CA ONLY.</strong></p>
<p style="text-align: justify;"><strong># This will be the initial name of the management CA instance</strong><br />
<strong># ejbca will use this for administration purpose, not your production CAs</strong><br />
<strong># Note that the CN given here is NOT the FQDN of your CA!</strong><br />
<strong># Why does this matter? This certificate will be temporarily installed </strong><br />
<strong># on your browser as a trusted root CA, but will not be communicated </strong><br />
<strong># with.</strong><br />
<span style="color: #ff0000;"><strong>ca.name=mgmtca</strong></span><br />
<span style="color: #ff0000;"><strong>ca.dn=CN=mgmtca,O=Your Company,C=ID</strong></span></p>
<p style="text-align: justify;"><strong># The token type the administrative CA will use.</strong><br />
<span style="color: #ff0000;"><strong>ca.tokentype=org.cesecore.keys.token.PKCS11CryptoToken</strong></span></p>
<p style="text-align: justify;"><strong># This is the path to a “catoken.properties” file that will be created when ‘ant</strong><br />
<strong># install’ is run. It will contain encryption parameters used by the mgmt CA.</strong><br />
<strong># It is only used with hard encryption tokens, and can be ignored if your certs</strong><br />
<strong># will be stored in the ejbca database (which is were we will be putting them.)</strong></p>
<p style="text-align: justify;"><strong># Configuration file were you define key name, password and key alias for the HSM</strong><br />
<span style="color: #ff0000;"><strong>ca.tokenproperties=/opt/ejbca/conf/catoken.properties</strong></span></p>
<p style="text-align: justify;"><strong># THIS IS IMPORTANT</strong><br />
<strong># You can assume that ejbca cannot use EC algorithms for the management CA.</strong><br />
<strong># This does not mean that ejbca cannot issue certificates that use EC.</strong><br />
<strong># It just means that the management CA will use RSA for internal purposes.</strong><br />
<strong># The reason for this limitation is that the various EC algorithms are</strong><br />
<strong># not equally supported by the various java flavors that could be used.</strong><br />
<strong># More importantly, ejbca does not include any sort of logic to identify</strong><br />
<strong># the version of java you are using to limit or correct your options.</strong><br />
<strong># Choosing an unsupported algorithm here leads to a corrupt installation.</strong><br />
<strong># This can waste a great amount of time, so just avoid EC. </strong><br />
<strong># You can use EC later with the actual production CAs you define.</strong></p>
<p style="text-align: justify;"><strong># Keyspec for RSA keys is size of RSA keys (1024, 2048, 4096, 8192).</strong><br />
<span style="color: #ff0000;"><strong>ca.keyspec=2048</strong></span></p>
<p style="text-align: justify;"><strong># The keytype for the administrative CA, can be RSA, ECDSA or DSA</strong><br />
<span style="color: #ff0000;"><strong>ca.keytype=RSA</strong></span></p>
<p style="text-align: justify;"><strong># Even though SHA1 is still largely in use as a certificate hashing</strong><br />
<strong># algorithm, I *strongly* suggest that you go with SHA256WithRSA.</strong><br />
<strong># Also, please note that the “with/With” in the hash names is indeed case-sensitive. </strong><br />
<strong># Stay classy, Oracle.</strong></p>
<p style="text-align: justify;"><strong># SHA1WithRSA, SHA1withECDSA, SHA256WithRSA, SHA256withECDSA.</strong><br />
<span style="color: #ff0000;"><strong>ca.signaturealgorithm=SHA256WithRSA</strong></span></p>
<p style="text-align: justify;"><strong># I set a CA validity of 10 years (including the leap years, rain man)</strong><br />
<span style="color: #ff0000;"><strong>ca.validity=5650</strong></span><br />
<span style="color: #ff0000;"><strong>ca.policy=null</strong></span><br />
<span style="color: #ff0000;"><strong>ca.certificateprofile=ROOTCA</strong></span></p>
<p style="text-align: justify;"><strong>### End install.properties ###</strong></p>
<figure id="attachment_4224" aria-describedby="caption-attachment-4224" style="width: 828px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4224" src="https://blog.goreinnamah.com/wp-content/uploads/2019/12/35-int-prop.png" alt="" width="828" height="1008" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/12/35-int-prop.png 828w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/35-int-prop-246x300.png 246w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/35-int-prop-768x935.png 768w" sizes="auto, (max-width: 828px) 100vw, 828px" /><figcaption id="caption-attachment-4224" class="wp-caption-text">install properties</figcaption></figure>
<h3 style="text-align: justify;"><span style="color: #00ffff;"><strong>web.properties</strong></span></h3>
<p style="text-align: justify;"><strong>### Start web.properties ###</strong></p>
<p style="text-align: justify;"><strong># The key to this portion of the config is understanding that this file affects</strong><br />
<strong># the certificate used by the ejbca admin webpage. In install.properties, we</strong><br />
<strong># defined variables for the management CA root certificate. But that certificate</strong><br />
<strong># is not used for session TLS. The management CA issues a separate “server</strong><br />
<strong># certificate” for that purpose that is defined here.</strong></p>
<p style="text-align: justify;"><strong># ———— Web GUI configuration ———————</strong><br />
<strong># Can not be set to false, commented away means that web will be configured.</strong><br />
<strong>#web.noconfigure=true</strong></p>
<p style="text-align: justify;"><strong># Can not be set to false, commented away means that web will be configured.</strong><br />
<strong># web.nosslconfigure=true</strong></p>
<p style="text-align: justify;"><span style="color: #ff0000;"><strong>java.trustpassword=gantiapaaja</strong></span></p>
<p style="text-align: justify;"><span style="color: #ff0000;"><strong>superadmin.cn=superadmin</strong></span><br />
<span style="color: #ff0000;"><strong>superadmin.dn=CN=${superadmin.cn},O=Your Company,C=ID</strong></span></p>
<p style="text-align: justify;"><span style="color: #ff0000;"><strong>superadmin.password=ejbca</strong></span></p>
<p style="text-align: justify;"><span style="color: #ff0000;"><strong>superadmin.batch=true</strong></span></p>
<p style="text-align: justify;"><strong># You do not need to set this password!</strong><br />
<strong>#httpsserver.password=serverpwd</strong></p>
<p style="text-align: justify;"><span style="color: #ff0000;"><strong>httpsserver.hostname=rootca.domainlo.net</strong></span></p>
<p style="text-align: justify;"><span style="color: #ff0000;"><strong>httpsserver.dn=CN=${httpsserver.hostname},O=Your Company,C=ID</strong></span></p>
<p style="text-align: justify;"><strong># This is the port that will host the unencrypted Ejbca Public Web page.</strong><br />
<strong># Note that this will be used the CRL and OSCP URLs, although it will be NATted to port 80 by our firewall rules.</strong></p>
<p style="text-align: justify;"><span style="color: #ff0000;"><strong>httpserver.pubhttp=8080</strong></span></p>
<p style="text-align: justify;"><strong># This is the port that will host the encrypted Ejbca Public Web page, *without* client certificate authentication.</strong><br />
<span style="color: #ff0000;"><strong>httpserver.pubhttps=8442</strong></span></p>
<p style="text-align: justify;"><strong># This is the port that will host the encrypted Ejbca Public Web page,</strong><br />
<strong># as well as the Administration page. Accessing content hosted on</strong><br />
<strong># this port requires client certificate authentication.</strong></p>
<p style="text-align: justify;"><strong># Note that the Ejbca Public Web page link to the administration</strong><br />
<strong># page will try to include this port in the URL, regardless of any</strong><br />
<strong># port redirection you may be using. This will fixed at the end of</strong><br />
<strong># the how-to.</strong></p>
<p style="text-align: justify;"><span style="color: #ff0000;"><strong>httpserver.privhttps=8443</strong></span></p>
<p style="text-align: justify;"><strong># Trying to use port 443 will not work here, as it is a “privileged” port.</strong><br />
<strong>#httpserver.external.privhttps=443</strong></p>
<p style="text-align: justify;"><strong>#Don’t set these up unless you use an apache proxy for port translation</strong></p>
<p style="text-align: justify;"><strong>#httpserver.external.fqdn=</strong><br />
<strong>#httpserver.external.fqdn=${httpsserver.hostname}</strong></p>
<p style="text-align: justify;"><strong>#httpsserver.bindaddress.pubhttp=0.0.0.0</strong><br />
<strong>#httpsserver.bindaddress.pubhttps=0.0.0.0</strong><br />
<strong>#httpsserver.bindaddress.privhttps=0.0.0.0</strong></p>
<p style="text-align: justify;"><strong># Who let the Swedes in here?</strong><br />
<strong>#web.availablelanguages=EN,DE,ES,FR,IT,JA,PT,SE,UA,ZH,BS</strong></p>
<p style="text-align: justify;"><span style="color: #ff0000;"><strong>web.availablelanguages=EN,DE,ES,FR,IT,JA,PT,UA,ZH,BS</strong></span><br />
<span style="color: #ff0000;"><strong>web.contentencoding=UTF-8</strong></span></p>
<p style="text-align: justify;"><strong># Well, this doesn’t sound like a good idea. </strong><br />
<strong>#hardtoken.diplaysensitiveinfo=true</strong></p>
<p style="text-align: justify;"><strong>#web.docbaseuri=disabled</strong><br />
<strong>#web.docbaseuri=internal</strong><br />
<strong>#web.docbaseuri=http://www.ejbca.org</strong></p>
<p style="text-align: justify;"><strong>#web.reqcertindb=true</strong></p>
<p style="text-align: justify;"><span style="color: #ff0000;"><strong>web.selfreg.enabled=false</strong></span><br />
<span style="color: #ff0000;"><strong>web.selfreg.defaultcerttype=1</strong></span><br />
<span style="color: #ff0000;"><strong>web.selfreg.certtypes.1.description=User certificate</strong></span><br />
<span style="color: #ff0000;"><strong>web.selfreg.certtypes.1.eeprofile=SOMEPROFILE</strong></span><br />
<span style="color: #ff0000;"><strong>web.selfreg.certtypes.1.certprofile=ENDUSER</strong></span><br />
<strong>#web.selfreg.certtypes.1.usernamemapping=CN</strong><br />
<span style="color: #ff0000;"><strong>web.renewalenabled=false</strong></span><br />
<strong>#web.manualclasspathsenabled=true</strong></p>
<p style="text-align: justify;"><strong>#web.errorpage.notification=An exception has occurred.</strong><br />
<span style="color: #ff0000;"><strong>web.errorpage.notification=ZOMG PWND!!!!!!!!!!</strong></span></p>
<p style="text-align: justify;"><strong># This setting is good for a lab environment. Don’t use this in production.</strong><br />
<span style="color: #ff0000;"><strong>web.errorpage.stacktrace=true</strong></span></p>
<p style="text-align: justify;"><strong>#web.enableproxiedauth=true</strong><br />
<span style="color: #ff0000;"><strong>web.log.adminremoteip=true</strong></span><br />
<strong>#web.log.adminforwardedip=true</strong></p>
<p style="text-align: justify;"><strong>#### End web.properties ###</strong></p>
<figure id="attachment_4226" aria-describedby="caption-attachment-4226" style="width: 999px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4226" src="https://blog.goreinnamah.com/wp-content/uploads/2019/12/36-web-prop-1.png" alt="" width="999" height="846" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/12/36-web-prop-1.png 999w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/36-web-prop-1-300x254.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/36-web-prop-1-768x650.png 768w" sizes="auto, (max-width: 999px) 100vw, 999px" /><figcaption id="caption-attachment-4226" class="wp-caption-text">web.properties (1)</figcaption></figure>
<figure id="attachment_4227" aria-describedby="caption-attachment-4227" style="width: 882px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4227" src="https://blog.goreinnamah.com/wp-content/uploads/2019/12/37-web-properties-2.png" alt="" width="882" height="930" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/12/37-web-properties-2.png 882w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/37-web-properties-2-285x300.png 285w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/37-web-properties-2-768x810.png 768w" sizes="auto, (max-width: 882px) 100vw, 882px" /><figcaption id="caption-attachment-4227" class="wp-caption-text">web.properties (2)</figcaption></figure>
<h3 style="text-align: justify;">Deploy EJBCA 6.15.2.1</h3>
<p style="text-align: justify;">Sekarang kita sudah punya file properties yang sudah dimodifikasi. Kita bisa memulai untuk <em>build </em>dan <em>deploy </em>EJBCA ke Wildfly, tanpa menyentuh konfigurasi konfigurasi Wildfly, dengan menjalankan perintah EJBCA.</p>
<p style="text-align: justify;">Sebelum menjalankan perintah <em>deployear, </em>jangan lupa untuk mengarahkan <em><strong>application server</strong> </em>pada <strong>APPSRV_HOME </strong>dan konfigur database pada <strong>conf/database.properties.</strong></p>
<p style="text-align: justify;">Jalankan perintah ini pada <em>command prompt </em>di <strong>EJBCA_HOME</strong></p>
<pre><strong>cd /opt/ejbca
ant deployear</strong></pre>
<figure id="attachment_4228" aria-describedby="caption-attachment-4228" style="width: 550px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4228" src="https://blog.goreinnamah.com/wp-content/uploads/2019/12/40-deployear.png" alt="" width="550" height="819" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/12/40-deployear.png 550w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/40-deployear-201x300.png 201w" sizes="auto, (max-width: 550px) 100vw, 550px" /><figcaption id="caption-attachment-4228" class="wp-caption-text">ant deployear</figcaption></figure>
<ul style="text-align: justify;">
<li>Kalian harus selalu menjalankan <strong>ant</strong> dari folder <strong>/opt/ejbca</strong>, tempat dimana <strong>build.xml </strong>berada. kita bisa saja menggunakan path menuju folder ejbca tersebut ketika mengeksekusi perintah <strong>ant</strong>, namun lebih mudah apabila kita pindah langsung ke folder <strong>/opt/ejbca</strong>.</li>
<li>dan yang terakhir, Wildfly harus terlebih dahulu berjalan sebelum kita menjalankan perintah <strong>ant</strong>.</li>
</ul>
<p style="text-align: justify;"><em>Deployment</em> yang kita lakukan menarik informasi dari file konfigurasi, menggunakan informasi tersebut untuk meng-compile file <strong>ejbca.ear</strong>, kemudian mendorong <em>wildfly</em> untuk men-deploy-nya. Karena ini deployment pertama, <strong>ant</strong> juga melakukan hal berikut:</p>
<ul style="text-align: justify;">
<li>Menambahkan konfigurasi mail ejbca ke file standalone.xml</li>
<li>menambahkan ejbca datasource ke file standalone.xml</li>
<li>membuat tabel pada database dengan skema awal</li>
</ul>
<p style="text-align: justify;">Periksa <em>Wildfly console</em> atau log yang ada untuk memastikan tidak ada error yang terjadi pada saat proses deploy.</p>
<h3 style="text-align: justify;"><strong>Run Install</strong></h3>
<p style="text-align: justify;">setelah proses <strong>deployear </strong>berjalan mulus tanpa ada masalah, sekarang adalah waktunya melakukan <strong>run install. </strong>Caranya:</p>
<pre><strong>ant runinstall</strong></pre>
<figure id="attachment_4229" aria-describedby="caption-attachment-4229" style="width: 1106px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-4229" src="https://blog.goreinnamah.com/wp-content/uploads/2019/12/44-runint.png" alt="" width="1106" height="945" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/12/44-runint.png 1106w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/44-runint-300x256.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/44-runint-1024x875.png 1024w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/44-runint-768x656.png 768w" sizes="auto, (max-width: 1106px) 100vw, 1106px" /><figcaption id="caption-attachment-4229" class="wp-caption-text">ant runinstall</figcaption></figure>
<figure id="attachment_4230" aria-describedby="caption-attachment-4230" style="width: 705px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4230" src="https://blog.goreinnamah.com/wp-content/uploads/2019/12/45-ant-runinstall-success.png" alt="" width="705" height="427" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/12/45-ant-runinstall-success.png 705w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/45-ant-runinstall-success-300x182.png 300w" sizes="auto, (max-width: 705px) 100vw, 705px" /><figcaption id="caption-attachment-4230" class="wp-caption-text">ant runinstall success</figcaption></figure>
<h3 style="text-align: justify;"><strong>Deploy TLS Keystore ke dalam WildFLy</strong></h3>
<p style="text-align: justify;">Setelah install, TLS keystores telah berhasil dibuat. Jalankan perintah berikut untuk meng-<em>copy </em><em>keystore </em>tersebut ke <strong>wildfly_home/standarlone/config/keystore.</strong></p>
<pre class="code"><strong>ant deploy-keystore</strong></pre>
<figure id="attachment_4231" aria-describedby="caption-attachment-4231" style="width: 630px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4231" src="https://blog.goreinnamah.com/wp-content/uploads/2019/12/46-ant-deploykeystore.png" alt="" width="630" height="757" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/12/46-ant-deploykeystore.png 630w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/46-ant-deploykeystore-250x300.png 250w" sizes="auto, (max-width: 630px) 100vw, 630px" /><figcaption id="caption-attachment-4231" class="wp-caption-text">ant deploy-keystore</figcaption></figure>
<h3 style="text-align: justify;"><strong>Menghapus TLS dan Konfigurasi HTTP yang Sudah Ada</strong></h3>
<p style="text-align: justify;">Jalankan perintah berikut pada <strong>JBOSS CLI </strong>untuk menhapus konfigurasi TLS dan HTTP yang sudah ada (hanya untuk keamanan).</p>
<pre class="code"><strong>/subsystem=undertow/server=default-server/http-listener=default:remove
/subsystem=undertow/server=default-server/https-listener=https:remove
/socket-binding-group=standard-sockets/socket-binding=http:remove
/socket-binding-group=standard-sockets/socket-binding=https:remove
:reload</strong></pre>
<figure id="attachment_4232" aria-describedby="caption-attachment-4232" style="width: 977px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4232" src="https://blog.goreinnamah.com/wp-content/uploads/2019/12/47-jbosscli.png" alt="" width="977" height="792" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/12/47-jbosscli.png 977w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/47-jbosscli-300x243.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/47-jbosscli-768x623.png 768w" sizes="auto, (max-width: 977px) 100vw, 977px" /><figcaption id="caption-attachment-4232" class="wp-caption-text">removing some things</figcaption></figure>
<p style="text-align: justify;">Tunggu proses <em>reload </em>hingga benar-benar selesai dengan memeriksa <em>log server </em>sebelum melanjutkan ke proses selanjutnya.</p>
<h3 style="text-align: justify;"><strong>Konfigure TLS</strong></h3>
<p style="text-align: justify;">Jalankan perintah berikut pada <strong>JBOSS CLI</strong> (jboss-cli.sh -c) untuk mengatur konfigurasi TLS.</p>
<p style="text-align: justify;">Tambahkan <em>interfaces, </em>gunakan 0.0.0.0 agar bisa diakses dari luar:</p>
<pre class="code"><strong>/interface=http:add(inet-address="0.0.0.0")
/interface=httpspub:add(inet-address="0.0.0.0")
/interface=httpspriv:add(inet-address="0.0.0.0")
/socket-binding-group=standard-sockets/socket-binding=http:add(port="8080",interface="http")
/subsystem=undertow/server=default-server/http-listener=http:add(socket-binding=http)
/subsystem=undertow/server=default-server/http-listener=http:write-attribute(name=redirect-socket, value="httpspriv")
:reload</strong></pre>
<figure id="attachment_4233" aria-describedby="caption-attachment-4233" style="width: 1187px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4233" src="https://blog.goreinnamah.com/wp-content/uploads/2019/12/48-jbosscli2.png" alt="" width="1187" height="391" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/12/48-jbosscli2.png 1187w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/48-jbosscli2-300x99.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/48-jbosscli2-1024x337.png 1024w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/48-jbosscli2-768x253.png 768w" sizes="auto, (max-width: 1187px) 100vw, 1187px" /><figcaption id="caption-attachment-4233" class="wp-caption-text">configuring TLS</figcaption></figure>
<p style="text-align: justify;">Tunggu proses <em>reload </em>hingga benar-benar selesai dengan memeriksa <em>log server </em>sebelum melanjutkan ke proses selanjutnya.</p>
<h3 style="text-align: justify;"><strong>Konfigur <em>identities </em>dan <em>socket bindings:</em></strong></h3>
<p style="text-align: justify;"><em>update </em><em>keystore alias </em>agar cocok dengan <strong>httpsserver.hostname </strong>yang ada pada <strong>web.properties. </strong>Jangan lupa juga untuk <em>update </em><strong>keystore-password </strong>untuk <strong>keystore.jks </strong>agar cocok dengan <strong>httpsserver.password </strong>dan <strong>keystore-password </strong>untuk <strong>trustore.jks </strong>agar cocok dengan <strong>java.trustore </strong>pada <strong>web.properties:</strong></p>
<h5 style="text-align: justify;"><span style="color: #ff0000;"><em>*pastikan kalau password pada sesi ini sesuai. Kalau tidak, maka proses akan gagal. Untuk kalian yang melakukannya pada production, password harus benar-benar diganti ke password yang sesuai.</em></span></h5>
<pre class="code"><strong>/core-service=management/security-realm=SSLRealm:add()
/core-service=management/security-realm=SSLRealm/server-identity=ssl:add(keystore-path="${jboss.server.config.dir}/keystore/keystore.jks", keystore-password="serverpwd", alias="localhost")
/core-service=management/security-realm=SSLRealm/authentication=truststore:add(keystore-path="${jboss.server.config.dir}/keystore/truststore.jks", keystore-password="changeit")
/socket-binding-group=standard-sockets/socket-binding=httpspriv:add(port="8443",interface="httpspriv")
/socket-binding-group=standard-sockets/socket-binding=httpspub:add(port="8442", interface="httpspub")</strong></pre>
<figure id="attachment_4234" aria-describedby="caption-attachment-4234" style="width: 1810px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4234" src="https://blog.goreinnamah.com/wp-content/uploads/2019/12/49-jbosscli3sh.png" alt="" width="1810" height="553" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/12/49-jbosscli3sh.png 1810w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/49-jbosscli3sh-300x92.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/49-jbosscli3sh-1024x313.png 1024w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/49-jbosscli3sh-768x235.png 768w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/49-jbosscli3sh-1536x469.png 1536w" sizes="auto, (max-width: 1810px) 100vw, 1810px" /><figcaption id="caption-attachment-4234" class="wp-caption-text">update keystore</figcaption></figure>
<p style="text-align: justify;">Restart Wildfly sampai benar-benar berjalan kembali. Periksa log untuk benar-benar memastikannya</p>
<p style="text-align: justify;">Setelah me-<em>restart </em>Wildfly, sekarang jalankan perintah berikut:</p>
<pre class="code"><strong>/subsystem=undertow/server=default-server/https-listener=httpspriv:add(socket-binding=httpspriv, security-realm="SSLRealm", verify-client=REQUIRED)
/subsystem=undertow/server=default-server/https-listener=httpspriv:write-attribute(name=max-parameters, value="2048")
/subsystem=undertow/server=default-server/https-listener=httpspub:add(socket-binding=httpspub, security-realm="SSLRealm")
/subsystem=undertow/server=default-server/https-listener=httpspub:write-attribute(name=max-parameters, value="2048")
:reload</strong></pre>
<figure id="attachment_4235" aria-describedby="caption-attachment-4235" style="width: 1429px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-4235" src="https://blog.goreinnamah.com/wp-content/uploads/2019/12/50-jbosscli4.png" alt="" width="1429" height="581" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/12/50-jbosscli4.png 1429w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/50-jbosscli4-300x122.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/50-jbosscli4-1024x416.png 1024w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/50-jbosscli4-768x312.png 768w" sizes="auto, (max-width: 1429px) 100vw, 1429px" /><figcaption id="caption-attachment-4235" class="wp-caption-text">Jalankan setelah restart service wildfly</figcaption></figure>
<p style="text-align: justify;">Untuk finalisasi, jalankan perintah berikut:</p>
<pre class="code"><strong>/system-property=org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH:add(value=true)
/system-property=org.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH:add(value=true)
/system-property=org.apache.catalina.connector.URI_ENCODING:add(value="UTF-8")
/system-property=org.apache.catalina.connector.USE_BODY_ENCODING_FOR_QUERY_STRING:add(value=true)
/subsystem=webservices:write-attribute(name=wsdl-host, value=jbossws.undefined.host)
/subsystem=webservices:write-attribute(name=modify-wsdl-address, value=true)
:reload</strong></pre>
<figure id="attachment_4237" aria-describedby="caption-attachment-4237" style="width: 1026px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-4237" src="https://blog.goreinnamah.com/wp-content/uploads/2019/12/51-jbosscli5.png" alt="" width="1026" height="437" srcset="https://blog.goreinnamah.com/wp-content/uploads/2019/12/51-jbosscli5.png 1026w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/51-jbosscli5-300x128.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/51-jbosscli5-1024x436.png 1024w, https://blog.goreinnamah.com/wp-content/uploads/2019/12/51-jbosscli5-768x327.png 768w" sizes="auto, (max-width: 1026px) 100vw, 1026px" /><figcaption id="caption-attachment-4237" class="wp-caption-text">Konfigurasi akhir</figcaption></figure>
<h3 style="text-align: justify;"><strong>Lebih Detail soal Ant</strong></h3>
<p style="text-align: justify;">Kenapa kita melakukan ant deploy sebelum melakukan ant install? ada dua alasannya:</p>
<ul style="text-align: justify;">
<li>untuk menguji file <strong>ejbca.ear</strong> sukses di-compile dari apa yang sudah kita bangun sejauh ini. Menjalankan <strong>ant deploy</strong> sambil membaca log memberikan kita sebuah kesempatan untuk memperbaiki kesalahan sebelum lanjut ke tahap selanjutnya. Setelah instalasi komplit, akan jauh lebih sulit untuk memperbaiki kesalahan-kesalahan yang terjadi pada konfigurasi.</li>
<li>yang lebih penting lagi, file <strong>ejbca.ear</strong> haruslah ada sebelum file <strong>install</strong> dapat dieksekusi.</li>
</ul>
<p style="text-align: justify;">Memang perlu meluangkan waktu sedikit untuk menggambarkan dengan lebih detil apa saja yang dilakukan oleh beragam perintah ant dan belajar beberapa hal yang baru. Mempelajari ant akan sangat berguna ketika memperbaiki beberapa kendala yang terjadi saat instalasi.</p>
<ul style="text-align: justify;">
<li>Seperti yang kita tau, skrip <strong>ant deploy</strong> membuat beberapa file sementara yang digunakan untuk meng-compile <strong>ejbca.ear</strong>, meng-compile <strong>ejbca.ear,</strong> dan kemudian mendorong jboss untuk mendeploy-nya. Ada dua fungsi yang berbeda di sini yaitu:<br />
pertama, <strong>ant</strong> menjalankan <strong>build</strong> yang melakukan persiapan dan kompilasi.<br />
kedua, <strong>ant</strong> menggunakan jboss <strong>jee.deploy</strong> untuk melakukan transfer ke jboss.</li>
<li>proses <strong>build</strong> dapat dipanggil dengan menggunakan perintah <strong>ant build</strong>. namun perintah <strong>ant deploy</strong>menjalankan keduanya, build dan deploy.</li>
<li>skrip <strong>ant install</strong> mengambil file konfigurasi kita, menggunakan informasi tersebut untuk menciptakan konfigurasi yang lebih jauh lagi (seperti file keystore), dan meng-copy file-file baru tersebut ke lokasi-lokasi yang lebih tepat. Bermacam perubahan pada jboss juga dibuat oleh skrip ini. dan full deployment harus dijalankan secara manual setelah instalasi selesai.<br />
Sebuah skrip terpisah untuk instalasi dibutuhkan untuk memisahkan hal yang dilakukan hanya sekali (seperti mengenerate keystore) dari hal yang dilakukan berulang-ulang saat deployment. Kita tidak perlu membangun ulang setiap kali kita ingin deploy.</li>
<li>perintah <strong>ant clean</strong> akan menghapus file-file temporary (sementara) yang dihasilkan saat deployment sebelumnya yang mungkin secara tidak sengaja masih ada atau tertinggal. Menghapus file-file temporary tersebut dapat membantu memecahkan error-error yang muncul saat deployment.</li>
<li>jika kalian tetap menerima error selama deployment setelah melakukan <strong>ant clean</strong>, kalian boleh mencoba sebuah perintah yng sudah usang: <strong>ant bootstrap</strong>. Secara teori, semua fungsi ant bootstrap sekarang dijalankan oleh <strong>ant deploy</strong>.</li>
</ul>
<h3 style="text-align: justify;"><strong>Keystore</strong></h3>
<p style="text-align: justify;">Keystore menyimpan sertifikat yang digunakan oleh EJBCA 6.15.2.1 untuk mengamankan web portal, tidak lebih. Keberadaan mereka selama instalasi membuat mereka sangat penting, tetapi mereka memiliki sedikit relevansi dengan fungsi “Certificate Authority” dari EJBCA 6.15.2.1</p>
<ul style="text-align: justify;">
<li>Mereka <strong>tidak</strong> digunakan untuk menyimpan kunci dan sertifikat yang dihasilkan oleh EJBCA setelah aplikasi ini live di production –  informasi tersebut disimpan di dalam database.</li>
<li>pada sebuah instalasi yang terdistribusi, mereka mempunyai peran penting dalam autentikasi lintas server (cross-server).</li>
</ul>
<p style="text-align: justify;">ketika skrip install berjalan, skrip tersebut akan melakukan bermacam operasi sampai akhirnya membawa kita untuk memasukkan beberapa password yang digunakan untuk file-file keystore. File-file keystore tersebut berada di <strong>/opt/ejbca/p12</strong> dan mereka adalah:</p>
<ul style="text-align: justify;">
<li><strong>tomcat. jks</strong> → Menyimpan sertifikat yang digunakan jboss untuk mengamankan web portal EJBCA 6.15.2.1 dengan TLS.</li>
<li><strong>trustore.jks</strong> → menyimpan sebuah copy dari key root CA yang mengeluarkan sertifikat TLS.</li>
</ul>
<p style="text-align: justify;">Setelah pembuatan, file-file ini di-copy oleh script install tersebut ke <strong>/opt/jboss/standalone/configuration/keystore</strong>, dan file <strong>tomcat.jks</strong> di rename menjadi <strong>keystore.jks</strong>di direktori baru.</p>
<p style="text-align: justify;">Penting untuk dimengerti bahwa ketika <strong>ant</strong> membuat keystore di <strong>/opt/ejbca/p12</strong>, jboss menggunakan keystore yang berada pada <strong>/opt/jboss/standalone/configuration/keystore</strong> untuk TLS.</p>
<ul style="text-align: justify;">
<li>file <strong>superadmin.p12</strong> yang berisi sertifikat klien yang digunakan untuk mengautentikasi akun administrator juga berada di <strong>/opt/ejbca/p12</strong>. file ini tidak di copy ke direktori jboss seperti keystore lainnya.</li>
</ul>
<p style="text-align: justify;">Java tool yang digunakan untuk mengatur keystore disebut <strong>keytool</strong>, dan (saat instalasi) keytool tersebut dipanggil oleh sebuah link pada <strong>/usr/bin</strong>. Melalui alternatives, link ini diarahkan ke <strong>/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/keytool</strong>. Untuk mencegah terjadinya beberapa masalah yang mungkin muncul (karena menggunakan enkripsi EC), gunakan enkripsi RSA untuk keystore kita. seperti contoh di atas.</p>
<p style="text-align: justify;">Seperti telah disebutkan tadi, <strong>ant install</strong> menghasilkan copy awal dari keystore yang didasarkan pada konfigurasi kita di <strong>install.properties</strong> dan <strong>web.properties</strong>. Tergantung dari bagaimana kita mengkonfigurasi file-file tersebut, kalau kita banyak mengisi informasi pada kedua file tersebut, maka kita tidak akan diminta untuk menginput lagi pada saat <strong>ant install</strong> dijalankan.</p>
<h3 style="text-align: justify;">Pengujian</h3>
<p style="text-align: justify;">Untuk membuktikan apakah instalasi sudah berjalan dengan benar, caranya adalah masuk ke browser dan ketikkan alamat berikut:</p>
<pre><strong>http://&lt;ip atau domain&gt;:8080</strong></pre>
<p style="text-align: justify;">Maka akan muncul halaman berikut:</p>
<figure id="attachment_2197" aria-describedby="caption-attachment-2197" style="width: 1440px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-2197" src="https://blog.goreinnamah.com/wp-content/uploads/2018/03/34-wildfly.png" alt="" width="1440" height="710" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/34-wildfly.png 1440w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/34-wildfly-300x148.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/34-wildfly-768x379.png 768w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/34-wildfly-1024x505.png 1024w" sizes="auto, (max-width: 1440px) 100vw, 1440px" /><figcaption id="caption-attachment-2197" class="wp-caption-text">wildfly jalan</figcaption></figure>
<p style="text-align: justify;">dan untuk masuk ke halaman EJBCA-nya, tambahkan <strong>/ejbca</strong> setelah port tersebut. maka akan tampil halaman berikut:</p>
<figure id="attachment_2198" aria-describedby="caption-attachment-2198" style="width: 1652px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-2198" src="https://blog.goreinnamah.com/wp-content/uploads/2018/03/37-ejbca-running.png" alt="" width="1652" height="723" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/37-ejbca-running.png 1652w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/37-ejbca-running-300x131.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/37-ejbca-running-768x336.png 768w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/37-ejbca-running-1024x448.png 1024w" sizes="auto, (max-width: 1652px) 100vw, 1652px" /><figcaption id="caption-attachment-2198" class="wp-caption-text">halaman utama EJBCA 6.15.2.1</figcaption></figure>
<h3 style="text-align: justify;">Notes:</h3>
<p style="text-align: justify;">Tulisan ini merupakan hasil pengujian dari blog <strong><a href="https://ejbcacentos.blogspot.co.id/">ejbcacentos</a></strong> dengan melakukan beberapa modifikasi sesuai dengan kebutuhan dan juga mengambil beberapa konfigurasi dari <a href="https://www.ejbca.org/docs/installation.html#WildFly%2010%20/%20JBoss%20EAP%207"><strong>SINI</strong></a>.</p>
<h3 style="text-align: justify;"><strong>Integrasi EJBCA dengan SoftHSM</strong></h3>
<p style="text-align: justify;">Untuk mengintegrasikan antara EJBCA 6.15.2.1 denggan SoftHSM, silakan baca pada <a href="https://blog.goreinnamah.com/blog/2019/10/28/softhsm-dan-ejbca-6-10-1-2-di-ubuntu-server/"><strong>LINK ini.</strong></a></p><p>The post <a href="https://blog.goreinnamah.com/blog/2019/12/02/ejbca-6-15-2-1/">Instalasi EJBCA 6.15.2.1 dengan SoftHSM pada Ubuntu Server 18.04</a> first appeared on <a href="https://blog.goreinnamah.com">GoBlog</a>.</p>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Object Caching 0/239 objects using Memcached
Page Caching using Disk: Enhanced 
Database Caching using Memcached (Request-wide modification query)

Served from: blog.goreinnamah.com @ 2026-10-07 09:30:26 by W3 Total Cache
-->