-
Notifications
You must be signed in to change notification settings - Fork 163
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
Adds SSL test support, compatibility test support #1856
Merged
DarshitChanpura
merged 17 commits into
opensearch-project:feature/supporting-multiple-datasources
from
derek-ho:test-support
Mar 28, 2024
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
0ca7761
Test support
derek-ho e0b3216
Fix github workflows
derek-ho 2f00b96
Fix -t
derek-ho d407167
Re-run ci
derek-ho 3a43b3c
Re-run ci
derek-ho 925f0b1
Change to correct var name
derek-ho f98f8ae
Thanks @cwperks
derek-ho 05e807c
Cert check for remote cluster
derek-ho fcbbf65
Fix for certs
derek-ho 7ce0344
Remove up to 2.4
derek-ho b495340
Remove grecko
derek-ho 35c4fa4
Support same version instances
derek-ho 76b2b02
Re-enable https
derek-ho f1d1def
Fix
derek-ho 2480375
Right var
derek-ho ff8e18f
Cert check
derek-ho d4deef3
Https
derek-ho File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-latest , windows-latest ] | ||
os_bwc_version: [2.4.0, 2.5.0, 2.6.0, 2.7.0, 2.8.0, 2.9.0, 2.10.0, 2.11.0, 2.12.0, 3.0.0] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
|
@@ -34,85 +35,35 @@ jobs: | |
echo "PLUGIN_VERSION=$plugin_version" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- uses: browser-actions/[email protected] | ||
- run: geckodriver --version | ||
|
||
- name: Set up Firefox browser | ||
if: ${{ runner.os == 'Linux' }} | ||
uses: browser-actions/setup-firefox@v1 | ||
|
||
- run: firefox --version | ||
if: ${{ runner.os == 'Linux' }} | ||
|
||
# Browser-action version does not work on Windows | ||
- name: Set up Firefox browser for Windows | ||
if: ${{ runner.os == 'Windows' }} | ||
uses: RyanL1997/setup-browser@main | ||
- name: Download security plugin and create setup scripts for remote cluster | ||
uses: ./.github/actions/download-plugin | ||
with: | ||
browser: firefox | ||
version: latest | ||
opensearch-version: ${{ matrix.os_bwc_version }} | ||
plugin-name: ${{ env.PLUGIN_NAME }} | ||
download-location: ${{env.PLUGIN_NAME}}-${{matrix.os_bwc_version}} | ||
plugin-version: ${{matrix.os_bwc_version}}.0 | ||
|
||
- name: Download security plugin and create setup scripts | ||
- name: Download security plugin and create setup scripts for local cluster | ||
uses: ./.github/actions/download-plugin | ||
with: | ||
opensearch-version: ${{ env.OPENSEARCH_VERSION }} | ||
plugin-name: ${{ env.PLUGIN_NAME }} | ||
download-location: ${{env.PLUGIN_NAME}} | ||
plugin-version: ${{ env.PLUGIN_VERSION }} | ||
|
||
- name: Create remote OpenSearch Config | ||
run: | | ||
cat << 'EOT' > remote_opensearch.yml | ||
http.port: 9202 | ||
plugins.security.ssl.transport.pemcert_filepath: esnode.pem | ||
plugins.security.ssl.transport.pemkey_filepath: esnode-key.pem | ||
plugins.security.ssl.transport.pemtrustedcas_filepath: root-ca.pem | ||
plugins.security.ssl.transport.enforce_hostname_verification: false | ||
plugins.security.ssl.http.pemcert_filepath: esnode.pem | ||
plugins.security.ssl.http.pemkey_filepath: esnode-key.pem | ||
plugins.security.ssl.http.pemtrustedcas_filepath: root-ca.pem | ||
plugins.security.allow_unsafe_democertificates: true | ||
plugins.security.allow_default_init_securityindex: true | ||
plugins.security.authcz.admin_dn: | ||
- 'CN=A,OU=UNIT,O=ORG,L=TORONTO,ST=ONTARIO,C=CA' | ||
plugins.security.nodes_dn: | ||
- 'CN=node1.dns.a-record,OU=UNIT,O=ORG,L=TORONTO,ST=ONTARIO,C=CA' | ||
- 'CN=node2.dns.a-record,OU=UNIT,O=ORG,L=TORONTO,ST=ONTARIO,C=CA' | ||
plugins.security.audit.type: internal_opensearch | ||
plugins.security.enable_snapshot_restore_privilege: true | ||
plugins.security.check_snapshot_restore_write_privileges: true | ||
# TODO: change this back to true/just append to the created opensearch.yml the new port | ||
# after the self-signed certs issue is fixed | ||
plugins.security.ssl.http.enabled: false | ||
plugins.security.restapi.roles_enabled: [all_access, security_rest_api_access] | ||
plugins.security.system_indices.enabled: true | ||
plugins.security.system_indices.indices: [.plugins-ml-config, .plugins-ml-connector, | ||
.plugins-ml-model-group, .plugins-ml-model, .plugins-ml-task, .plugins-ml-conversation-meta, | ||
.plugins-ml-conversation-interactions, .plugins-ml-memory-meta, .plugins-ml-memory-message, | ||
.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, | ||
.ql-datasources, .opendistro-asynchronous-search-response*, .replication-metadata-store, | ||
.opensearch-knn-models, .geospatial-ip2geo-data*, .plugins-flow-framework-config, | ||
.plugins-flow-framework-templates, .plugins-flow-framework-state] | ||
node.max_local_storage_nodes: 3 | ||
EOT | ||
shell: bash | ||
|
||
- name: Run Opensearch with A Single Plugin | ||
uses: derek-ho/start-opensearch@9202 | ||
- name: Run Opensearch with A Single Plugin Remote Cluster | ||
uses: derek-ho/start-opensearch@graceful-t | ||
with: | ||
opensearch-version: ${{ env.OPENSEARCH_VERSION }} | ||
plugins: "file:$(pwd)/opensearch-security.zip" | ||
opensearch-version: ${{ matrix.os_bwc_version }} | ||
plugins: "file:$(pwd)/opensearch-security-${{matrix.os_bwc_version}}.zip" | ||
security-enabled: true | ||
admin-password: ${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} | ||
security_config_file: ${{ inputs.security_config_file }} | ||
opensearch_yml_file: remote_opensearch.yml | ||
opensearch_port: 9202 | ||
port: 9202 | ||
|
||
- name: Check OpenSearch is running | ||
# Verify that the server is operational | ||
- name: Check OpenSearch remote is running | ||
run: | | ||
curl http://localhost:9202/_cat/plugins -v -u admin:myStrongPassword123! | ||
curl https://localhost:9202/_cat/plugins -v -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} -k | ||
shell: bash | ||
|
||
- name: Run Opensearch with security | ||
|
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skipping the flaky test, will re-enable when reading from url to avoid unnecessary component clicks. #1858