1 <p>Secret key is required to be able to encrypt properties. Please follow those steps :</p>
4 <%= button_to_remote 'Generate a random key',
5 :url => {:action => 'generate_secret'},
6 :update => {:success => 'secret', :failure => 'secret_error'},
7 :success => "$('secret').show()",
8 :failure => "$('secret_error').show()",
10 :id => 'submit_generate_secret' -%>
11 <span id="secret" class="notice" style="display:none"></span>
12 <span id="secret_error" class="error" style="display:none"></span>
14 <li>Store this key in the file <code>~/.sonar/sonar-secret.txt</code> of the server. This file can be relocated
15 by defining the property <code>sonar.secretKeyPath</code> in <code>conf/sonar.properties</code></li>
16 <li>Restrict access to this file by making it readable and by owner only</li>
17 <li>Copy this file on all the machines that execute code inspection. Define the property <code>sonar.secretKeyPath</code> on those machines if needed.</li>
18 <li>For each property that you want to encrypt, <%= link_to 'generate the encrypted value', {:action => 'index'}, {:class => 'link-action'} -%>
19 and replace the original values where ever they are stored
20 (configuration files, command lines)