Skip to content

Comments

Add hash_salt_path parameter#5

Open
kou wants to merge 1 commit intoy-ken:masterfrom
kou:add-hash-salt-path
Open

Add hash_salt_path parameter#5
kou wants to merge 1 commit intoy-ken:masterfrom
kou:add-hash-salt-path

Conversation

@kou
Copy link

@kou kou commented Dec 29, 2014

hash_salt_path parameter is for security.

Here is a use cases.

Use case: Don't version control hash salt.

If we version control fluentd.conf, hash salt is also version controlled
because we need to write hash salt by hash_salt parameter in
fluentd.conf.

We can use random hash salt for each host by hash_salt_path parameter
without version controlling hash salt. Because hash_salt_path generates
random hash salt key and saves it when the path doesn't exist.

`hash_salt_path` parameter is for security.

Here is a use cases.

Use case: Don't version control hash salt.

If we version control fluentd.conf, hash salt is also version controlled
because we need to write hash salt by `hash_salt` parameter in
fluentd.conf.

We can use random hash salt for each host by `hash_salt_path` parameter
without version controlling hash salt. Because `hash_salt_path` generates
random hash salt key and saves it when the path doesn't exist.
@y-ken
Copy link
Owner

y-ken commented Jan 2, 2015

Hi @kou

Thank you very much for contribution this fluentd plugin project!
It is very good for splitting configuration to store secret data.

How do you think store hash_salt_key into environment data?
On td-agent2, you can use environment values in configuration file.
The example implement design is below.

$ less /etc/sysconfig/td-agent
export ANONYMIZE_HASH_SALT='MyHashSaltString'

$ less /etc/td-agent/td-agent.conf
<match hoge.**>
  type anonymizer
  # ...snip...
  hash_salt  #{ENV['ANONYMIZE_HASH_SALT']}
</match>

Storing hash_salt_key in environment vs. in file comparison.

Pros

  • keep a single file as /etc/sysconfig/td-agent (on storing in environment.)
  • controllable file permission (on storing in file)

Cons

  • According to some opinions, It is not safe for storing secret data into environment.

How do you think?

@y-ken y-ken self-assigned this Jan 2, 2015
@kou
Copy link
Author

kou commented Jan 3, 2015

英語で説明できる気がしないので日本語ですみません。。。

ユーザーとしての意見だと、提案してもらった方法は自分で各ホスト毎のsaltを生成する必要があって面倒だなぁと感じます。

(環境変数を使うと他のプラグインがspawnしたりしたときに別プロセスにも情報が渡ってしまいやすくなるので、この方向で実現(設定ファイルの中にRubyのコードを書いて実現)するときは、私はFile.read("/path/to/salt-file")みたいにすると思います。)

1開発者の意見だと、多少ユーザーが不便になったとしても使用や実装をシンプルに保ちたいというのは理解できるので、このプロジェクトがそういう方針であれば、このpull requestは取り下げます。

という感じです!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants