Site updated at 2017-08-23 09:23:41 UTC
This commit is contained in:
parent
3e78352a23
commit
b8ca0c6a9b
28 changed files with 68 additions and 64 deletions
|
@ -75,9 +75,9 @@
|
|||
</h1>
|
||||
</header>
|
||||
<hr class="divider">
|
||||
<p>The <code class="highlighter-rouge">configuration.yaml</code> file is a plain-text file, thus it is readable by anyone who has access to the file. The file contains passwords and API tokens which need to be redacted if you want to share your configuration. By using <code class="highlighter-rouge">!secrets</code> you can remove any private information from you configuration files. This separation can also help you to keep easier track of your passwords and API keys. As they are all stored at one place and no longer spread across the <code class="highlighter-rouge">configuration.yaml</code> file or even multiple yaml files if you <a href="/topics/splitting_configuration/">split up your configuration</a>.</p>
|
||||
<p>The <code class="highlighter-rouge">configuration.yaml</code> file is a plain-text file, thus it is readable by anyone who has access to the file. The file contains passwords and API tokens which need to be redacted if you want to share your configuration. By using <code class="highlighter-rouge">!secrets</code> you can remove any private information from you configuration files. This separation can also help you to keep easier track of your passwords and API keys. As they are all stored at one place and no longer spread across the <code class="highlighter-rouge">configuration.yaml</code> file or even multiple yaml files if you <a href="/docs/configuration/splitting_configuration/">split up your configuration</a>.</p>
|
||||
<h3><a class="title-link" name="using-secretsyaml" href="#using-secretsyaml"></a> Using secrets.yaml</h3>
|
||||
<p>The workflow for moving private information to <code class="highlighter-rouge">secrets.yaml</code> is very similar to the <a href="/topics/splitting_configuration/">splitting of the configuration</a>. Create a <code class="highlighter-rouge">secrets.yaml</code> file in your Home assistant configuration directory (The location of the folder differs between operating systems: on OS X and Linux it’s <code class="highlighter-rouge">~/.homeassistant</code> and on Windows it’s <code class="highlighter-rouge">%APPDATA%/.homeassistant</code>).</p>
|
||||
<p>The workflow for moving private information to <code class="highlighter-rouge">secrets.yaml</code> is very similar to the <a href="/docs/configuration/splitting_configuration/">splitting of the configuration</a>. Create a <code class="highlighter-rouge">secrets.yaml</code> file in your Home Assistant <a href="/docs/configuration/">configuration directory</a>.</p>
|
||||
<p>The entries for password and API keys in the <code class="highlighter-rouge">configuration.yaml</code> file usually looks like the example below.</p>
|
||||
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="s">http</span><span class="pi">:</span>
|
||||
<span class="s">api_password</span><span class="pi">:</span> <span class="s">YOUR_PASSWORD</span>
|
||||
|
@ -95,7 +95,7 @@
|
|||
<h3><a class="title-link" name="debugging-secrets" href="#debugging-secrets"></a> Debugging secrets</h3>
|
||||
<p>When you start splitting your configuration into multiple files, you might end up with configuration in sub folders. Secrets will be resolved in this order:</p>
|
||||
<ul>
|
||||
<li>A <code class="highlighter-rouge">secrets.yaml</code> located in the same folder as the yaml file referencing the secret,</li>
|
||||
<li>A <code class="highlighter-rouge">secrets.yaml</code> located in the same folder as the YAML file referencing the secret,</li>
|
||||
<li>next, parent folders will be searched for a <code class="highlighter-rouge">secrets.yaml</code> file with the secret, stopping at the folder with the main <code class="highlighter-rouge">configuration.yaml</code>,</li>
|
||||
<li>lastly, <code class="highlighter-rouge">keyring</code> will be queried for the secret (more info below)</li>
|
||||
</ul>
|
||||
|
@ -106,7 +106,7 @@
|
|||
</div>
|
||||
<p>This will not print the actual secret’s value to the log.</p>
|
||||
<p><em>Option 2</em>: View where secrets are retrieved from and the contents of all <code class="highlighter-rouge">secrets.yaml</code> files used, you can use the <code class="highlighter-rouge">check_config</code> script from the command line:</p>
|
||||
<div class="language-bash highlighter-rouge"><pre class="highlight"><code>hass --script check_config --secrets
|
||||
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>hass --script check_config --secrets
|
||||
</code></pre>
|
||||
</div>
|
||||
<p>This will print all your secrets.</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue