🔐 Secure your cluster with TLS, numerous authentication backends, data masking, audit logging as well as role-based access control on indices, documents, and fields https://opensearch.org/docs/latest/security-plugin/index/
  • Java 99.8%
  • Shell 0.1%
Find a file
Oleksii Udovychenko 4845012af1
Run DLS tests in src/test against legacy and V4 privilege evaluators (#6834)
Signed-off-by: Oleksii Udovychenko <oleksii-udovychenko@users.noreply.github.com>
Co-authored-by: Oleksii Udovychenko <oleksii-udovychenko@users.noreply.github.com>
2026-12-02 22:09:43 -05:00
.github Bump the codeql-action group with 2 updates (#6820) 2026-11-28 13:28:56 +01:00
bwc-test Use explicit Gradle root project properties (#6841) 2026-12-02 23:53:56 +01:00
checkstyle Replace AccessController and remove restriction on word Extension (#5750) 2025-10-29 16:01:26 -04:00
config Add required_claims setting to JWT authenticator (#6776) 2026-11-27 14:31:14 -05:00
docs Resolve the resource that governs a request through a provider hook (#6571) 2026-11-02 21:51:45 -08:00
formatter Update non java files (#2812) 2023-05-31 09:13:05 -04:00
gradle Bump gradle-wrapper from 9.9.1 to 9.9.2 (#6824) 2026-11-28 13:57:01 +01:00
libs Use explicit Gradle root project properties (#6841) 2026-12-02 23:53:56 +01:00
release-notes [Backport main] [AUTO] Add release notes for 3.10.1 (#6801) 2026-11-23 22:03:39 -05:00
sample-resource-plugin Use explicit Gradle root project properties (#6841) 2026-12-02 23:53:56 +01:00
scripts Add SPDX license header checker and missing headers (#6435) 2026-09-01 15:58:56 -04:00
spi Use explicit Gradle root project properties (#6841) 2026-12-02 23:53:56 +01:00
src Run DLS tests in src/test against legacy and V4 privilege evaluators (#6834) 2026-12-02 22:09:43 -05:00
tools Keep Windows security tool environment changes local (#6518) 2026-09-16 16:56:34 -04:00
.gitattributes Remove manual CHANGELOG (#6071) 2026-04-06 12:43:42 -04:00
.gitignore [Resource Permissions] Introduces Centralized Resource Access Control Framework (#5281) 2025-04-24 17:26:18 -04:00
.licenserc.json Add SPDX license header checker and missing headers (#6435) 2026-09-01 15:58:56 -04:00
.linelint.yml Add new code hygiene workflow (#1699) 2022-03-24 12:08:41 -04:00
.lycheeignore Add workflow using lychee to ensure that links in documentation files resolve (#5348) 2025-05-20 07:23:33 -04:00
.whitesource Enable mend remediate to create PRs (#5776) 2025-11-06 18:30:24 -05:00
ADMINS.md Add new code hygiene workflow (#1699) 2022-03-24 12:08:41 -04:00
AGENTS.md Support hybrid search with DLS term lookup (#6757) 2026-11-19 20:38:45 -05:00
build.gradle Use explicit Gradle root project properties (#6841) 2026-12-02 23:53:56 +01:00
CHANGELOG.md Remove manual CHANGELOG (#6071) 2026-04-06 12:43:42 -04:00
check-permissions-order.js Create a mechanism for plugins to explicitly declare actions they need to perform with their assigned PluginSubject (#5341) 2025-06-18 10:40:21 -04:00
CODE_OF_CONDUCT.md Cleanup md files (#1298) 2021-06-24 16:16:02 -07:00
codecov.yml [Resource Permissions] Introduces Centralized Resource Access Control Framework (#5281) 2025-04-24 17:26:18 -04:00
CONTRIBUTING.md Move repository guides into docs (#6596) 2026-10-07 13:32:16 -04:00
gradle.properties Add gradle.properties file to build security with -Pcrypto.standard=FIPS=140-3 by default (#6004) 2026-03-13 11:48:47 -07:00
gradlew Bump gradle-wrapper from 9.5.1 to 9.6.1 (#6262) 2026-06-29 06:58:35 -04:00
gradlew.bat Bump gradle-wrapper from 9.7.1 to 9.8.0 (#6584) 2026-10-03 09:58:46 +02:00
LICENSE.txt Cleanup md files (#1298) 2021-06-24 16:16:02 -07:00
MAINTAINERS.md Add Ralph Ursprung (gh: rursprung) as a co-maintainer of the Security repo (#6736) 2026-11-04 11:51:56 -08:00
NOTICE.txt Updated copyright notices (#1477) 2021-11-09 13:30:45 -05:00
plugin-security.policy Fix compilation issue after Secure gRPC PR (#17796) merged into core (#5263) 2025-04-10 13:40:05 -04:00
README.md Add plugin system indices to the default restorable list (#6691) 2026-10-30 16:44:50 -07:00
RELEASING.md Add new code hygiene workflow (#1699) 2022-03-24 12:08:41 -04:00
SECURITY.md Updating security reachout email (#4333) 2024-05-10 09:57:59 -04:00
settings.gradle Bump com.autonomousapps.build-health from 3.20.1 to 3.20.4 (#6823) 2026-11-28 13:27:45 +01:00
spotbugs-include.xml Fix windows encoding issues (#2206) 2022-11-02 11:56:12 -04:00

CI Slack

Announcement: The Slack workspace is live! Please join the conversation.

OpenSearch Security Plugin

OpenSearch Security is a plugin for OpenSearch that offers encryption, authentication and authorization. When combined with OpenSearch Security-Advanced Modules, it supports authentication via Active Directory, LDAP, Kerberos, JSON web tokens, SAML, OpenID and more. It includes fine grained role-based access control to indices, documents and fields. It also provides multi-tenancy support in OpenSearch Dashboards.

Features

Encryption

  • Full data in transit encryption
  • Node-to-node encryption
  • Certificate revocation lists
  • Hot Certificate renewal

Authentication

  • Internal user database
  • HTTP basic authentication
  • PKI authentication
  • Proxy authentication
  • User Impersonation
  • Active Directory / LDAP
  • Kerberos / SPNEGO
  • JSON web token (JWT)
  • OpenID Connect (OIDC)
  • SAML

Access control

  • Role-based cluster level access control
  • Role-based index level access control
  • User-, role- and permission management
  • Document-level security
  • Field-level security
  • REST management API

Audit/Compliance logging

  • Audit logging
  • Compliance logging for GDPR, HIPAA, PCI, SOX and ISO compliance

OpenSearch Dashboards multi-tenancy

  • True OpenSearch Dashboards multi-tenancy

Resource Sharing and Access Control

Installation

OpenSearch Security Plugin comes bundled by default as part of the OpenSearch distribution. Please refer to the installation guide and technical documentation for detailed information on installing and configuring the OpenSearch Security Plugin.

You can also see the developer guide which walks through the installation of the plugin for an OpenSearch server that doesn't initially have it.

Test and Build

Run all tests:

./gradlew clean test

Run tests against local cluster:

./gradlew integTestRemote -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername=docker-cluster -Dsecurity=true -Dhttps=true -Duser=admin -Dpassword=admin -Dcommon_utils.version="2.2.0.0"

OR

./scripts/integtest.sh

Note: To run against a remote cluster replace cluster-name and localhost:9200 with the IPAddress:Port of that cluster.

Build artifacts (zip, deb, rpm):

./gradlew clean assemble
artifact_zip=`ls $(pwd)/build/distributions/opensearch-security-*.zip | grep -v admin-standalone`
./gradlew buildDeb buildRpm -ParchivePath=$artifact_zip

This produces:

build/releases/opensearch-security-<VERSION>.zip
build/distributions/opensearch-security-<VERSION>.deb
build/distributions/opensearch-security-<VERSION>.rpm

Config hot reloading

The Security Plugin configuration is stored in a dedicated index in OpenSearch itself. Changes to the configuration are pushed to this index via the command line tool. This triggers a reload of the configuration on all nodes automatically. This has several advantages over configuration via opensearch.yml:

  • Configuration is stored in a central place
  • No configuration files on the nodes necessary
  • Configuration changes do not require a restart
  • Configuration changes take effect immediately

Onboarding new APIs

It is common practice to create new transport actions to perform different tasks between nodes when developing new APIs. For any new or existing plugins that want to onboard & integrate these actions with security, they should follow the steps below:

  1. Name your action (example), and register it (example) in your plugin. Best practice is to follow existing naming conventions, which follow a hierarchical pattern to keep the action names organized between different plugins.
  2. Register the action in the OpenSearch Security plugin. Each new action is registered in the plugin as a new permission. Usually, plugins will define different roles for their plugin (e.g., read-only access, write access). Each role will contain a set of permissions. An example of adding a new permission to the anomaly_read_access role for the Anomaly Detection plugin can be found in this PR.
  3. Register the action in the OpenSearch Dashboards Security plugin. This plugin maintains the full list of possible permissions, so users can see all of them when creating new roles or searching permissions via Dashboards. An example of adding different permissions can be found in this PR.

See the plugin-authorization-flows in the ARCHITECTURE.md.

System Index Protection

The Security plugin protects system indices registered by OpenSearch plugins. The deprecated plugins.security.system_indices.indices setting remains available for compatibility with plugins that do not register their system indices through SystemIndexPlugin.getSystemIndexDescriptors.

Users whose mapped roles are listed in plugins.security.restapi.roles_enabled can restore only the system indices matched by plugins.security.system_indices.restore.indices. By default it holds plugin system indices that restore correctly onto a new cluster. To see the default list, run:

GET _cluster/settings?include_defaults=true&filter_path=defaults.plugins.security.system_indices.restore.indices

An operator can override the list in opensearch.yml, and a configured value replaces the default list rather than adding to it. To also allow changing it at runtime with PUT _cluster/settings, set plugins.security.system_indices.restore.dynamic.enabled: true in opensearch.yml; the runtime value then takes precedence over the file. The Security configuration index can never be restored this way:

plugins.security.system_indices.restore.indices:
  - ".opendistro-alerting-config"

The user must still have the snapshot restore cluster permission. In the restore request, each system index must be named exactly or matched by a pattern that is no broader than an entry of the list. For example, with the entry .opendistro-alerting-alert-history-*, the request can name .opendistro-alerting-alert-history-* or .opendistro-alerting-alert-history-2026.10*, but not .opendistro-alerting-alert-history* or *.

Contributing

See the repository documentation, developer guide, and how to contribute to this project.

Getting Help

If you find a bug, or have a feature request, please don't hesitate to open an issue in this repository.

For more information, see project website and documentation. If you need help and are unsure where to open an issue, try forums.

Code of Conduct

This project has adopted the Amazon Open Source Code of Conduct. For more information see the Code of Conduct FAQ, or contact opensource-codeofconduct@amazon.com with any additional questions or comments.

Security

If you discover a potential security issue in this project we ask that you notify OpenSearch Security directly via email to security@opensearch.org. Please do not create a public GitHub issue.

License

This code is licensed under the Apache 2.0 License.

Copyright OpenSearch Contributors. See NOTICE for details.