Skip to content

Commit

Permalink
Fix for certs
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Ho <[email protected]>
  • Loading branch information
derek-ho committed Mar 27, 2024
1 parent 05e807c commit fcbbf65
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 23 deletions.
21 changes: 0 additions & 21 deletions .github/actions/download-plugin/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,3 @@ runs:
-Dtransitive=false \
-Ddest=${{ inputs.download-location }}.zip
shell: bash
- name: Create Setup Script for Linux
if: ${{ runner.os == 'Linux' }}
run: |
cat > setup.sh <<'EOF'
chmod +x ./opensearch-${{ inputs.opensearch-version}}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/install_demo_configuration.sh
/bin/bash -c "yes | ./opensearch-${{ inputs.opensearch-version}}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/install_demo_configuration.sh -t"
echo "plugins.security.unsupported.restapi.allow_securityconfig_modification: true" >> ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/config/opensearch.yml
echo "cluster.routing.allocation.disk.threshold_enabled: false" >> ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/config/opensearch.yml
EOF
shell: bash

- name: Create Setup Script for Windows
if: ${{ runner.os == 'Windows' }}
run: |
New-Item .\setup.bat -type file
Set-Content .\setup.bat -Value "powershell.exe -noexit -command `".\opensearch-${{ inputs.opensearch-version}}-SNAPSHOT\plugins\${{ inputs.plugin-name }}\tools\install_demo_configuration.bat -y -i -c -t`""
Add-Content -Path .\setup.bat -Value "echo plugins.security.unsupported.restapi.allow_securityconfig_modification: true >> .\opensearch-${{ inputs.opensearch-version}}-SNAPSHOT\config\opensearch.yml"
Add-Content -Path .\setup.bat -Value "echo cluster.routing.allocation.disk.threshold_enabled: false >> .\opensearch-${{ inputs.opensearch-version}}-SNAPSHOT\config\opensearch.yml"
Get-Content .\setup.bat
shell: pwsh
17 changes: 16 additions & 1 deletion public/apps/configuration/top-nav-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import React from 'react';
import { DataSourceSelectableConfig } from 'src/plugins/data_source_management/public';
import { DataSourceOption } from 'src/plugins/data_source_management/public/components/data_source_menu/types';
import { PLUGIN_NAME } from '../../../common';
import { AppDependencies } from '../types';

export interface TopNavMenuProps extends AppDependencies {
Expand All @@ -25,6 +24,21 @@ export interface TopNavMenuProps extends AppDependencies {
selectedDataSource: DataSourceOption;
}

const compatibleVersion = new Set([
'2.1',
'2.2',
'2.3',
'2.4',
'2.5',
'2.6',
'2.7',
'2.8',
'2.9',
'2.10',
'2.11',
'2.12',
]);

export const SecurityPluginTopNavMenu = (props: TopNavMenuProps) => {
const {
coreStart,
Expand All @@ -48,6 +62,7 @@ export const SecurityPluginTopNavMenu = (props: TopNavMenuProps) => {
savedObjects: coreStart.savedObjects.client,
notifications: coreStart.notifications,
activeOption: [selectedDataSource],
dataSourceFilter: (ds) => compatibleVersion.has(ds.attributes.version),
onSelectedDataSources: (dataSources) => {
// single select for now
setDataSource(dataSources[0]);
Expand Down
2 changes: 1 addition & 1 deletion test/jest_integration/security_entity_api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ describe('start OpenSearch Dashboards server multi datasources enabled', () => {
attributes: {
title: 'test',
description: '',
endpoint: 'http://localhost:9202',
endpoint: 'https://localhost:9202',
auth: {
type: 'username_password',
credentials: {
Expand Down

0 comments on commit fcbbf65

Please sign in to comment.