forked from opensearch-project/security-dashboards-plugin
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Bump version Security Dashboards Plugin 2.9.0.0 (#21) * Upgrade to version 2.8.0 of Security Dashboards Plugin (#20) * Patch actions and workflows. Skip integration tests that fail (#4) * Change plugin name in actions and workflows * Patch install-dashboards action * Change jest config path * Skip tests --------- * Change Wazuh logo and titles (#3) * Change Wazuh logo and titles * Don't force custom logo to have 100% width * Add comment * Fix lint * Fix prettier * Update snapshots --------- * Disable tenant popup (#5) * Replace readme (#16) * Replace readme * Replace Opensearch to Wazuh * Update README.md --------- * Add GitHub workflow for automated build (#15) * Manual build * Workflow for automated build * Update .github/workflows/dev-environment.yml --------- * Create codeql.yml * Revert changes in cypress-test.yml * Revert changes in integration-test.yml * Fix integration test * Fix cypress test tenancy disabled --------- * Skip overview page test * Skip test for issue * Skip test for issue --------- * Fix home image and lint * Fix lint * Fix snapshot * Fix integration test * Revert selector --------- Signed-off-by: Ian Yenien Serrano <[email protected]> Signed-off-by: Álex Ruiz <[email protected]> Co-authored-by: Álex Ruiz <[email protected]> Co-authored-by: Federico Rodriguez <[email protected]>
1 parent
5def2a4
commit eebb0fe
Showing
21 changed files
with
357 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# This workflow builds a production-ready package when a tag is created. | ||
# | ||
# This workflow is based on the `dev-environment` workflow. | ||
|
||
name: Build | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
jobs: | ||
build: | ||
name: Build app package (auto) | ||
uses: ./.github/workflows/dev-environment.yml | ||
with: | ||
reference: ${{ github.ref_name }} | ||
command: 'yarn build' | ||
artifact_name: 'wazuh-security-dashboards-plugin-${{ github.ref_name }}' | ||
artifact_path: './wazuh-security-plugin/build' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ "main", "[0-9].[0-9]", "[0-9].x" ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ "main" ] | ||
schedule: | ||
- cron: '00 8 * * 5' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'javascript' ] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] | ||
# Use only 'java' to analyze code written in Java, Kotlin or both | ||
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both | ||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
|
||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs | ||
# queries: security-extended,security-and-quality | ||
|
||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun | ||
|
||
# If the Autobuild fails above, remove it and uncomment the following three lines. | ||
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. | ||
|
||
# - run: | | ||
# echo "Run, Build Application using script" | ||
# ./location_of_script_within_repo/buildscript.sh | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
with: | ||
category: "/language:${{matrix.language}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# This workflow downloads the source code at the given git reference | ||
# (branch, tag or commit), an sets up an environment (Kibana or OpenSearch) | ||
# to run this code and a command (build, test, ...). | ||
# | ||
# This workflow is used as a base for other workflows. | ||
|
||
name: Base workflow - Environment | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
reference: | ||
required: true | ||
type: string | ||
default: master | ||
description: Source code reference (branch, tag or commit SHA). | ||
command: | ||
required: true | ||
type: string | ||
default: 'yarn build' | ||
description: Command to run in the environment | ||
docker_run_extra_args: | ||
type: string | ||
default: '' | ||
description: Additional paramaters for the docker run command. | ||
required: false | ||
artifact_name: | ||
type: string | ||
default: '' | ||
description: Artifact name (will be automatically suffixed with .zip) | ||
required: false | ||
artifact_path: | ||
type: string | ||
default: '' | ||
description: Folder to include in the archive. | ||
required: false | ||
notify_jest_coverage_summary: | ||
type: boolean | ||
default: false | ||
required: false | ||
|
||
jobs: | ||
# Deploy the plugin in a development environment and run a command | ||
# using a pre-built Docker image, hosted in Quay.io. | ||
deploy_and_run_command: | ||
name: Deploy and run command | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Step 01 - Download the plugin's source code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ inputs.reference }} | ||
path: wazuh-security-plugin | ||
|
||
# Fix source code ownership so the internal user of the Docker | ||
# container is also owner. | ||
- name: Step 02 - Change code ownership | ||
run: sudo chown 1000:1000 -R wazuh-security-plugin; | ||
|
||
- name: Step 03 - Set up the environment and run the command | ||
run: | | ||
# Read the platform version from the package.json file | ||
echo "Reading the platform version from the package.json..."; | ||
platform_version=$(jq -r '.opensearchDashboards.version | select(. != null)' wazuh-security-plugin/package.json); | ||
echo "Plugin platform version: $platform_version"; | ||
# Up the environment and run the command | ||
docker run -t --rm \ | ||
-e OPENSEARCH_DASHBOARDS_VERSION=${platform_version} \ | ||
-v `pwd`/wazuh-security-plugin:/home/node/kbn/plugins/wazuh-security-plugin \ | ||
${{ inputs.docker_run_extra_args }} \ | ||
quay.io/wazuh/osd-dev:${platform_version} \ | ||
bash -c ' | ||
yarn config set registry https://registry.yarnpkg.com; | ||
cd /home/node/kbn/plugins/wazuh-security-plugin && yarn && ${{ inputs.command }}; | ||
' | ||
- name: Step 04 - Upload artifact to GitHub | ||
if: ${{ inputs.artifact_name && inputs.artifact_path }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ inputs.artifact_name }} | ||
path: ${{ inputs.artifact_path }} | ||
|
||
- name: Step 05 - Upload coverage results to GitHub | ||
if: ${{ inputs.notify_jest_coverage_summary && github.event_name == 'pull_request' }} | ||
uses: AthleticNet/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
path: ./wazuh-security-plugin/target/test-coverage/coverage-summary.json | ||
title: "Code coverage (Jest)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# This workflow builds a production-ready package from the given Git reference. | ||
# Any branch, tag or commit SHA existing in the origin can be used. | ||
# | ||
# This workflow is based on the `dev-environment` workflow. | ||
|
||
name: Manual build | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
reference: | ||
required: true | ||
type: string | ||
default: master | ||
description: Source code reference (branch, tag or commit SHA) | ||
|
||
jobs: | ||
# Build an app package from the given source code reference. | ||
build: | ||
name: Build app package | ||
uses: ./.github/workflows/dev-environment.yml | ||
with: | ||
reference: ${{ github.event.inputs.reference }} | ||
command: 'yarn build' | ||
artifact_name: 'wazuh-security-dashboards-plugin-${{ github.event.inputs.reference }}.zip' | ||
artifact_path: './wazuh-security-plugin/build' | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,32 @@ | ||
[![Unit tests](https://github.com/opensearch-project/security-dashboards-plugin/workflows/Unit%20Tests/badge.svg?branch=main)](https://github.com/opensearch-project/security-dashboards-plugin/actions)[![Integration tests](https://github.com/opensearch-project/security-dashboards-plugin/workflows/Integration%20Tests/badge.svg?branch=main)](https://github.com/opensearch-project/security-dashboards-plugin/actions)[![codecov](https://codecov.io/gh/opensearch-project/security-dashboards-plugin/branch/main/graphs/badge.svg)](https://github.com/opensearch-project/security-dashboards-plugin) | ||
<div style="text-align:center"> | ||
<img src="https://wazuh.com/uploads/2022/05/Logo-blogpost.png"/> | ||
</div> | ||
|
||
<img src="https://opensearch.org/assets/brand/SVG/Logo/opensearch_logo_default.svg" height="64px"/> | ||
# Wazuh Security Dashboards Plugin | ||
|
||
# OpenSearch Dashboards Security Plugin | ||
Wazuh Security Dashboards Plugin is a fork of the OpenSearch Dashboards Security Plugin which incorporate changes to make it easier to use for Wazuh users. Our aim is to contribute back any work not tied specifically to Wazuh. | ||
|
||
This plugin for OpenSearch Dashboards adds a configuration management UI for the OpenSearch Security features, as well as authentication, session management and multi-tenancy support to your secured cluster. | ||
This plugin for Wazuh Dashboard adds a configuration management UI for the Wazuh Security features, as well as authentication, session management and multi-tenancy support to your secured cluster. | ||
|
||
- [Features](#features) | ||
- [Installation](#installation) | ||
- [Contributing](#contributing) | ||
- [Getting Help](#getting-help) | ||
- [Code of Conduct](#code-of-conduct) | ||
- [Security](#security) | ||
- [License](#license) | ||
- [Copyright](#copyright) | ||
|
||
## Features | ||
|
||
* OpenSearch Dashboards authentication for OpenSearch | ||
* OpenSearch Dashboards session management | ||
* OpenSearch Security configuration UI | ||
* Multi-tenancy support for OpenSearch Dashboards | ||
* OpenSearch audit logging configuration UI | ||
* Wazuh Dashboard authentication for OpenSearch | ||
* Wazuh Dashboard session management | ||
* Wazuh Security configuration UI | ||
* Multi-tenancy support for Wazuh Dashboard | ||
* Wazuh audit logging configuration UI | ||
|
||
## Installation | ||
|
||
The OpenSearch Dashboards Security Plugin comes bundled by default as part of the OpenSearch Dashboards distribution. Please refer to the [installation guide](https://opensearch.org/docs/latest/dashboards/install/index/) and [technical documentation](https://opensearch.org/docs/latest/security-plugin/index/) for detailed information on installing and configuring the OpenSearch Security Plugin. | ||
The Wazuh Security Dashboards Plugin comes bundled by default as part of the Wazuh Dashboards distribution. Please refer to the [installation guide](https://documentation.wazuh.com/current/installation-guide/index.html). | ||
|
||
## Contributing | ||
|
||
|
@@ -35,20 +36,17 @@ See [developer guide](DEVELOPER_GUIDE.md) and [how to contribute to this project | |
|
||
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](https://opensearch.org/) and [documentation](https://opensearch.org/docs/latest). If you need help and are unsure where to open an issue, try [forums](https://discuss.opendistrocommunity.dev/). | ||
|
||
## Code of Conduct | ||
|
||
This project has adopted the [Amazon Open Source Code of Conduct](CODE_OF_CONDUCT.md). For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq), or contact [[email protected]](mailto:[email protected]) with any additional questions or comments. | ||
For more information, see [project website](https://wazuh.com/) and [documentation](https://documentation.wazuh.com/current/index.html). If you need help and are unsure where to open an [issue](https://github.com/wazuh/wazuh-security-dashboards-plugin/issues). | ||
|
||
## Security | ||
|
||
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public GitHub issue. | ||
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](https://github.com/wazuh/wazuh-security-dashboards-plugin/issues/new/choose). 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](NOTICE.txt) for details. | ||
- Copyright OpenSearch Contributors. See [NOTICE](NOTICE.txt) for details. | ||
- Copyright Wazuh, Inc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters