Skip to content

Commit

Permalink
Adds test for APIs related to security plugin and updates spec to add…
Browse files Browse the repository at this point in the history
… new APIs. (#439)

* Updates the missing item types for security API related schemas

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Adds tests for some APIs

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Fixes schema path and lint error in a file

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Adds version check for account API test

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Adds a CHANGELOG entry

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Fixes tests to expect status as integer

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Adds base tests for all APIs

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Fixes linter errors and complete payloads and request bodies

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Adds API spec for the new certificates API and adds tests

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Adds missing new lines at the end of files and removes any extra lines added by linter

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Fixes lint errors

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Fixes test spec lint

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Fixes without api prefix tests

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Fixes accounts tests

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Fixes action-groups tests

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Fixes account, allowlist and audit tests

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Fixes certificates tests

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Fixes internal users test

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Fixes nodesdn test

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Fixes roles test

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Fixes rolesmapping test

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Fixes securityconfig test

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Fixes ssl_certs tests

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Fixes tenancyconfig tests

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Fixes tenants tests

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Fixes tokens and upgrade tests

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Fixes user tests

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Fixes validate tests and run linter

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Fixes spec

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Adds missing new lines to EOFs

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Address changes in CHANGELOG

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Updates parameter descriptions

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Re-organize folder structure

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Moved security tests inside plugins folder

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Updates test spec workflow to run security tests

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Adds security test specific docker compose file

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Cleans commented code and updates test-spec to run for 2.16 only

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Refactor s boolean to be true boolean

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Move security tests to default folder and updates spec file

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Fixes 1.3 tests

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Fixes 2.0 test failures

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Fixes TLS cipher versiion payload issue

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Re-verifies auth token fix

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Checks for newer images and pulls them before running tests

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Updates the docker compose command

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Removes sha ref for staging branches

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Updates shas

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

* Renames everything to match the API path

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>

---------

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
  • Loading branch information
DarshitChanpura authored Aug 12, 2024
1 parent 3828838 commit 9eb3732
Show file tree
Hide file tree
Showing 40 changed files with 1,503 additions and 169 deletions.
1 change: 1 addition & 0 deletions .cspell
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ subqueries
subschemas
subword
syserr
tcnative
tdigest
tenantinfo
termvectors
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
tests: snapshot
- version: 2.17.0
hub: opensearchstaging
ref: '@sha256:6398c27d7560626ed6b0ba28b3d6b20b7f00c6d94abf45ad3a820f8eeb3d61a3'
ref: '@sha256:ed4274522a50228f41b50f1a7ea86e6b52fa6737072fc151b2624d22aff80d56'
- version: 3.0.0
hub: opensearchstaging
ref: '@sha256:101681eea630393f8caf5987dd023a975a9656b63090a07bfdfe6ad2f73f0640'
ref: '@sha256:cab6f71b284485c44306f8f4849ad520283c2a32ece617109b38183ba29cc401'

name: test-opensearch-spec (version=${{ matrix.entry.version }}, hub=${{ matrix.entry.hub || 'opensearchproject' }}, tests=${{ matrix.entry.tests || 'default' }})
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added `observability` namespace API specifications ([#474](https://github.com/opensearch-project/opensearch-api-specification/pull/474))
- Added support for reusing output variables as keys in payload expectations ([#471](https://github.com/opensearch-project/opensearch-api-specification/pull/471))
- Added support for running tests against Amazon OpenSearch ([#476](https://github.com/opensearch-project/opensearch-api-specification/pull/476))
- Added API spec for security plugin ([#271](https://github.com/opensearch-project/opensearch-api-specification/pull/271))
- Added `/_plugins/_security/api/certificates/` to API spec ([#439](https://github.com/opensearch-project/opensearch-api-specification/pull/439))

### Changed

Expand Down Expand Up @@ -111,6 +113,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fixed `_update_by_query` with a simple term ([#451](https://github.com/opensearch-project/opensearch-api-specification/pull/451))
- Fixed `Duration` to allow for non-integers ([#479](https://github.com/opensearch-project/opensearch-api-specification/pull/479))
- Fixed accuracy of the index stats schemas ([#491](https://github.com/opensearch-project/opensearch-api-specification/pull/491))
- Fixed security spec to add support for 400 and 403s ([#439](https://github.com/opensearch-project/opensearch-api-specification/pull/439))

### Security

Expand Down
Loading

0 comments on commit 9eb3732

Please sign in to comment.