Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

Commit

Permalink
Rename for OpenSearch (opensearch-project#1126)
Browse files Browse the repository at this point in the history
* Rename for OpenSearch
  • Loading branch information
Chang Liu committed Apr 20, 2021
1 parent 9e05281 commit 7253fb4
Show file tree
Hide file tree
Showing 371 changed files with 2,948 additions and 2,731 deletions.
33 changes: 33 additions & 0 deletions .github/bug_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: 🐛 Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: bug
assignees: ''
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Plugins**
Please list all plugins currently enabled.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Host/Environment (please complete the following information):**
- OS: [e.g. iOS]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
19 changes: 19 additions & 0 deletions .github/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: 🎆 Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
3 changes: 3 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,6 @@ By making a contribution to this project, I certify that:
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check [here](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin).
2 changes: 1 addition & 1 deletion .github/release-notes-drafter-config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Configuration for Release Drafter: https://github.com/toolmantim/release-drafter
template: |
Compatible with Elasticsearch (set version here).
Compatible with OpenSearch (set version here).
$CHANGES
# Setting the formatting and sorting for the release notes body
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ eclipse-build
!/.settings/org.eclipse.jdt.ui.prefs
!/.settings/org.eclipse.jdt.groovy.core.prefs
bin
elasticsearch-*/
opensearch-*/
.DS_Store
data/
puppet/.vagrant
Expand Down
27 changes: 25 additions & 2 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,25 @@
## Code of Conduct
This project has adopted an [Open Source Code of Conduct](https://opendistro.github.io/for-elasticsearch/codeofconduct.html).

This code of conduct applies to all spaces provided by the OpenSource project including in code, documentation, issue trackers, mailing lists, chat channels, wikis, blogs, social media and any other communication channels used by the project.


**Our open source communities endeavor to:**

* Be Inclusive: We are committed to being a community where everyone can join and contribute. This means using inclusive and welcoming language.
* Be Welcoming: We are committed to maintaining a safe space for everyone to be able to contribute.
* Be Respectful: We are committed to encouraging differing viewpoints, accepting constructive criticism and work collaboratively towards decisions that help the project grow. Disrespectful and unacceptable behavior will not be tolerated.
* Be Collaborative: We are committed to supporting what is best for our community and users. When we build anything for the benefit of the project, we should document the work we do and communicate to others on how this affects their work.


**Our Responsibility. As contributors, members, or bystanders we each individually have the responsibility to behave professionally and respectfully at all times. Disrespectful and unacceptable behaviors include, but are not limited to:**

* The use of violent threats, abusive, discriminatory, or derogatory language;
* Offensive comments related to gender, gender identity and expression, sexual orientation, disability, mental illness, race, political or religious affiliation;
* Posting of sexually explicit or violent content;
* The use of sexualized language and unwelcome sexual attention or advances;
* Public or private harassment of any kind;
* Publishing private information, such as physical or electronic address, without permission;
* Other conduct which could reasonably be considered inappropriate in a professional setting;
* Advocating for or encouraging any of the above behaviors.
* Enforcement and Reporting Code of Conduct Issues:

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported. [Contact us](mailto:opensource-codeofconduct@amazon.com). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.
48 changes: 46 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ information to effectively respond to your bug report or contribution.

We welcome you to use the GitHub issue tracker to report bugs or suggest features.

When filing an issue, please check [existing open](../../issues), or [recently closed](../../issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
When filing an issue, please check [existing open](https://github.com/opensearch-project/security/issues), or [recently closed](https://github.com/opensearch-project/security/issues?q=is%3Aissue+is%3Aclosed), issues to make sure somebody else hasn't already reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:

* A reproducible test case or series of steps
* The version of our code being used
Expand Down Expand Up @@ -44,8 +44,52 @@ Looking at the existing issues is a great way to find something to contribute on

## Code of Conduct

This project has adopted an [Open Source Code of Conduct](https://opendistro.github.io/for-elasticsearch/codeofconduct.html).
This project has adopted an [Open Source Code of Conduct](CODE_OF_CONDUCT.md).

## Developer Certificate of Origin

OpenSearch is an open source product released under the Apache 2.0 license (see either [the Apache site](https://www.apache.org/licenses/LICENSE-2.0) or the [LICENSE file](./LICENSE)). The Apache 2.0 license allows you to freely use, modify, distribute, and sell your own products that include Apache 2.0 licensed software.

We respect intellectual property rights of others and we want to make sure all incoming contributions are correctly attributed and licensed. A Developer Certificate of Origin (DCO) is a lightweight mechanism to do that.

The DCO is a declaration attached to every contribution made by every developer. In the commit message of the contribution, the developer simply adds a `Signed-off-by` statement and thereby agrees to the DCO, which you can find below or at [DeveloperCertificate.org](http://developercertificate.org/).

```
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the
best of my knowledge, is covered under an appropriate open
source license and I have the right under that license to
submit that work with modifications, whether created in whole
or in part by me, under the same open source license (unless
I am permitted to submit under a different license), as
Indicated in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including
all personal information I submit with it, including my
sign-off) is maintained indefinitely and may be redistributed
consistent with this project or the open source license(s)
involved.
```
We require that every contribution to OpenSearch is signed with a Developer Certificate of Origin. Additionally, please use your real name. We do not accept anonymous contributors nor those utilizing pseudonyms.

Each commit must include a DCO which looks like this

```
Signed-off-by: Jane Smith <jane.smith@email.com>
```
You may type this line on your own when writing your commit messages. However, if your user.name and user.email are set in your git configs, you can use `-s` or `– – signoff` to add the `Signed-off-by` line to the end of the commit message.

## Security issue notifications

Expand Down
3 changes: 1 addition & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -199,4 +198,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
12 changes: 12 additions & 0 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# OpenSearch Security Maintainers

## Maintainers
| Maintainer | GitHub ID | Affiliation |
| --------------- | --------- | ----------- |
| Andy | [andy840314](https://github.com/andy840314) | Amazon |
| Chang Liu | [cliu123](https://github.com/cliu123) | Amazon |
| Debjani Banerjee | [debjanibnrj](https://github.com/debjanibnrj) | Amazon |
| hsiang9431-amzn | [hsiang9431-amzn](https://github.com/hsiang9431-amzn) | Amazon |
| lukkoor | [lukkoor](https://github.com/lukkoor) | Amazon |
| Sujith Vadakkepat | [sujithvm](https://github.com/sujithvm) | Amazon |
| Vlad Rozov | [vrozov](https://github.com/vrozov) | Amazon |
7 changes: 3 additions & 4 deletions NOTICE.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
Copyright 2015-2017 floragunn GmbH

Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
OpenSearch
Copyright 2021 OpenSearch Contributors

This product includes software developed by The Apache Software
Foundation (http://www.apache.org/).

This product includes software developed by The Legion of the Bouncy Castle Inc.
(http://www.bouncycastle.org)

See THIRD-PARTY.txt for additional third party licenses used by this product.
See THIRD-PARTY.txt for additional third party licenses used by this product.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[![CI](https://github.com/opendistro-for-elasticsearch/security/workflows/CI/badge.svg?branch=main)](https://github.com/opendistro-for-elasticsearch/security/actions)
[![codecov](https://codecov.io/gh/opendistro-for-elasticsearch/security/branch/main/graph/badge.svg)](https://codecov.io/gh/opendistro-for-elasticsearch/security)

# Open Distro for Elasticsearch Security
# OpenSearch Security

Open Distro for Elasticsearch Security is an Elasticsearch plugin that offers encryption, authentication, and authorization. When combined with Open Distro for Elasticsearch 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 Kibana.
OpenSearch Security is an OpenSearch plugin 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 Kibana.

## Features provided by Security

Expand Down Expand Up @@ -49,20 +49,20 @@ Please refer to the [technical documentation](https://opendistro.github.io/for-e

## Quick Start

* Install Elasticsearch
* Install OpenSearch

* Install the opendistro-elasticsearch-security plugin for your Elasticsearch version 6.5.4, e.g.:

```
<ES directory>/bin/elasticsearch-plugin install \
<OpenSearch directory>/bin/opensearch-plugin install \
-b com.amazon.opendistroforelasticsearch:opendistro_security:0.8.0.0
```

* ``cd`` into ``<ES directory>/plugins/opendistro_security/tools``
* ``cd`` into ``<OpenSearch directory>/plugins/opendistro_security/tools``

* Execute ``./install_demo_configuration.sh``, ``chmod`` the script first if necessary. This will generate all required TLS certificates and add the Security Plugin Configuration to your ``elasticsearch.yml`` file.
* Execute ``./install_demo_configuration.sh``, ``chmod`` the script first if necessary. This will generate all required TLS certificates and add the Security Plugin Configuration to your ``opensearch.yml`` file.

* Start Elasticsearch
* Start OpenSearch

* Test the installation by visiting ``https://localhost:9200``. When prompted, use admin/admin as username and password. This user has full access to the cluster.

Expand All @@ -88,7 +88,7 @@ artifact_zip=`ls $(pwd)/target/releases/opendistro-security-*.zip | grep -v admi

## Config hot reloading

The Security Plugin Configuration is stored in a dedicated index in Elasticsearch itself. Changes to the configuration are pushed to this index via the command line tool. This will trigger a reload of the configuration on all nodes automatically. This has several advantages over configuration via elasticsearch.yml:
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 will trigger 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
Expand Down
48 changes: 39 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

// Uses Gradle to build RPMs since that's what we use for the other plugins. When all you have is a hammer...
plugins {
id "nebula.ospackage" version "5.3.0"
Expand All @@ -7,14 +37,14 @@ plugins {
buildDir = 'gradle-build'

ext {
opendistroVersion = '1.13.1'
opensearchVersion = '1.15.0'
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
}

group = "com.amazon.opendistroforelasticsearch"
// Increment the final digit when there's a new plugin versions for the same opendistro version
// Reset the final digit to 0 when upgrading to a new opendistro version
version = "${opendistroVersion}.0" + (isSnapshot ? "-SNAPSHOT" : "")
group = "org.opensearch"
// Increment the final digit when there's a new plugin versions for the same opensearch version
// Reset the final digit to 0 when upgrading to a new opensearch version
version = "${opensearchVersion}.0" + (isSnapshot ? "-SNAPSHOT" : "")


if (!project.hasProperty("archivePath")) {
Expand All @@ -29,16 +59,16 @@ ospackage {
release = isSnapshot ? "0.1" : '1'
version = "${project.version}"

into '/usr/share/elasticsearch/plugins'
into '/usr/share/opensearch/plugins'
from(zipTree(project.file(archivePath).absolutePath)) {
into "opendistro_security"
permissionGroup 'elasticsearch'
permissionGroup 'opensearch'
}

user 'root'
permissionGroup 'root'

requires('elasticsearch-oss', "7.10.2", EQUAL)
requires('opensearch-oss', "7.10.3-SNAPSHOT", EQUAL)
packager = 'Amazon'
vendor = 'Amazon'
os = 'LINUX'
Expand All @@ -53,7 +83,7 @@ ospackage {
'''.stripIndent().replace('\n', ' ').trim()

//TODO: Would be better if the install_demo_configuration.sh script is marked executable in the upstream plugin instead of running bash manually here
postInstall "exec /bin/bash /usr/share/elasticsearch/plugins/opendistro_security/tools/install_demo_configuration.sh -y -i -s"
postInstall "exec /bin/bash /usr/share/opensearch/plugins/opendistro_security/tools/install_demo_configuration.sh -y -i -s"
}

buildRpm {
Expand Down
27 changes: 27 additions & 0 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
#!/usr/bin/env sh

#
# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
#
# Modifications Copyright OpenSearch Contributors. See
# GitHub history for details.
#

#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
##
## Gradle start up script for UN*X
Expand Down
Loading

0 comments on commit 7253fb4

Please sign in to comment.