• Stars
    star
    193
  • Rank 201,081 (Top 4 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created almost 6 years ago
  • Updated 17 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

πŸ” Secure your cluster with TLS, numerous authentication backends, data masking, audit logging as well as role-based access control on indices, documents, and fields

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

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.
sequenceDiagram
    participant Client
    participant OpenSearch
    participant SecurityPlugin
    participant Cluster as Plugin

    Client->>OpenSearch: Request
    OpenSearch->>SecurityPlugin: Request
    SecurityPlugin->>SecurityPlugin: Add Auth information to request context
    OpenSearch->>Cluster: Client Request
    Cluster->>SecurityPlugin: Execute transport layer action
    SecurityPlugin->>SecurityPlugin: Check if action is allowed
    alt Allowed
        SecurityPlugin->>OpenSearch: Continue request
        OpenSearch-->>Cluster: Transport layer action result
    else Denied
        SecurityPlugin-->>OpenSearch: Return 403 Forbidden
        OpenSearch-->>Client: 403 Forbidden
    end
    alt Plugin run outside user context
    Cluster->>Cluster: Stash context
    Cluster->>SecurityPlugin: Execute transport layer action outside user context
    SecurityPlugin-->>SecurityPlugin: Check if action is allowed
    SecurityPlugin->>OpenSearch: Continue request
    OpenSearch-->>Cluster: Transport layer action result
    Cluster->>Cluster: Restore user context
    end
    Cluster-->>SecurityPlugin: Result
    SecurityPlugin-->>OpenSearch: Result
    OpenSearch-->>Client: Result

System Index Protection

The Security Plugin provides protection to system indices used by plugins. The system index names must be explicitly registered in opensearch.yml under the plugins.security.system_indices.indices setting. See below for an example setup of system index protection from the demo configuration:

plugins.security.system_indices.enabled: true
plugins.security.system_indices.indices: [".plugins-ml-model", ".plugins-ml-task", ".opendistro-alerting-config", ".opendistro-alerting-alert*", ".opendistro-anomaly-results*", ".opendistro-anomaly-detector*", ".opendistro-anomaly-checkpoints", ".opendistro-anomaly-detection-state", ".opendistro-reports-*", ".opensearch-notifications-*", ".opensearch-notebooks", ".opensearch-observability", ".opendistro-asynchronous-search-response*", ".replication-metadata-store"]

The demo configuration can be modified in the following files to add a new system index to the demo configuration:

Contributing

See 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 [email protected] with any additional questions or comments.

Security

If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our vulnerability reporting page. Please do not create a public GitHub issue.

License

This code is licensed under the Apache 2.0 License.

Copyright

Copyright OpenSearch Contributors. See NOTICE for details.

More Repositories

1

OpenSearch

πŸ”Ž Open source distributed and RESTful search engine.
Java
9,725
star
2

OpenSearch-Dashboards

πŸ“Š Open source visualization dashboards for OpenSearch.
TypeScript
1,682
star
3

opensearch-k8s-operator

OpenSearch Kubernetes Operator
Go
375
star
4

opensearch-py

Python Client for OpenSearch
Python
321
star
5

data-prepper

Data Prepper is a component of the OpenSearch project that accepts, filters, transforms, enriches, and routes data at scale.
Java
259
star
6

opensearch-go

Go Client for OpenSearch
Go
190
star
7

opensearch-js

Node.js Client for OpenSearch
JavaScript
185
star
8

helm-charts

☸️ A community repository for Helm Charts of OpenSearch Project.
Smarty
171
star
9

k-NN

πŸ†• Find the k-nearest neighbors (k-NN) for your vector data
Java
154
star
10

opensearch-build

🧰 OpenSearch / OpenSearch-Dashboards Build Systems
Python
135
star
11

sql

Query your data using familiar SQL or intuitive Piped Processing Language (PPL)
Java
118
star
12

spring-data-opensearch

Java
116
star
13

opensearch-java

Java Client for OpenSearch
Java
113
star
14

opensearch-benchmark

OpenSearch Benchmark - a community driven, open source project to run performance tests for OpenSearch
Python
108
star
15

logstash-output-opensearch

A Logstash plugin that sends event data to a OpenSearch clusters and stores as an index.
Ruby
106
star
16

opensearch-net

OpenSearch .NET Client
C#
103
star
17

opensearch-php

Official PHP Client for OpenSearch
PHP
94
star
18

ml-commons

ml-commons provides a set of common machine learning algorithms, e.g. k-means, or linear regression, to help developers build ML related features within OpenSearch.
Java
93
star
19

opensearch-ruby

Ruby Client for OpenSearch
Ruby
93
star
20

ansible-playbook

πŸ€– A community repository for Ansible Playbook of OpenSearch Project.
83
star
21

terraform-provider-opensearch

Go
73
star
22

security-analytics

Security Analytics enables users for detecting security threats on their security event log data. It will also allow them to modify/tailor the pre-packaged solution.
Java
72
star
23

security-dashboards-plugin

πŸ” Manage your internal users, roles, access control, and audit logs from OpenSearch Dashboards
TypeScript
71
star
24

documentation-website

The documentation for OpenSearch, OpenSearch Dashboards, and their associated plugins.
HTML
66
star
25

anomaly-detection

Identify atypical data and receive automatic notifications
Java
65
star
26

neural-search

Plugin that adds dense neural retrieval into the OpenSearch ecosytem
Java
62
star
27

alerting

πŸ“Ÿ Get notified when your data meets certain conditions by setting up monitors, alerts, and notifications
Kotlin
60
star
28

opensearch-rs

OpenSearch Rust Client
Rust
58
star
29

index-management

πŸ—ƒ Automate periodic data operations, such as deleting indices at a certain age or performing a rollover at a certain size
Kotlin
53
star
30

observability

Visualize and explore your logs, traces and metrics data in OpenSearch Dashboards
Kotlin
52
star
31

opensearch-plugins

For all things OpenSearch plugins. You want to install, or develop a plugin? You've come to the right place.
49
star
32

cross-cluster-replication

Synchronize your data across multiple clusters for lower latencies and higher availability
Kotlin
48
star
33

opensearch-devops

πŸ˜„ We welcome all the community members to help develop third party tools/automations/workflows for OpenSearch/OpenSearch-Dashboards.
TypeScript
45
star
34

opensearch-cli

A full-featured command line interface (CLI) for OpenSearch.
Go
43
star
35

project-website

The source to opensearch.org
HTML
41
star
36

opensearch-dsl-py

High level Python client for OpenSearch (deprecated, moved to opensearch-py)
Python
40
star
37

opensearch-migrations

Migrate, upgrade, compare, and replicate OpenSearch clusters with ease.
Java
37
star
38

performance-analyzer

πŸ“ˆ Get detailed performance metrics from your cluster independently of the Java Virtual Machine (JVM)
Java
36
star
39

oui

OpenSearch UI Framework
TypeScript
36
star
40

geospatial

Future home of Geospatial features for OpenSearch
Java
33
star
41

flow-framework

OpenSearch plugin that enables builders to innovate AI apps on OpenSearch
Java
32
star
42

opensearch-py-ml

Python
32
star
43

opensearch-api-specification

API specification for OpenSearch
TypeScript
30
star
44

.github

Provides templates and resources for other OpenSearch project repositories.
30
star
45

opensearch-hadoop

Java
29
star
46

anomaly-detection-dashboards-plugin

Manage your detectors and identify atypical data in OpenSearch Dashboards
TypeScript
29
star
47

opensearch-sdk-java

OpenSearch SDK to build and run extensions
Java
28
star
48

performance-analyzer-rca

The Performance Analyzer RCA is a framework that builds on the Performance Analyzer engine to support root cause analysis (RCA) of performance and reliability problems for OpenSearch instances.
Java
28
star
49

asynchronous-search

▢️ Run queries in the background and retrieve partial results along the way
Java
28
star
50

reporting

Export and automate PNG, PDF, and CSV reports in OpenSearch Dashboards
Kotlin
28
star
51

alerting-dashboards-plugin

πŸ“Ÿ Manage your monitors, alerts and notifications in OpenSearch Dashboards
JavaScript
26
star
52

notifications

Notifications plugin for OpenSearch enables other plugins to send notifications via Email, Slack, Amazon Chime, Custom web-hook etc channels
Kotlin
25
star
53

opensearch-plugin-template-java

Template repo for creating OpenSearch plugins
Java
23
star
54

search-processor

Search Request Processor: pipeline for transformation of queries and results inline with a search request.
Java
22
star
55

job-scheduler

Run periodic jobs on the cluster from your plugin
Java
21
star
56

common-utils

Offers a library of utilities for building Java-based OpenSearch plugins
Kotlin
20
star
57

opensearch-testcontainers

Java
19
star
58

opensearch-spark

Spark Accelerator framework ; It enables secondary indices to remote data stores.
Scala
19
star
59

opensearch-benchmark-workloads

Official workloads used by OpenSearch Benchmark (OSB)
Python
18
star
60

dashboards-search-relevance

Tools to help search relevance engineers and business users tune search results for their OpenSearch applications.
TypeScript
18
star
61

opensearch-catalog

The OpenSearch Catalog is designed to make it easier for developers and community to contribute, search and install artifacts like plugins, visualization dashboards, ingestion to visualization content packs (data pipeline configurations, normalization, ingestion, dashboards).
HTML
18
star
62

dashboards-assistant

Dashboard assistant is a way for users on OpenSearch Dashboards to interact with an assistant through chat or the different OSD pages
TypeScript
17
star
63

piped-processing-language

Query your data using an intuitive Piped Processing Language (PPL)
17
star
64

dashboards-maps

🌐 User interface for the backend geospatial plugin which can be integrated with OpenSearch Dashboards and a home for all other map related features.
TypeScript
17
star
65

user-behavior-insights

User Behavior Insights plugin for OpenSearch
Java
17
star
66

index-management-dashboards-plugin

πŸ—ƒ Manage policies and jobs and automate periodic data operations in OpenSearch Dashboards
TypeScript
16
star
67

opensearch-cluster-cdk

TypeScript
15
star
68

dashboards-observability

Visualize and explore your logs, traces and metrics data in OpenSearch Dashboards
TypeScript
15
star
69

perftop

πŸ“ˆ PerfTop: A client for the OpenSearch Performance Analyzer
JavaScript
15
star
70

opensearch-ci

Enables continuous integration across OpenSearch, OpenSearch Dashboards, and plugins.
TypeScript
15
star
71

sql-jdbc

This is the driver for JDBC connectivity to a cluster running with OpenSearch SQL support.
Java
14
star
72

dashboards-anywhere

Cloud native infrastructure for the OpenSearch Dashboards service.
Python
13
star
73

dashboards-visualizations

Visualize the start, end, and duration of unique events in a sequence in OpenSearch Dashboards
TypeScript
12
star
74

opensearch-dashboards-functional-test

Maintains functional tests for OpenSearch Dashboards and Dashboards plugins
JavaScript
12
star
75

security-analytics-dashboards-plugin

Front end (UI) plugin to support security-analytics
TypeScript
10
star
76

opensearch-sdk-py

OpenSearch Extensions SDK for Python.
Python
10
star
77

dashboards-notifications

The Notifications plugin provides a central location for all of your notifications from OpenSearch plugins. You can use either OpenSearch Dashboards or the REST API to configure notifications. Dashboards offers a more organized way of selecting a channel type and selecting which OpenSearch plugin sources you want to use.
TypeScript
10
star
78

dashboards-reporting

HTML
9
star
79

logstash-input-opensearch

Ruby
9
star
80

dashboards-flow-framework

A UI designer for constructing AI applications with OpenSearch
TypeScript
9
star
81

opensearch-clients

For all things about OpenSearch clients.
9
star
82

dashboards-notebooks

Combine code snippets, live visualizations, and narrative text into rich reports in OpenSearch Dashboards
8
star
83

docker-images

Shell
8
star
84

sql-odbc

OpenSearchODBC is a read-only ODBC driver for Windows and Mac for connecting to OpenSearch SQL support.
C++
7
star
85

opensearch-oci-object-storage

OpenSearch Repository Plugin For Oci Object Storage
Java
7
star
86

ml-commons-dashboards

User interface for the ml-commons plugin which can be integrated with OpenSearch Dashboards and a health dashboard for machine learning models.
TypeScript
7
star
87

query-insights

Query Insights plugin offers frameworks and APIs for analyzing and optimizing query performance in OpenSearch.
Java
7
star
88

dashboards-query-workbench

The OpenSearch Dashboards Query Workbench enables you to query your OpenSearch data using either SQL or PPL
TypeScript
7
star
89

maps

Maps resources for OpenSearch
TypeScript
7
star
90

simple-schema

The purpose of this Plugin is to enhance open-search engine with user-domain schema by using GraphQL.
Java
6
star
91

custom-codecs

OpenSearch custom lucene codecs for providing different on-disk index encoding (e.g., compression).
Java
6
star
92

opensearch-build-libraries

Groovy
6
star
93

skills

Java
6
star
94

dashboards-desktop

HTML
5
star
95

ux

Public repository for OpenSearch UX. Tracks issues, epics and workstreams related to improving the user experience, usability and accessibility of OpenSearch core, dashboards and related plugins.
5
star
96

reporting-cli

JavaScript
4
star
97

project-meta

Tools to make it easy to manage processes across the opensearch-project org.
Shell
4
star
98

sql-cli

The SQL CLI component in OpenSearch is a stand-alone Python application for query
Python
4
star
99

project-tools

OpenSearch project/org tools.
Ruby
4
star
100

performance-analyzer-commons

Java
4
star