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

Bumped version to 1.3.0.0 #884

Merged
merged 7 commits into from
Jan 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = {
'@osd/eslint/require-license-header': [
'error',
{
license: LICENSE_HEADER,
licenses: [LICENSE_HEADER],
Copy link
Author

Choose a reason for hiding this comment

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

},
],
"no-console": 0
Expand Down
31 changes: 5 additions & 26 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,15 @@ jobs:
name: Run integration tests
runs-on: ubuntu-latest
steps:
# build backend plugin
- name: Set up JDK 14
uses: actions/setup-java@v1
with:
java-version: 14.0.x

- name: Cache Maven packages
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Checkout security plugin
uses: actions/checkout@v2
with:
repository: 'opensearch-project/security'
path: security
ref: 'main'

- name: Build security plugin
working-directory: ./security
run: mvn -B clean package -Padvanced -DskipTests

- name: Download OpenSearch Core
run: |
wget https://artifacts.opensearch.org/snapshots/core/opensearch/1.2.0-SNAPSHOT/opensearch-min-1.2.0-SNAPSHOT-linux-x64-latest.tar.gz
wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.0/488/linux/x64/builds/opensearch/dist/opensearch-min-1.3.0-linux-x64.tar.gz
Copy link
Author

Choose a reason for hiding this comment

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

This is a temporary fix, moving forward we want to point to a symlinked latest build of each SNAPSHOT version, after they are provided here

Copy link
Member

Choose a reason for hiding this comment

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

It looks like your integration tests are running docker, can you pick up the latest docker opensearch distribution image as starting point instead - https://hub.docker.com/r/opensearchstaging/opensearch/tags?page=1&name=1.3.0?

I think this would clean up this integration test code sustainably by removing the interaction with build artifacts.

tar -xzf opensearch-*.tar.gz
rm -f opensearch-*.tar.gz

- name: Download OpenSearch Security Plugin
run: wget -O opensearch-security.zip https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.0/488/linux/x64/builds/opensearch/plugins/opensearch-security-1.3.0.0.zip

- name: Run OpenSearch with plugin
run: |
cat > os-ep.sh <<EOF
Expand All @@ -56,7 +35,7 @@ jobs:
docker build -t opensearch-test:latest -f- . <<EOF
FROM ubuntu:latest
COPY --chown=1001:1001 os-ep.sh /docker-host/
COPY --chown=1001:1001 security/target/releases/opensearch-security-1.2.0.0-SNAPSHOT.zip /docker-host/security-plugin.zip
COPY --chown=1001:1001 opensearch-security.zip /docker-host/security-plugin.zip
COPY --chown=1001:1001 opensearch* /opensearch/
RUN chmod +x /docker-host/os-ep.sh
RUN useradd -u 1001 -s /sbin/nologin opensearch
Expand Down
4 changes: 2 additions & 2 deletions opensearch_dashboards.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "securityDashboards",
"version": "1.2.0.0",
"opensearchDashboardsVersion": "1.2.0",
"version": "1.3.0.0",
"opensearchDashboardsVersion": "1.3.0",
"configPath": ["opensearch_security"],
"requiredPlugins": ["navigation"],
"server": true,
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "opensearch-security-dashboards",
"version": "1.2.0.0",
"version": "1.3.0.0",
"main": "target/plugins/opensearch_security_dashboards",
"opensearchDashboards": {
"version": "1.2.0",
"templateVersion": "1.2.0"
"version": "1.3.0",
"templateVersion": "1.3.0"
},
"license": "Apache-2.0",
"homepage": "https://github.com/opensearch-project/security-dashboards-plugin",
Expand Down
8 changes: 2 additions & 6 deletions server/auth/types/saml/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,7 @@ export class SamlAuthRoutes {
if (!payloadEncoded) {
context.security_plugin.logger.error('JWT token payload not found');
}
const tokenPayload = JSON.parse(
Buffer.from(payloadEncoded, 'base64').toString()
);
const tokenPayload = JSON.parse(Buffer.from(payloadEncoded, 'base64').toString());
if (tokenPayload.exp) {
expiryTime = parseInt(tokenPayload.exp, 10) * 1000;
}
Expand Down Expand Up @@ -189,9 +187,7 @@ export class SamlAuthRoutes {
if (!payloadEncoded) {
context.security_plugin.logger.error('JWT token payload not found');
}
const tokenPayload = JSON.parse(
Buffer.from(payloadEncoded, 'base64').toString()
);
const tokenPayload = JSON.parse(Buffer.from(payloadEncoded, 'base64').toString());
if (tokenPayload.exp) {
expiryTime = parseInt(tokenPayload.exp, 10) * 1000;
}
Expand Down