<?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>HSM - GoBlog</title>
	<atom:link href="https://blog.goreinnamah.com/blog/tag/hsm/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.goreinnamah.com</link>
	<description>LOG ALL LOGS</description>
	<lastBuildDate>Sat, 07 Apr 2018 12:10:54 +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>HSM - GoBlog</title>
	<link>https://blog.goreinnamah.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Cara Menghubungkan HSM Luna 7 dan CentOS 7 dengan NTL</title>
		<link>https://blog.goreinnamah.com/blog/2018/03/02/hsm-luna-7-dan-centos-7-dengan-ntl/</link>
					<comments>https://blog.goreinnamah.com/blog/2018/03/02/hsm-luna-7-dan-centos-7-dengan-ntl/#comments</comments>
		
		<dc:creator><![CDATA[Darius Go Reinnamah]]></dc:creator>
		<pubDate>Fri, 02 Mar 2018 03:00:58 +0000</pubDate>
				<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[HSM]]></category>
		<category><![CDATA[hsm luna 7]]></category>
		<category><![CDATA[hsm luna7 dan centos 7]]></category>
		<category><![CDATA[lunacm]]></category>
		<category><![CDATA[NTL]]></category>
		<category><![CDATA[NTLS]]></category>
		<category><![CDATA[NTLS LUNA 7 dan CentOS 7]]></category>
		<category><![CDATA[partition]]></category>
		<category><![CDATA[Proses NTLS Server dengan HSM]]></category>
		<guid isPermaLink="false">http://blog.goreinnamah.com/?p=1915</guid>

					<description><![CDATA[<p>Pada postingan kali ini, saya ingin memberitahu cara mempersiapkan CentOS 7 untuk &#8216;ngobrol&#8217; secara aman dengan Luna 7 (yang selanjutnya[...]</p>
<p>The post <a href="https://blog.goreinnamah.com/blog/2018/03/02/hsm-luna-7-dan-centos-7-dengan-ntl/">Cara Menghubungkan HSM Luna 7 dan CentOS 7 dengan NTL</a> first appeared on <a href="https://blog.goreinnamah.com">GoBlog</a>.</p>]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;">Pada postingan kali ini, saya ingin memberitahu cara mempersiapkan CentOS 7 untuk <em>&#8216;ngobrol&#8217;</em> secara aman dengan <strong>Luna 7</strong> (yang selanjutnya akan saya sebut dengan HSM) melalui <strong>NTL <em>(Network Trust Links)</em></strong>. Tujuan sebenarnya adalah agar aplikasi (<strong>EJBCA</strong>) dapat berkomunikasi dengan HSM, namun terlebih dahulu level Sistem Operasi lah yang harus bisa melakukannya.</p>
<p style="text-align: justify;">Menurut <a href="http://cloudhsm-safenet-docs-5.3.s3-website-us-east-1.amazonaws.com/007-011136-006_lunasa_5-3_webhelp_rev-c/Content/configuration/prepare_the_client_for_network_trust_link.htm"><strong>Safenet</strong></a>, NTL <em>(Network Trust Links)</em> adalah koneksi jaringan yang aman dan terautentikasi antara HSM dengan <em>clients</em>nya. NTLs ini menggunakan autentikasi sertifikat digital 2 arah dan data enkripsi SSL untuk melindungi data sensitif  yang melewati jalur antara partisi HSM pada Luna SA dan <em>client</em>. Port yang digunakan pada HSM untuk NTLs adalah 1792.</p>
<p style="text-align: justify;">NTLs terdiri atas 3 bagian yaitu:</p>
<ul style="text-align: justify;">
<li class="Bulleted" value="1">Network Trust Link Service (NTLS) yang berada pada HSM.</li>
<li class="Bulleted" value="2">Network Trust Link Agents (NTLA) yang terinstal pada <em>Clients</em>.</li>
<li class="Bulleted" value="3">Network Trust Link itu sendiri, sebuah koneksi aman yag terbentik antara NTLS dan sebuah NTLA yang terautentikasi</li>
</ul>
<h3 style="text-align: justify;"><strong>Alat dan Bahan:</strong></h3>
<ol style="text-align: justify;">
<li>Server CentOS 7 (alamat IP: 192.168.1.12)</li>
<li>Luna 7 (alamat IP: 192.168.1.2)</li>
<li>Paket Safenet yang akan diinstall pada CentOS Server sebagai client.</li>
</ol>
<h4 style="text-align: justify;"><em><strong>Baca juga: <a href="http://blog.goreinnamah.com/blog/2018/02/21/menerbitkan-sertifikat-ssl/">cara menerbitkan sertifikat SSL melalui EJBCA</a></strong></em></h4>
<h3 style="text-align: justify;"><strong>Konfigurasi pada HSM</strong></h3>
<ol style="text-align: justify;">
<li>Ketika pertama kali dinyalakan, <strong>HSM </strong>belum memiliki <em><strong>IP Address</strong>. </em>Untuk itu kita perlu untuk memberikan <em>IP Address</em> kepada HSM ini guna mempermudah proses pengaksesannya di masa mendatang dan juga untuk keperluan teknis lainnya.<br />
Pertama, hubungkan HSM dengan server melalui koneksi serial. Pada Luna 7, <em>Port Serial</em> tidak lagi sama seperti seri HSM sebelumnya. Kini sudah menggunakan <em>USB Port </em>dan letaknya ada di bagian belakang dari HSM.</li>
<li>Kalau sudah terhubung, login menggunakan user <strong>admin</strong> dan masukkan <strong>password</strong> yang kita tentukan. Perlu diingat bahwa password ini tidak boleh hilang atau lupa karena kalau lupa maka tidak bisa di reset.
<p><figure id="attachment_1918" aria-describedby="caption-attachment-1918" style="width: 646px" class="wp-caption aligncenter"><img fetchpriority="high" decoding="async" class="size-full wp-image-1918" src="http://blog.goreinnamah.com/wp-content/uploads/2018/02/1.jpg" alt="" width="646" height="131" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/02/1.jpg 646w, https://blog.goreinnamah.com/wp-content/uploads/2018/02/1-300x61.jpg 300w" sizes="(max-width: 646px) 100vw, 646px" /><figcaption id="caption-attachment-1918" class="wp-caption-text">Login ke dalam HSM</figcaption></figure></li>
<li>Setelah masuk, jalankan perintah <strong>hsm show</strong> terlebih dahulu untuk melihat details dari HSM. Mulai dari Software Version, Partitions Details dan lainnya.
<figure id="attachment_1921" aria-describedby="caption-attachment-1921" style="width: 489px" class="wp-caption aligncenter"><img decoding="async" class="size-full wp-image-1921" src="http://blog.goreinnamah.com/wp-content/uploads/2018/02/2-2.png" alt="" width="489" height="709" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/02/2-2.png 489w, https://blog.goreinnamah.com/wp-content/uploads/2018/02/2-2-207x300.png 207w" sizes="(max-width: 489px) 100vw, 489px" /><figcaption id="caption-attachment-1921" class="wp-caption-text">HSM Show</figcaption></figure>
<p>Dari gambar di atas, kita bisa melihat kalau dalam HSM ini memiliki 5 partisi namun belum ada partisi yang dibuat. Saya juga belum memberikan label dan HSM Admin login di sini adalah untuk login ke dalam partisi.</li>
<li>Sebelum memberikan label, terlebih dahulu kita akan menambahkan <em>Static </em><em>IP Address</em>. Jalankan perintah <strong>network</strong> untuk melihat opsi apa saja yang ada untuk memberikan IP.
<p><figure id="attachment_1923" aria-describedby="caption-attachment-1923" style="width: 793px" class="wp-caption aligncenter"><img decoding="async" class="size-full wp-image-1923" src="http://blog.goreinnamah.com/wp-content/uploads/2018/02/3.jpg" alt="" width="793" height="589" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/02/3.jpg 793w, https://blog.goreinnamah.com/wp-content/uploads/2018/02/3-300x223.jpg 300w, https://blog.goreinnamah.com/wp-content/uploads/2018/02/3-768x570.jpg 768w" sizes="(max-width: 793px) 100vw, 793px" /><figcaption id="caption-attachment-1923" class="wp-caption-text">Command Network</figcaption></figure></li>
<li>Secara lengkap, perintah untuk menambahkan IP adalah seperti berikut:
<pre><strong>network interface -device &lt;nama_device&gt; -ip &lt;alamat_ip&gt; -netmask &lt;netmask&gt; -gateway &lt;alamat_gateway&gt; </strong></pre>
<figure id="attachment_1925" aria-describedby="caption-attachment-1925" style="width: 796px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1925" src="http://blog.goreinnamah.com/wp-content/uploads/2018/02/5.jpg" alt="" width="796" height="221" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/02/5.jpg 796w, https://blog.goreinnamah.com/wp-content/uploads/2018/02/5-300x83.jpg 300w, https://blog.goreinnamah.com/wp-content/uploads/2018/02/5-768x213.jpg 768w" sizes="auto, (max-width: 796px) 100vw, 796px" /><figcaption id="caption-attachment-1925" class="wp-caption-text">Pemberian IP Address</figcaption></figure>
<p>Pada contoh di atas, alamat IP yang saya berikan pada <strong>eth3</strong> adalah <strong>192.168.1.5.</strong></p>
<p>Alamat IP yang saya gunakan sebenarnya adalah <strong>192.168.1.2</strong> pada <strong>eth0</strong>. Di atas hanyalah contoh perintah untuk menambahkan alamat IP.</p>
<p>Untuk melihat daftar IP yang tersedia, jalankan perintah<strong> network show</strong>.</li>
<li>Nah, setelah memberikan <em>IP Address, </em>barulah sekarang kita memberikan <strong>Label</strong> kepada HSM ini. Jalankan perintah <strong>hsm init</strong> untuk mengetahui opsi dalam proses inisiasi saat memberikan nama label.
<p><figure id="attachment_1927" aria-describedby="caption-attachment-1927" style="width: 794px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1927" src="http://blog.goreinnamah.com/wp-content/uploads/2018/02/6.jpg" alt="" width="794" height="297" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/02/6.jpg 794w, https://blog.goreinnamah.com/wp-content/uploads/2018/02/6-300x112.jpg 300w, https://blog.goreinnamah.com/wp-content/uploads/2018/02/6-768x287.jpg 768w" sizes="auto, (max-width: 794px) 100vw, 794px" /><figcaption id="caption-attachment-1927" class="wp-caption-text">Perintah hsm init</figcaption></figure></li>
<li>Secara lengkap, perintah untuk memberikan label adalah seperti berikut:
<pre><strong>hsm init -label &lt;nama_label&gt;</strong></pre>
<figure id="attachment_1928" aria-describedby="caption-attachment-1928" style="width: 782px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-1928" src="http://blog.goreinnamah.com/wp-content/uploads/2018/02/7-1.png" alt="" width="782" height="309" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/02/7-1.png 782w, https://blog.goreinnamah.com/wp-content/uploads/2018/02/7-1-300x119.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2018/02/7-1-768x303.png 768w" sizes="auto, (max-width: 782px) 100vw, 782px" /><figcaption id="caption-attachment-1928" class="wp-caption-text">Pemberian label</figcaption></figure>
<p>Dalam proses inisiasi, pertama kali kita akan diminta untuk memasukkan Token Biru ke dalam PED key yang kedepannya berfungsi sebagai admin. Terdapat nilai M/N yang harus ditentukan dan juga password untuk token tersebut. M adalah nilai untuk mengaktifkan HSM, sedangkan N adalah total yang memegang token tersebut. Sebagai contoh, misalkan kamu memberikan nilai M=2 dan N=5, Itu berarti diperlukan 2 admin untuk mengaktifkan HSM dari 5 admin yang tersedia.</p>
<p>Setelah selesai, kita diminta untuk login kembali dengan Token Biru yang baru saja kita set. Baru setelah itu, PED akan meminta kita untuk memasukkan Token Merah yang berfungsi sebagai Domain. Cabut Token Biru tersebut, kemudian masukkan Token merah untuk memasukkan nama domain.</p>
<p>Yang perlu diperhatikan saat memasukkan Token, baik biru ataupun merah, adalah password minimal yang bisa dimasukkan adalah 4 karakter.</li>
<li><em>IP Address </em>sudah ada, <em>Label </em>sudah dibuat, tahap selanjutnya adalah login. Jalankan perintah <strong>hsm login</strong> dan kemudian masukkan kembali Token Biru yang digunakan sebagai proses otentikasi. Pastikan kalau login yang kamu lakukan sukses.
<p><figure id="attachment_1931" aria-describedby="caption-attachment-1931" style="width: 782px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1931" src="http://blog.goreinnamah.com/wp-content/uploads/2018/02/8.jpg" alt="" width="782" height="148" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/02/8.jpg 782w, https://blog.goreinnamah.com/wp-content/uploads/2018/02/8-300x57.jpg 300w, https://blog.goreinnamah.com/wp-content/uploads/2018/02/8-768x145.jpg 768w" sizes="auto, (max-width: 782px) 100vw, 782px" /><figcaption id="caption-attachment-1931" class="wp-caption-text">hsm login</figcaption></figure></li>
<li>Salah satu keuntungan menggunakan HSM ini adalah banyak partisi yang bisa kita gunakan di dalamnya dan user yang di-<em>assign </em>untuk satu partisi tidak bisa mengakses partisi lainnya. Namun sebelum kita bisa menggunakan partisi tersebut, terlebih dahulu kita harus membuat partisinya. Setelah<em> login</em>, jalankan perintah <strong>partition create</strong> untuk melihat opsi dalam membuat partisi.
<p><figure id="attachment_1934" aria-describedby="caption-attachment-1934" style="width: 716px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1934" src="http://blog.goreinnamah.com/wp-content/uploads/2018/02/9-1.jpg" alt="" width="716" height="245" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/02/9-1.jpg 716w, https://blog.goreinnamah.com/wp-content/uploads/2018/02/9-1-300x103.jpg 300w" sizes="auto, (max-width: 716px) 100vw, 716px" /><figcaption id="caption-attachment-1934" class="wp-caption-text">Perintah Partition Create</figcaption></figure></li>
<li>Secara lengkap, perintah untuk memberikan partisi adalah seperti berikut:
<pre><strong>partition create -partition &lt;nama_partisi&gt;</strong></pre>
<figure id="attachment_1935" aria-describedby="caption-attachment-1935" style="width: 473px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1935" src="http://blog.goreinnamah.com/wp-content/uploads/2018/02/9.jpg" alt="" width="473" height="173" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/02/9.jpg 473w, https://blog.goreinnamah.com/wp-content/uploads/2018/02/9-300x110.jpg 300w" sizes="auto, (max-width: 473px) 100vw, 473px" /><figcaption id="caption-attachment-1935" class="wp-caption-text">Pemberian partisi</figcaption></figure>
<p>Pada contoh di atas, nama partisi yang sukses saya buat adalah <strong>cobacoba</strong>.</li>
<li>Setelah membuat partisi tersebut, sekarang waktunya untuk melihat details dari partisi tersebut. Caranya adalah dengan menjalankan perintah <strong>partition show </strong>dan <strong>partition list</strong>
<p><figure id="attachment_1937" aria-describedby="caption-attachment-1937" style="width: 684px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1937" src="http://blog.goreinnamah.com/wp-content/uploads/2018/02/10.jpg" alt="" width="684" height="420" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/02/10.jpg 684w, https://blog.goreinnamah.com/wp-content/uploads/2018/02/10-300x184.jpg 300w" sizes="auto, (max-width: 684px) 100vw, 684px" /><figcaption id="caption-attachment-1937" class="wp-caption-text">perintah partition show dan partition list</figcaption></figure></li>
<li>Tahap selanjutnya adalah membuat <strong>certificate</strong> dan <strong>key</strong> untuk HSM. caranya jalankan perintah <strong>syscon regenCert</strong>.
<figure id="attachment_1948" aria-describedby="caption-attachment-1948" style="width: 794px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1948" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/11.jpg" alt="" width="794" height="707" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/11.jpg 794w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/11-300x267.jpg 300w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/11-768x684.jpg 768w" sizes="auto, (max-width: 794px) 100vw, 794px" /><figcaption id="caption-attachment-1948" class="wp-caption-text">Generate Key dan cert untuk HSM</figcaption></figure>
<p>Jalankan perintah syscon regenCert cukup satu kali saja, karena jika kita menjalankannya berulang-ulang, maka cert dan key akan di-generate baru.</li>
</ol>
<h3 style="text-align: justify;"><strong>Konfigurasi pada CentOS 7</strong></h3>
<ol style="text-align: justify;">
<li>Untuk bisa terhubung dengan HSM, terlebih dahulu kita perlu melakukan instalasi paket-paket yang diperlukan. Masuk ke dalam folder <strong>LunaClient_7.0.0-956_Linux/64 </strong>yang didapat dari CD saat membeli. Setelah itu jalankan perintah <strong>ls </strong>untuk melihat paket apa saja yang tersedia di dalamnya
<p><figure id="attachment_1956" aria-describedby="caption-attachment-1956" style="width: 1092px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1956" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-11_21_47.png" alt="" width="1092" height="389" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-11_21_47.png 1092w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-11_21_47-300x107.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-11_21_47-768x274.png 768w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-11_21_47-1024x365.png 1024w" sizes="auto, (max-width: 1092px) 100vw, 1092px" /><figcaption id="caption-attachment-1956" class="wp-caption-text">Paket-paket yang tersedia dan siap untuk diinstal<span style="font-size: 1.0625rem;"> </span></figcaption></figure></li>
<li>Kalau dilihat, di dalam folder tersebut sudah tersedia file <strong>install.sh </strong>yang bisa kita eksekusi langsung guna menginstall semua paket. Eksekusi file tersebut dengan perintah <strong>sh install.sh<br />
</strong>Ketika ada pertanyaan <strong>&#8220;Do you agree &#8230;&#8230;&#8230;&#8221;</strong>, tekan <strong>y</strong> kemudian tekan <strong>enter</strong>.</p>
<p><figure id="attachment_1957" aria-describedby="caption-attachment-1957" style="width: 797px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1957" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-11_27_45.png" alt="" width="797" height="283" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-11_27_45.png 797w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-11_27_45-300x107.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-11_27_45-768x273.png 768w" sizes="auto, (max-width: 797px) 100vw, 797px" /><figcaption id="caption-attachment-1957" class="wp-caption-text">Proses eksekusi file install.sh</figcaption></figure></li>
<li>(Masih dalam proses ekskusi file <strong>install.sh</strong>) Ketika ada pilihan <strong>Produk Luna</strong> yang ingin diinstal, tekan <strong>1</strong> kemudian tekan <strong><strong>N.<br />
</strong></strong></p>
<figure id="attachment_1958" aria-describedby="caption-attachment-1958" style="width: 344px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1958" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-11_28_12.png" alt="" width="344" height="307" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-11_28_12.png 344w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-11_28_12-300x268.png 300w" sizes="auto, (max-width: 344px) 100vw, 344px" /><figcaption id="caption-attachment-1958" class="wp-caption-text">Pilih 1 untuk Luna Network</figcaption></figure>
<p><figure id="attachment_1959" aria-describedby="caption-attachment-1959" style="width: 376px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1959" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-11_28_29.png" alt="" width="376" height="298" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-11_28_29.png 376w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-11_28_29-300x238.png 300w" sizes="auto, (max-width: 376px) 100vw, 376px" /><figcaption id="caption-attachment-1959" class="wp-caption-text">Setelah itu pilih next</figcaption></figure></li>
<li>Ketika ada pilihan <strong>Komponen Luna</strong> yang ingin diinstal, tekan <strong>1</strong> kemudian tekan <strong>I. </strong>Kini ada 3 komponen yang akan diinstal yaitu Luna SDK, Luna JSP, Luna JCProv.
<figure id="attachment_1960" aria-describedby="caption-attachment-1960" style="width: 453px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1960" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-11_28_44.png" alt="" width="453" height="301" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-11_28_44.png 453w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-11_28_44-300x199.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-11_28_44-120x80.png 120w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-11_28_44-360x240.png 360w" sizes="auto, (max-width: 453px) 100vw, 453px" /><figcaption id="caption-attachment-1960" class="wp-caption-text">Tekan 1</figcaption></figure>
<p><figure id="attachment_1961" aria-describedby="caption-attachment-1961" style="width: 401px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1961" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-11_28_56.png" alt="" width="401" height="299" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-11_28_56.png 401w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-11_28_56-300x224.png 300w" sizes="auto, (max-width: 401px) 100vw, 401px" /><figcaption id="caption-attachment-1961" class="wp-caption-text">kemudian tekan I untuk Install</figcaption></figure></li>
<li>SIlahkan seduh kopi dan biarkan proses instalasinya selesai.
<p><figure id="attachment_1962" aria-describedby="caption-attachment-1962" style="width: 845px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1962" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-11_29_21.png" alt="" width="845" height="634" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-11_29_21.png 845w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-11_29_21-300x225.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-11_29_21-768x576.png 768w" sizes="auto, (max-width: 845px) 100vw, 845px" /><figcaption id="caption-attachment-1962" class="wp-caption-text">instalasi selesai</figcaption></figure></li>
<li>Berikutnya, <em>copy</em> <strong>cert </strong>milik HSM ke dalam CentOS 7 ini. Caranya:
<pre><strong>cd /usr/safenet/lunaclient
</strong><strong>mkdir servercert
</strong><strong>cd servercert
</strong><strong>scp admin@192.168.1.2:server.pem .</strong></pre>
<p><figure id="attachment_1964" aria-describedby="caption-attachment-1964" style="width: 698px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-1964" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-12_30_47.png" alt="" width="698" height="253" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-12_30_47.png 698w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-12_30_47-300x109.png 300w" sizes="auto, (max-width: 698px) 100vw, 698px" /><figcaption id="caption-attachment-1964" class="wp-caption-text">Copy cert milik HSM ke dalam server</figcaption></figure></li>
<li>Setelah berhasil meng-<em>copy </em>cert milik HSM, sekarang waktunya menambahkan HSM ini ke dalam <strong>server list</strong>. Caranya:
<pre><strong>cd /usr/safenet/lunaclient/bin
</strong><strong>./vtl addserver -n &lt;ip_HSM&gt; -c &lt;lokasi_cert_dari_HSM&gt;</strong></pre>
<p><figure id="attachment_1965" aria-describedby="caption-attachment-1965" style="width: 722px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1965" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-12_32_24.png" alt="" width="722" height="138" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-12_32_24.png 722w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-12_32_24-300x57.png 300w" sizes="auto, (max-width: 722px) 100vw, 722px" /><figcaption id="caption-attachment-1965" class="wp-caption-text">Menambahkan HSM ke dalam server list</figcaption></figure></li>
<li>Sekarang waktunya kita membuat <strong>cert </strong>dan <strong>key </strong>untuk server CentOS kita. Caranya:
<pre><strong>./vtl createcert -n &lt;common_name&gt;</strong></pre>
<figure id="attachment_1967" aria-describedby="caption-attachment-1967" style="width: 722px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1967" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-12_34_34.png" alt="" width="722" height="114" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-12_34_34.png 722w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-12_34_34-300x47.png 300w" sizes="auto, (max-width: 722px) 100vw, 722px" /><figcaption id="caption-attachment-1967" class="wp-caption-text">create cert dan key untuk server CentOS</figcaption></figure>
<p>Pada contoh di atas, saya menggunakan alamat IP sebagai <em>Common Name. </em>Kalian bisa menggantinya dengan yang lain.</li>
<li>Setelah <strong>cert </strong>berhasil dibuat, selanjutnya <em>copy-</em>kan cert tersebut ke dalam HSM. Caranya:
<pre><strong>scp &lt;lokasi_cert&gt; &lt;username&gt;@&lt;ip_HSM&gt;:</strong></pre>
<figure id="attachment_1969" aria-describedby="caption-attachment-1969" style="width: 725px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1969" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-12_36_49.png" alt="" width="725" height="128" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-12_36_49.png 725w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-12_36_49-300x53.png 300w" sizes="auto, (max-width: 725px) 100vw, 725px" /><figcaption id="caption-attachment-1969" class="wp-caption-text">Meng-copy cert server ke dalam HSM</figcaption></figure>
<p>lokasi file cert pada contoh di atas adalah <strong>/usr/safenet/lunaclient/cert/client/192.168.1.12.pem</strong></p>
<p>sedangkan untuk user HSM adalah <strong>admin </strong>dan alamatnya <strong>192.168.1.2</strong></li>
</ol>
<h3 style="text-align: justify;"><strong>Kembali ke HSM</strong></h3>
<ol style="text-align: justify;">
<li>HSM dan CentOS server sudah saling bertukar sertifikat. Selanjutnya kita akan menambahkan <em>client</em> yang bisa terhubung ke dalam HSM ini. Untuk melihat apakah sudah ada <em>client</em> yang terhubung, jalankan perintah <strong><strong>client list:<br />
</strong></strong></p>
<p><figure id="attachment_1950" aria-describedby="caption-attachment-1950" style="width: 568px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1950" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/12.png" alt="" width="568" height="416" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/12.png 568w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/12-300x220.png 300w" sizes="auto, (max-width: 568px) 100vw, 568px" /><figcaption id="caption-attachment-1950" class="wp-caption-text">client list: cara untuk melihat client yang terhubung</figcaption></figure></li>
<li>Jika sudah ada <em>client</em> dan memang kita ingin menghapus <em>client</em> tersebut, jalankan perintah dengan syntax berikut:
<pre><strong>client delete -c &lt;nama_client&gt;</strong></pre>
<figure id="attachment_1952" aria-describedby="caption-attachment-1952" style="width: 469px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1952" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/13.png" alt="" width="469" height="504" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/13.png 469w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/13-279x300.png 279w" sizes="auto, (max-width: 469px) 100vw, 469px" /><figcaption id="caption-attachment-1952" class="wp-caption-text">cara menghapus client</figcaption></figure>
<p>Pada contoh di atas, saya menghapus <em>client</em> dengan nama 10.10.10.3 dan io. Setelah itu saya menjalankan kembali perintah <strong>client list </strong>untuk melihat apakah <em>clients</em> tersebut sudah benar terhapus atau belum.</li>
<li>Sekarang mari kita daftarkan <em>client</em> baru. caranya:
<pre><strong>client register -c &lt;nama_client&gt; -ip &lt;alamat_ip&gt;</strong></pre>
<figure id="attachment_1954" aria-describedby="caption-attachment-1954" style="width: 795px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1954" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/14.jpg" alt="" width="795" height="379" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/14.jpg 795w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/14-300x143.jpg 300w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/14-768x366.jpg 768w" sizes="auto, (max-width: 795px) 100vw, 795px" /><figcaption id="caption-attachment-1954" class="wp-caption-text">mendaftarkan client baru</figcaption></figure>
<p>Pada contoh di atas, saya menambahkan <em>client</em> dengan nama <strong>cobacobaclient</strong> yang memiliki <em>ip address </em><strong>192.168.1.12</strong></li>
<li>Proses pendaftaran <em>client</em> dapat terjadi karena HSM dan Server sudah saling bertukar sertifikat. Sekarang mari kita coba untuk medaftarkan <em>client</em> secara asal. Kita ubah alamat IP-nya menjadi 192.168.1.10
<figure id="attachment_1971" aria-describedby="caption-attachment-1971" style="width: 574px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1971" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/15.jpg" alt="" width="574" height="99" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/15.jpg 574w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/15-300x52.jpg 300w" sizes="auto, (max-width: 574px) 100vw, 574px" /><figcaption id="caption-attachment-1971" class="wp-caption-text">Proses gagal</figcaption></figure>
<p>proses gagal karena HSM tidak bisa menemukan cert dari <em>client</em>.</li>
<li>Sebelumnya, kita sudah membuat partisi dengan nama <strong>cobacoba. </strong>Sekarang kita akan menempelkan <em>client</em> yang sudah kita buat (<strong>cobacobaclient) </strong>pada partisi cobacoba. Caranya:
<pre><strong>client assignPartition -c &lt;nama_client&gt; -p &lt;nama_partisi&gt;</strong></pre>
<figure id="attachment_1972" aria-describedby="caption-attachment-1972" style="width: 621px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1972" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/16.jpg" alt="" width="621" height="349" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/16.jpg 621w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/16-300x169.jpg 300w" sizes="auto, (max-width: 621px) 100vw, 621px" /><figcaption id="caption-attachment-1972" class="wp-caption-text">assignPartition: menempelkan si partisi dengan client</figcaption></figure>
<p>Gunakanlah perintah <strong>assignPartition </strong>untuk melihat opsi apa saja yang tersedia pada perintah tersebut.</li>
<li>Untuk melihat <em>client</em> yang sudah terdaftar, gunakan perintah <strong><strong>client list</strong></strong> dan kemudian jalankan perintah <strong>partition list </strong>untuk melihat partisi yang ada.
<p><figure id="attachment_1974" aria-describedby="caption-attachment-1974" style="width: 684px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1974" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/18.jpg" alt="" width="684" height="518" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/18.jpg 684w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/18-300x227.jpg 300w" sizes="auto, (max-width: 684px) 100vw, 684px" /><figcaption id="caption-attachment-1974" class="wp-caption-text">terlihat kalau cobacobaclient sudah terdaftar sebagai client</figcaption></figure></li>
<li>Untuk melihat partisi mana yang sudah berhasil ditambahkan pada cobacobaclient, jalankan perintah berikut:
<pre><strong>client show -client &lt;nama_client&gt;</strong></pre>
<p><figure id="attachment_1975" aria-describedby="caption-attachment-1975" style="width: 457px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1975" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/19.jpg" alt="" width="457" height="176" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/19.jpg 457w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/19-300x116.jpg 300w" sizes="auto, (max-width: 457px) 100vw, 457px" /><figcaption id="caption-attachment-1975" class="wp-caption-text">cara untuk melihat partisi yang berhasil ditambahkan ke client</figcaption></figure></li>
<li>Sekarang waktunya me-<em>restart service </em>NTLS. Caranya:
<pre><strong style="font-size: 0.9375rem;">ntls bind all
service restart ntls</strong></pre>
<p><figure id="attachment_1976" aria-describedby="caption-attachment-1976" style="width: 556px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1976" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/20.jpg" alt="" width="556" height="167" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/20.jpg 556w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/20-300x90.jpg 300w" sizes="auto, (max-width: 556px) 100vw, 556px" /><figcaption id="caption-attachment-1976" class="wp-caption-text">restart service ntls</figcaption></figure></li>
<li>Setelah di <em>restart, </em>sekarang kita akan melihat apakah IP dari <em>client</em> bisa melakukan NTLS. Caranya:<br />
<strong><strong><br />
</strong></strong></p>
<p><figure id="attachment_1977" aria-describedby="caption-attachment-1977" style="width: 440px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1977" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/21-1.jpg" alt="" width="440" height="119" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/21-1.jpg 440w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/21-1-300x81.jpg 300w" sizes="auto, (max-width: 440px) 100vw, 440px" /><figcaption id="caption-attachment-1977" class="wp-caption-text">Pemeriksaan IP client</figcaption></figure></li>
<li>Untuk lebih jelasnya, jalankan perintah <strong><strong>ntls information show<br />
</strong></strong></p>
<figure id="attachment_1978" aria-describedby="caption-attachment-1978" style="width: 516px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1978" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/21.jpg" alt="" width="516" height="434" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/21.jpg 516w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/21-300x252.jpg 300w" sizes="auto, (max-width: 516px) 100vw, 516px" /><figcaption id="caption-attachment-1978" class="wp-caption-text">Menampilkan informasi NTLS</figcaption></figure>
<p>Dari gambar di atas terlihat kalau belum ada koneksi klien terhadap HSM.</li>
<li>Untuk membuat koneksi antara HSM dengan Server. Kini kita perlu kembali lagi ke Server.</li>
</ol>
<h3 style="text-align: justify;"><strong>Kembali ke Server</strong></h3>
<p style="text-align: justify;">Untuk membuat koneksi dengan HSM yang sudah mendaftarkan Server ini sebagai <em>client</em>, jalankan perintah berikut:</p>
<pre><strong>cd /usr/safenet/lunaclient/bin
./vtl verify </strong></pre>
<figure id="attachment_1979" aria-describedby="caption-attachment-1979" style="width: 511px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1979" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-13_04_29.png" alt="" width="511" height="142" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-13_04_29.png 511w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-13_04_29-300x83.png 300w" sizes="auto, (max-width: 511px) 100vw, 511px" /><figcaption id="caption-attachment-1979" class="wp-caption-text">Proses verifikasi</figcaption></figure>
<h3 style="text-align: justify;">Kembali lagi ke HSM</h3>
<p style="text-align: justify;">Setelah porses vtl verify yang dilakukan pada clien, kembali kita akan mnjalankan perintah <strong>ntls information show </strong>untuk melihat hasil terbarunya</p>
<figure id="attachment_1981" aria-describedby="caption-attachment-1981" style="width: 478px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1981" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/22-setelah-vtl-verify.jpg" alt="" width="478" height="228" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/22-setelah-vtl-verify.jpg 478w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/22-setelah-vtl-verify-300x143.jpg 300w" sizes="auto, (max-width: 478px) 100vw, 478px" /><figcaption id="caption-attachment-1981" class="wp-caption-text">Sekarang terlihat kalau client yang sukses membuat koneksi sudah ada 1</figcaption></figure>
<h3 style="text-align: justify;"><strong>Menambahkan Objek ke dalam Partisi</strong></h3>
<p style="text-align: justify;">Belum lengkap rasanya apabila kita belum menambahkan objek ke dalam partisi yang baru saja di <em>assign </em>kepada klien. Untuk mengujinya, Luna SA Client sudah menyediakan fungsi untuk itu. Caranya:</p>
<ol style="text-align: justify;">
<li style="text-align: justify;">Pada CentOS Server, masuk ke dalam direktori safenet
<pre><strong>cd /usr/safenet/lunaclient/bin</strong></pre>
</li>
<li>Eksekusi file lunacm
<pre><strong>./lunacm</strong></pre>
<p><figure id="attachment_1983" aria-describedby="caption-attachment-1983" style="width: 721px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1983" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-14_09_15.png" alt="" width="721" height="342" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-14_09_15.png 721w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-02-23-14_09_15-300x142.png 300w" sizes="auto, (max-width: 721px) 100vw, 721px" /><figcaption id="caption-attachment-1983" class="wp-caption-text">lunacm</figcaption></figure></li>
<li>Kalau dilihat, slot 0 dimana client ini di-<em>assign, </em>belum memiliki label. Untuk memberikan label, jalankan perintah berikut:
<pre><strong>partition init -l &lt;nama_label&gt; -p &lt;password&gt;</strong></pre>
<p>Pada contoh ini, saya akan memberikan nama label <strong>cobacoba </strong>dengan tanpa menggunakan password</p>
<pre><strong>partition init -l cobacoba</strong></pre>
<p>Saat memberikan label ini, proses inisiasi akan dimulai. Kembali tancapkan token biru pada PED Key. Gunakan Token Biru yang baru, bukan Token Biru yang digunakan sebagai admin HSM tadi. Kita sebut TOken Biru yang baru ini sebagai <strong>Token Biru Partition</strong>.</p>
<p>Proses yang sama akan dimulai, kita diminta untuk menentukan nilai M/N kembali. Untuk saran saya, kali ini gunakanlah nilai M=1 dan N=1.</p>
<p>Kalau sudah, cabut Token Biru dan lanjutkan dengan Token Merah. Untuk Token yang berwarna merah ini, kita bisa menggunakan Token yang sama dengan token merah sebelumnya karena ini adalah partition pertama dan (mungkin) berada pada domain yang sama.</p>
<p><strong><span style="color: #ff0000;">*Catatan: slot yang saya miliki di atas hanya satu. Untuk menggunakan slot yang tersedia, jalankan perintah</span></strong> <strong>slot set -slot &lt;nomor_set&gt;</strong></li>
<li>Setelah selesai, keluarlah dari lunacm dan kembali jalankan <strong>./vtl verify. </strong>Kini sudah ada labelnya.
<p><figure id="attachment_1988" aria-describedby="caption-attachment-1988" style="width: 464px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1988" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-03-01-19_45_45.png" alt="" width="464" height="127" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-03-01-19_45_45.png 464w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-03-01-19_45_45-300x82.png 300w" sizes="auto, (max-width: 464px) 100vw, 464px" /><figcaption id="caption-attachment-1988" class="wp-caption-text">Sekarang sudah ada labelnya</figcaption></figure></li>
<li>Di dalam folder <strong>/usr/safenet/lunaclient/bin </strong>, terdapat sebuah file bernama <strong>ckdemo. </strong>Ckdemo berfungsi sebagai <em>simulation lab </em>sehingga kita bisa mencoba melakukan beberapa hal pada HSM. Pada kesempatan kali ini kita akan mencoba untuk menambahkan objek. Eksekusi perintah berikut:
<pre><strong>./ckdemo</strong></pre>
<p><figure id="attachment_1990" aria-describedby="caption-attachment-1990" style="width: 723px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1990" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-03-02-08_52_08.png" alt="" width="723" height="437" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-03-02-08_52_08.png 723w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-03-02-08_52_08-300x181.png 300w" sizes="auto, (max-width: 723px) 100vw, 723px" /><figcaption id="caption-attachment-1990" class="wp-caption-text">ckdemo</figcaption></figure></li>
<li>Setelah itu akan banyak opsi yang muncul, pilih <strong>opsi 1</strong> untuk membuka sesi lalu pilih <strong><strong>slot 0<br />
</strong></strong></p>
<p><figure id="attachment_1991" aria-describedby="caption-attachment-1991" style="width: 386px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1991" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-03-02-08_53_01.png" alt="" width="386" height="184" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-03-02-08_53_01.png 386w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-03-02-08_53_01-300x143.png 300w" sizes="auto, (max-width: 386px) 100vw, 386px" /><figcaption id="caption-attachment-1991" class="wp-caption-text">membuka sesi dan memilih slot</figcaption></figure></li>
<li>Berikutnya pilih <strong>opsi 20</strong> lalu <strong>opsi 0</strong> untuk menambahkan objek berupa data.
<figure id="attachment_1992" aria-describedby="caption-attachment-1992" style="width: 628px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1992" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-03-02-08_53_29.png" alt="" width="628" height="110" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-03-02-08_53_29.png 628w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-03-02-08_53_29-300x53.png 300w" sizes="auto, (max-width: 628px) 100vw, 628px" /><figcaption id="caption-attachment-1992" class="wp-caption-text">Object Management</figcaption></figure>
<p><figure id="attachment_1993" aria-describedby="caption-attachment-1993" style="width: 594px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1993" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-03-02-08_54_07.png" alt="" width="594" height="237" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-03-02-08_54_07.png 594w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-03-02-08_54_07-300x120.png 300w" sizes="auto, (max-width: 594px) 100vw, 594px" /><figcaption id="caption-attachment-1993" class="wp-caption-text">Menambahkan data</figcaption></figure></li>
<li>Karena ini hanya contoh, maka kita gunakan saja template yang sudah disediakan. <strong>Pilih 0</strong>
<p><figure id="attachment_1994" aria-describedby="caption-attachment-1994" style="width: 604px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1994" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-03-02-08_54_28.png" alt="" width="604" height="124" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-03-02-08_54_28.png 604w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-03-02-08_54_28-300x62.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-03-02-08_54_28-600x124.png 600w" sizes="auto, (max-width: 604px) 100vw, 604px" /><figcaption id="caption-attachment-1994" class="wp-caption-text">Gunakan template yang sudah ada</figcaption></figure></li>
<li>Data sudah berhasil ditambahkan. Untuk membuktikan apakah data tersebut sudah ada di dalam partisi, keluar dari ckdemo dan masuk kembali ke dalam lunacm. Jalankan perintah <strong>partition contents</strong>
<pre><strong>exit
</strong><strong>./lunacm
partitions contents</strong></pre>
<p><figure id="attachment_1995" aria-describedby="caption-attachment-1995" style="width: 664px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1995" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-03-02-08_56_16.png" alt="" width="664" height="308" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-03-02-08_56_16.png 664w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/Screenshot-from-2018-03-02-08_56_16-300x139.png 300w" sizes="auto, (max-width: 664px) 100vw, 664px" /><figcaption id="caption-attachment-1995" class="wp-caption-text">Obejk sudah berada di dalam partisi</figcaption></figure></li>
</ol>
<h3 style="text-align: justify;">Managing Luna HSM 7 PPSO</h3>
<p style="text-align: justify;">SafeNet Luna Network HSM mengizinkan kita untuk membuat <strong>Per-Partition Security Officer (PPSO) </strong>Partition. <strong>HSM Administrator </strong>bukanlah <strong>Security Officer (SO) </strong>untuk PPSO Partition. <strong>HSM SO </strong>memutuskan untuk membuat sebuah partisi sebagai <strong>tipe PPSO, </strong>yang membuat sebuah struktur kosong yang dipegang oleh owner baru, yang menginisialisasi sebuah partisi untuk membuat <strong>Partition Security Officer (PSO). </strong>PSO kemudian akan membuat <strong>Crypto Officer (CO) </strong>bagi sebuah partisi untuk mengontrol <em>cryptographic operation </em>dari klien pada partisi tersebut.</p>
<p style="text-align: justify;">Tahapan untuk membuat CO adalah sebagai berikut:</p>
<ol style="text-align: justify;">
<li>Masuk ke dalam folder <strong>bin </strong>yang ada di <strong>safenet </strong>dan eksekusi perintah <strong>lunacm. </strong>Caranya:
<pre><strong>cd /usr/safenet/lunaclient/bin
./lunacm</strong></pre>
</li>
<li>Login ke sebagai <strong>PO (Partition Owner) </strong>dengan cara:
<pre><strong>role login -name po</strong></pre>
<figure id="attachment_2253" aria-describedby="caption-attachment-2253" style="width: 295px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-2253" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/1-PO-Login.png" alt="" width="295" height="100" /><figcaption id="caption-attachment-2253" class="wp-caption-text">PO Login</figcaption></figure>
<p>Saat Login, kita akan diminta untuk memasukkan Token Biru Partition untuk proses otentikasi.</li>
<li>Selanjutnya kita akan menginisiasi pembuatan <strong>CO (Crypto Officer). </strong>Caranya:
<pre><strong>role init -name co</strong></pre>
<figure id="attachment_2254" aria-describedby="caption-attachment-2254" style="width: 326px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-2254" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/2-CO-init.png" alt="" width="326" height="101" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/2-CO-init.png 326w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/2-CO-init-300x93.png 300w" sizes="auto, (max-width: 326px) 100vw, 326px" /><figcaption id="caption-attachment-2254" class="wp-caption-text">CO init</figcaption></figure>
<p>Saat proses di atas, kita akan diminta untuk memasukkan token yang baru bagi CO dan saya menyebutnya sebagai <strong>Token Hitam. </strong>Set juga PIN untuk Token tersebut seperti Token Biru dan Token Merah yang sudah diset sebelumnya.</li>
<li>Kalau sudah selesai. jalankan perintah <strong>role logout </strong>untuk keluar.</li>
<li>Sekarang login sebagai CO. Caranya:
<pre><strong>role login - name co</strong></pre>
<figure id="attachment_2255" aria-describedby="caption-attachment-2255" style="width: 337px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-2255" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/3-CO-login.png" alt="" width="337" height="98" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/3-CO-login.png 337w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/3-CO-login-300x87.png 300w" sizes="auto, (max-width: 337px) 100vw, 337px" /><figcaption id="caption-attachment-2255" class="wp-caption-text">CO Login</figcaption></figure>
<p>Masukkan kembali Token Hitam untuk login sebagai CO</li>
<li>Setelah itu jalankan perintah <strong>partition show </strong>dan pastikan semua opsinya <strong>no</strong></li>
</ol>
<h3 style="text-align: justify;"><strong>Change Policy</strong></h3>
<p style="text-align: justify;">Untuk dapat membuat HSM Luna 7 ini bekerja dengan <strong>Truted Path Authentication (TPA), </strong>ada beberapa Policy yang harus diganti yaitu Policy nomor 22 dan 23. Policy ini berlaku per partisi, jadi bisa saja partisi yang satu dengan partisi yang lainnya memiliki policy yang berbeda.</p>
<figure id="attachment_2256" aria-describedby="caption-attachment-2256" style="width: 530px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-2256" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/policy-awal.png" alt="" width="530" height="543" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/policy-awal.png 530w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/policy-awal-293x300.png 293w" sizes="auto, (max-width: 530px) 100vw, 530px" /><figcaption id="caption-attachment-2256" class="wp-caption-text">policy awal yang belum diubah</figcaption></figure>
<p style="text-align: justify;">Untuk mengubah policy nomor 22 dan 23. Jalankan perintah berikut pada <strong>lunacm:</strong></p>
<pre><strong>partition changepo -slot &lt;nomor_slot&gt; -p policy &lt;nomor_policy -v 1 -f</strong></pre>
<figure id="attachment_2257" aria-describedby="caption-attachment-2257" style="width: 509px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-2257" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/5-change-policy.png" alt="" width="509" height="133" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/5-change-policy.png 509w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/5-change-policy-300x78.png 300w" sizes="auto, (max-width: 509px) 100vw, 509px" /><figcaption id="caption-attachment-2257" class="wp-caption-text">Change Policy</figcaption></figure>
<p style="text-align: justify;">Sekarang Policy-nya telah berubah</p>
<figure id="attachment_2258" aria-describedby="caption-attachment-2258" style="width: 532px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-2258" src="http://blog.goreinnamah.com/wp-content/uploads/2018/03/policy-akhir.png" alt="" width="532" height="536" srcset="https://blog.goreinnamah.com/wp-content/uploads/2018/03/policy-akhir.png 532w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/policy-akhir-150x150.png 150w, https://blog.goreinnamah.com/wp-content/uploads/2018/03/policy-akhir-298x300.png 298w" sizes="auto, (max-width: 532px) 100vw, 532px" /><figcaption id="caption-attachment-2258" class="wp-caption-text">Policy sudah berubah</figcaption></figure>
<p style="text-align: center;">****</p>
<p style="text-align: justify;">Itu tadi sedikit tutorial dari saya. Dari aktifitas di atas, ada beberapa poin yang kita dapat, yaitu:</p>
<ul style="text-align: justify;">
<li>Kta sudah menentukan <strong>secure admin password </strong>untuk Safenet Luna 7.</li>
<li>Kita sudah menentukan IP Safenet Luna 7 agar dapat bekerja pada network yang kita inginkan.</li>
<li>Menginisialisasi Safenet Luna 7.</li>
<li>Membuat dan bertukar sertifikat antar Safenet Luna 7 dan mesin kita sebagai klien.</li>
<li>Membuat Partisi yang nantinya akan digunakan oleh EJBCA.</li>
<li>Mendaftarkan mesin kita sebagai klien dan menjalankan perintah <strong>vtl verify </strong>untuk menampilkan partisi dari Safenet Luna 7.</li>
<li>Menginisialisasi partisi dengan PED.</li>
<li>Mengaktifkan <em>Prtition Policy </em>nomor 22 dan 23.</li>
</ul>
<p style="text-align: justify;">Mohon maaf kalau ada bahasa yang kurang jelas atau bahkan cenderung salah. Silahkan dikoreksi dan jangan ragu untuk memberitahu saya lewat kolom <em>comment. </em></p>
<p style="text-align: justify;">Terima kasih. Sampai jumpa di tulisan selanjutnya.</p>
<p style="text-align: justify;"><em>Aufwiedersehen</em></p><p>The post <a href="https://blog.goreinnamah.com/blog/2018/03/02/hsm-luna-7-dan-centos-7-dengan-ntl/">Cara Menghubungkan HSM Luna 7 dan CentOS 7 dengan NTL</a> first appeared on <a href="https://blog.goreinnamah.com">GoBlog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://blog.goreinnamah.com/blog/2018/03/02/hsm-luna-7-dan-centos-7-dengan-ntl/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Instalasi EJBCA 6.3.1.1 dengan HSM LUNA PCIE pada CentOS 7</title>
		<link>https://blog.goreinnamah.com/blog/2017/12/01/instalasi-ejbca-6-3-1-1-dengan-hsm-luna-pcie-pada-centos-7/</link>
					<comments>https://blog.goreinnamah.com/blog/2017/12/01/instalasi-ejbca-6-3-1-1-dengan-hsm-luna-pcie-pada-centos-7/#comments</comments>
		
		<dc:creator><![CDATA[Darius Go Reinnamah]]></dc:creator>
		<pubDate>Fri, 01 Dec 2017 09:01:39 +0000</pubDate>
				<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[ejbca]]></category>
		<category><![CDATA[EJBCA 6.3.1.1]]></category>
		<category><![CDATA[Hardware Security Modul]]></category>
		<category><![CDATA[HSM]]></category>
		<category><![CDATA[HSM LUNA]]></category>
		<category><![CDATA[Jboss 7.1.1]]></category>
		<category><![CDATA[JBOSS EJBCA]]></category>
		<category><![CDATA[LUNA HSM]]></category>
		<category><![CDATA[SafeNet]]></category>
		<category><![CDATA[SafeNet Luna HSM]]></category>
		<guid isPermaLink="false">http://blog.goreinnamah.com/?p=1572</guid>

					<description><![CDATA[<p>Kalau di postingan sebelumnya, DI SINI, saya membahas mengenai cara agar Sistem Operasi (CentOS 7) dapat mengenali LUNA HSM PCIe[...]</p>
<p>The post <a href="https://blog.goreinnamah.com/blog/2017/12/01/instalasi-ejbca-6-3-1-1-dengan-hsm-luna-pcie-pada-centos-7/">Instalasi EJBCA 6.3.1.1 dengan HSM LUNA PCIE pada CentOS 7</a> first appeared on <a href="https://blog.goreinnamah.com">GoBlog</a>.</p>]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;">Kalau di postingan sebelumnya, <a href="http://blog.goreinnamah.com/blog/2017/10/09/instalasi-driver-luna-client-pcie/"><strong>DI SINI</strong></a>, saya membahas mengenai cara agar Sistem Operasi (CentOS 7) dapat mengenali LUNA HSM PCIe v6.10.9. Pada kesempatan kali ini saya mau memberikan cara agar LUNA HSM PCIe v6.10.9 ini dapat mengobrol alias diintegrasikan dengan EJBCA 6.3.1.1.</p>
<p style="text-align: justify;">Integrasi ini bertujuan agar pasca melakukan instalasi EJBCA 6.3.1.1, LUNA HSM PCIe v6.10.9 ini dapat digunakan sebagai tempat dimana EJBCA 6.3.1.1 men-generate key yang nantinya akan digunakan oleh CA untuk CRL Signing dan Certificate.</p>
<h3 style="text-align: justify;"><strong>Konfigurasi SafeNet HSM PCIe</strong></h3>
<p style="text-align: justify;">Kita perlu melakukan <em>patch </em>berikut agar EJBCA 6.3.1.1 dapat bekerja dengan SafeNet HSM PCIe v6.10.9:</p>
<ol style="text-align: justify;">
<li>Lakukan instalasi driver untuk SafeNet Luna PCIe terlebih dahulu. Caranya bisa dilihat <a href="http://blog.goreinnamah.com/blog/2017/10/09/instalasi-driver-luna-client-pcie/"><strong>DI SINI</strong></a>.</li>
<li>Setelah selesai,  kita harus mengubah isi dari file <strong>Chrystoki.conf</strong> yang berada pada folder <strong>etc</strong>. Caranya:
<ol>
<li><strong>vi /etc/Chrystoki.conf</strong></li>
<li>Ubah menjadi seperti berikut:<br />
<strong>Chrystoki2 = {</strong><br />
<strong>LibUNIX64 = /usr/safenet/lunaclient/lib/libshim.so;</strong><br />
<strong>}</strong><br />
<strong>Shim2 = {</strong><br />
<strong>LibUNIX64 = /usr/safenet/lunaclient/lib/libCryptoki2_64.so;</strong><br />
<strong>}</strong><br />
<strong>Misc = {</strong><br />
<strong>:</strong><br />
<strong>ApplicationInstance=SA5_COMPATIBILITY;</strong><br />
<strong>FunctionBindLevel=2;</strong><br />
<strong>:</strong><br />
<strong>}</strong><br />
<strong>Presentation = {</strong><br />
<strong>OneBaseSlotId =1;</strong><br />
<strong>}</strong></li>
</ol>
</li>
</ol>
<h2 style="text-align: justify;">SafeNet LUNA HSM dengan EJBCA 6.3.1.1</h2>
<p style="text-align: justify;">Untuk mempersiapkan SafeNet LUNA HSM untuk EJBCA 6.3.1.1, beberapa langkah berikut perlu dipersiapkan:</p>
<h3 style="text-align: justify;"><strong>Alat dan Bahan:</strong></h3>
<ol style="text-align: justify;">
<li>EJBCA 6.3.1.1 → Download <a href="http://www.ejbca.org/download.html"><strong>DI SINI</strong></a></li>
<li>JBOSS AS 7.1.1 → Download <a href="http://download.jboss.org/jbossas/7.1/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final.zip"><strong>DI SINI</strong></a></li>
<li>MariaDB 10.2 (Stable)→ Cara Install <a href="https://downloads.mariadb.org/mariadb/repositories/#mirror=datautama&amp;distro=CentOS&amp;distro_release=centos7-amd64--centos7&amp;version=10.2"><strong>DI SINI</strong></a></li>
<li>MariaDB Java Client 1.2.0→ Download <a href="http://central.maven.org/maven2/org/mariadb/jdbc/mariadb-java-client/1.2.0/mariadb-java-client-1.2.0.jar"><strong>DI SINI</strong></a></li>
<li>OpenJDK 7</li>
</ol>
<h3 style="text-align: justify;"><strong>Spek Server yang Saya Gunakan</strong></h3>
<ol style="text-align: justify;">
<li>RAM = 6GB</li>
<li>CPUs = 6</li>
<li>Harddisk = 50 GB</li>
</ol>
<h3 style="text-align: justify;">Pengaturan FQDN</h3>
<p style="text-align: justify;">Pertama kali yang kita dilakukan adalah Setting FQDN-nya terlebih dahulu, caranya:</p>
<pre><strong>vi /etc/hosts</strong></pre>
<figure id="attachment_28" aria-describedby="caption-attachment-28" style="width: 308px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/1-setting-hosts.png" alt="" width="308" height="38" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-setting-hosts.png 308w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-setting-hosts-300x37.png 300w" sizes="auto, (max-width: 308px) 100vw, 308px" /><figcaption id="caption-attachment-28" class="wp-caption-text">Setting IP, Nama Domain dan nama Host</figcaption></figure>
<h3 style="text-align: justify;"><strong>Konfigurasi Firewall</strong></h3>
<p style="text-align: justify;">EJBCA 6.3.1.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 EJBCA 6.3.1.1 nya langsung.</p>
<p style="text-align: justify;">Jika kita mau menggunakan port standar yang digunakan WEB, silahkan atur Port Forwarding pada iptables. Kita bisa melakukannya dengan cara:</p>
<pre><strong>vi /etc/sysconfig/iptables</strong></pre>
<p style="text-align: justify;">kemudian masukkan:</p>
<h4 style="text-align: justify;">#### Start Iptables ####</h4>
<p style="text-align: justify;">*<strong>filter</strong><br />
<strong>:INPUT ACCEPT [0:0]</strong><br />
<strong>:FORWARD ACCEPT [0:0]</strong><br />
<strong>:OUTPUT ACCEPT [34:14652]</strong><br />
<strong>-A INPUT -p tcp -m tcp &#8211;dport 8008 -j ACCEPT</strong><br />
<strong>-A INPUT -m state &#8211;state RELATED,ESTABLISHED -j ACCEPT</strong><br />
<strong>-A INPUT -p icmp -j ACCEPT</strong><br />
<strong>-A INPUT -i lo -j ACCEPT</strong><br />
<strong>-A INPUT -i eth0 -p tcp -m state &#8211;state NEW -m tcp &#8211;dport 8080 -m mark &#8211;mark 0x64 -j ACCEPT</strong><br />
<strong>-A INPUT -p tcp -m state &#8211;state NEW -m tcp &#8211;dport 80 -j ACCEPT</strong><br />
<strong>-A INPUT -p tcp -m state &#8211;state NEW -m tcp &#8211;dport 8080 -j ACCEPT</strong><br />
<strong>-A INPUT -p tcp -m state &#8211;state NEW -m tcp &#8211;dport 8443 -j ACCEPT</strong><br />
<strong>-A INPUT -p tcp -m state &#8211;state NEW -m tcp &#8211;dport 8442 -j ACCEPT</strong><br />
<strong>-A INPUT -p tcp -m state &#8211;state NEW -m tcp &#8211;dport 443 -j ACCEPT</strong><br />
<strong>-A INPUT -p tcp -m state &#8211;state NEW -m tcp &#8211;dport 22 -j ACCEPT</strong><br />
<strong>-A INPUT -j REJECT &#8211;reject-with icmp-host-prohibited</strong><br />
<strong>-A FORWARD -j REJECT &#8211;reject-with icmp-host-prohibited</strong><br />
<strong>COMMIT</strong></p>
<p style="text-align: justify;"><strong>*nat</strong><br />
<strong>:PREROUTING ACCEPT [1928198:538190860]</strong><br />
<strong>:POSTROUTING ACCEPT [239877:14576705]</strong><br />
<strong>:OUTPUT ACCEPT [239877:14576705]</strong><br />
<strong>-A PREROUTING -i eth0 -p tcp -m tcp &#8211;dport 80 -m mark &#8211;mark 0x64 -j DNAT &#8211;to-destination :8080</strong><br />
<strong>COMMIT</strong></p>
<p style="text-align: justify;"><strong>*mangle</strong><br />
<strong>:PREROUTING ACCEPT [5793867:3540661671]</strong><br />
<strong>:INPUT ACCEPT [5504145:3514609021]</strong><br />
<strong>:FORWARD ACCEPT [0:0]</strong><br />
<strong>:OUTPUT ACCEPT [4546890:3055306048]</strong><br />
<strong>:POSTROUTING ACCEPT [4546890:3055306048]</strong><br />
<strong>-A PREROUTING -i eth0 -p tcp -m tcp &#8211;dport 80 -j MARK &#8211;set-xmark 0x64/0xffffffff</strong><br />
<strong>COMMIT</strong></p>
<figure id="attachment_1576" aria-describedby="caption-attachment-1576" style="width: 893px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1576" src="http://blog.goreinnamah.com/wp-content/uploads/2017/11/500.png" alt="" width="893" height="637" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/11/500.png 893w, https://blog.goreinnamah.com/wp-content/uploads/2017/11/500-300x214.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/11/500-768x548.png 768w" sizes="auto, (max-width: 893px) 100vw, 893px" /><figcaption id="caption-attachment-1576" class="wp-caption-text">Konfigurasi IPTables</figcaption></figure>
<p style="text-align: justify;">Setelah melakuan konfigurasi, untuk mengaktifkan iptables tersebut maka lakukan perintah berikut:</p>
<pre><strong>sh -c 'iptables-restore -t &lt; /etc/sysconfig/iptables'</strong></pre>
<h3 style="text-align: justify;">Instalasi beberapa paket</h3>
<p style="text-align: justify;">Seperti namanya <strong>EJBCA (Enterprise Java Bean Certification Authority)</strong>, maka kita membutuhkan java agar software ini dapat running. Versi OpenJDK yang harus diinstal adalah versi 7. Caranya:</p>
<pre><strong>yum install java-1.7.0-openjdk-devel.x86_64</strong></pre>
<figure id="attachment_1579" aria-describedby="caption-attachment-1579" style="width: 1351px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1579" src="http://blog.goreinnamah.com/wp-content/uploads/2017/11/501.png" alt="" width="1351" height="460" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/11/501.png 1351w, https://blog.goreinnamah.com/wp-content/uploads/2017/11/501-300x102.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/11/501-768x261.png 768w, https://blog.goreinnamah.com/wp-content/uploads/2017/11/501-1024x349.png 1024w" sizes="auto, (max-width: 1351px) 100vw, 1351px" /><figcaption id="caption-attachment-1579" class="wp-caption-text">Instalasi Openjdk-7</figcaption></figure>
<p style="text-align: justify;">Setelah selesai melakukan instalasi <strong>openjdk-7</strong>, selanjutnya kita akan meng-install beberapa paket tambahan yaitu ant, ant-antlr, dan unzip. Caranya:</p>
<pre><strong>yum install ant ant-antlr unzip</strong></pre>
<figure id="attachment_1581" aria-describedby="caption-attachment-1581" style="width: 772px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1581" src="http://blog.goreinnamah.com/wp-content/uploads/2017/11/502.png" alt="" width="772" height="321" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/11/502.png 772w, https://blog.goreinnamah.com/wp-content/uploads/2017/11/502-300x125.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/11/502-768x319.png 768w" sizes="auto, (max-width: 772px) 100vw, 772px" /><figcaption id="caption-attachment-1581" class="wp-caption-text">instalasi ant ant-antlr unzip</figcaption></figure>
<p style="text-align: justify;">Setelah melakukan instalasi openjdk 7 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_36" aria-describedby="caption-attachment-36" style="width: 485px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-36" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/6-cek-versi-java-kembali.png" alt="" width="485" height="79" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/6-cek-versi-java-kembali.png 485w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/6-cek-versi-java-kembali-300x49.png 300w" sizes="auto, (max-width: 485px) 100vw, 485px" /><figcaption id="caption-attachment-36" class="wp-caption-text">Sudah menggunakan java versi 7 sesuai yang diperlukan</figcaption></figure>
<p style="text-align: justify;">dari hasil di atas didapatkan kalau versi java yang terpasang adalah versi 7.</p>
<h3 style="text-align: justify;"><strong>Instalasi dan Konfigurasi MariaDB</strong></h3>
<p style="text-align: justify;">Tahap berikutnya kita harus melakukan instalasi Database kemudian konfigurasi. konfigurasi yang saya lakukan disini hanyalah konfigurasi biasa tanpa <em>Security </em>yang cukup baik (hanya untuk keperluan percobaan). Untuk kalian yang ingin mengimplementasikannya di production, pastikan mengamankan direktori mysql dan meng-<em>update </em>/etc/mysql/my.cnf sebelum menjalankan service database. Konfigurasi ini juga menggunakan utf-8 encoding yang menjadi syarat dari EJBCA 6.3.1.1. Mari kita mulai instalasinya terlebih dahulu:</p>
<p style="text-align: justify;">Untuk melakukan instalasi mariaDB 10.2 (stable) pada CentOS 7. Tambahkan dulu repositorinya dengan cara:</p>
<pre style="text-align: justify;"><strong><code>#</code> MariaDB 10.2 CentOS repository list - created 2017-11-24 07:32 UTC <code>#</code> <a href="http://downloads.mariadb.org/mariadb/repositories/">http://downloads.mariadb.org/mariadb/repositories/</a> </strong> <strong>[mariadb] </strong> <strong>name = MariaDB </strong> <strong>baseurl = <a href="http://yum.mariadb.org/10.2/centos7-amd64">http://yum.mariadb.org/10.2/centos7-amd64</a> </strong> <strong>gpgkey= <a href="https://yum.mariadb.org/RPM-GPG-KEY-MariaDB">https://yum.mariadb.org/RPM-GPG-KEY-MariaDB</a> </strong> <strong>gpgcheck=1</strong></pre>
<p style="text-align: justify;">Setelah itu update paket CentOS dan install MariaDB 10.2. Caranya:</p>
<pre><strong>yum update</strong>
<strong>yum install MariaDB-server MariaDB-client</strong></pre>
<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>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;">Setelah 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>
<p style="text-align: justify;">Pada konfigurasi <em>my.cnf </em>di atas, kita memasukkan lokasi untuk meletakkan log. Untuk 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>
<p style="text-align: justify;">Setelah MariaDB terinstall dan konfigurasi dilakukan, tahap selanjutnya adalah merestart service database dan membuat database untuk EJBCA 6.3.1.1 dan juga sebuah user untuk mengakses database EJBCA 6.3.1.1 tersebut (jangan menggunakan user root untuk EJBCA 6.3.1.1 dalam mengakses database-nya). Caranya:</p>
<pre><strong>service mysql restart</strong></pre>
<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_57" aria-describedby="caption-attachment-57" style="width: 845px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-57" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/15-Create-user-dbca.png" alt="" width="845" height="333" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/15-Create-user-dbca.png 845w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/15-Create-user-dbca-300x118.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/15-Create-user-dbca-768x303.png 768w" sizes="auto, (max-width: 845px) 100vw, 845px" /><figcaption id="caption-attachment-57" class="wp-caption-text">Create db untuk ejbca 6.3.1.1 dan user untuk mengaksesnya</figcaption></figure>
<p style="text-align: justify;">kalau sudah, lakukan verifikasi dengan cara login dengan menggunakan user yang baru saja kita buat tadi dan test aksesnya. Caranya:</p>
<pre><strong>mysql -u &lt;user_db&gt; -p
use &lt;db_ejbca&gt;;
show grants for '&lt;user_db&gt;@'&lt;ip&gt;';
exit</strong></pre>
<figure id="attachment_60" aria-describedby="caption-attachment-60" style="width: 934px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-60" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/16-periksa-user.png" alt="" width="934" height="335" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/16-periksa-user.png 934w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/16-periksa-user-300x108.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/16-periksa-user-768x275.png 768w" sizes="auto, (max-width: 934px) 100vw, 934px" /><figcaption id="caption-attachment-60" class="wp-caption-text">test user yang baru dibuat untuk database ejbca 6.3.1.1</figcaption></figure>
<p style="text-align: justify;">Pada bagian akhir, restart service database tersebut dengan perintah:</p>
<pre><strong>service mysql restart</strong></pre>
<h3 style="text-align: justify;"><strong>Membuat Struktur Direktori</strong></h3>
<p style="text-align: justify;">Sekarang kita akan membuat struktur direktori dari aplikasi itu sendiri. Saya memutuskan untuk meletakkan aplikasi-aplikasi yang saya butuhkan pada <strong>/opt</strong>. Secara default, Semua dokumentasi EJBCA mengasumsikan kita melakukan instalasi pada home direktori. Namun saya lebih senang untuk menggunakan simbolik link agar lebih mudah.</p>
<ul style="text-align: justify;">
<li><strong>/opt </strong>saya gunakan untuk meletakkan semua file sehingga kita bisa dengan mudah menghapusnya dan memulai lagi dari awal.</li>
<li>Download Jboss dan EJBCA 6.3.1.1 dengan wget (link ada di “alat &amp; bahan”) dan letakkan pada <strong>/opt</strong>.</li>
</ul>
<figure id="attachment_72" aria-describedby="caption-attachment-72" style="width: 1301px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-72" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/18-wget-jboss.png" alt="" width="1301" height="199" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/18-wget-jboss.png 1301w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/18-wget-jboss-300x46.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/18-wget-jboss-768x117.png 768w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/18-wget-jboss-1024x157.png 1024w" sizes="auto, (max-width: 1301px) 100vw, 1301px" /><figcaption id="caption-attachment-72" class="wp-caption-text">wget jboss</figcaption></figure>
<p style="text-align: justify;">Setelah semua file terdownload (dalam bentuk zip), lalu ekstrak dan buat beberapa link sebagai <em>shortcut</em> untuk menuju folder tersebut. caranya:</p>
<pre><strong>sudo unzip jboss-as-7.1.1.Final.zip
sudo unzip ejbca_ce_6_3_1_1.zip
sudo ln -s /opt/ejbca_ce_6_3_1_1 ejbca
sudo ln -s /opt/jboss-as-7.1.1.Final jboss</strong></pre>
<p style="text-align: justify;">lalu masukkan perintah berikut:</p>
<pre><strong>export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk/
</strong><strong>export PATH=$JAVA_HOME/bin:$PATH
</strong><strong>export JBOSS_HOME=/opt/jboss
</strong><strong>export PATH=$PATH:$JBOSS_HOME/bin:$PATH
</strong><strong>export APPSRV_HOME=/opt/jboss
</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>
<h3 style="text-align: justify;"><strong>Menambahkan Akun User untuk OS</strong></h3>
<p style="text-align: justify;">Sekarang kita akan membuat akun untuk service ejbca. Ada 2 akun yang akan dibuat di sini, yang pertama akun sistem dengan nama <strong>jboss </strong>dan yang kedua adalah akun <strong>ejbca </strong>untuk keperluan administratif setelah server ini dibuat.</p>
<p style="text-align: justify;">Sangat penting <strong>jboss </strong>memiliki <strong>/bin/bash </strong>dalam sebuah<strong> <em>shell </em></strong>dan sebuah <strong>/opt/jboss </strong>sebagai <em>home directory.</em></p>
<pre><strong>useradd ­s /bin/bash -­r -­d /opt/jboss ­-M -­U jboss</strong>
<strong>useradd -­m -­U -­G jboss,wheel ejbca</strong></pre>
<h3 style="text-align: justify;"><strong>Membuat Direktori untuk Console Log</strong></h3>
<p style="text-align: justify;">Sekarang user service sudah dibuat, kita bisa membuat direktori yang akan menampung <strong>jboss console logs:</strong></p>
<pre><strong>mkdir -­p /var/log/ejbca</strong>
<strong>chown jboss:jboss /var/log/ejbca</strong></pre>
<ul style="text-align: justify;">
<li>Pada tahap ini, server sudah dibuat, mariadb sudah berjalan, dan kita sudah siap untuk melakukan instalasi jboss. Pada tahap ini merupakan tahap yang baik untuk melakukan snapshot (kalau kalian menggunakan <em>Virtual Machine</em>).</li>
</ul>
<h2 style="text-align: justify;">Instalasi JBOSS</h2>
<p style="text-align: justify;">Sekarang adalah saatnya melakukan instalasi JBoss. Kita tidak akan melakukan konfigurasi setiap detailnya (tanpa email, logging default), namun kita akan melakukan cukup perubahan untuk JBoss ini dapat berjalan sesuai dengan yang dibutuhkan untuk menginstall EJBCA 6.3.1.1.</p>
<h3 style="text-align: justify;"><strong>Konfigurasi JBoss Instance (Standalone)</strong></h3>
<p style="text-align: justify;">Pertama, kita akan melakukan konfigurasi Instance JBoss yang nanti akan digunakan oleh EJBCA 6.3.1.1. Namanya &#8220;<strong>standalone&#8221;</strong>, dan hadir secara default dalam JBoss 7.1.1.</p>
<p style="text-align: justify;">Pada direktori <strong>/opt/jboss/bin</strong> terdapat sebuah script yang bernama <strong>standalone.sh</strong> yang merupakan titik utama dari Jboss. Script ini memberi referensi pada sebuah file konfigurasi yang terletak pada folder yang sama bernama <strong>standalone.conf</strong>. Kita tidak akan memodifikasi script startup-nya, tapi kita perlu untuk memodifikasi file konfigurasinya.</p>
<p style="text-align: justify;">Sebagai langkah awal, kita akan mem-backup file konfigurasi defaultnya terlebih dahulu. Caranya:</p>
<pre><strong>cd /opt/jboss/bin
cp standalone.conf standalone.conf.bak</strong></pre>
<p style="text-align: justify;">File konfigurasi tersebut juga berisi satu set option JVM yang nantinya akan kita ubah sedikit. Ini bukanlah perubahan yang wajib, tapi perubahan tersebut dapat mengalokasikan memori lebih pada JVM.</p>
<ul style="text-align: justify;">
<li>Ada beberapa entri yang dinonaktifkan, namun yang penting di sini adalah <strong>JAVA_HOME</strong> dan <strong>JAVA_OPTS</strong>.</li>
</ul>
<pre><strong>vi standalone.conf</strong></pre>
<p style="text-align: justify;">Sesuaikan entri berikut:</p>
<pre><strong>JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk
if [ "x$JAVA_OPTS" = "x" ]; then
   JAVA_OPTS="-Xms128m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"</strong></pre>
<h3 style="text-align: justify;"><strong>Menambahkan Service Init JBoss</strong></h3>
<p style="text-align: justify;">script <strong>/opt/jboss/bin/standalone.sh </strong>dapat selalu digunakan untuk menjalankan dan memberhentikan jboss secara manual. Namun, kita perlu mengkonfigurasi sebuah service dengan nama <strong>&#8220;ejbca&#8221; </strong>untuk mengatasi proses tersebut. Untungnya, jboss memberikan sebuah script untuk kita bisa menggunakannya:</p>
<ul style="text-align: justify;">
<li>Saya tahu akan sedikit bingungmemberi nama &#8220;<strong>ejbca&#8221; </strong>untuk sebuah jboss service, tapi saya berasumsi bahwa instance jboss hanya akan berjalan untuk aplikasi ejbca dan tidak digunakan untuk tujuan atau aplikasi lainnya.</li>
<li>script init itu sendiri berisi variabel-variabel penting: path untuk menuju <em>home directory </em>JBoss.</li>
</ul>
<p style="text-align: justify;">Pertama, kita akan mengcopy file contoh yang diberikan Jboss ke lokasi yang tepat:</p>
<pre><strong>cp /opt/jboss/bin/init.d/jboss-­as-­standalone.sh /etc/init.d/ejbca</strong>
<strong>mkdir /etc/ejbca</strong>
<strong>cp /opt/jboss/bin/init.d/jboss­-as.conf /etc/ejbca/ejbca­-init.conf</strong></pre>
<p style="text-align: justify;">Kemudian kita akan memodifikasi kedua file agar bisa digunakan untuk instalasi kita. Berikut adalah contohnya:</p>
<pre><strong>vi /etc/init.d/ejbca</strong></pre>
<pre><strong>### Start ejbca init.d Delta ###</strong>
<strong>### BEGIN INIT INFO</strong>
<strong># chkconfig ­- 345 97 17</strong>
<strong># Provides: ejbca</strong>
<strong># Required­Start: $remote_fs $syslog $network mysqld</strong>
<strong># Required­Stop: $remote_fs $syslog $network</strong>
<strong># Short­Description: ejbca jboss instance</strong>
<strong># Description: ejbca jboss instance</strong>
<strong># Default­Start: 3 4 5</strong>
<strong># Default­Stop: 0 1 2 6</strong>
<strong>### END INIT INFO</strong>
<strong>#</strong>
<strong># processname: ejbca</strong>
<strong># pidfile: /var/run/jboss-­standalone.pid</strong>
<strong># config: /etc/ejbca/ejbca-­init.conf</strong>
<strong>JBOSS_CONF="/etc/ejbca/ejbca-­init.conf"</strong>
<strong>JBOSS_HOME=/opt/jboss</strong>
<strong>prog='ejbca jboss instance'</strong>
<strong>### End ejbca init.d Delta ###</strong></pre>
<p style="text-align: justify;">file <strong>ejbca-init.conf </strong>memiliki 2 variabel yang sangat penting di dalamnya: username proses jboss dan nama log file.</p>
<pre><strong>vi /etc/ejbca/ejbca­-init.conf</strong></pre>
<pre><strong>### Start ejbca-­init.conf ###
# General configuration for the init.d scripts,
# not necessarily for JBoss AS itself.
# The username who should own the process.
#
JBOSS_USER=jboss
# The amount of time to wait for startup
#
# STARTUP_WAIT=10
# The amount of time to wait for shutdown
#
# SHUTDOWN_WAIT=10
# Location to keep the console log
#
JBOSS_CONSOLE_LOG=/var/log/ejbca/console.log
### End ejbca­init.conf ###</strong></pre>
<p style="text-align: justify;">Terakhir, kita menggunakan <strong>chkconfig </strong>untuk menambahkan service tersebut kedalam ierarki <strong>rc </strong> dan mengatur <em>runlevel-</em>nya:</p>
<pre><strong>chkconfig ­­--add ejbca</strong>
<strong>chkconfig --­­level 345 mysql on</strong>
<strong>chkconfig ­­--level 345 ejbca on</strong></pre>
<ul style="text-align: justify;">
<li>file init harus tetap dimiliki oleh <strong>root:root</strong>, dengan <em>default permissions.</em></li>
</ul>
<h3 style="text-align: justify;"><strong>Menambahkan Export Class pada JBoss</strong></h3>
<p style="text-align: justify;">Sekarang kita akanmemulai <em>tweak </em>pada konfigurasi JBoss. Kita akan memulai dengan mengaktifkan beberapa fungsi keamanan yang dibutuhkan oleh EJBCA 6.3.1.1. Caranya:</p>
<pre><strong>cd /opt/jboss/modules/sun/jdk/main
vi module.xml</strong></pre>
<p style="text-align: justify;">Tambahkan beberapa entry berikut pada bagian &#8220;System export&#8221;:</p>
<pre><strong>&lt;path name="sun/security/x509"/&gt;
&lt;path name="sun/security/pkcs11"/&gt;
&lt;path name="sun/security/pkcs11/wrapper"/&gt;
&lt;path name="sun/security/action"/&gt;</strong></pre>
<figure id="attachment_90" aria-describedby="caption-attachment-90" style="width: 377px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-90" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/39-isi-module-xml.png" alt="" width="377" height="352" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/39-isi-module-xml.png 377w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/39-isi-module-xml-300x280.png 300w" sizes="auto, (max-width: 377px) 100vw, 377px" /><figcaption id="caption-attachment-90" class="wp-caption-text">Penambahan entry pada System Export</figcaption></figure>
<h3 style="text-align: justify;"><strong>Menambahkan MariaDB Java Client</strong></h3>
<p style="text-align: justify;">JBoss merupakan sebuah aplikasi yang <em>running </em>dengan java. Agar JBoss dapat “ngobrol” dengan MariaDB maka kita akan membutuhkan sebuah penghubung bernama MariaDB Java Client. Untuk itu tahap pertama yang harus dilakukan adalah download MariaDB Java Client tersebut, link sudah saya sertakan di “alat dan bahan”. (versi yang saya gunakan adalah Mariadb-java-client-1.2.0)</p>
<pre><strong>cd /opt/jboss/modules/org
mkdir -p mariadb/main
cd mariadb/main
cp /opt/mariadb-java-client-1.2.0.jar /opt/jboss/modules/org/mariadb/main</strong></pre>
<p style="text-align: justify;">Setelah selesai, kita masih perlu membuat 2 file lagi dan meletakkannya pada lokasi yang sama dengan <strong>mariadb-java-client-1.2.0.jar</strong> yaitu <strong>mariadb-java-client-1.2.0.jar.index</strong> dan <strong>module.xml</strong>. Caranya:</p>
<pre><strong>vi mariadb-java-client-1.2.0.jar.index</strong></pre>
<p style="text-align: justify;">isinya:</p>
<pre><strong>org/mariadb/jdbc/internal/common/packet
META-INF/maven
org/mariadb/jdbc/internal/common/query/parameters
org/mariadb/jdbc/internal/mysql/packet/commands
org
META-INF
org/mariadb/jdbc/internal/common/packet/commands
META-INF/maven/org.mariadb.jdbc/mariadb-java-client
META-INF/maven/org.mariadb.jdbc
org/mariadb/jdbc/internal/common/queryresults
org/mariadb/jdbc/internal
org/mariadb/jdbc/internal/mysql
org/mariadb/jdbc/internal/common/query
org/mariadb
org/mariadb/jdbc/internal/mysql/packet
META-INF/services
org/mariadb/jdbc
org/mariadb/jdbc/internal/common
org/mariadb/jdbc/internal/common/packet/buffer
</strong></pre>
<pre><strong>vi module.xml</strong></pre>
<p style="text-align: justify;">isinya:</p>
<pre><strong>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;module xmlns="urn:jboss:module:1.1" name="org.mariadb"&gt;
  &lt;resources&gt;
    &lt;resource-root path="mariadb-java-client-1.2.0.jar"/&gt;
   &lt;/resources&gt;
   &lt;dependencies&gt;
    &lt;module name="javax.api"/&gt;
    &lt;module name="javax.transaction.api"/&gt;
   &lt;/dependencies&gt;
&lt;/module&gt;</strong></pre>
<h3 style="text-align: justify;"><strong>Starting JBoss</strong></h3>
<p style="text-align: justify;">Beberapa tweak harus kita lakukan setelah JBoss berjalan. Karena beberapa perintah di atas ada yang dijalankan sebagai <strong>root</strong>, kita akan membuat user <strong>jboss</strong> menjadi owner dari folder jboss yang sudah kita extract.</p>
<ul style="text-align: justify;">
<li>Jangan jalankan perintah “<strong>chown -R root:root /opt/jboss</strong>” – kita ingin agar <strong>root</strong> tetap menjadi pemilik dari Symbolic link.</li>
</ul>
<p style="text-align: justify;">Maka jalankan perintah berikut:</p>
<pre><strong>chown -R jboss:jboss /opt/jboss-as-7.1.1.Final</strong></pre>
<p style="text-align: justify;">Sekarang kita testing bagaimana script init yang sudah kita buat tadi bekerja. Caranya:</p>
<pre style="text-align: justify;"><strong>service ejbca start</strong></pre>
<p style="text-align: justify;">Sekarang kita bisa berharap kalau service dari init script tadi berjalan. Kita bisa melihat console log yang sudah kita buat di <strong>/var/log/ejbca, </strong>caranya:</p>
<pre><strong>tail -­f /var/log/ejbca/console.log</strong></pre>
<p style="text-align: justify;">Seharusnya kamu akan melihat baris seperti ini di akhir file tersebut:</p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-1596" src="http://blog.goreinnamah.com/wp-content/uploads/2017/11/Screenshot-from-2017-11-27-20-36-07.png" alt="" width="883" height="224" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/11/Screenshot-from-2017-11-27-20-36-07.png 883w, https://blog.goreinnamah.com/wp-content/uploads/2017/11/Screenshot-from-2017-11-27-20-36-07-300x76.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/11/Screenshot-from-2017-11-27-20-36-07-768x195.png 768w" sizes="auto, (max-width: 883px) 100vw, 883px" /></p>
<p style="text-align: justify;">Dari log di atas, kita bisa tahu kalau:</p>
<ul style="text-align: justify;">
<li>halaman web jboss admin hanya bisa diakses melalui <strong>localhost. </strong>Jadi kalau kamu belum punya browser dalam servermu, segeralah install.</li>
<li>URL default dari halaman admin tersebut adalah <strong>http://localhost:9990/console/App.html#server-overview</strong></li>
<li>Ketika kamu melihat baris &#8220;<strong>7.1.1.Final &#8220;Brontes&#8221; started in xxxx ms&#8221;, </strong>berarti JBoss sudah selesai <em>loading.</em></li>
</ul>
<h3 style="text-align: justify;"><strong>Menambahkan Data Source</strong></h3>
<p style="text-align: justify;">Sekarang <em>service</em> JBoss sudah berjalan, kita bisa menambahkan data source. Kita akan melakukan ini melalui CLI-nya JBoss, yang akan mengupdate konfigurasi yang berada pada instance <strong>Standalone</strong>. Sebelum melakukan perubahan maka ada baiknya kita membackup konfigurasi awal terlebih dahulu. Caranya (masih dengan user jboss):</p>
<pre><strong>cd /opt/jboss/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/jboss/bin
sh jboss-cli.sh
connect</strong></pre>
<p style="text-align: justify;">Lalu jalankan perintah berikut:</p>
<pre><strong>/subsystem=datasources/jdbc-driver=org.mariadb.jdbc.Driver:add(driver-name=org.mariadb.jdbc.Driver,driver-module-name=org.mariadb,driver-xa-datasource-class-name=org.mariadb.jdbc.MySQLDataSource)
:reload
Exit</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_103" aria-describedby="caption-attachment-103" style="width: 1348px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-103" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/43-tambahin-modul-mariadb.png" alt="" width="1348" height="184" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/43-tambahin-modul-mariadb.png 1348w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/43-tambahin-modul-mariadb-300x41.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/43-tambahin-modul-mariadb-768x105.png 768w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/43-tambahin-modul-mariadb-1024x140.png 1024w" sizes="auto, (max-width: 1348px) 100vw, 1348px" /><figcaption id="caption-attachment-103" class="wp-caption-text">Mengaktifkan MariaDB Connect</figcaption></figure>
<p style="text-align: justify;">Hal yang kita lakukan pada CLI ini mendefinisikan driver mariadb yang ada pada <strong>/opt/jboss/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_109" aria-describedby="caption-attachment-109" style="width: 1112px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-109" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/44-membuktikan-mariadb-datasource.png" alt="" width="1112" height="337" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/44-membuktikan-mariadb-datasource.png 1112w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/44-membuktikan-mariadb-datasource-300x91.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/44-membuktikan-mariadb-datasource-768x233.png 768w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/44-membuktikan-mariadb-datasource-1024x310.png 1024w" sizes="auto, (max-width: 1112px) 100vw, 1112px" /><figcaption id="caption-attachment-109" class="wp-caption-text">Hasil dari penambahan driver yang dilakukan pada JBoss CLI</figcaption></figure>
<p style="text-align: justify;">Sebagai bukti lagi kalau driver tersebut sudah masuk, kita akan melihat pada log yang tertera di <strong> /var/log/ejbca/console.log</strong>. Namun sebelumnya kita harus me-restart service jboss yang sedang berjalan. Caranya:</p>
<pre><strong>service ejbca restart
</strong><strong>tail /var/log/ejbca/console.log</strong></pre>
<p style="text-align: justify;">Maka kan tampil hasil seperti berikut kalau sukses:</p>
<figure id="attachment_111" aria-describedby="caption-attachment-111" style="width: 1356px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-111" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/45-bukti-mariadb-sudah-running.png" alt="" width="1356" height="498" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/45-bukti-mariadb-sudah-running.png 1356w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/45-bukti-mariadb-sudah-running-300x110.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/45-bukti-mariadb-sudah-running-768x282.png 768w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/45-bukti-mariadb-sudah-running-1024x376.png 1024w" sizes="auto, (max-width: 1356px) 100vw, 1356px" /><figcaption id="caption-attachment-111" class="wp-caption-text">MariaDB sudah ada</figcaption></figure>
<h3 style="text-align: justify;"><strong>Menghapus Datasource H2 dan Drivernya</strong></h3>
<p style="text-align: justify;">Secara default, instance <strong>standalone</strong> didefinisikan dengan sebuah h2/hsqldb database connector dan sebuah database contoh. Kita tidak membutuhkan ini, jadi kita akan memodifikasi kembali <strong>standalone.xml</strong> dan menonaktifkannya.</p>
<ul style="text-align: justify;">
<li>Ingat bahwa database instance H2 adalah database yang bersifat sementara di memory yang tidak menyimpan data dalam disk, tidak menyediakan koneksi TCP/IP eksternal dan dapat diabaikan saja.</li>
</ul>
<pre><strong>cd /opt/jboss/standalone/configuration
vi standalone.xml</strong></pre>
<p style="text-align: justify;">Buang bagian berikut:</p>
<pre><strong>&lt;datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true"&gt;
                     &lt;connection-url&gt;jdbc:h2:mem:test;DB_CLOSE_DELAY=-1&lt;/connection-url&gt;
                     &lt;driver&gt;h2&lt;/driver&gt;
                     &lt;security&gt;
                         &lt;user-name&gt;sa&lt;/user-name&gt;
                         &lt;password&gt;sa&lt;/password&gt;
                     &lt;/security&gt;
                 &lt;/datasource&gt;</strong></pre>
<figure id="attachment_119" aria-describedby="caption-attachment-119" style="width: 977px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-119" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/46-buang-exampleDS.png" alt="" width="977" height="125" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/46-buang-exampleDS.png 977w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/46-buang-exampleDS-300x38.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/46-buang-exampleDS-768x98.png 768w" sizes="auto, (max-width: 977px) 100vw, 977px" /><figcaption id="caption-attachment-119" class="wp-caption-text">Buang bagian exampleDS</figcaption></figure>
<p style="text-align: justify;">dan juga buang bagian berikut:</p>
<pre><strong>&lt;driver name="h2" module="com.h2database.h2"&gt; 
                     &lt;xa-datasource-class&gt;org.h2.jdbcx.JdbcDataSource&lt;/xa-datasource-class&gt;
                 &lt;/driver&gt;</strong></pre>
<figure id="attachment_120" aria-describedby="caption-attachment-120" style="width: 616px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-120" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/47-buang-h2-driver.png" alt="" width="616" height="49" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/47-buang-h2-driver.png 616w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/47-buang-h2-driver-300x24.png 300w" sizes="auto, (max-width: 616px) 100vw, 616px" /><figcaption id="caption-attachment-120" class="wp-caption-text">buang h2 driver</figcaption></figure>
<p style="text-align: justify;">setelah itu, kita akan kembali me-restart JBoss dan melihat log yang ada pada <strong>console.log</strong>. apabila kalian perhatikan maka sudah tidak ada lagi</p>
<p style="text-align: justify;"><strong>[org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool — 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)</strong></p>
<p style="text-align: justify;">dan yang ada hanya</p>
<p style="text-align: justify;"><strong>[org.jboss.as.connector.subsystems.datasources] (management-handler-thread – 4) JBAS010404: Deploying non-JDBC-compliant driver class org.mariadb.jdbc.Driver (version 1.1)</strong></p>
<h3 style="text-align: justify;"><strong>Menambahkan Datasource untuk database EJBCA 6.3.1.1</strong></h3>
<p style="text-align: justify;">Setelah tadi kita menghapus datasource untuk H2, sekarang kita akan menambahkan datasource untuk database EJBCA 6.3.1.1. Fungsinya disini nanti adalah ketika kita mau melakukan instalasi EJBCA 6.3.1.1, maka jboss sudah mengenali nama database yang akan digunakan untuk menyimpan tabel EJBCA 6.3.1.1 serta user dan password untuk mengakses database tersebut. Caranya:</p>
<pre><strong>cd /opt/jboss/bin
sh jboss-cli.sh
connect</strong></pre>
<p style="text-align: justify;">lalu tambahkan file berikut:</p>
<pre><b>data-source add --name=ejbcads --driver-name="org.mariadb.jdbc.Driver" --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_username&gt;" --password="&lt;password&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;"</b>
</pre>
<ul style="text-align: justify;">
<li>Ubah yang ada di dalam tanda &lt;&gt; sesuai dengan yang kita punya</li>
</ul>
<figure id="attachment_125" aria-describedby="caption-attachment-125" style="width: 1349px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-125" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/49-penambahan-user-untuk-database-dbca-1.png" alt="" width="1349" height="111" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/49-penambahan-user-untuk-database-dbca-1.png 1349w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/49-penambahan-user-untuk-database-dbca-1-300x25.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/49-penambahan-user-untuk-database-dbca-1-768x63.png 768w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/49-penambahan-user-untuk-database-dbca-1-1024x84.png 1024w" sizes="auto, (max-width: 1349px) 100vw, 1349px" /><figcaption id="caption-attachment-125" class="wp-caption-text">penambahan data source untuk EJBCA 6.3.1.1</figcaption></figure>
<p style="text-align: justify;">Setelah ditambahkan maka datasource tersebut akan masuk ke dalam <strong>standalone.xml</strong>. Untuk membuktikannya, maka lakukan:</p>
<pre><strong>vi /opt/jboss/standalone/configuration/standalone.xml</strong></pre>
<p style="text-align: justify;">Cari dan temukan baris berikut:</p>
<figure id="attachment_136" aria-describedby="caption-attachment-136" style="width: 702px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-136" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/50-mariadb-ada-di-standalone-xml.png" alt="" width="702" height="228" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/50-mariadb-ada-di-standalone-xml.png 702w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/50-mariadb-ada-di-standalone-xml-300x97.png 300w" sizes="auto, (max-width: 702px) 100vw, 702px" /><figcaption id="caption-attachment-136" class="wp-caption-text">datasource yang berhasil ditambahkan</figcaption></figure>
<h3 style="text-align: justify;"><strong>Konfigurasi User Admin untuk JBoss Web</strong></h3>
<p style="text-align: justify;">apabila kita mengakses <strong>console JBoss 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_132" aria-describedby="caption-attachment-132" style="width: 791px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-132" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/1-2.png" alt="" width="791" height="513" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-2.png 791w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-2-300x195.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-2-768x498.png 768w" sizes="auto, (max-width: 791px) 100vw, 791px" /><figcaption id="caption-attachment-132" class="wp-caption-text">Jboss console via web tapi masih ada error</figcaption></figure>
<p style="text-align: justify;">Hal itu disebabkan oleh belum adanya admin User yang dibuat untuk mengakses console tersebut. Untuk itu kita perlu membuatnya. Caranya:</p>
<pre><strong>cd /opt/jboss/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): a</strong>

<strong>Enter the details of the new user to add.</strong>
<strong> Realm (ManagementRealm) :</strong>
<strong> Username : xxxx</strong>
<strong> Password :</strong>
<strong> Re-enter Password :</strong>
<strong> About to add user 'xxxx' for realm 'ManagementRealm'</strong>
<strong> Is this correct yes/no? yes</strong>
<strong> Added user 'xxxx' to file '/opt/jboss-as-7.1.1.Final/standalone/configuration/mgmt-users.properties'</strong>
<strong> Added user 'xxxx' to file '/opt/jboss-as-7.1.1.Final/domain/configuration/mgmt-users.properties'</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>“yes/no” <b>→</b> pilih “yes”</li>
</ul>
<p style="text-align: justify;">Pada saat ini seharusnya kita sudah bisa mengakses interface dari <strong>JBoss 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_140" aria-describedby="caption-attachment-140" style="width: 1375px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-140" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/1-3.png" alt="" width="1375" height="468" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-3.png 1375w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-3-300x102.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-3-768x261.png 768w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-3-1024x349.png 1024w" sizes="auto, (max-width: 1375px) 100vw, 1375px" /><figcaption id="caption-attachment-140" class="wp-caption-text">JBoss 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_141" aria-describedby="caption-attachment-141" style="width: 962px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-141" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/1-4.png" alt="" width="962" height="606" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-4.png 962w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-4-300x189.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-4-768x484.png 768w" sizes="auto, (max-width: 962px) 100vw, 962px" /><figcaption id="caption-attachment-141" class="wp-caption-text">Web Console JBoss</figcaption></figure>
<h3 style="text-align: justify;"><strong>Konfigurasi PKCS11 Provider pada EJBCA 6.3.1.1</strong></h3>
<p style="text-align: justify;">Untuk melakukan <em>setup </em>pada PKCS11 di server ini, lakukan beberapa langkah berikut pada terminal:</p>
<ol style="text-align: justify;">
<li>Buat file konfigurasi Luna dengan konten di bawah:<br />
# vi $JAVA_HOME/jre/lib/security/luna.cfg<br />
dan masukkan perintah berikut</li>
</ol>
<pre><strong>#SafeNet Luna</strong>
<strong>name = Luna</strong>
<strong>library = /usr/safenet/lunaclient/lib/libCryptoki2_64.so</strong>
<strong>description = Luna config</strong>
<strong>slot = 1</strong>
<strong>attributes(*,*,*) = {</strong>
<strong>CKA_TOKEN = true</strong>
<strong>}</strong>
<strong>attributes(*,CKO_SECRET_KEY,*) = {</strong>
<strong>CKA_CLASS=4</strong>
<strong>CKA_PRIVATE= true</strong>
<strong>CKA_KEY_TYPE = 21</strong>
<strong>CKA_SENSITIVE= true</strong>
<strong>CKA_ENCRYPT= true</strong>
<strong>CKA_DECRYPT= true</strong>
<strong>CKA_WRAP= true</strong>
<strong>CKA_UNWRAP= true</strong>
<strong>}</strong>
<strong>attributes(*,CKO_PRIVATE_KEY,*) = {</strong>
<strong>CKA_CLASS=3</strong>
<strong>CKA_LABEL=true</strong>
<strong>CKA_PRIVATE = true</strong>
<strong>CKA_DECRYPT=true</strong>
<strong>CKA_SIGN=true</strong>
<strong>CKA_UNWRAP=true</strong>
<strong>}</strong>
<strong>attributes(*,CKO_PUBLIC_KEY,*) = {</strong>
<strong>CKA_CLASS=2</strong>
<strong>CKA_LABEL=true</strong>
<strong>CKA_ENCRYPT = true</strong>
<strong>CKA_VERIFY=true</strong>
<strong>CKA_WRAP=true</strong>
<strong>}</strong></pre>
<blockquote><p>Bisa juga mengganti &#8220;/usr/safenet/lunaclient/lib/libCryptoki2_64.so&#8221; dengan&#8221;/usr/safenet/lunaclient/lib/libshim.so&#8221;</p></blockquote>
<ul style="text-align: justify;">
<li> Modifikasi file <strong>java.security </strong>untuk memasukkan PKCS11. Buka file <strong>java.security </strong>dan lakukan perubahan berikut:<br />
<strong>Untuk Java 6:</strong><br />
<strong># vi $JAVA_HOME/jre/lib/security/java.security</strong></p>
<pre><strong>security.provider.1=sun.security.provider.Sun</strong>
<strong>security.provider.2=sun.security.rsa.SunRsaSign</strong>
<strong>security.provider.3=com.sun.net.ssl.internal.ssl.Provider</strong>
<strong>security.provider.4=com.sun.crypto.provider.SunJCE</strong>
<strong>security.provider.5=sun.security.jgss.SunProvider</strong>
<strong>security.provider.6=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/luna.cfg</strong>
<strong>security.provider.7=com.sun.security.sasl.Provider</strong>
<strong>security.provider.8=org.jcp.xml.dsig.internal.dom.XMLDSigRI</strong>
<strong>security.provider.9=sun.security.smartcardio.SunPCSC</strong></pre>
<p><strong>Untuk Java 7:</strong><br />
<strong># vi $JAVA_HOME/jre/lib/security/java.security</strong></p>
<pre><strong>security.provider.1=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/nss.cfg</strong>
<strong>security.provider.2=sun.security.provider.Sun</strong>
<strong>security.provider.3=sun.security.rsa.SunRsaSign</strong>
<strong>security.provider.4=sun.security.ec.SunEC</strong>
<strong>security.provider.5=com.sun.net.ssl.internal.ssl.Provider</strong>
<strong>security.provider.6=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/luna.cfg</strong>
<strong>security.provider.7=com.sun.crypto.provider.SunJCE</strong>
<strong>security.provider.8=sun.security.jgss.SunProvider</strong>
<strong>security.provider.9=com.sun.security.sasl.Provider</strong>
<strong>security.provider.10=org.jcp.xml.dsig.internal.dom.XMLDSigRI</strong>
<strong>security.provider.11=sun.security.smartcardio.SunPCSC</strong></pre>
</li>
<li>Pilih yang sesuai dengan <em>security provider </em>anda dan kemudian simpan. Pastikan file JAR dari PKCS11 ada di dalam <strong>$JAVA_HOME/jre/lib/ext</strong>.</li>
</ul>
<h3 style="text-align: justify;"><strong>Generate Keys Untuk EJBCA 6.3.1.1</strong></h3>
<p style="text-align: justify;">Tool yang berada pada <strong>$EJBCA_HOME/dist/clientToolBox/ejbcaClientToolBox.sh </strong>digunakan untuk administratif dan men-generate keys. Lakukan beberapa langkah berikut untuk men-generate keys pada SafeNet Luna HSM dengan menggunakan PKCS11:</p>
<pre><strong>cd $EJBCA_HOME
</strong><strong>ant clientToolBox
</strong><strong>dist/clientToolBox/ejbcaClientToolBox.sh PKCS11HSMKeyTool generate /usr/safenet/lunaclient/lib/libCryptoki2_64.so 2048 signKey 1
</strong><strong>dist/clientToolBox/ejbcaClientToolBox.sh PKCS11HSMKeyTool generate /usr/safenet/lunaclient/lib/libCryptoki2_64.so 2048 defaultKey 1
dist/clientToolBox/ejbcaClientToolBox.sh PKCS11HSMKeyTool generate </strong><strong>/usr/safenet/lunaclient/lib/libCryptoki2_64.so 2048 myKey 1</strong></pre>
<figure id="attachment_1603" aria-describedby="caption-attachment-1603" style="width: 1259px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1603" src="http://blog.goreinnamah.com/wp-content/uploads/2017/11/Screenshot-from-2017-10-31-13-25-59.png" alt="" width="1259" height="155" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/11/Screenshot-from-2017-10-31-13-25-59.png 1259w, https://blog.goreinnamah.com/wp-content/uploads/2017/11/Screenshot-from-2017-10-31-13-25-59-300x37.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/11/Screenshot-from-2017-10-31-13-25-59-768x95.png 768w, https://blog.goreinnamah.com/wp-content/uploads/2017/11/Screenshot-from-2017-10-31-13-25-59-1024x126.png 1024w" sizes="auto, (max-width: 1259px) 100vw, 1259px" /><figcaption id="caption-attachment-1603" class="wp-caption-text">Generating Keys</figcaption></figure>
<p style="text-align: justify;">Ketika mengeksekusi perintah di atas, maka kita akan diminta untuk memasukkan password. Masukkan Password dari partisi SafeNet Luna HSM dan tunggu hingga keys ter-generate. Kunci-kunci ini yang akan digunakan untuk membuat inisial Admin CA, ROOT CA, dan Server CA.</p>
<p style="text-align: justify;">Untuk melakukan pengujian kunci pada HSM yang akan digunakan oleh EJBCA 6.3.1.1 , gunakan perintah berikut dan masukkan password partisinya jika diminta:</p>
<pre style="text-align: justify;"><strong>dist/clientToolBox/ejbcaClientToolBox.sh PKCS11HSMKeyTool test /usr/safenet/lunaclient/lib/libCryptoki2_64.so 1</strong></pre>
<blockquote><p>Slot id adalah 1 dan libCyptoki2_64.so adalah library dari SafeNet Luna HSM</p></blockquote>
<figure id="attachment_1606" aria-describedby="caption-attachment-1606" style="width: 1920px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-1606" src="http://blog.goreinnamah.com/wp-content/uploads/2017/11/2-keys.png" alt="" width="1920" height="885" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/11/2-keys.png 1920w, https://blog.goreinnamah.com/wp-content/uploads/2017/11/2-keys-300x138.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/11/2-keys-768x354.png 768w, https://blog.goreinnamah.com/wp-content/uploads/2017/11/2-keys-1024x472.png 1024w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /><figcaption id="caption-attachment-1606" class="wp-caption-text">Test Keys</figcaption></figure>
<h2 style="text-align: justify;"><strong>Instalasi EJBCA</strong></h2>
<p style="text-align: justify;">Sebelum kita melanjutkan, kalian perlu tahu bahwa konfigurasi awal EJBCA 6.3.1.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 JBoss 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.3.1.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</strong></h3>
<p style="text-align: justify;">EJBCA 6.3.1.1 menggunakan text biasa pada file “<strong>.properties</strong>” untuk konfigurasi utamanya. File-file ini akan menjadi rujukan ketika kita meng-compile ejbca.ear dengan ant, 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 deploy.</strong></li>
<li>Beberapa file sebenarnya berisi paremeter yang menyediakan parsing runtime dari variabel-variabel pada file properties tersebut, tetapi fungsi ini di non-aktifkan secara default.</li>
</ul>
<figure id="attachment_153" aria-describedby="caption-attachment-153" style="width: 653px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-153" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/52.png" alt="" width="653" height="333" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/52.png 653w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/52-300x153.png 300w" sizes="auto, (max-width: 653px) 100vw, 653px" /><figcaption id="caption-attachment-153" class="wp-caption-text">file properties yang ada di EJBCA</figcaption></figure>
<p style="text-align: justify;">Pertama, EJBCA 6.3.1.1 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-12" class="tablepress tablepress-id-12">
<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">catoken.properties</td><td class="column-2">mendefinisikan nama key, password dan alias untuk HSM. file ini digunakan ketika menambahkan HSM ketika melakukan 'ant install'</td>
</tr>
<tr class="row-3">
	<td class="column-1">certstore.properties</td><td class="column-2">mendefinisikan variabel penyimpanan sertifikat</td>
</tr>
<tr class="row-4">
	<td class="column-1">cesecore.properties</td><td class="column-2">mendefinisikan variabel core security engine</td>
</tr>
<tr class="row-5">
	<td class="column-1">crlstore.properties</td><td class="column-2">mendefinisikan variabel penyimpanan CRL</td>
</tr>
<tr class="row-6">
	<td class="column-1">database.properties</td><td class="column-2">mendefinisikan bagaimana EJBCA akan mengakses database<br />
</td>
</tr>
<tr class="row-7">
	<td class="column-1">extendedkeyusage.properties</td><td class="column-2">mendefinisikan oid dan nama dari oid tersebut</td>
</tr>
<tr class="row-8">
	<td class="column-1">ejbca.properties</td><td class="column-2">mendefinisikan variabel basic untuk EJBCA itu sendiri</td>
</tr>
<tr class="row-9">
	<td class="column-1">install.properties</td><td class="column-2">digunakan oleh "ant install" selama instalasi</td>
</tr>
<tr class="row-10">
	<td class="column-1">mail.properties</td><td class="column-2">mendefinisikan bagaiman EJBCA SMTP connector akan berfungsi</td>
</tr>
<tr class="row-11">
	<td class="column-1">ocsp.properties</td><td class="column-2">mendefinisikan bagaimana OCSP itu akan bekerja</td>
</tr>
<tr class="row-12">
	<td class="column-1">va.properties</td><td class="column-2">mendefinisikan bagaimana validation authority akan bekerja</td>
</tr>
<tr class="row-13">
	<td class="column-1">va-publisher.properties</td><td class="column-2">mendefinisikan bagaimana validation authority akan mengakses database</td>
</tr>
<tr class="row-14">
	<td class="column-1">web.properties</td><td class="column-2">mendefinisikan variabel untuk web interface EJBCA</td>
</tr>
</tbody>
</table>
<!-- #tablepress-12 from cache --></p>
<p style="text-align: justify;">Ada beberapa file <strong>jndi.*</strong> dan sebuah file yang disebut <strong>extendedkeyusage.properties</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/catoken.properties.sample catoken.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/mail.properties.sample mail.properties</strong>
<strong>cp sample/web.properties.sample web.properties
</strong></pre>
<figure id="attachment_154" aria-describedby="caption-attachment-154" style="width: 852px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-154" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/53-copy-properties-ejbca-conf.png" alt="" width="852" height="178" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/53-copy-properties-ejbca-conf.png 852w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/53-copy-properties-ejbca-conf-300x63.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/53-copy-properties-ejbca-conf-768x160.png 768w" sizes="auto, (max-width: 852px) 100vw, 852px" /><figcaption id="caption-attachment-154" class="wp-caption-text">FIle properties yang kita butuhkan</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.3.1.1 akan beroperasi tanpa <strong>Validation Authority</strong>.</p>
<p style="text-align: justify;">mari kita mulai:</p>
<h3 style="text-align: justify;"><strong>catoken.propeties</strong></h3>
<p style="text-align: justify;"><strong>#### Start catoken.properties ###</strong></p>
<p style="text-align: justify;"><strong># Ini merupakan kombinasi dari CA dan CryptoToken Properties yang nanti ada di Admin-GUI</strong></p>
<p style="text-align: justify;"><strong># Common for all HSM are:</strong><br />
<strong># * certSignKey &#8211; the key to be used when signing certificates, can be RSA or ECDSA.</strong><br />
<strong># * crlSignKey &#8211; the key to be used when signing CLSs, can be RSA or ECDSA.</strong><br />
<strong># * keyEncryptKey &#8211; the key to be used for key encryption and decryption, this must be an RSA key.</strong><br />
<strong># * testKey &#8211; the key to be used by HSM status checks, can be RSA or ECDSA.</strong><br />
<strong># * hardTokenEncrypt &#8211; the key to be used for hardtoken encryption and decryption. PUK will be decrypted by this key.</strong><br />
<strong># * defaultKey &#8211; the key to be used when no other key is defined for a purpose. If this is the only definition then this key will be used for all purposes.</strong><br />
<strong>#</strong></p>
<p style="text-align: justify;"><strong># Utimaco HSM Crypto Token example:</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>sharedLibrary=/usr/safenet/lunaclient/lib/libCryptoki2_64.so</strong></span><br />
<span style="color: #ff0000;"><strong>slotLabelType=SLOT_NUMBER</strong></span><br />
<span style="color: #ff0000;"><strong>slotLabelValue=1</strong></span></p>
<p style="text-align: justify;"><strong>#pin dari HSM</strong><br />
<span style="color: #ff0000;"><strong>pin=J7/5-KLxT-LT9L-Csjq</strong></span><br />
<span style="color: #ff0000;"><strong>certSignKey=signKey</strong></span><br />
<span style="color: #ff0000;"><strong>clrSignKey=signKey</strong></span><br />
<span style="color: #ff0000;"><strong>defaultKey=signKey</strong></span></p>
<h4 style="text-align: justify;"><strong>### End catoken.properties ###</strong></h4>
<figure id="attachment_1611" aria-describedby="caption-attachment-1611" style="width: 1071px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1611" src="http://blog.goreinnamah.com/wp-content/uploads/2017/12/Screenshot-from-2017-12-01-13-17-43.png" alt="" width="1071" height="355" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/12/Screenshot-from-2017-12-01-13-17-43.png 1071w, https://blog.goreinnamah.com/wp-content/uploads/2017/12/Screenshot-from-2017-12-01-13-17-43-300x99.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/12/Screenshot-from-2017-12-01-13-17-43-768x255.png 768w, https://blog.goreinnamah.com/wp-content/uploads/2017/12/Screenshot-from-2017-12-01-13-17-43-1024x339.png 1024w" sizes="auto, (max-width: 1071px) 100vw, 1071px" /><figcaption id="caption-attachment-1611" class="wp-caption-text">catoken.properties</figcaption></figure>
<h3 style="text-align: justify;"><strong>certstore.properties</strong></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_158" aria-describedby="caption-attachment-158" style="width: 831px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-158" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/54-certstore-properties.png" alt="" width="831" height="174" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/54-certstore-properties.png 831w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/54-certstore-properties-300x63.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/54-certstore-properties-768x161.png 768w" sizes="auto, (max-width: 831px) 100vw, 831px" /><figcaption id="caption-attachment-158" class="wp-caption-text">certstore.properties</figcaption></figure>
<h3 style="text-align: justify;"><strong>cesecore.properties</strong></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># You do not need to configure this password!</strong><br />
<strong>#ca.keystorepass=!secret!</strong></p>
<p style="text-align: justify;"><strong>#ca.rngalgorithm=SHA1PRNG</strong><br />
<strong>#ca.serialnumberoctetsize=8</strong></p>
<p style="text-align: justify;"><span style="color: #ff0000;"><strong>ca.toolateexpiredate=80000000</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;"><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 />
<span style="color: #ff0000;"><strong>securityeventsaudit.implementation.0=org.cesecore.audit.impl.log4j.Log4jDevice</strong></span><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>
<p style="text-align: justify;"><strong>### End cesecore.properties ###</strong></p>
<figure id="attachment_159" aria-describedby="caption-attachment-159" style="width: 479px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-159" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/55-cesesore-properties-1.png" alt="" width="479" height="42" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/55-cesesore-properties-1.png 479w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/55-cesesore-properties-1-300x26.png 300w" sizes="auto, (max-width: 479px) 100vw, 479px" /><figcaption id="caption-attachment-159" class="wp-caption-text">cesecore.properties 1</figcaption></figure>
<figure id="attachment_160" aria-describedby="caption-attachment-160" style="width: 853px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-160" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/56-cesesore-properties-2.png" alt="" width="853" height="94" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/56-cesesore-properties-2.png 853w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/56-cesesore-properties-2-300x33.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/56-cesesore-properties-2-768x85.png 768w" sizes="auto, (max-width: 853px) 100vw, 853px" /><figcaption id="caption-attachment-160" class="wp-caption-text">cesecore.properties 2</figcaption></figure>
<h3 style="text-align: justify;"><strong>crlstore.properties</strong></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>
<p style="text-align: justify;"><strong>### End crlstore.properties ###</strong></p>
<figure id="attachment_161" aria-describedby="caption-attachment-161" style="width: 818px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-161" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/57-crlstore-properties.png" alt="" width="818" height="174" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/57-crlstore-properties.png 818w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/57-crlstore-properties-300x64.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/57-crlstore-properties-768x163.png 768w" sizes="auto, (max-width: 818px) 100vw, 818px" /><figcaption id="caption-attachment-161" class="wp-caption-text">crlstore.properties</figcaption></figure>
<h3 style="text-align: justify;"><strong>database.properties</strong></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/ejbcadb?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;"><span style="color: #ff0000;"><strong>database.username=ejbcadbuser</strong></span></p>
<p style="text-align: justify;"><strong># Change this to your mysql user password: </strong><br />
<span style="color: #ff0000;"><strong>database.password=pumpkin</strong></span></p>
<p style="text-align: justify;"><strong>### End database.properties ###</strong></p>
<figure id="attachment_166" aria-describedby="caption-attachment-166" style="width: 463px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-166" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/58-database-properties-1.png" alt="" width="463" height="244" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/58-database-properties-1.png 463w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/58-database-properties-1-300x158.png 300w" sizes="auto, (max-width: 463px) 100vw, 463px" /><figcaption id="caption-attachment-166" class="wp-caption-text">database.properties 1</figcaption></figure>
<figure id="attachment_167" aria-describedby="caption-attachment-167" style="width: 699px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-167" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/59-database-properties-2.png" alt="" width="699" height="359" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/59-database-properties-2.png 699w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/59-database-properties-2-300x154.png 300w" sizes="auto, (max-width: 699px) 100vw, 699px" /><figcaption id="caption-attachment-167" class="wp-caption-text">database.properties 2</figcaption></figure>
<figure id="attachment_170" aria-describedby="caption-attachment-170" style="width: 430px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-170" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/1-5.png" alt="" width="430" height="181" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-5.png 430w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-5-300x126.png 300w" sizes="auto, (max-width: 430px) 100vw, 430px" /><figcaption id="caption-attachment-170" class="wp-caption-text">database.properties 3</figcaption></figure>
<h3 style="text-align: justify;"><strong>ejbca.properties</strong></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/jboss</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=ca</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_1617" aria-describedby="caption-attachment-1617" style="width: 448px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1617" src="http://blog.goreinnamah.com/wp-content/uploads/2017/12/Screenshot-from-2017-12-01-13-43-25.png" alt="" width="448" height="350" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/12/Screenshot-from-2017-12-01-13-43-25.png 448w, https://blog.goreinnamah.com/wp-content/uploads/2017/12/Screenshot-from-2017-12-01-13-43-25-300x234.png 300w" sizes="auto, (max-width: 448px) 100vw, 448px" /><figcaption id="caption-attachment-1617" class="wp-caption-text">ejbca.properties1</figcaption></figure>
<figure id="attachment_173" aria-describedby="caption-attachment-173" style="width: 782px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-173" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/62-ejbca-properties-2.png" alt="" width="782" height="170" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/62-ejbca-properties-2.png 782w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/62-ejbca-properties-2-300x65.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/62-ejbca-properties-2-768x167.png 768w" sizes="auto, (max-width: 782px) 100vw, 782px" /><figcaption id="caption-attachment-173" class="wp-caption-text">ejbca.properties 2</figcaption></figure>
<figure id="attachment_174" aria-describedby="caption-attachment-174" style="width: 852px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-174" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/63-ejbca-properties-3.png" alt="" width="852" height="506" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/63-ejbca-properties-3.png 852w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/63-ejbca-properties-3-300x178.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/63-ejbca-properties-3-768x456.png 768w" sizes="auto, (max-width: 852px) 100vw, 852px" /><figcaption id="caption-attachment-174" class="wp-caption-text">ejbca.properties 3</figcaption></figure>
<figure id="attachment_175" aria-describedby="caption-attachment-175" style="width: 728px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-175" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/64-ejbca-properties-4.png" alt="" width="728" height="270" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/64-ejbca-properties-4.png 728w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/64-ejbca-properties-4-300x111.png 300w" sizes="auto, (max-width: 728px) 100vw, 728px" /><figcaption id="caption-attachment-175" class="wp-caption-text">ejbca.properties 4</figcaption></figure>
<figure id="attachment_176" aria-describedby="caption-attachment-176" style="width: 850px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-176" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/65-ejbca-properties-5.png" alt="" width="850" height="140" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/65-ejbca-properties-5.png 850w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/65-ejbca-properties-5-300x49.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/65-ejbca-properties-5-768x126.png 768w" sizes="auto, (max-width: 850px) 100vw, 850px" /><figcaption id="caption-attachment-176" class="wp-caption-text">ejbca.properties 5</figcaption></figure>
<h3 style="text-align: justify;"><strong>install.properties</strong></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=US</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>#Password for the administrative CA token. Masukkan sama dengan pin pada catoken.properties</strong><br />
<span style="color: #ff0000;"><strong>ca.tokenpassword=J7/5-KLxT-LT9L-Csjq</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=3652</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_1621" aria-describedby="caption-attachment-1621" style="width: 704px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1621" src="http://blog.goreinnamah.com/wp-content/uploads/2017/12/install-properties1.png" alt="" width="704" height="143" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/12/install-properties1.png 704w, https://blog.goreinnamah.com/wp-content/uploads/2017/12/install-properties1-300x61.png 300w" sizes="auto, (max-width: 704px) 100vw, 704px" /><figcaption id="caption-attachment-1621" class="wp-caption-text">install.properties1</figcaption></figure>
<figure id="attachment_1622" aria-describedby="caption-attachment-1622" style="width: 905px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1622" src="http://blog.goreinnamah.com/wp-content/uploads/2017/12/Screenshot-from-2017-12-01-15-09-26.png" alt="" width="905" height="456" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/12/Screenshot-from-2017-12-01-15-09-26.png 905w, https://blog.goreinnamah.com/wp-content/uploads/2017/12/Screenshot-from-2017-12-01-15-09-26-300x151.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/12/Screenshot-from-2017-12-01-15-09-26-768x387.png 768w" sizes="auto, (max-width: 905px) 100vw, 905px" /><figcaption id="caption-attachment-1622" class="wp-caption-text">install.properties2</figcaption></figure>
<figure id="attachment_1620" aria-describedby="caption-attachment-1620" style="width: 853px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1620" src="http://blog.goreinnamah.com/wp-content/uploads/2017/12/install-properties4.png" alt="" width="853" height="329" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/12/install-properties4.png 853w, https://blog.goreinnamah.com/wp-content/uploads/2017/12/install-properties4-300x116.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/12/install-properties4-768x296.png 768w" sizes="auto, (max-width: 853px) 100vw, 853px" /><figcaption id="caption-attachment-1620" class="wp-caption-text">install.properties3</figcaption></figure>
<h3 style="text-align: justify;"><strong>web.properties</strong></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=US</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=US</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!!111!!!1!!!1</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_180" aria-describedby="caption-attachment-180" style="width: 854px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-180" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/68-web-properties-1.png" alt="" width="854" height="507" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/68-web-properties-1.png 854w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/68-web-properties-1-300x178.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/68-web-properties-1-768x456.png 768w" sizes="auto, (max-width: 854px) 100vw, 854px" /><figcaption id="caption-attachment-180" class="wp-caption-text">web.properties 1</figcaption></figure>
<figure id="attachment_183" aria-describedby="caption-attachment-183" style="width: 854px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-183" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/62-ejbca-properties-2-1.png" alt="" width="854" height="239" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/62-ejbca-properties-2-1.png 854w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/62-ejbca-properties-2-1-300x84.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/62-ejbca-properties-2-1-768x215.png 768w" sizes="auto, (max-width: 854px) 100vw, 854px" /><figcaption id="caption-attachment-183" class="wp-caption-text">web.properties 2</figcaption></figure>
<figure id="attachment_185" aria-describedby="caption-attachment-185" style="width: 852px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-185" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/70-web-properties-3.png" alt="" width="852" height="139" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/70-web-properties-3.png 852w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/70-web-properties-3-300x49.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/70-web-properties-3-768x125.png 768w" sizes="auto, (max-width: 852px) 100vw, 852px" /><figcaption id="caption-attachment-185" class="wp-caption-text">web.properties 3</figcaption></figure>
<figure id="attachment_186" aria-describedby="caption-attachment-186" style="width: 786px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-186" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/71-web-properties-4.png" alt="" width="786" height="324" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/71-web-properties-4.png 786w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/71-web-properties-4-300x124.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/71-web-properties-4-768x317.png 768w" sizes="auto, (max-width: 786px) 100vw, 786px" /><figcaption id="caption-attachment-186" class="wp-caption-text">web.properties 4</figcaption></figure>
<figure id="attachment_187" aria-describedby="caption-attachment-187" style="width: 853px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-187" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/72-web-properties-5.png" alt="" width="853" height="410" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/72-web-properties-5.png 853w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/72-web-properties-5-300x144.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/72-web-properties-5-768x369.png 768w" sizes="auto, (max-width: 853px) 100vw, 853px" /><figcaption id="caption-attachment-187" class="wp-caption-text">web.properties 5</figcaption></figure>
<h3 style="text-align: justify;"><strong>Deployment Awal</strong></h3>
<p style="text-align: justify;">Sekarang kita sudah punya file properties yang sudah dimodifikasi. sekarang kita bisa memulai untuk melakukan deployment awal dari ejbca ke jboss.</p>
<p style="text-align: justify;">Buka terminal dan lihat log yang terjadi pada console jboss. Caranya:</p>
<pre><strong>tail ­-f /var/log/ejbca/console.log</strong></pre>
<p style="text-align: justify;">user jboss haruslah menjadi pemilik baik direktori jboss ataupun ejbca. sebelum menjalankan deployment awal, ini adalah persyaratan awal untuk meyakinkan bahwa kepemilikannya benar. Caranya:</p>
<pre><strong>service ejbca stop</strong>
<strong>chown ­R jboss:jboss /opt/jboss­as­7.1.1.Final</strong>
<strong>chown ­R jboss:jboss /opt/ejbca_ce_6_3_1_1</strong>
<strong>service ejbca start
cd /opt/ejbca
sudo ­-u jboss ant deploy
</strong></pre>
<ul style="text-align: justify;">
<li>selalu jalankan perintah <strong>ant</strong> dengan user <strong>jboss</strong>.</li>
<li>biasanya kegagalan yang sering terjadi adalah karena <strong>ant</strong> tidak dieksekusi dengan user <strong>jboss</strong> tetapi user <strong>root</strong>.</li>
<li>dan juga 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, JBoss harus terlebih dahulu berjalan sebelum kita menjalankan perintah <strong>ant</strong>.</li>
</ul>
<p style="text-align: justify;">Deployment yang kita lakukan menarik informasi dari file konfigurasi, menggunakan informasi tersebut untuk meng-compile file <strong>ejbca.ear</strong>, kemudian mendorong jboss untuk mendeploy-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;">Apabila proses deployment berhasil maka akan berakhir dengan pesan seperti berikut:</p>
<figure id="attachment_190" aria-describedby="caption-attachment-190" style="width: 815px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-190" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/75-ant-deploy.png" alt="" width="815" height="257" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/75-ant-deploy.png 815w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/75-ant-deploy-300x95.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/75-ant-deploy-768x242.png 768w" sizes="auto, (max-width: 815px) 100vw, 815px" /><figcaption id="caption-attachment-190" class="wp-caption-text">ant deploy sukses</figcaption></figure>
<h3 style="text-align: justify;"><strong>Pesan Error pada saat Deployment</strong></h3>
<p style="text-align: justify;">kita akan melihat beberapa pesan error pada saat deployment. berikut ini beberapa bugs yang dapat diabaikan karena merupakan bugs dalam Jboss:</p>
<figure id="attachment_195" aria-describedby="caption-attachment-195" style="width: 1350px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-195" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/1-Error.png" alt="" width="1350" height="77" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-Error.png 1350w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-Error-300x17.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-Error-768x44.png 768w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-Error-1024x58.png 1024w" sizes="auto, (max-width: 1350px) 100vw, 1350px" /><figcaption id="caption-attachment-195" class="wp-caption-text">Error</figcaption></figure>
<figure id="attachment_194" aria-describedby="caption-attachment-194" style="width: 1352px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-194" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/1-error-parsing.png" alt="" width="1352" height="56" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-error-parsing.png 1352w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-error-parsing-300x12.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-error-parsing-768x32.png 768w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-error-parsing-1024x42.png 1024w" sizes="auto, (max-width: 1352px) 100vw, 1352px" /><figcaption id="caption-attachment-194" class="wp-caption-text">error parsing</figcaption></figure>
<figure id="attachment_196" aria-describedby="caption-attachment-196" style="width: 1352px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-196" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/1-error-nih.png" alt="" width="1352" height="39" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-error-nih.png 1352w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-error-nih-300x9.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-error-nih-768x22.png 768w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-error-nih-1024x30.png 1024w" sizes="auto, (max-width: 1352px) 100vw, 1352px" /><figcaption id="caption-attachment-196" class="wp-caption-text">Entry will be ignored</figcaption></figure>
<p style="text-align: justify;">Pesan di bawah ini membuktikan kalau versi komunitas dari EJBCA tidak mendukung proteksi database integrity:</p>
<figure id="attachment_197" aria-describedby="caption-attachment-197" style="width: 1351px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-197" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/1-error-nih-1.png" alt="" width="1351" height="39" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-error-nih-1.png 1351w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-error-nih-1-300x9.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-error-nih-1-768x22.png 768w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-error-nih-1-1024x30.png 1024w" sizes="auto, (max-width: 1351px) 100vw, 1351px" /><figcaption id="caption-attachment-197" class="wp-caption-text">Tidak ada Database Integrity Protection</figcaption></figure>
<p style="text-align: justify;">Apapun yang kita lakukan, kita akan selalu melihat pesan error. Beberapa error harus segera diselesaikan sebelum lanjut ke instalasi. namun kalau deployment berhasil maka kita akan melihat pesan berikut:</p>
<figure id="attachment_198" aria-describedby="caption-attachment-198" style="width: 1352px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-198" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/1-sukses-deploy.png" alt="" width="1352" height="56" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-sukses-deploy.png 1352w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-sukses-deploy-300x12.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-sukses-deploy-768x32.png 768w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-sukses-deploy-1024x42.png 1024w" sizes="auto, (max-width: 1352px) 100vw, 1352px" /><figcaption id="caption-attachment-198" class="wp-caption-text">sukses deploy</figcaption></figure>
<p style="text-align: justify;">Pesan error yang muncul pada bagian akhir deployment yaitu:</p>
<p style="text-align: justify;"><strong>appserver.error.message:</strong><br />
<strong>     [echo] jndi.properties.file: /opt/ejbca_ce_6_2_0/conf/jndi.properties.jboss7</strong></p>
<p style="text-align: justify;">dapat diabaikan</p>
<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>
<p style="text-align: justify;">Seperti yang mungkin anda harapkan, semua perintah harus dieksekusi oleh user <strong>jboss</strong>. jika tidak, kalian akan melhat error seperti berikut saat service menyala atau saat deployment:</p>
<p style="text-align: justify;"><strong>06:31:45,480 SEVERE [javax.enterprise.resource.webcontainer.jsf.application] (MSC service thread 1-4) JSF1051: Service entry ‘org.jboss.as.web.deployment.jsf.JsfInjectionProvider’ does not extend DiscoverableInjectionProvider. Entry will be ignored.</strong></p>
<p style="text-align: justify;"><strong>06:31:43,811 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report</strong><br />
<strong>JBAS014777:   Services which failed to start: service jboss.web.connector.httpspub: org.jboss.msc.service.StartException in service jboss.web.connector.httpspub: </strong><br />
<strong>JBAS018007: Error starting web connector service jboss.web.connector.httpspriv: org.jboss.msc.service.StartException in service jboss.web.connector.httpspriv: </strong><br />
<strong>JBAS018007: Error starting web connector</strong></p>
<p style="text-align: justify;">Jika tidak ada error yang muncul, kita bisa melanjutkan ke proses instalasi. Ada baiknya untuk merestart jboss, kemudian lakukan install. Hal ini untuk menghindari error <em>out-of-memory </em>yang sesekali bisa terjadi pada Jboss.</p>
<ul style="text-align: justify;">
<li>Jika benar terjadi <em>out of memory, </em>lakukan “<strong>kill -9</strong>” pada proses Jboss dan start kembali proses Jboss nya. setelah itu kita bisa menjalankan perintah <strong>ant</strong> dengan baik.</li>
</ul>
<p style="text-align: justify;">untuk melakukan instalasi maka jalankan ant install. Caranya:</p>
<pre><strong>cd /opt/ejbca
ant install</strong></pre>
<h3 style="text-align: justify;"><strong>Keystores Awal</strong></h3>
<p style="text-align: justify;">Keystore menyimpan sertifikat yang digunakan oleh EJBCA 6.3.1.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.3.1.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.3.1.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.7.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. Namun kalau kalian melakukan konfigurasi seperti contoh, maka ant install  akan membawa kita untuk mengisi 3 password untuk meng-autentikasi keystore:</p>
<p style="text-align: justify;"><strong>Please enter the password of the truststore with the CA certificate for https? [changeit]</strong><br />
<strong>Please enter the password of the keystore with the TLS key for https [serverpwd]</strong></p>
<p style="text-align: justify;">(dan kemudian)<br />
<strong>Please enter the superadmin password (default: ejbca) ? [ejbca]</strong></p>
<p style="text-align: justify;">Sebagai klarifikasi, password-password tersebut adalah untuk:</p>
<ul style="text-align: justify;">
<li>“<strong>the password of the truststore with the CA certificate for https</strong>” adalah password untuk <strong>trustore.jks</strong></li>
<li>“<strong>the password of the keystore with the TLS key for https</strong>” adalah password untuk <strong>tomcat.jks</strong></li>
<li>“<strong>superadmin password</strong>” adalah password untuk file <strong>superadmin.p12</strong></li>
</ul>
<p style="text-align: justify;">sekali lagi, kita bisa mengisi password tersebut pada file <strong>.properties</strong> sehingga tidak diminta mengisi saat melakukan <strong>ant install</strong>. hanya saja, akan lebih baik kalau tidak menyimpan password dalam format <em>clear text.</em></p>
<ul style="text-align: justify;">
<li>Tapi sayangnya, EJBCA tetap menyimpan hasil copy dari keystore password dalam format <em>clear text </em>di standalone.xml</li>
</ul>
<p style="text-align: justify;">Idealnya, EJBCA 6.3.1.1 hanya akan menyimpan password-password ini dalam format <em>hash. </em>namun tidak ada yang bisa kita lakukan dalam waktu dekat ini.</p>
<p style="text-align: justify;">setelah keystore selesai dibuat, <strong>ant install</strong> akan memperlihatkan ringkasan dari root CA yang kita buat.</p>
<p style="text-align: justify;">Jika proses pembuatan keystore gagal atau bermasalah karena kita mengubah konfigurasi (tidak menggunakan Enkripsi RSA), <strong>ant install</strong> akan mengeluarkan pesan seperti berikut:</p>
<p style="text-align: justify;"><strong> [java] org.ejbca.ui.cli.ErrorAdminCommandException: org.cesecore.certificates.ca.InvalidAlgorithmException: Signature algorithm SHA384withRSA is not one of the allowed signature algorithms. Available algorithms: {SHA1WithRSA, SHA256WithRSA, SHA384WithRSA, SHA512WithRSA, SHA256WithRSAAndMGF1, </strong><strong>SHA1withECDSA, SHA224withECDSA, SHA256withECDSA, SHA384withECDSA, SHA1WithDSA, </strong><strong>GOST3411withECGOST3410, GOST3411withDSTU4145}.</strong></p>
<p style="text-align: justify;">dan console log akan mengeluarkan pesan seperti berikut:</p>
<p style="text-align: justify;"><strong>06:21:15,184 ERROR [org.apache.tomcat.util.net.jsse.JSSESocketFactory] (MSC service thread 1-2) Failed to load keystore type JKS with path /opt/jboss/standalone/configuration/keystore/keystore.jks due to /opt/jboss/standalone/configuration/keystore/keystore.jks (No such file or directory): java.io.FileNotFoundException: /opt/jboss/standalone/configuration/keystore/keystore.jks (No such file or directory)</strong></p>
<p style="text-align: justify;"><strong>06:21:15,188 ERROR [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-2) Error initializing endpoint: java.io.FileNotFoundException: /opt/jboss/standalone/configuration/keystore/keystore.jks (No such file or directory)</strong></p>
<p style="text-align: justify;">untuk troubleshooting keystore ini kita memang harus melihat error yang terjadi pada hasil keluaran <strong>ant install</strong> dan juga pada console log (<strong>nohup.out</strong>). Namun biasanya masalah berasal dari syntax <strong>keytool</strong> yang <strong>ant install</strong> taruh bersama-sama. Kalian bisa menduga syntax ini dari pesan yang diberikan pada output console <strong>ant</strong>.</p>
<h3 style="text-align: justify;"><strong>Finalisasi Instalasi</strong></h3>
<p style="text-align: justify;">Disamping dari pembuatan keystore, skrip install juga melakukan beberapa hal berikut:</p>
<ul style="text-align: justify;">
<li>membuat instance untuk Management CA (Root CA) di dalam database.</li>
<li>mengupdate <strong>standalone.xml</strong> dengan informasi keamanan, web session, keystore.</li>
</ul>
<p style="text-align: justify;">Dalam log file, kita akan melihat banyak pesan, utamanya terkait dengan fungsi enkripsi untuk file keystore. Tapi cara terbaik adalah dengan memastikan sendiri bagaimana instalasi berlangsung dengan cara membaca pesan melalui log console:</p>
<figure id="attachment_212" aria-describedby="caption-attachment-212" style="width: 1139px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-212" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/1-6.png" alt="" width="1139" height="114" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-6.png 1139w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-6-300x30.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-6-768x77.png 768w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-6-1024x102.png 1024w" sizes="auto, (max-width: 1139px) 100vw, 1139px" /><figcaption id="caption-attachment-212" class="wp-caption-text">Registering Web Context</figcaption></figure>
<p style="text-align: justify;">Jika melihat web context berhasil didaftarkan, kalian bisa merasa yakin kalau fungsi EJBCA 6.3.1.1 sedang berhasil dibangun. Tapi ingat, kebanyakan fungsi dari yang dibangun tersebut tidak bisa di browsing langsung untuk memeriksa fungsi mereka. Kita harus membuat CA kita sendiri terlebih dahulu. Juga beberapa service seperti healthcheck, hanya bisa dilakukan dari <strong>localhost</strong> (seperti yang tertera pada file properties kalau tidak ditambahkan)</p>
<p style="text-align: justify;">Instalasi yang sukses akan diakhiri dengan pesan “BUILD SUCCESSFULL” seperti gambar berikut:</p>
<figure id="attachment_215" aria-describedby="caption-attachment-215" style="width: 833px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-215" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/77-ant-install-2.png" alt="" width="833" height="404" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/77-ant-install-2.png 833w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/77-ant-install-2-300x145.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/77-ant-install-2-768x372.png 768w" sizes="auto, (max-width: 833px) 100vw, 833px" /><figcaption id="caption-attachment-215" class="wp-caption-text">ant.install 2</figcaption></figure>
<p style="text-align: justify;">dan setelah sukses tersebut, kita perlu menjalankan ulang (restart) service JBoss. setelah di restart maka kita harus melihat console log dan memastikan kalau Jboss dan ejbca sama-sama berjalan. Lognya kurang lebih akan seperti ini:</p>
<figure id="attachment_216" aria-describedby="caption-attachment-216" style="width: 851px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-216" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/78-ant-install-3.png" alt="" width="851" height="91" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/78-ant-install-3.png 851w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/78-ant-install-3-300x32.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/78-ant-install-3-768x82.png 768w" sizes="auto, (max-width: 851px) 100vw, 851px" /><figcaption id="caption-attachment-216" class="wp-caption-text">log sukses merestart jboss setelah proses ant install selesai.</figcaption></figure>
<h3 style="text-align: justify;"><strong>Pengujian</strong></h3>
<p style="text-align: justify;">Untuk menguji apakah instalasi sudah dilakukan 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 tampilan berikut:</p>
<figure id="attachment_237" aria-describedby="caption-attachment-237" style="width: 1209px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-237" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/1-8.png" alt="" width="1209" height="433" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-8.png 1209w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-8-300x107.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-8-768x275.png 768w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-8-1024x367.png 1024w" sizes="auto, (max-width: 1209px) 100vw, 1209px" /><figcaption id="caption-attachment-237" class="wp-caption-text">Sudah running</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_238" aria-describedby="caption-attachment-238" style="width: 1332px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-238" src="http://blog.goreinnamah.com/wp-content/uploads/2017/01/1-9.png" alt="" width="1332" height="617" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-9.png 1332w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-9-300x139.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-9-768x356.png 768w, https://blog.goreinnamah.com/wp-content/uploads/2017/01/1-9-1024x474.png 1024w" sizes="auto, (max-width: 1332px) 100vw, 1332px" /><figcaption id="caption-attachment-238" class="wp-caption-text">halaman ejbca</figcaption></figure>
<p>Pada bagian Crypto Token, maka kita bisa melihat lokasi dari library <em>Crypto Token </em>yang kita gunakan</p>
<figure id="attachment_1672" aria-describedby="caption-attachment-1672" style="width: 1156px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1672" src="http://blog.goreinnamah.com/wp-content/uploads/2017/12/12.png" alt="" width="1156" height="206" srcset="https://blog.goreinnamah.com/wp-content/uploads/2017/12/12.png 1156w, https://blog.goreinnamah.com/wp-content/uploads/2017/12/12-300x53.png 300w, https://blog.goreinnamah.com/wp-content/uploads/2017/12/12-768x137.png 768w, https://blog.goreinnamah.com/wp-content/uploads/2017/12/12-1024x182.png 1024w" sizes="auto, (max-width: 1156px) 100vw, 1156px" /><figcaption id="caption-attachment-1672" class="wp-caption-text">Crypto Token yang kita gunakan</figcaption></figure>
<h2 style="text-align: justify;">Notes:</h2>
<p style="text-align: justify;">Tulisan ini merupakan hasil pengujian dari blog <strong><a href="http://ejbcacentos.blogspot.co.id/">ejbcacentos</a></strong> dengan melakukan beberapa modifikasi sesuai dengan kebutuhan.</p>
<p style="text-align: justify;">sumber lainnya datang dari <strong><a href="https://developer.jboss.org/thread/263088">link berikut</a></strong>.</p><p>The post <a href="https://blog.goreinnamah.com/blog/2017/12/01/instalasi-ejbca-6-3-1-1-dengan-hsm-luna-pcie-pada-centos-7/">Instalasi EJBCA 6.3.1.1 dengan HSM LUNA PCIE pada CentOS 7</a> first appeared on <a href="https://blog.goreinnamah.com">GoBlog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://blog.goreinnamah.com/blog/2017/12/01/instalasi-ejbca-6-3-1-1-dengan-hsm-luna-pcie-pada-centos-7/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</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/370 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:28:20 by W3 Total Cache
-->