Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Chore] --security for snapshot and OSD server #5451

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

kavilla
Copy link
Member

@kavilla kavilla commented Nov 9, 2023

Add the ability to run:

yarn opensearch snapshot --security

which will start the OpenSearch cluster with the security plugin.

And add the ability to run:

yarn start:security

which will start the OpenSearch Dashboards server if the security plugin is available.

This is only intended for demo and local purposes.

Issue:
n/a

Description

Issues Resolved

Screenshot

Testing the changes

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Copy link

codecov bot commented Nov 9, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (f6ce6e7) 66.98% compared to head (15d8962) 66.95%.
Report is 3 commits behind head on main.

Files Patch % Lines
...ckages/osd-opensearch/src/cli_commands/snapshot.js 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5451      +/-   ##
==========================================
- Coverage   66.98%   66.95%   -0.04%     
==========================================
  Files        3293     3293              
  Lines       63281    63285       +4     
  Branches    10061    10061              
==========================================
- Hits        42389    42370      -19     
- Misses      18451    18470      +19     
- Partials     2441     2445       +4     
Flag Coverage Δ
Linux_1 ?
Linux_2 55.21% <50.00%> (-0.01%) ⬇️
Linux_3 43.78% <ø> (ø)
Linux_4 ?
Windows_1 35.27% <0.00%> (-0.01%) ⬇️
Windows_2 ?
Windows_3 43.80% <ø> (ø)
Windows_4 35.33% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kavilla kavilla force-pushed the kavilla/aasecurity branch from 8eed647 to 25fc270 Compare November 9, 2023 22:49
ananzh
ananzh previously approved these changes Nov 10, 2023
DEVELOPER_GUIDE.md Outdated Show resolved Hide resolved
DEVELOPER_GUIDE.md Outdated Show resolved Hide resolved
package.json Outdated
@@ -64,6 +64,8 @@
"build": "scripts/use_node scripts/build --all-platforms",
"start": "scripts/use_node scripts/opensearch_dashboards --dev",
"start:docker": "scripts/use_node scripts/opensearch_dashboards --dev --opensearch.hosts=$OPENSEARCH_HOSTS --opensearch.ignoreVersionMismatch=true --server.host=$SERVER_HOST",
"start:security": "scripts/use_node scripts/opensearch_dashboards --dev --security",
"start:security:default": "export OPENSEARCH_USERNAME=kibanaserver && export OPENSEARCH_PASSWORD=kibanaserver && scripts/use_node scripts/opensearch_dashboards --dev --security",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not comfortable with this. Where is this default defined? Is it something we use in CI or is it a default for OS?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I was uncomfortable with this. It is the demo user for OpenSearch Dashboards defined by the OpenSearch Security plugin:

https://github.com/opensearch-project/security/blob/main/config/internal_users.yml#L27

Add the ability to run:
```
yarn opensearch snapshot --security
```
which will start the OpenSearch cluster with the security plugin.

And add the ability to run:
```
yarn start:security
```
which will start the OpenSearch Dashboards server if the security
plugin is available.

This is only intended for demo and local purposes.

Issue:
n/a

Signed-off-by: Kawika Avilla <[email protected]>
Copy link
Member

@manasvinibs manasvinibs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@abbyhu2000 abbyhu2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified and it works well!

> 3. Wait a few seconds while the plugin is installed, configured, and OpenSearch starts up.

Then within another window. You can start:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also add a step here to clone the dashboard-security repo under /plugins?

@kavilla kavilla merged commit 2e7a2ba into opensearch-project:main Nov 30, 2023
65 of 68 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Nov 30, 2023
Add the ability to run:
```
yarn opensearch snapshot --security
```
which will start the OpenSearch cluster with the security plugin.

And add the ability to run:
```
yarn start:security
```
which will start the OpenSearch Dashboards server if the security
plugin is available.

This is only intended for demo and local purposes.

Issue:
n/a

Signed-off-by: Kawika Avilla <[email protected]>
(cherry picked from commit 2e7a2ba)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
kavilla added a commit that referenced this pull request Nov 30, 2023
Add the ability to run:
```
yarn opensearch snapshot --security
```
which will start the OpenSearch cluster with the security plugin.

And add the ability to run:
```
yarn start:security
```
which will start the OpenSearch Dashboards server if the security
plugin is available.

This is only intended for demo and local purposes.

Issue:
n/a

Signed-off-by: Kawika Avilla <[email protected]>
kavilla added a commit that referenced this pull request Dec 11, 2023
Add the ability to run:
```
yarn opensearch snapshot --security
```
which will start the OpenSearch cluster with the security plugin.

And add the ability to run:
```
yarn start:security
```
which will start the OpenSearch Dashboards server if the security
plugin is available.

This is only intended for demo and local purposes.

Issue:
n/a

Signed-off-by: Kawika Avilla <[email protected]>
ananzh pushed a commit that referenced this pull request Dec 12, 2023
Add the ability to run:
```
yarn opensearch snapshot --security
```
which will start the OpenSearch cluster with the security plugin.

And add the ability to run:
```
yarn start:security
```
which will start the OpenSearch Dashboards server if the security
plugin is available.

This is only intended for demo and local purposes.

Issue:
n/a


(cherry picked from commit 2e7a2ba)

Signed-off-by: Kawika Avilla <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants