fluentd
fluentd copied to clipboard
Add user tag prefix to in_forward plugin
Is your feature request related to a problem? Please describe.
Hello,
We're trying to use forward plugin for multi-tenant configuration.
So each tenant would have it's own username and password.
It is basically described in in_forward_users.conf and out_forward_users.conf config examples.
What we also want - is to ensure that tenant1 won't send (audit) logs on behalf tenant2.
So, want to add user_tag_prefix
to security section on server side (in_forward).
Describe the solution you'd like
Current configuration (in_forward_users.conf):
<source>
@type forward
<security>
self_hostname input.testing.local
shared_key secure_communication_is_awesome
user_auth yes
<user>
username user1
password yes_this_is_user1
</user>
<user>
username user2
password yes_this_is_really_user2
</user>
</security>
</source>
Desired configuration:
<source>
@type forward
<security>
self_hostname input.testing.local
shared_key secure_communication_is_awesome
user_auth yes
user_tag_prefix yes #### NEW
<user>
username user1
password yes_this_is_user1
</user>
<user>
username user2
password yes_this_is_really_user2
</user>
</security>
</source>
As a result, tag would have prefix with username:
Original tag coming from user1: auditlog
Desired tag after user_tag_prefix
: user1.auditlog
Describe alternatives you've considered
Nothing
Additional context
No response
There's actually also add_tag_prefix, but not in <security>
section.
Wondering, if need to combine it with user_tag_prefix
. For example, using $username
value.
There probably should be logic for cases:
- If user_auth enabled
- If allow_anonymous_source enabled