<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Splunk with certbot SSL certificates in Installation</title>
    <link>https://community.splunk.com/t5/Installation/Splunk-with-certbot-SSL-certificates/m-p/623854#M12161</link>
    <description>&lt;P&gt;i think a human can see that the answer is in the OP. but i can mark your suggestion as the answer if that helps tick of a box somewhere so that this post isn't showing up as "needs an answer" still&lt;/P&gt;</description>
    <pubDate>Fri, 09 Dec 2022 16:32:00 GMT</pubDate>
    <dc:creator>jnilsson</dc:creator>
    <dc:date>2022-12-09T16:32:00Z</dc:date>
    <item>
      <title>Splunk with certbot SSL certificates</title>
      <link>https://community.splunk.com/t5/Installation/Splunk-with-certbot-SSL-certificates/m-p/623760#M12155</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I've spent probably 8+hrs now trying to debug how to get SSL certificates working with splunk web and finally got it working, so posting this here to hopefully help someone in the future.&lt;/P&gt;
&lt;P&gt;Using these links as a reference:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.0.2/Security/Turnonbasicencryptionusingweb.conf" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/9.0.2/Security/Turnonbasicencryptionusingweb.conf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.0.2/Security/HowtoprepareyoursignedcertificatesforSplunk" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/9.0.2/Security/HowtoprepareyoursignedcertificatesforSplunk&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The hardest part was figuring out how to use the certificates provided by certbot into a format that splunk recognizes.&lt;/P&gt;
&lt;P&gt;The following steps ended up working:&lt;/P&gt;
&lt;P&gt;1) Create /opt/splunk/etc/system/local/web.conf by copying /opt/splunk/etc/system/default/web.conf and change the line "&lt;SPAN&gt;enableSplunkWebSSL = false" to "enableSplunkWebSSL = true"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2) Install and configure certbot to obtain certificates as needed. They'll be in /etc/letsencrypt/live/$my_domain/ instead of /opt/splunk/etc/auth/splunkweb/ and they're not in a format that splunk can use.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3) The second link above gives some guidance on how to prepare the certbot certificates to the format that splunk needs them, which should be:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;server certificate&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;private key&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;CA certificate&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;To do this, I'm creating the following certbot post renewal hook script:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;/etc/letsencrypt/renewal-hooks/post/splunk.sh&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;#!/bin/bash&lt;/P&gt;
&lt;P&gt;#change this my_domain variable to match the domain you are using&lt;BR /&gt;my_domain=XXXX&lt;BR /&gt;src_path=/etc/letsencrypt/live/$my_domain&lt;BR /&gt;&lt;SPAN&gt;dst_path=/opt/splunk/etc/auth/splunkweb&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;cat $src_path/cert.pem $src_path/privkey.pem $src_path/fullchain.pem &amp;gt; $dst_path/cert.pem&lt;BR /&gt;&lt;SPAN&gt;cat $src_path/privkey.pem &amp;gt; $dst_path/privkey.pem&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;chown splunk:splunk $dst_path/cert.pem $dst_path/privkey.pem&lt;BR /&gt;&lt;SPAN&gt;chmod 600&amp;nbsp;$dst_path/cert.pem $dst_path/privkey.pem&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;/opt/splunk/bin/splunk restart&lt;BR /&gt;#EOF&lt;/P&gt;
&lt;P&gt;And make the script executable:&lt;/P&gt;
&lt;P&gt;chmod +x&amp;nbsp;/etc/letsencrypt/renewal-hooks/post/splunk.sh&lt;/P&gt;
&lt;P&gt;4) Since you've already renewed the certificate with certbot, you can run the script directly:&lt;/P&gt;
&lt;P&gt;/etc/letsencrypt/renewal-hooks/post/splunk.sh&lt;/P&gt;
&lt;P&gt;The script should run automatically whenever certbot renews your certificate&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 21:21:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Splunk-with-certbot-SSL-certificates/m-p/623760#M12155</guid>
      <dc:creator>jnilsson</dc:creator>
      <dc:date>2022-12-08T21:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk with certbot SSL certificates</title>
      <link>https://community.splunk.com/t5/Installation/Splunk-with-certbot-SSL-certificates/m-p/623765#M12156</link>
      <description>&lt;P&gt;Thanks for the hard work in solving the problem and for the great post.&amp;nbsp; Would you mind editing the post into question and answer?&amp;nbsp; Then the answer could be marked as a solution to better help those with similar problems find it in the future.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 21:44:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Splunk-with-certbot-SSL-certificates/m-p/623765#M12156</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-12-08T21:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk with certbot SSL certificates</title>
      <link>https://community.splunk.com/t5/Installation/Splunk-with-certbot-SSL-certificates/m-p/623766#M12157</link>
      <description>&lt;P&gt;I'm not sure what you are asking me to do. I tried to edit the message and I don't see any place to mark it as a question and answer.&lt;/P&gt;&lt;P&gt;Is there a different forum where I'm supposed to post solutions?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 22:11:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Splunk-with-certbot-SSL-certificates/m-p/623766#M12157</guid>
      <dc:creator>jnilsson</dc:creator>
      <dc:date>2022-12-08T22:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk with certbot SSL certificates</title>
      <link>https://community.splunk.com/t5/Installation/Splunk-with-certbot-SSL-certificates/m-p/623840#M12160</link>
      <description>&lt;P&gt;There is no "make this a question and answer" button.&amp;nbsp; What I meant was to change the posting into a question (perhaps, "How do I use SSL with Splunk web?") and then reply to that question with the rest of the OP as an answer.&amp;nbsp; Then that reply could be accepted as the solution.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2022 14:28:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Splunk-with-certbot-SSL-certificates/m-p/623840#M12160</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-12-09T14:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk with certbot SSL certificates</title>
      <link>https://community.splunk.com/t5/Installation/Splunk-with-certbot-SSL-certificates/m-p/623854#M12161</link>
      <description>&lt;P&gt;i think a human can see that the answer is in the OP. but i can mark your suggestion as the answer if that helps tick of a box somewhere so that this post isn't showing up as "needs an answer" still&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2022 16:32:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Splunk-with-certbot-SSL-certificates/m-p/623854#M12161</guid>
      <dc:creator>jnilsson</dc:creator>
      <dc:date>2022-12-09T16:32:00Z</dc:date>
    </item>
  </channel>
</rss>

