Skip to content

[RFC] [Security Manager Replacement] Run Opensearch Plugins as separate systemd service  #16753

@kumargu

Description

@kumargu

Please describe the end goal of this project

#16729 proposes to strengthen the Opensearch core security model via additional systemd configs such as limiting access to sockets and files. An advancement / extension of such sandboxing would be to run (some) plugins as a separate systemd unit (aka separate process), each of it with its own restrictive systemd config . This is akin to security-manager having plugin level security policies. This will also allow some plugins to run with elevated privileges without elevating the privileges of Core. Further, I said, some plugins will move to this architecture because plugins which are performance sensitive and are fairly trusted will continue to work as they work today.

The overall idea would be to expose a secure REST server within Opensearch core where plugin <-> core interactions will be over secure, fast, bidirectional IPC. Such as IPC could be over Unix domain sockets which is fast, lightweight and can be modelled to use POSIX permissions to lock down access to the file descriptor (FD) associated with the socket, and the server side can request information such as credentials and PID of clients before they can fully connect.

High level advantages --

[1] Plugin level fine grained systemd configs

[2] Restrict resource usages like Rss/CPU/FD/Threads at plugin level (as needed by a plugin). Currently it is very tricky to set the resource level limits within the OS core systemd unit.

[3] The plugins could themselves run in a sandbox environment like docker; or leverage Polygot sandboxing in GraalVM bringing better isolation between plugins and OS core.

[4] Better telemetry injected at new REST layer to measure call-volume for individual plugins and throttle for any DDOS attack at the REST layer.

[5] This model allows building plugins natively in any language (such as RUST for high performance and memory safe use-cases).

Supporting References

#1687

Issues

#16634

Related component

Other

Metadata

Metadata

Assignees

No one assigned

    Labels

    MetaMeta issue, not directly linked to a PR

    Type

    No type

    Projects

    Status

    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions