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

[Windows] Configuration values are improperly decoded #2194

Closed
peternied opened this issue Oct 25, 2022 · 3 comments · Fixed by #2206
Closed

[Windows] Configuration values are improperly decoded #2194

peternied opened this issue Oct 25, 2022 · 3 comments · Fixed by #2206
Labels
bug Something isn't working triaged Issues labeled as 'Triaged' have been reviewed and are deemed actionable. windows

Comments

@peternied
Copy link
Member

What is the bug?
When users.yml is proccessed by DynamicSecurityConfig through the scenario tests the user strings are improperly treated as ANSI values.

Expected username §ÄÖÜäöüß, malformed username §ÄÖÜäöüß

How can one reproduce the bug?
On a windows machine run the following command
./gradlew.bat test --tests org.opensearch.security.IntegrationTests.testSpecialUsernames

Additional Context
Its not yet clear if this is a scenario test issue or if this a problem with any configuration that is loaded normally.

Should attempt a manual repro on windows with an UTF-8 name like above in the configuration settings.

@peternied peternied added bug Something isn't working untriaged Require the attention of the repository maintainers and may need to be prioritized windows labels Oct 25, 2022
@peternied peternied changed the title [Windows] Username's are improperly decoded [Windows] Configuration values are improperly decoded Oct 25, 2022
peternied added a commit to peternied/security that referenced this issue Oct 25, 2022
opensearch-project#2194

Signed-off-by: Peter Nied <petern@amazon.com>
peternied added a commit that referenced this issue Oct 28, 2022
Add CI for Windows and MacOS platforms

Due to the increase in the number of platforms, I've separated the newer integration tests into their own workflow.  Until retries have been enabled they will automatically pass - but still run and report logs.  As soon as we have full confidence we will allow them to start blocking pull requests from merging.  #2184

Switch the gradle commands to be platform agnostic via the `gradle/gradle-build-action@v2`, dropping the 'clean' step to the build which allows us to reuse the gradle cache - if we see any problems pulling in more recent snapshots we can disable this setting quickly.

Found and fixed an issued with config value replacement via environment variables, long story short Windows and MacOS allow for many more characters that are used in the unix environment variable landscape.  Added new tests to cover these interesting scenarios as well.

Found an encoding issue with user names from config files, still unclear of the source of this issue, be it test setup specific or a problem in the broader OpenSearch ecosystem, disabling the `testSpecialUsernames` until we can dive deeper. #2194

Disabled the HeapBasedRateTrackerTests - it was depending on system timing and was very brittle if the system under test experienced any undo load, created follow up issue #2193

Fixed a test issue in testDlsWithMinDocCountZeroAggregations where there was a random chance for a test failure, easier to find intermittent tests when they are run so often.

OpenSSL has open questions - while it is supported for our Linux JDK11 builds, it seems like a stopgap measure.  I've disabled the tests on windows environment while we determine if we should support OpenSSL at all on Windows JDK11.  #2195

Signed-off-by: Peter Nied <petern@amazon.com>
peternied added a commit that referenced this issue Oct 28, 2022
Add CI for Windows and MacOS platforms

Due to the increase in the number of platforms, I've separated the newer integration tests into their own workflow.  Until retries have been enabled they will automatically pass - but still run and report logs.  As soon as we have full confidence we will allow them to start blocking pull requests from merging.  #2184

Switch the gradle commands to be platform agnostic via the `gradle/gradle-build-action@v2`, dropping the 'clean' step to the build which allows us to reuse the gradle cache - if we see any problems pulling in more recent snapshots we can disable this setting quickly.

Found and fixed an issued with config value replacement via environment variables, long story short Windows and MacOS allow for many more characters that are used in the unix environment variable landscape.  Added new tests to cover these interesting scenarios as well.

Found an encoding issue with user names from config files, still unclear of the source of this issue, be it test setup specific or a problem in the broader OpenSearch ecosystem, disabling the `testSpecialUsernames` until we can dive deeper. #2194

Disabled the HeapBasedRateTrackerTests - it was depending on system timing and was very brittle if the system under test experienced any undo load, created follow up issue #2193

Fixed a test issue in testDlsWithMinDocCountZeroAggregations where there was a random chance for a test failure, easier to find intermittent tests when they are run so often.

OpenSSL has open questions - while it is supported for our Linux JDK11 builds, it seems like a stopgap measure.  I've disabled the tests on windows environment while we determine if we should support OpenSSL at all on Windows JDK11.  #2195

Signed-off-by: Peter Nied <petern@amazon.com>
(cherry picked from commit a57fd0a)
peternied added a commit that referenced this issue Oct 28, 2022
Add CI for Windows and MacOS platforms

Due to the increase in the number of platforms, I've separated the newer integration tests into their own workflow.  Until retries have been enabled they will automatically pass - but still run and report logs.  As soon as we have full confidence we will allow them to start blocking pull requests from merging.  #2184

Switch the gradle commands to be platform agnostic via the `gradle/gradle-build-action@v2`, dropping the 'clean' step to the build which allows us to reuse the gradle cache - if we see any problems pulling in more recent snapshots we can disable this setting quickly.

Found and fixed an issued with config value replacement via environment variables, long story short Windows and MacOS allow for many more characters that are used in the unix environment variable landscape.  Added new tests to cover these interesting scenarios as well.

Found an encoding issue with user names from config files, still unclear of the source of this issue, be it test setup specific or a problem in the broader OpenSearch ecosystem, disabling the `testSpecialUsernames` until we can dive deeper. #2194

Disabled the HeapBasedRateTrackerTests - it was depending on system timing and was very brittle if the system under test experienced any undo load, created follow up issue #2193

Fixed a test issue in testDlsWithMinDocCountZeroAggregations where there was a random chance for a test failure, easier to find intermittent tests when they are run so often.

OpenSSL has open questions - while it is supported for our Linux JDK11 builds, it seems like a stopgap measure.  I've disabled the tests on windows environment while we determine if we should support OpenSSL at all on Windows JDK11.  #2195

Signed-off-by: Peter Nied <petern@amazon.com>
(cherry picked from commit a57fd0a)
@stephen-crawford
Copy link
Contributor

So I have some news on this issue:

I took several steps to try to determine the most likely cause and believe I have narrowed it down.

Right now, the integration test for the special usernames functions perfectly fine on-non special usernames for any internal users in the internal_users yaml file. This suggests that the issue is not a universal encoding error but instead an issue arising from the conversions of Windows-1252 into UTF-8 and vice versa.

What complicates things is the location of this translation. When running Opensearch 2.4 with the security plugin, you can access the node information ONLY when you log in as one of the original internal user roles: admin, readall, kibanauser, etc. So while the security plugin successfully tests on users such as rexclude the Opensearch node responds 401 from a manual attempt -- likewise for any of the special names.

Going deeper, it appears somewhere OpenSearch is populating from only the internal_users2.yml file instead of both. I am not sure where yet but I do know that this is likely related to at least one side of the problem. The next step will be to check whether moving a role from internal_users.yml to 2.yml makes it identifiable by OpenSearch on login and then further if this somehow helps with the special character issue.

@peternied
Copy link
Member Author

@scrawfor99 Setting aside the integrations tests cases, can you manually reproduce the issue with a internal_users.yml bootstrapped cluster?

Separately did you see that in base window OpenSearch (no security plugin), if you modify the config's cluster.name value to §ÄÖÜäöüß, when you call the information endpoint at / it comes back without being malformed, like below? [1]

GET http://localhost:9200/
{
  "name" : "opensearch-node1-2-2-0",
  "cluster_name" : "§ÄÖÜäöüß",
  "cluster_uuid" : "9jZU_R4_RH-98h15iCmhsA",
  "version" : {
    "distribution" : "opensearch",
    "number" : "2.2.0",
    "build_type" : "tar",
    "build_hash" : "b1017fa3b9a1c781d4f34ecee411e0cdf930a515",
    "build_date" : "2022-08-09T02:27:25.256769336Z",
    "build_snapshot" : false,
    "lucene_version" : "9.3.0",
    "minimum_wire_compatibility_version" : "7.10.0",
    "minimum_index_compatibility_version" : "7.0.0"
  },
  "tagline" : "The OpenSearch Project: https://opensearch.org/"
}

[1] https://opensearch.org/docs/latest/opensearch/configuration/

@stephen-crawford
Copy link
Contributor

In response to the second question, the cluster.name does come back correctly formatted when you query the address even when there are special characters.

peternied added a commit to peternied/security that referenced this issue Oct 29, 2022
Adds spotbugs to detect internalization before they are added to the codebase, also fixed several encoding bugs that impact windows users.

Closes opensearch-project#2194

Signed-off-by: Peter Nied <petern@amazon.com>
peternied added a commit to peternied/security that referenced this issue Oct 29, 2022
Adds spotbugs [1] to detect internalization before they are added to the codebase, also fixed several encoding bugs that impact windows users.

[1] https://spotbugs.readthedocs.io/en/stable/index.html

Closes opensearch-project#2194

Signed-off-by: Peter Nied <petern@amazon.com>
peternied added a commit that referenced this issue Oct 31, 2022
Add CI for Windows and MacOS platforms

Due to the increase in the number of platforms, I've separated the newer integration tests into their own workflow.  Until retries have been enabled they will automatically pass - but still run and report logs.  As soon as we have full confidence we will allow them to start blocking pull requests from merging.  #2184

Switch the gradle commands to be platform agnostic via the `gradle/gradle-build-action@v2`, dropping the 'clean' step to the build which allows us to reuse the gradle cache - if we see any problems pulling in more recent snapshots we can disable this setting quickly.

Found and fixed an issued with config value replacement via environment variables, long story short Windows and MacOS allow for many more characters that are used in the unix environment variable landscape.  Added new tests to cover these interesting scenarios as well.

Found an encoding issue with user names from config files, still unclear of the source of this issue, be it test setup specific or a problem in the broader OpenSearch ecosystem, disabling the `testSpecialUsernames` until we can dive deeper. #2194

Disabled the HeapBasedRateTrackerTests - it was depending on system timing and was very brittle if the system under test experienced any undo load, created follow up issue #2193

Fixed a test issue in testDlsWithMinDocCountZeroAggregations where there was a random chance for a test failure, easier to find intermittent tests when they are run so often.

OpenSSL has open questions - while it is supported for our Linux JDK11 builds, it seems like a stopgap measure.  I've disabled the tests on windows environment while we determine if we should support OpenSSL at all on Windows JDK11.  #2195

Signed-off-by: Peter Nied <petern@amazon.com>
(cherry picked from commit a57fd0a)
@cwperks cwperks removed the untriaged Require the attention of the repository maintainers and may need to be prioritized label Oct 31, 2022
@peternied peternied added the triaged Issues labeled as 'Triaged' have been reviewed and are deemed actionable. label Oct 31, 2022
peternied added a commit that referenced this issue Nov 2, 2022
Adds spotbugs [1] to detect internalization before they are added to the codebase, also fixed several encoding bugs that impact windows users.

[1] https://spotbugs.readthedocs.io/en/stable/index.html

Closes #2194

Signed-off-by: Peter Nied <petern@amazon.com>
(cherry picked from commit a040b86)
peternied added a commit that referenced this issue Nov 2, 2022
Adds spotbugs [1] to detect internalization before they are added to the codebase, also fixed several encoding bugs that impact windows users.

[1] https://spotbugs.readthedocs.io/en/stable/index.html

Closes #2194

Signed-off-by: Peter Nied <petern@amazon.com>
(cherry picked from commit a040b86)
cwperks pushed a commit that referenced this issue Nov 2, 2022
Adds spotbugs [1] to detect internalization before they are added to the codebase, also fixed several encoding bugs that impact windows users.

[1] https://spotbugs.readthedocs.io/en/stable/index.html

Closes #2194

Signed-off-by: Peter Nied <petern@amazon.com>
(cherry picked from commit a040b86)
cwperks pushed a commit that referenced this issue Nov 2, 2022
Adds spotbugs [1] to detect internalization before they are added to the codebase, also fixed several encoding bugs that impact windows users.

[1] https://spotbugs.readthedocs.io/en/stable/index.html

Closes #2194

Signed-off-by: Peter Nied <petern@amazon.com>
(cherry picked from commit a040b86)
stephen-crawford pushed a commit to stephen-crawford/security that referenced this issue Nov 10, 2022
…nsearch-project#2205)

Add CI for Windows and MacOS platforms

Due to the increase in the number of platforms, I've separated the newer integration tests into their own workflow.  Until retries have been enabled they will automatically pass - but still run and report logs.  As soon as we have full confidence we will allow them to start blocking pull requests from merging.  opensearch-project#2184

Switch the gradle commands to be platform agnostic via the `gradle/gradle-build-action@v2`, dropping the 'clean' step to the build which allows us to reuse the gradle cache - if we see any problems pulling in more recent snapshots we can disable this setting quickly.

Found and fixed an issued with config value replacement via environment variables, long story short Windows and MacOS allow for many more characters that are used in the unix environment variable landscape.  Added new tests to cover these interesting scenarios as well.

Found an encoding issue with user names from config files, still unclear of the source of this issue, be it test setup specific or a problem in the broader OpenSearch ecosystem, disabling the `testSpecialUsernames` until we can dive deeper. opensearch-project#2194

Disabled the HeapBasedRateTrackerTests - it was depending on system timing and was very brittle if the system under test experienced any undo load, created follow up issue opensearch-project#2193

Fixed a test issue in testDlsWithMinDocCountZeroAggregations where there was a random chance for a test failure, easier to find intermittent tests when they are run so often.

OpenSSL has open questions - while it is supported for our Linux JDK11 builds, it seems like a stopgap measure.  I've disabled the tests on windows environment while we determine if we should support OpenSSL at all on Windows JDK11.  opensearch-project#2195

Signed-off-by: Peter Nied <petern@amazon.com>
(cherry picked from commit a57fd0a)
stephen-crawford pushed a commit to stephen-crawford/security that referenced this issue Nov 10, 2022
…ject#2218)

Adds spotbugs [1] to detect internalization before they are added to the codebase, also fixed several encoding bugs that impact windows users.

[1] https://spotbugs.readthedocs.io/en/stable/index.html

Closes opensearch-project#2194

Signed-off-by: Peter Nied <petern@amazon.com>
(cherry picked from commit a040b86)
stephen-crawford pushed a commit to stephen-crawford/security that referenced this issue Nov 10, 2022
Add CI for Windows and MacOS platforms

Due to the increase in the number of platforms, I've separated the newer integration tests into their own workflow.  Until retries have been enabled they will automatically pass - but still run and report logs.  As soon as we have full confidence we will allow them to start blocking pull requests from merging.  opensearch-project#2184

Switch the gradle commands to be platform agnostic via the `gradle/gradle-build-action@v2`, dropping the 'clean' step to the build which allows us to reuse the gradle cache - if we see any problems pulling in more recent snapshots we can disable this setting quickly.

Found and fixed an issued with config value replacement via environment variables, long story short Windows and MacOS allow for many more characters that are used in the unix environment variable landscape.  Added new tests to cover these interesting scenarios as well.

Found an encoding issue with user names from config files, still unclear of the source of this issue, be it test setup specific or a problem in the broader OpenSearch ecosystem, disabling the `testSpecialUsernames` until we can dive deeper. opensearch-project#2194

Disabled the HeapBasedRateTrackerTests - it was depending on system timing and was very brittle if the system under test experienced any undo load, created follow up issue opensearch-project#2193

Fixed a test issue in testDlsWithMinDocCountZeroAggregations where there was a random chance for a test failure, easier to find intermittent tests when they are run so often.

OpenSSL has open questions - while it is supported for our Linux JDK11 builds, it seems like a stopgap measure.  I've disabled the tests on windows environment while we determine if we should support OpenSSL at all on Windows JDK11.  opensearch-project#2195

Signed-off-by: Peter Nied <petern@amazon.com>
Signed-off-by: Stephen Crawford <steecraw@amazon.com>
stephen-crawford pushed a commit to stephen-crawford/security that referenced this issue Nov 10, 2022
Adds spotbugs [1] to detect internalization before they are added to the codebase, also fixed several encoding bugs that impact windows users.

[1] https://spotbugs.readthedocs.io/en/stable/index.html

Closes opensearch-project#2194

Signed-off-by: Peter Nied <petern@amazon.com>
Signed-off-by: Stephen Crawford <steecraw@amazon.com>
stephen-crawford pushed a commit to stephen-crawford/security that referenced this issue Nov 10, 2022
…nsearch-project#2205)

Add CI for Windows and MacOS platforms

Due to the increase in the number of platforms, I've separated the newer integration tests into their own workflow.  Until retries have been enabled they will automatically pass - but still run and report logs.  As soon as we have full confidence we will allow them to start blocking pull requests from merging.  opensearch-project#2184

Switch the gradle commands to be platform agnostic via the `gradle/gradle-build-action@v2`, dropping the 'clean' step to the build which allows us to reuse the gradle cache - if we see any problems pulling in more recent snapshots we can disable this setting quickly.

Found and fixed an issued with config value replacement via environment variables, long story short Windows and MacOS allow for many more characters that are used in the unix environment variable landscape.  Added new tests to cover these interesting scenarios as well.

Found an encoding issue with user names from config files, still unclear of the source of this issue, be it test setup specific or a problem in the broader OpenSearch ecosystem, disabling the `testSpecialUsernames` until we can dive deeper. opensearch-project#2194

Disabled the HeapBasedRateTrackerTests - it was depending on system timing and was very brittle if the system under test experienced any undo load, created follow up issue opensearch-project#2193

Fixed a test issue in testDlsWithMinDocCountZeroAggregations where there was a random chance for a test failure, easier to find intermittent tests when they are run so often.

OpenSSL has open questions - while it is supported for our Linux JDK11 builds, it seems like a stopgap measure.  I've disabled the tests on windows environment while we determine if we should support OpenSSL at all on Windows JDK11.  opensearch-project#2195

Signed-off-by: Peter Nied <petern@amazon.com>
(cherry picked from commit a57fd0a)
Signed-off-by: Stephen Crawford <steecraw@amazon.com>
stephen-crawford pushed a commit to stephen-crawford/security that referenced this issue Nov 10, 2022
…ject#2218)

Adds spotbugs [1] to detect internalization before they are added to the codebase, also fixed several encoding bugs that impact windows users.

[1] https://spotbugs.readthedocs.io/en/stable/index.html

Closes opensearch-project#2194

Signed-off-by: Peter Nied <petern@amazon.com>
(cherry picked from commit a040b86)
Signed-off-by: Stephen Crawford <steecraw@amazon.com>
stephen-crawford pushed a commit to stephen-crawford/security that referenced this issue Nov 10, 2022
…nsearch-project#2205)

Add CI for Windows and MacOS platforms

Due to the increase in the number of platforms, I've separated the newer integration tests into their own workflow.  Until retries have been enabled they will automatically pass - but still run and report logs.  As soon as we have full confidence we will allow them to start blocking pull requests from merging.  opensearch-project#2184

Switch the gradle commands to be platform agnostic via the `gradle/gradle-build-action@v2`, dropping the 'clean' step to the build which allows us to reuse the gradle cache - if we see any problems pulling in more recent snapshots we can disable this setting quickly.

Found and fixed an issued with config value replacement via environment variables, long story short Windows and MacOS allow for many more characters that are used in the unix environment variable landscape.  Added new tests to cover these interesting scenarios as well.

Found an encoding issue with user names from config files, still unclear of the source of this issue, be it test setup specific or a problem in the broader OpenSearch ecosystem, disabling the `testSpecialUsernames` until we can dive deeper. opensearch-project#2194

Disabled the HeapBasedRateTrackerTests - it was depending on system timing and was very brittle if the system under test experienced any undo load, created follow up issue opensearch-project#2193

Fixed a test issue in testDlsWithMinDocCountZeroAggregations where there was a random chance for a test failure, easier to find intermittent tests when they are run so often.

OpenSSL has open questions - while it is supported for our Linux JDK11 builds, it seems like a stopgap measure.  I've disabled the tests on windows environment while we determine if we should support OpenSSL at all on Windows JDK11.  opensearch-project#2195

Signed-off-by: Peter Nied <petern@amazon.com>
(cherry picked from commit a57fd0a)
Signed-off-by: Stephen Crawford <steecraw@amazon.com>
stephen-crawford pushed a commit to stephen-crawford/security that referenced this issue Nov 10, 2022
…ject#2218)

Adds spotbugs [1] to detect internalization before they are added to the codebase, also fixed several encoding bugs that impact windows users.

[1] https://spotbugs.readthedocs.io/en/stable/index.html

Closes opensearch-project#2194

Signed-off-by: Peter Nied <petern@amazon.com>
(cherry picked from commit a040b86)
Signed-off-by: Stephen Crawford <steecraw@amazon.com>
peternied added a commit to peternied/security that referenced this issue Dec 1, 2022
Add CI for Windows and MacOS platforms

Due to the increase in the number of platforms, I've separated the newer integration tests into their own workflow.  Until retries have been enabled they will automatically pass - but still run and report logs.  As soon as we have full confidence we will allow them to start blocking pull requests from merging.  opensearch-project#2184

Switch the gradle commands to be platform agnostic via the `gradle/gradle-build-action@v2`, dropping the 'clean' step to the build which allows us to reuse the gradle cache - if we see any problems pulling in more recent snapshots we can disable this setting quickly.

Found and fixed an issued with config value replacement via environment variables, long story short Windows and MacOS allow for many more characters that are used in the unix environment variable landscape.  Added new tests to cover these interesting scenarios as well.

Found an encoding issue with user names from config files, still unclear of the source of this issue, be it test setup specific or a problem in the broader OpenSearch ecosystem, disabling the `testSpecialUsernames` until we can dive deeper. opensearch-project#2194

Disabled the HeapBasedRateTrackerTests - it was depending on system timing and was very brittle if the system under test experienced any undo load, created follow up issue opensearch-project#2193

Fixed a test issue in testDlsWithMinDocCountZeroAggregations where there was a random chance for a test failure, easier to find intermittent tests when they are run so often.

OpenSSL has open questions - while it is supported for our Linux JDK11 builds, it seems like a stopgap measure.  I've disabled the tests on windows environment while we determine if we should support OpenSSL at all on Windows JDK11.  opensearch-project#2195

Signed-off-by: Peter Nied <petern@amazon.com>
peternied added a commit to peternied/security that referenced this issue Dec 1, 2022
Adds spotbugs [1] to detect internalization before they are added to the codebase, also fixed several encoding bugs that impact windows users.

[1] https://spotbugs.readthedocs.io/en/stable/index.html

Closes opensearch-project#2194

Signed-off-by: Peter Nied <petern@amazon.com>
stephen-crawford pushed a commit to stephen-crawford/security that referenced this issue Dec 2, 2022
Add CI for Windows and MacOS platforms

Due to the increase in the number of platforms, I've separated the newer integration tests into their own workflow.  Until retries have been enabled they will automatically pass - but still run and report logs.  As soon as we have full confidence we will allow them to start blocking pull requests from merging.  opensearch-project#2184

