Skip to content

Allow running in mlock-less environment #13804

@redbaron

Description

@redbaron

Use Case

memguard as a backend for secret store requires lockable memory. Kubernetes doesn't have native way to configure RLIMIT_MEMLOCK and for that reason it is hard to run Telegraf with many "secret-capable" config options, even if they don't contain references to the secret store.

I didn't dig deep what value memguard provides, but I assume locked memory is used so that plaintext value is not leaked to swap. Kubernetes nodes run in swap-less mode and if "secret-capable" config option doesn't contain any secret references then using locked memory has no benefit.

Consider adding a switch to disable use of locked memory so that it can be enabled in environments where it is safe to do so.

Expected behavior

add agent level option secretstore_memlock with default value true. When set to false disable use of locked memory by memguard

Actual behavior

Locked memory requirement is enforced on Linux even if on other OSes memguard can run without it.

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestRequests for new plugin and for new features to existing plugins

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions