<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Spinnaker – Secrets</title>
    <link>/docs/reference/secrets/</link>
    <description>Recent content in Secrets on Spinnaker</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/docs/reference/secrets/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Docs: Secrets in GCS</title>
      <link>/docs/reference/secrets/gcs-secrets/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/docs/reference/secrets/gcs-secrets/</guid>
      <description>
        
        
        &lt;p&gt;This example uses a bucket (&lt;code&gt;mybucket&lt;/code&gt;) to store GitHub credentials and a kubeconfig file.&lt;/p&gt;
&lt;h2 id=&#34;authorization&#34;&gt;Authorization&lt;/h2&gt;
&lt;p&gt;Since you&amp;rsquo;re storing sensitive information you protect the bucket by restricting access to it. Encryption at rest is 
&lt;a href=&#34;https://cloud.google.com/storage/docs/encryption/default-keys&#34; target=&#34;_blank&#34;&gt;already provided&lt;/a&gt;
 automatically without additional setup.&lt;/p&gt;
&lt;p&gt;Remember to run Spinnaker services with a service account that allows them to read that content.&lt;/p&gt;
&lt;h2 id=&#34;storing-secrets&#34;&gt;Storing secrets&lt;/h2&gt;
&lt;h3 id=&#34;storing-credentials&#34;&gt;Storing credentials&lt;/h3&gt;
&lt;p&gt;Store your GitHub credentials in &lt;code&gt;mybucket/spinnaker-secrets.yml&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;github&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;password&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;&amp;lt;PASSWORD&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;token&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;&amp;lt;TOKEN&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Note: You could choose to store the password under different keys than &lt;code&gt;github.password&lt;/code&gt; and &lt;code&gt;github.token&lt;/code&gt;. You&amp;rsquo;d just need to 
&lt;a href=&#34;#referencing-secrets&#34;&gt;change how to reference the secret&lt;/a&gt;
.&lt;/p&gt;
&lt;h3 id=&#34;storing-sensitive-files&#34;&gt;Storing sensitive files&lt;/h3&gt;
&lt;p&gt;Some Spinnaker configuration uses information stored as files. For example, upload the &lt;code&gt;kubeconfig&lt;/code&gt; file of your Kubernetes account directly to &lt;code&gt;mybucket/mykubeconfig&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;gsutil cp /path/to/mykubeconfig gs://mybucket/mykubeconfig
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;referencing-secrets&#34;&gt;Referencing secrets&lt;/h2&gt;
&lt;p&gt;Now that secrets are safely stored in the bucket, you reference them from your config files using the format below. The GCS-specific parameters (&lt;code&gt;b:&amp;lt;bucket&amp;gt;&lt;/code&gt;, &lt;code&gt;f:&amp;lt;path to file&amp;gt;&lt;/code&gt;, &lt;code&gt;k:&amp;lt;optional yaml key&amp;gt;&lt;/code&gt;) can be in any order.
To reference secret literal values:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;encrypted:gcs!b:&amp;lt;bucket&amp;gt;!f:&amp;lt;path to file&amp;gt;!k:&amp;lt;optional yaml key&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To reference secret files:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;encryptedFile:gcs!b:&amp;lt;bucket&amp;gt;!f:&amp;lt;path to file&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The &lt;code&gt;k:&amp;lt;key&amp;gt;&lt;/code&gt; parameter is only necessary when storing secret values in a yaml file, like in our example. To reference &lt;code&gt;github.password&lt;/code&gt; from the file above, use:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;encrypted:gcs!b:mybucket!f:spinnaker-secrets.yml!k:github.password
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;But to reference your kubeconfig file, you can leave off the &lt;code&gt;k&lt;/code&gt; parameter and use &lt;code&gt;encryptedFile&lt;/code&gt; prefix:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;encrypted:gcs!b:mybucket!f:mykubeconfig
encryptedFile:gcs!b:mybucket!f:mykubeconfig
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Docs: Secrets in Google Secret Manager</title>
      <link>/docs/reference/secrets/secret-manager-secrets/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/docs/reference/secrets/secret-manager-secrets/</guid>
      <description>
        
        
        &lt;p&gt;This example uses secrets - &lt;code&gt;mysecret1&lt;/code&gt;, &lt;code&gt;mysecret2&lt;/code&gt; - to store GitHub credentials and secret - &lt;code&gt;mykubeconfig&lt;/code&gt; - to store kubeconfig file.&lt;/p&gt;
&lt;h2 id=&#34;authorization&#34;&gt;Authorization&lt;/h2&gt;
&lt;p&gt;Since you&amp;rsquo;re storing sensitive information you protect the secret by restricting access to it
through 
&lt;a href=&#34;https://cloud.google.com/secret-manager/docs/access-control&#34; target=&#34;_blank&#34;&gt;IAM roles&lt;/a&gt;
. Encryption at rest
is 
&lt;a href=&#34;https://cloud.google.com/secret-manager/docs/encryption&#34; target=&#34;_blank&#34;&gt;already provided&lt;/a&gt;
 by default.&lt;/p&gt;
&lt;p&gt;Remember to run Spinnaker services with a service account that allows them to read that content.&lt;/p&gt;
&lt;h2 id=&#34;storing-secrets&#34;&gt;Storing secrets&lt;/h2&gt;
&lt;h3 id=&#34;storing-credentials&#34;&gt;Storing credentials&lt;/h3&gt;
&lt;p&gt;Store your GitHub token in a secret named &lt;code&gt;mysecret&lt;/code&gt; either as a complete secret or as a value of one of the json keys:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;secret &lt;code&gt;mysecret1&lt;/code&gt;:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;    &amp;lt;TOKEN&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;secret &lt;code&gt;mysecret2&lt;/code&gt;:&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;github-token&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&amp;lt;TOKEN&amp;gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;some-other-key&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&amp;lt;some-other-secret&amp;gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Note: You could choose to store the token under different key than &lt;code&gt;github-token&lt;/code&gt;. You&amp;rsquo;d just need to 
&lt;a href=&#34;#referencing-secrets&#34;&gt;change how to reference the secret&lt;/a&gt;
.&lt;/p&gt;
&lt;h3 id=&#34;storing-sensitive-files&#34;&gt;Storing sensitive files&lt;/h3&gt;
&lt;p&gt;Some Spinnaker configuration uses information stored as files. For example, upload the &lt;code&gt;kubeconfig&lt;/code&gt; file of your Kubernetes account directly to &lt;code&gt;mykubeconfig&lt;/code&gt; secret:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;gcloud secrets versions add mykubeconfig --data-file=&amp;#34;/path/to/kubeconfig&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;referencing-secrets&#34;&gt;Referencing secrets&lt;/h2&gt;
&lt;p&gt;Now that secrets are safely stored in the Secret Manager, you reference them from your config files using the format below. The Secret Manager specific parameters (&lt;code&gt;p:&amp;lt;project number&amp;gt;&lt;/code&gt;, &lt;code&gt;s:&amp;lt;secret id&amp;gt;&lt;/code&gt;, &lt;code&gt;k:&amp;lt;optional json key&amp;gt;&lt;/code&gt;, &lt;code&gt;v:&amp;lt;optional secret version&amp;gt;&lt;/code&gt;) can be in any order.
To reference secret literal values:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;encrypted:google-secrets-manager!p:&amp;lt;project number&amp;gt;!s:&amp;lt;secret id&amp;gt;!k:&amp;lt;optional json key&amp;gt;!v:&amp;lt;optional secret version&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To reference secret files:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;encryptedFile:google-secrets-manager!p:&amp;lt;project number&amp;gt;!s:&amp;lt;secret id&amp;gt;!v:&amp;lt;optional secret version&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To reference the latest version of secret from &lt;code&gt;mysecret1&lt;/code&gt;, use:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;encrypted:google-secrets-manager!p:123456789012!s:mysecret1
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The &lt;code&gt;k:&amp;lt;key&amp;gt;&lt;/code&gt; parameter is only necessary when storing secret values in a json file. Also, the &lt;code&gt;v:&amp;lt;secret version&amp;gt;&lt;/code&gt; parameter is required only when the secret is not from the latest version. To reference &lt;code&gt;github-token&lt;/code&gt; from the secret above having version &lt;code&gt;2&lt;/code&gt;, use:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;encrypted:google-secrets-manager!p:123456789012!s:mysecret2!k:github-token!v:2
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;But to reference your kubeconfig file, you must leave off the &lt;code&gt;k&lt;/code&gt; parameter and use &lt;code&gt;encryptedFile&lt;/code&gt; prefix:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;encryptedFile:google-secrets-manager!p:123456789012!s:mykubeconfig
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Docs: Secrets in S3</title>
      <link>/docs/reference/secrets/s3-secrets/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/docs/reference/secrets/s3-secrets/</guid>
      <description>
        
        
        &lt;p&gt;This document describes how to set up Spinnaker secrets in an encrypted S3 bucket. This example uses a bucket (
&lt;code&gt;mybucket&lt;/code&gt;) in the &lt;code&gt;us-west-2&lt;/code&gt; region to store GitHub credentials and a kubeconfig file. You can reference the bucket by its
URL &lt;code&gt;mybucket.us-west-2.amazonaws.com&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;authorization&#34;&gt;Authorization&lt;/h2&gt;
&lt;p&gt;Since you&amp;rsquo;re storing sensitive information, you protect the bucket by restricting access
and 
&lt;a href=&#34;https://docs.aws.amazon.com/AmazonS3/latest/user-guide/default-bucket-encryption.html&#34; target=&#34;_blank&#34;&gt;enabling encryption&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;Remember to run Spinnaker services with IAM roles that allow them to read that content.&lt;/p&gt;
&lt;h2 id=&#34;storing-secrets&#34;&gt;Storing secrets&lt;/h2&gt;
&lt;h3 id=&#34;storing-credentials&#34;&gt;Storing credentials&lt;/h3&gt;
&lt;p&gt;Store your GitHub credentials in &lt;code&gt;mybucket/spinnaker-secrets.yml&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;github&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;password&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;&amp;lt;PASSWORD&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;token&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;&amp;lt;TOKEN&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Note: You could choose to store the password under different keys than &lt;code&gt;github.password&lt;/code&gt; and &lt;code&gt;github.token&lt;/code&gt;. You&amp;rsquo;d just need to change how to reference the secret further down.&lt;/p&gt;
&lt;h3 id=&#34;storing-sensitive-files&#34;&gt;Storing sensitive files&lt;/h3&gt;
&lt;p&gt;Some Spinnaker configuration uses information stored as files. For example, upload the &lt;code&gt;kubeconfig&lt;/code&gt; file of your Kubernetes account directly to &lt;code&gt;mybucket/mykubeconfig&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;aws s3 cp /path/to/mykubeconfig s3://mybucket/mykubeconfig
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;referencing-secrets&#34;&gt;Referencing secrets&lt;/h2&gt;
&lt;p&gt;Now that secrets are safely stored in the bucket, you reference them from your config files using the following format. The S3 specific parameters (&lt;code&gt;r:&amp;lt;region&amp;gt;&lt;/code&gt;, &lt;code&gt;b:&amp;lt;bucket&amp;gt;&lt;/code&gt;, &lt;code&gt;k:&amp;lt;optional yaml key&amp;gt;&lt;/code&gt;) can be in any order:
To reference secret literal values:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;encrypted:s3!r:&amp;lt;region&amp;gt;!b:&amp;lt;bucket&amp;gt;!f:&amp;lt;path to file&amp;gt;!k:&amp;lt;optional yaml key&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To reference secret files:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;encryptedFile:s3!b:&amp;lt;bucket&amp;gt;!f:&amp;lt;path to file&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The &lt;code&gt;k:&amp;lt;key&amp;gt;&lt;/code&gt; parameter is only necessary when storing secret values in a yaml file, like in our example. To reference &lt;code&gt;github.password&lt;/code&gt; from the file above, use:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;encrypted:s3!b:mybucket!f:spinnaker-secrets.yml!r:us-west-2!k:github.password
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;But to reference your kubeconfig file, you can leave off the &lt;code&gt;k&lt;/code&gt; parameter and use &lt;code&gt;encryptedFile&lt;/code&gt; prefix:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;encrypted:s3!r:us-west-2!b:mybucket!f:mykubeconfig
encryptedFile:s3!r:us-west-2!b:mybucket!f:mykubeconfig
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
  </channel>
</rss>