Switch the gradle commands to be platform agnostic via the `gradle/gradle-build-action@v2`, dropping the 'clean' step to the build which allows us to reuse the gradle cache - if we see any problems pulling in more recent snapshots we can disable this setting quickly.

Found and fixed an issued with config value replacement via environment variables, long story short Windows and MacOS allow for many more characters that are used in the unix environment variable landscape.  Added new tests to cover these interesting scenarios as well.

Found an encoding issue with user names from config files, still unclear of the source of this issue, be it test setup specific or a problem in the broader OpenSearch ecosystem, disabling the `testSpecialUsernames` until we can dive deeper. opensearch-project#2194

Disabled the HeapBasedRateTrackerTests - it was depending on system timing and was very brittle if the system under test experienced any undo load, created follow up issue opensearch-project#2193

Fixed a test issue in testDlsWithMinDocCountZeroAggregations where there was a random chance for a test failure, easier to find intermittent tests when they are run so often.

OpenSSL has open questions - while it is supported for our Linux JDK11 builds, it seems like a stopgap measure.  I've disabled the tests on windows environment while we determine if we should support OpenSSL at all on Windows JDK11.  opensearch-project#2195

Signed-off-by: Peter Nied <petern@amazon.com>
stephen-crawford pushed a commit to stephen-crawford/security that referenced this issue Dec 2, 2022
Adds spotbugs [1] to detect internalization before they are added to the codebase, also fixed several encoding bugs that impact windows users.

[1] https://spotbugs.readthedocs.io/en/stable/index.html

Closes opensearch-project#2194

Signed-off-by: Peter Nied <petern@amazon.com>
wuychn pushed a commit to ochprince/security that referenced this issue Mar 16, 2023
…nsearch-project#2205)

Add CI for Windows and MacOS platforms

Due to the increase in the number of platforms, I've separated the newer integration tests into their own workflow.  Until retries have been enabled they will automatically pass - but still run and report logs.  As soon as we have full confidence we will allow them to start blocking pull requests from merging.  opensearch-project#2184

Switch the gradle commands to be platform agnostic via the `gradle/gradle-build-action@v2`, dropping the 'clean' step to the build which allows us to reuse the gradle cache - if we see any problems pulling in more recent snapshots we can disable this setting quickly.

Found and fixed an issued with config value replacement via environment variables, long story short Windows and MacOS allow for many more characters that are used in the unix environment variable landscape.  Added new tests to cover these interesting scenarios as well.

Found an encoding issue with user names from config files, still unclear of the source of this issue, be it test setup specific or a problem in the broader OpenSearch ecosystem, disabling the `testSpecialUsernames` until we can dive deeper. opensearch-project#2194

Disabled the HeapBasedRateTrackerTests - it was depending on system timing and was very brittle if the system under test experienced any undo load, created follow up issue opensearch-project#2193

Fixed a test issue in testDlsWithMinDocCountZeroAggregations where there was a random chance for a test failure, easier to find intermittent tests when they are run so often.

OpenSSL has open questions - while it is supported for our Linux JDK11 builds, it seems like a stopgap measure.  I've disabled the tests on windows environment while we determine if we should support OpenSSL at all on Windows JDK11.  opensearch-project#2195

Signed-off-by: Peter Nied <petern@amazon.com>
(cherry picked from commit a57fd0a)
wuychn pushed a commit to ochprince/security that referenced this issue Mar 16, 2023
…ject#2217)

Adds spotbugs [1] to detect internalization before they are added to the codebase, also fixed several encoding bugs that impact windows users.

[1] https://spotbugs.readthedocs.io/en/stable/index.html

Closes opensearch-project#2194

Signed-off-by: Peter Nied <petern@amazon.com>
(cherry picked from commit a040b86)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triaged Issues labeled as 'Triaged' have been reviewed and are deemed actionable. windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants