Skip to content

Commit

Permalink
Add basic auth remote cluster
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Ho <[email protected]>
  • Loading branch information
derek-ho committed Apr 3, 2024
1 parent 8364c60 commit 5319fe8
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/release-e2e-workflow-template-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ jobs:
opensearch-version: ${{ env.VERSION }}
security-enabled: false
port: 9201
- uses: derek-ho/start-opensearch@v3
with:
opensearch-version: ${{ env.VERSION }}
security-enabled: true
admin-password: admin
port: 9202
- name: Get and run OpenSearch-Dashboards
run: |
curl -SLO https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/${{ env.VERSION }}/latest/${{ env.PLATFORM }}/x64/zip/dist/opensearch-dashboards/opensearch-dashboards-${{ env.VERSION }}-${{ env.PLATFORM }}-x64.zip
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release-e2e-workflow-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ jobs:
opensearch-version: ${{ env.VERSION }}
security-enabled: false
port: 9201
- uses: derek-ho/start-opensearch@v3
with:
opensearch-version: ${{ env.VERSION }}
security-enabled: true
admin-password: admin
port: 9202
- name: Get OpenSearch-Dashboards
run: |
wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/${{ env.VERSION }}/latest/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release-signoff-chrome.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ jobs:
opensearch-version: ${{ env.VERSION }}
security-enabled: false
port: 9201
- uses: derek-ho/start-opensearch@v3
with:
opensearch-version: ${{ env.VERSION }}
security-enabled: true
admin-password: admin
port: 9202
- name: Get OpenSearch-Dashboards
run: |
wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/${{ env.VERSION }}/latest/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release-signoff-chromium-ad-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ jobs:
opensearch-version: ${{ env.VERSION }}
security-enabled: false
port: 9201
- uses: derek-ho/start-opensearch@v3
with:
opensearch-version: ${{ env.VERSION }}
security-enabled: true
port: 9202
- name: Get OpenSearch-Dashboards
run: |
wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/${{ env.VERSION }}/latest/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release-signoff-chromium-ism-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ jobs:
opensearch-version: ${{ env.VERSION }}
security-enabled: false
port: 9201
- uses: derek-ho/start-opensearch@v3
with:
opensearch-version: ${{ env.VERSION }}
security-enabled: true
admin-password: admin
port: 9202
- name: Get OpenSearch-Dashboards
run: |
wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/${{ env.VERSION }}/latest/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,30 @@ export const CreateDataSourceNoAuth = () => {
});
};

export const CreateDataSourceBasicAuth = () => {
miscUtils.visitPage(
'app/management/opensearch-dashboards/dataSources/create'
);

cy.get('[data-test-subj="createDataSourceButton"]').should('be.disabled');
cy.get('[name="dataSourceTitle"]').type('9201');
cy.get('[name="endpoint"]').type('https://localhost:9202');
cy.get('[data-test-subj="createDataSourceFormAuthTypeSelect"]').select(
'username_password'
);
cy.get('[data-test-subj="createDataSourceFormUsernameField"]').type('admin');
cy.get('[data-test-subj="createDataSourceFormPasswordField"]').type('admin');
cy.get('[data-test-subj="createDataSourceButton"]').should('be.enabled');
cy.get('[name="dataSourceDescription"]').type(
'cypress test basic auth data source'
);
cy.get('[data-test-subj="createDataSourceButton"]').click();
cy.location('pathname', { timeout: 6000 }).should(
'include',
'app/management/opensearch-dashboards/dataSources'
);
};

// TODO: create datasource with basic auth and sigv4

if (Cypress.env('DATASOURCE_MANAGEMENT_ENABLED')) {
Expand Down

0 comments on commit 5319fe8

Please sign in to comment.