<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Security on Mini Fish</title>
    <link>https://blog.minifish.org/tags/security/</link>
    <description>Recent content in Security on Mini Fish</description>
    <image>
      <title>Mini Fish</title>
      <url>https://blog.minifish.org/android-chrome-512x512.png</url>
      <link>https://blog.minifish.org/android-chrome-512x512.png</link>
    </image>
    <generator>Hugo -- 0.154.5</generator>
    <language>en-US</language>
    <copyright>Mini Fish 2014-present. Licensed under CC-BY-NC</copyright>
    <lastBuildDate>Mon, 22 May 2023 21:45:00 -0700</lastBuildDate>
    <atom:link href="https://blog.minifish.org/tags/security/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>How to Use the HTTP API in TiDB with TLS Enabled</title>
      <link>https://blog.minifish.org/posts/how-to-use-the-http-api-in-tidb-with-tls-enabled/</link>
      <pubDate>Mon, 22 May 2023 21:45:00 -0700</pubDate>
      <guid>https://blog.minifish.org/posts/how-to-use-the-http-api-in-tidb-with-tls-enabled/</guid>
      <description>&lt;h2 id=&#34;background&#34;&gt;Background&lt;/h2&gt;
&lt;p&gt;Many customers have TLS enabled, which is different from the lab environment.&lt;/p&gt;
&lt;h2 id=&#34;curl&#34;&gt;Curl&lt;/h2&gt;
&lt;p&gt;Curl requires a specified CA certificate, otherwise it will report an error.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;curl --cacert ca.crt https://127.0.0.1:10080/status
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;wget&#34;&gt;Wget&lt;/h2&gt;
&lt;p&gt;Many containers do not have curl, so wget is used instead. Wget is better as it does not require a CA certificate.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;wget --no-check-certificate http://127.0.0.1:10080/status
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
      <content:encoded><![CDATA[<h2 id="background">Background</h2>
<p>Many customers have TLS enabled, which is different from the lab environment.</p>
<h2 id="curl">Curl</h2>
<p>Curl requires a specified CA certificate, otherwise it will report an error.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl --cacert ca.crt https://127.0.0.1:10080/status
</span></span></code></pre></div><h2 id="wget">Wget</h2>
<p>Many containers do not have curl, so wget is used instead. Wget is better as it does not require a CA certificate.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>wget --no-check-certificate http://127.0.0.1:10080/status
</span></span></code></pre></div>]]></content:encoded>
    </item>
    <item>
      <title>How to Create GitHub Verified Commits on a MacBook M1</title>
      <link>https://blog.minifish.org/posts/how-to-create-github-verified-commits-on-a-macbook-m1/</link>
      <pubDate>Sat, 12 Feb 2022 11:54:00 +0800</pubDate>
      <guid>https://blog.minifish.org/posts/how-to-create-github-verified-commits-on-a-macbook-m1/</guid>
      <description>&lt;h2 id=&#34;background&#34;&gt;Background&lt;/h2&gt;
&lt;p&gt;One day, I impulsively turned on GitHub&amp;rsquo;s Vigilant mode.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;test&#34; loading=&#34;lazy&#34; src=&#34;https://blog.minifish.org/posts/images/2022-02-12-12.02.07.webp&#34;&gt;&lt;/p&gt;
&lt;p&gt;As a result, all my commits started looking like this.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;test&#34; loading=&#34;lazy&#34; src=&#34;https://blog.minifish.org/posts/images/2022-02-12-12.11.01.webp&#34;&gt;&lt;/p&gt;
&lt;p&gt;To figure out how to make them Verified, I found the following method.&lt;/p&gt;
&lt;h2 id=&#34;method&#34;&gt;Method&lt;/h2&gt;
&lt;p&gt;I actually referred to this &lt;a href=&#34;https://zhuanlan.zhihu.com/p/76861431&#34;&gt;link&lt;/a&gt;. However, it wasn&amp;rsquo;t quite enough, as there might be authentication-related issues on MacBooks that lead to commit errors. So, I found this &lt;a href=&#34;https://stackoverflow.com/a/40066889&#34;&gt;solution&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In summary, to verify, you need to enter a password. The issue on a Mac is the prompt for entering the password, which needs to be replaced with pinentry-mac, which most people install via homebrew.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<h2 id="background">Background</h2>
<p>One day, I impulsively turned on GitHub&rsquo;s Vigilant mode.</p>
<p><img alt="test" loading="lazy" src="/posts/images/2022-02-12-12.02.07.webp"></p>
<p>As a result, all my commits started looking like this.</p>
<p><img alt="test" loading="lazy" src="/posts/images/2022-02-12-12.11.01.webp"></p>
<p>To figure out how to make them Verified, I found the following method.</p>
<h2 id="method">Method</h2>
<p>I actually referred to this <a href="https://zhuanlan.zhihu.com/p/76861431">link</a>. However, it wasn&rsquo;t quite enough, as there might be authentication-related issues on MacBooks that lead to commit errors. So, I found this <a href="https://stackoverflow.com/a/40066889">solution</a>.</p>
<p>In summary, to verify, you need to enter a password. The issue on a Mac is the prompt for entering the password, which needs to be replaced with pinentry-mac, which most people install via homebrew.</p>
<p>Moreover, this solution thoughtfully provides a way to verify:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>echo <span style="color:#e6db74">&#34;test&#34;</span> | gpg --clearsign
</span></span></code></pre></div><h2 id="gpg-experience">GPG Experience</h2>
<ol>
<li>It doesn&rsquo;t replace the ssh key. After successfully setting it up, I deleted my GitHub ssh key and discovered that I couldn&rsquo;t log in. Actually, it only verifies the legitimacy of commits.</li>
<li>On the local machine, in any repo, you only need to enter the password once, and that makes it a verified commit. It doesn&rsquo;t affect daily use; it just adds a green check mark for verification.</li>
<li>Using the https protocol + token seems more reliable than this method, but I&rsquo;m not sure if it provides a verified mark.</li>
</ol>
]]></content:encoded>
    </item>
  </channel>
</rss>
