<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Security | Luis Cacho</title><link>https://luiscachog.io/tag/security/</link><atom:link href="https://luiscachog.io/tag/security/index.xml" rel="self" type="application/rss+xml"/><description>Security</description><generator>Wowchemy (https://wowchemy.com)</generator><language>en-us</language><lastBuildDate>Tue, 16 Aug 2022 00:00:00 +0000</lastBuildDate><image><url>https://luiscachog.io/media/icon_hu4fa4dbbaafd6f1b45a88958b9b4a0dd0_11007_512x512_fill_lanczos_center_3.png</url><title>Security</title><link>https://luiscachog.io/tag/security/</link></image><item><title>Understanding the Compliance Operator</title><link>https://luiscachog.io/understanding-compliance-operator/</link><pubDate>Tue, 16 Aug 2022 00:00:00 +0000</pubDate><guid>https://luiscachog.io/understanding-compliance-operator/</guid><description>&lt;details class="toc-inpage d-print-none " open>
&lt;summary class="font-weight-bold">Table of Contents&lt;/summary>
&lt;nav id="TableOfContents">
&lt;ul>
&lt;li>&lt;a href="#compliance-operator-introduction">Compliance Operator Introduction&lt;/a>&lt;/li>
&lt;li>&lt;a href="#why-compliance-operator">Why Compliance Operator?&lt;/a>&lt;/li>
&lt;li>&lt;a href="#how-can-i-implement-compliance-operator-in-my-cluster">How can I implement Compliance Operator in my cluster?&lt;/a>&lt;/li>
&lt;/ul>
&lt;/nav>
&lt;/details>
&lt;p>Compliance studies a company’s security processes. It details their security at a moment in time and compares it to a specific set of regulatory requirements. These requirements come in the form of legislation, industry regulations, or standards created from best practices.&lt;/p>
&lt;p>Every company can protect its data accordingly if they follow Compliance frameworks and have quality security in place. To have proper protection, companies must understand that Compliance is not the same thing as security. However, security is a big part of Compliance.&lt;/p>
&lt;p>Becoming secure and compliant means securing information assets, preventing damage, protecting it, eliminating potential attack vectors and decreasing the system&amp;rsquo;s attack surface.&lt;/p>
&lt;h2 id="compliance-operator-introduction">Compliance Operator Introduction&lt;/h2>
&lt;p>The &lt;a href="https://github.com/openshift/compliance-operator" target="_blank" rel="noopener">Compliance Operator&lt;/a> was released in OpenShift Container Platform v4.6, and allows OpenShift Container Platform administrators describe the desired compliance state of a cluster and provides them with an overview of gaps and ways to remediate them. The Compliance Operator assesses compliance of both the Kubernetes API resources of OpenShift Container Platform, as well as the nodes running the cluster. The Compliance Operator uses OpenSCAP, a NIST-certified tool, to scan and enforce security policies provided by the content.&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>&lt;/p>
&lt;div class="alert alert-warning">
&lt;div>
The Compliance Operator is available for Red Hat Enterprise Linux CoreOS (RHCOS) deployments only.
&lt;/div>
&lt;/div>
&lt;p>To secure your OpenShift cluster, it is necessary to consider both; platform (Kubernetes/OpenShift API) and host OS (RHCOS) perspectives, because Kubernetes is composed of control plane machines (master) and worker machines (node), then the Kubernetes services such as API Server, etcd, or controller manager run on the control plane to manage the workloads on the worker machines.&lt;/p>
&lt;figure id="figure-compliance-perspective">
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="Platform and Host Perspective" srcset="
/media/posts/understanding-compliance-operator/rhocp_rhcos_hu09dd5e15593eede621f9d1f9bf3b1c60_26104_f0dc721849f341f527a8d4a81017d68b.webp 400w,
/media/posts/understanding-compliance-operator/rhocp_rhcos_hu09dd5e15593eede621f9d1f9bf3b1c60_26104_8dc31d55033365b42ba3854173c8b36e.webp 760w,
/media/posts/understanding-compliance-operator/rhocp_rhcos_hu09dd5e15593eede621f9d1f9bf3b1c60_26104_1200x1200_fit_q90_h2_lanczos_3.webp 1200w"
src="https://luiscachog.io/media/posts/understanding-compliance-operator/rhocp_rhcos_hu09dd5e15593eede621f9d1f9bf3b1c60_26104_f0dc721849f341f527a8d4a81017d68b.webp"
width="282"
height="271"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;figcaption>
Platform and Host Perspective
&lt;/figcaption>&lt;/figure>
&lt;p>The basic approach to perform hardening in a RHCOS host is described in the &lt;a href="https://docs.openshift.com/container-platform/4.7/security/container_security/security-hardening.html" target="_blank" rel="noopener">documentation&lt;/a> and it is based in the &lt;a href="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/security_hardening/index#scanning-container-and-container-images-for-vulnerabilities_scanning-the-system-for-security-compliance-and-vulnerabilities" target="_blank" rel="noopener">RHEL 8 Security Hardening&lt;/a>.
For instance, the hardening consists in validate if the file has appropriately restrictive file permissions, if the file ownership is appropriately set, if required systemd services or processes are launched with appropriate arguments or parameters in the configuration, or if the appropriate kernel parameters are set. Then, hardening the control plane is specific to the Kubernetes services and includes the control plane components or the master configuration files. It should validate if the API server has started with restrictive arguments regarding allowing specific admission plug-ins, enabling audit logging, applying etcd server and peer configurations, and restricting RBAC, among others.
For clusters that use RHCOS, updating or upgrading are designed to become automatic events from the central control plane, because OpenShift completely controls the systems and services that run on each machine, including the operating system itself through the &lt;a href="https://github.com/openshift/machine-config-operator" target="_blank" rel="noopener">Machine Config Operator&lt;/a>.&lt;/p>
&lt;h2 id="why-compliance-operator">Why Compliance Operator?&lt;/h2>
&lt;p>Why is the Compliance Operator needed to validate the hardening and apply changes in the configuration of the operating system and the platform?
The Compliance Operator is defined as follows:&lt;/p>
&lt;p>&lt;em>The Compliance Operator lets OpenShift Container Platform administrators describe the required compliance state of a cluster and provides them with an overview of gaps and ways to remediate them. The Compliance Operator assesses compliance of both the Kubernetes API resources of OpenShift Container Platform, as well as the nodes running the cluster. The Compliance Operator uses OpenSCAP, a NIST-certified tool, to scan and enforce security policies provided by the content.&lt;/em>&lt;sup id="fnref1:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>&lt;/p>
&lt;p>In other words, the Compliance Operator checks the host and the platform to detect gaps in compliance by specifying profiles for scan and creates summary reports about security compliance so that you will be able to find if there is any configuration that violates the policy in the cluster. The reports also show which remediations are applied, so you can choose if you want to apply the recommended configuration by hand, step-by-step, or automatically. In short, the whole process goes like this: choosing a profile for scanning, specifying the scan settings, then initiating the scan, and generating the reports.&lt;/p>
&lt;figure id="figure-compliance-overview">
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="Compliance Operator Overview" srcset="
/media/posts/understanding-compliance-operator/rhocp_compliance_operator_hu27b70ccd330baa61a155b96202450126_295729_57140cb0159c62dc40056d2ffff800ea.webp 400w,
/media/posts/understanding-compliance-operator/rhocp_compliance_operator_hu27b70ccd330baa61a155b96202450126_295729_d84562e804fc16ee4c799468924dfe26.webp 760w,
/media/posts/understanding-compliance-operator/rhocp_compliance_operator_hu27b70ccd330baa61a155b96202450126_295729_1200x1200_fit_q90_h2_lanczos_3.webp 1200w"
src="https://luiscachog.io/media/posts/understanding-compliance-operator/rhocp_compliance_operator_hu27b70ccd330baa61a155b96202450126_295729_57140cb0159c62dc40056d2ffff800ea.webp"
width="760"
height="417"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;figcaption>
Compliance Operator Overview
&lt;/figcaption>&lt;/figure>
&lt;p>The Compliance Operator leverages &lt;a href="https://www.open-scap.org/" target="_blank" rel="noopener">OpenSCAP&lt;/a>, a NIST-certified tool, to scan and enforce security policies, and the security policies for the compliance checks are derived through SCAP content and built from the community-based &lt;a href="https://github.com/ComplianceAsCode/content" target="_blank" rel="noopener">ComplianceAsCode/content&lt;/a> project. A bundle of security policies, or profiles created by default when the operator is installed and profiles scheduled include NIST 800-53 Moderate (FedRAMP), Australian Cyber Security Centre (ACSC) Essential Eight, CIS OpenShift Benchmark, and others, so far. You can also create or tailor your own profiles so that you can pick the rules you want to run other than the profiles provided by default.&lt;/p>
&lt;h2 id="how-can-i-implement-compliance-operator-in-my-cluster">How can I implement Compliance Operator in my cluster?&lt;/h2>
&lt;p>First of all, you will need to install the Compliance Operator, for that, you can follow the &lt;a href="https://docs.openshift.com/container-platform/4.8/security/compliance_operator/compliance-operator-installation.html" target="_blank" rel="noopener">documentation steps&lt;/a>&lt;/p>
&lt;p>Great, the Operator is installed and functional, now lets check how to create, run and evaluate a compliance scan.&lt;/p>
&lt;p>&lt;strong>References:&lt;/strong>&lt;/p>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>&lt;a href="https://docs.openshift.com/container-platform/4.8/security/compliance_operator/compliance-operator-understanding.html" target="_blank" rel="noopener">https://docs.openshift.com/container-platform/4.8/security/compliance_operator/compliance-operator-understanding.html&lt;/a>&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&amp;#160;&lt;a href="#fnref1:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item><item><title>Approve pending CSRs in OpenShift</title><link>https://luiscachog.io/garden/approve-csr-openshift/</link><pubDate>Wed, 04 Aug 2021 00:00:00 +0000</pubDate><guid>https://luiscachog.io/garden/approve-csr-openshift/</guid><description>&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-shell" data-lang="shell">&lt;span class="line">&lt;span class="cl">&lt;span class="k">for&lt;/span> id in &lt;span class="k">$(&lt;/span>oc get csr &lt;span class="p">|&lt;/span> grep Pending &lt;span class="p">|&lt;/span> awk &lt;span class="s1">&amp;#39;{print $1}&amp;#39;&lt;/span>&lt;span class="k">)&lt;/span>&lt;span class="p">;&lt;/span> &lt;span class="k">do&lt;/span> oc adm certificate approve &lt;span class="nv">$id&lt;/span>&lt;span class="p">;&lt;/span> &lt;span class="k">done&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docker Login the Right Way</title><link>https://luiscachog.io/docker-login-the-right-way/</link><pubDate>Wed, 15 May 2019 00:00:00 +0000</pubDate><guid>https://luiscachog.io/docker-login-the-right-way/</guid><description>&lt;details class="toc-inpage d-print-none " open>
&lt;summary class="font-weight-bold">Table of Contents&lt;/summary>
&lt;nav id="TableOfContents">
&lt;ul>
&lt;li>&lt;a href="#credential-store">Credential Store&lt;/a>&lt;/li>
&lt;li>&lt;a href="#docker-credential-helpers">Docker Credential Helpers&lt;/a>&lt;/li>
&lt;li>&lt;a href="#docker-credential-secret-service">docker-credential-secret service&lt;/a>&lt;/li>
&lt;/ul>
&lt;/nav>
&lt;/details>
&lt;h1 id="docker-login-the-right-way">Docker Login the right Way&lt;/h1>
&lt;p>Hi again!&lt;/p>
&lt;p>It is been a while since I wrote something here, as always, there is no much time for a hobby.&lt;/p>
&lt;p>I&amp;rsquo;ve been working for a while with docker, not a production level, but for some applications that I use at work.
And since the &lt;a href="https://www.zdnet.com/article/docker-hub-hack-exposed-data-of-190000-users/" target="_blank" rel="noopener">Docker Hub Data breach&lt;/a>
I put more atention on the security of my data/credentials, so I investigate a little about and found this official
repository &lt;a href="https://github.com/docker/docker-credential-helpers/" target="_blank" rel="noopener">https://github.com/docker/docker-credential-helpers/&lt;/a> from Docker where are the supported credential helpers.&lt;/p>
&lt;h2 id="credential-store">Credential Store&lt;/h2>
&lt;p>Docker keeps our credentials saved on a JSON file located on &lt;code>~/.docker/config.json&lt;/code>,
but unfortunatelly credentials are just encrypted on base64,
here is an &lt;a href="https://fosdem.org/2019/schedule/event/base64_not_encryption/" target="_blank" rel="noopener">articule/video&lt;/a> where there is an explanation for the why it is a bad idea to just use base64 encryption.&lt;/p>
&lt;p>The following is a diagram on how a plain text storage works:&lt;/p>
&lt;figure id="figure-docker-plain-text-storage">
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="Plain Text Storage" srcset="
/media/posts/docker-login-the-right-way/DockerPlainTextCredentials_hu371181661409e61f690ceccfb695d5d5_82530_0db582c8916ffc5cd1b1225c42276838.webp 400w,
/media/posts/docker-login-the-right-way/DockerPlainTextCredentials_hu371181661409e61f690ceccfb695d5d5_82530_b27b4b3bd220158c0d85a61a2d4ae88b.webp 760w,
/media/posts/docker-login-the-right-way/DockerPlainTextCredentials_hu371181661409e61f690ceccfb695d5d5_82530_1200x1200_fit_q90_h2_lanczos_3.webp 1200w"
src="https://luiscachog.io/media/posts/docker-login-the-right-way/DockerPlainTextCredentials_hu371181661409e61f690ceccfb695d5d5_82530_0db582c8916ffc5cd1b1225c42276838.webp"
width="760"
height="570"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;figcaption>
Plain Text Storage
&lt;/figcaption>&lt;/figure>
&lt;p>Here is an example on how &lt;code>~/.docker/config.json&lt;/code> looks like when is using plain text credentials:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-shell" data-lang="shell">&lt;span class="line">&lt;span class="cl">cat ~/.docker/config.json
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="o">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;auths&amp;#34;&lt;/span>: &lt;span class="o">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;https://index.docker.io/v1/&amp;#34;&lt;/span>: &lt;span class="o">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;auth&amp;#34;&lt;/span>: &lt;span class="s2">&amp;#34;azRjaDA6c3VwZXJzZWNyZXRwYXNzd29yZAo=&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="o">}&lt;/span>,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;quay.io&amp;#34;&lt;/span>: &lt;span class="o">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;auth&amp;#34;&lt;/span>: &lt;span class="s2">&amp;#34;azRjaDA6c3VwZXJzZWNyZXRwYXNzd29yZAo=&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="o">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="o">}&lt;/span>,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;HttpHeaders&amp;#34;&lt;/span>: &lt;span class="o">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;User-Agent&amp;#34;&lt;/span>: &lt;span class="s2">&amp;#34;Docker-Client/18.09.6 (linux)&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="o">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="o">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>After a successful &lt;code>docker login&lt;/code> command,
Docker stores a base64 encoded string from the concatenation of the username, a colon, and the password and associates this string to the registry the user is logging into:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-shell" data-lang="shell">&lt;span class="line">&lt;span class="cl">$ &lt;span class="nb">echo&lt;/span> &lt;span class="nv">azRjaDA6c3VwZXJzZWNyZXRwYXNzd29yZAo&lt;/span>&lt;span class="o">=&lt;/span> &lt;span class="p">|&lt;/span> base64 -d -
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">luiscachog:supersecretpassword
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>A &lt;code>docker logout&lt;/code> command removes the entry from the JSON file for the given registry:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-shell" data-lang="shell">&lt;span class="line">&lt;span class="cl">$ docker &lt;span class="nb">logout&lt;/span> quay.io
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Remove login credentials &lt;span class="k">for&lt;/span> quay.io
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">$ cat ~/.docker/config.json
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="o">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;auths&amp;#34;&lt;/span>: &lt;span class="o">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;https://index.docker.io/v1/&amp;#34;&lt;/span>: &lt;span class="o">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;auth&amp;#34;&lt;/span>: &lt;span class="s2">&amp;#34;azRjaDA6c3VwZXJzZWNyZXRwYXNzd29yZAo=&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="o">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="o">}&lt;/span>,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;HttpHeaders&amp;#34;&lt;/span>: &lt;span class="o">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s2">&amp;#34;User-Agent&amp;#34;&lt;/span>: &lt;span class="s2">&amp;#34;Docker-Client/18.09.6 (linux)&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="o">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="o">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="docker-credential-helpers">Docker Credential Helpers&lt;/h2>
&lt;p>Since docker version &lt;code>1.11&lt;/code> implements support from an external credential store for registry authentication.
That means we can use a native keychain of the OS. Using an external store is more secure than storing on a &amp;ldquo;plain text&amp;rdquo; Docker configuration file.&lt;/p>
&lt;figure id="figure-docker-secure-storage">
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="Secure Storage" srcset="
/media/posts/docker-login-the-right-way/DockerSecureCredentials_huadaed0eecd0771dd576c62f4a77f8685_87803_dfab2c86655b67a2dd7b453f742b7daa.webp 400w,
/media/posts/docker-login-the-right-way/DockerSecureCredentials_huadaed0eecd0771dd576c62f4a77f8685_87803_67d1fdd1b117feb8b3cab43352b4a5be.webp 760w,
/media/posts/docker-login-the-right-way/DockerSecureCredentials_huadaed0eecd0771dd576c62f4a77f8685_87803_1200x1200_fit_q90_h2_lanczos_3.webp 1200w"
src="https://luiscachog.io/media/posts/docker-login-the-right-way/DockerSecureCredentials_huadaed0eecd0771dd576c62f4a77f8685_87803_dfab2c86655b67a2dd7b453f742b7daa.webp"
width="760"
height="543"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;figcaption>
Secure Storage
&lt;/figcaption>&lt;/figure>
&lt;p>In order to use a external credential store, we need a program to interact with.&lt;/p>
&lt;p>The actual list of &amp;ldquo;official&amp;rdquo; Docker Credential Helper is:&lt;/p>
&lt;ol>
&lt;li>docker-credential-osxkeychain: Provides a helper to use the OS X keychain as credentials store.&lt;/li>
&lt;li>docker-credential-secretservice: Provides a helper to use the D-Bus secret service as credentials store.&lt;/li>
&lt;li>docker-credential-wincred: Provides a helper to use Windows credentials manager as store.&lt;/li>
&lt;li>docker-credential-pass: Provides a helper to use pass as credentials store.&lt;/li>
&lt;/ol>
&lt;h2 id="docker-credential-secret-service">docker-credential-secret service&lt;/h2>
&lt;p>On this post we will explore the docker-credential-secretservice and how to configure it.&lt;/p>
&lt;ol>
&lt;li>
&lt;p>We need to download and install the helper.
You can find the lastest release on &lt;a href="https://github.com/docker/docker-credential-helpers/releases" target="_blank" rel="noopener">https://github.com/docker/docker-credential-helpers/releases&lt;/a>.
Download it, extract it and make it executable.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-shell" data-lang="shell">&lt;span class="line">&lt;span class="cl">wget https://github.com/docker/docker-credential-helpers/releases/download/v0.6.2/docker-credential-secretservice-v0.6.2-amd64.tar.gz
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">tar -xf docker-credential-secretservice-v0.6.2-amd64.tar.gz
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">chmod +x docker-credential-secretservice
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">sudo mv docker-credential-secretservice /usr/local/bin/
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>Then, we need to specify the credential store in the file &lt;code>~/.docker/config.json&lt;/code> to tell docker to use it.
The value must be the one after the prefix &lt;code>docker-credential-&lt;/code>. In this case:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-json" data-lang="json">&lt;span class="line">&lt;span class="cl">&lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;credsStore&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="s2">&amp;#34;secretservice&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>To facilite the configuration and do not make mistakes, you can run:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-shell" data-lang="shell">&lt;span class="line">&lt;span class="cl">sed -i &lt;span class="s1">&amp;#39;0,/{/s/{/{\n\t&amp;#34;credsStore&amp;#34;: &amp;#34;secretservice&amp;#34;,/&amp;#39;&lt;/span> ~/.docker/config.json
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;/ol>
&lt;p>From now we are uning an external store, so if you are currently logged in, you must run &lt;code>docker logout&lt;/code> to remove the credentials from the file and run &lt;code>docker login&lt;/code> tostart using the new ones.&lt;/p>
&lt;p>Let me know how this works for you.&lt;/p>
&lt;p>&lt;strong>References:&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>Docker Credential Helpers repository&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>&lt;/li>
&lt;li>Docker Credential Store Documentation&lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup>&lt;/li>
&lt;li>Slides about this topic &lt;sup id="fnref:3">&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref">3&lt;/a>&lt;/sup>&lt;/li>
&lt;/ul>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>&lt;a href="https://github.com/docker/docker-credential-helpers" target="_blank" rel="noopener">Docker Credential Helpers&lt;/a>&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>&lt;a href="https://docs.docker.com/engine/reference/commandline/login/#credentials-store" target="_blank" rel="noopener">docker cli documentation&lt;/a>&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:3">
&lt;p>&lt;a href="https://www.slideshare.net/DavidYeung22/can-we-stop-saving-docker-credentials-in-plain-text-now" target="_blank" rel="noopener">Stop saving credential tokens in text files&lt;/a>&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item></channel></rss>