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

Header verifier test #12

Closed
wants to merge 65 commits into from
Closed

Header verifier test #12

wants to merge 65 commits into from

Conversation

peternied
Copy link
Owner

Description

[Describe what this change achieves]

  • Category (Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation)
  • Why these changes are required?
  • What is the old behavior before changes and new behavior after changes?

Issues Resolved

[List any issues this PR will resolve]

Is this a backport? If so, please add backport PR # and/or commits #

Testing

[Please provide details of testing done: unit testing, integration testing and manual testing]

Check List

  • New functionality includes testing
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@codecov-commenter
Copy link

codecov-commenter commented Sep 29, 2023

Codecov Report

Merging #12 (e7b0916) into main (c62f91f) will increase coverage by 0.35%.
Report is 14 commits behind head on main.
The diff coverage is 76.12%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main      #12      +/-   ##
============================================
+ Coverage     64.21%   64.57%   +0.35%     
- Complexity     3474     3572      +98     
============================================
  Files           263      275      +12     
  Lines         20112    20451     +339     
  Branches       3359     3382      +23     
============================================
+ Hits          12915    13206     +291     
- Misses         5522     5547      +25     
- Partials       1675     1698      +23     
Files Coverage Δ
.../main/java/com/amazon/dlic/auth/ldap/LdapUser.java 89.28% <100.00%> (+3.57%) ⬆️
.../opensearch/security/OpenSearchSecurityPlugin.java 84.65% <100.00%> (+0.04%) ⬆️
...ava/org/opensearch/security/auditlog/AuditLog.java 100.00% <ø> (ø)
...security/auditlog/AuditLogSslExceptionHandler.java 57.14% <ø> (ø)
...org/opensearch/security/auditlog/NullAuditLog.java 0.00% <ø> (ø)
...earch/security/auditlog/impl/AbstractAuditLog.java 76.59% <100.00%> (+0.10%) ⬆️
...pensearch/security/auditlog/impl/AuditLogImpl.java 88.09% <ø> (ø)
...ava/org/opensearch/security/auth/UserInjector.java 90.66% <100.00%> (+0.66%) ⬆️
...g/opensearch/security/authtoken/jwt/JwtVendor.java 75.75% <100.00%> (ø)
...arch/security/dlic/rest/api/AbstractApiAction.java 88.61% <100.00%> (+0.04%) ⬆️
... and 60 more

... and 4 files with indirect coverage changes

parasjain1 and others added 20 commits September 29, 2023 18:41
Use custom serialization in security plugin. 
- Resolves opensearch-project#2780

Signed-off-by: Paras Jain <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
Co-authored-by: Paras Jain <[email protected]>
Co-authored-by: Peter Nied <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
…0.5 (opensearch-project#3435)

Bumps
[org.xerial.snappy:snappy-java](https://github.com/xerial/snappy-java)
from 1.1.10.4 to 1.1.10.5.

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…3433)

Bumps org.ow2.asm:asm from 9.5 to 9.6.

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…21.1 (opensearch-project#3432)

Bumps org.apache.camel:camel-xmlsecurity from 3.21.0 to 3.21.1.


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.camel:camel-xmlsecurity&package-manager=gradle&previous-version=3.21.0&new-version=3.21.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…4.3 (opensearch-project#3434)

Bumps
[com.github.wnameless.json:json-base](https://github.com/wnameless/json-base)
from 2.4.2 to 2.4.3.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/wnameless/json-base/blob/master/release-notes">com.github.wnameless.json:json-base's
changelog</a>.</em></p>
<blockquote>
<p>Version 1.0.0</p>
<ul>
<li>First release</li>
</ul>
<p>Version 1.1.0</p>
<ul>
<li>Support Java 9 Module</li>
<li>Add isEmpty() to JsonArrayBase and JsonObjectBase</li>
</ul>
<ul>
<li>Change package name from com.github.wnameless.json to
com.github.wnameless.json.base</li>
</ul>
<p>Version 1.1.1</p>
<ul>
<li>Using &quot;requires static&quot; on Gson and Jackson</li>
</ul>
<p>Version 1.2.0</p>
<ul>
<li>Add Jsonable interface</li>
</ul>
<p>Version 2.0.0</p>
<ul>
<li>Add #asBigInteger, #asBigDecimal, #asNumber, #asNull</li>
<li>Add #toMap, #toList</li>
<li>Add JsonValueCore, JsonObjectCore, JsonArrayCore, JsonCore,
JsonSource</li>
<li>Add JsonPrinter, JsonValueUtils</li>
</ul>
<p>Version 2.1.0</p>
<ul>
<li>Fix JsonProter#prettyPrint bug</li>
<li>Improve module-info.java</li>
</ul>
<p>Version 2.2.0</p>
<ul>
<li>Alter all &quot;requires static transitive&quot; to &quot;requires
static&quot; in module-info.java to avoid &quot;module not found&quot;
error while compiling by other projects</li>
</ul>
<p>Version 2.2.1</p>
<ul>
<li>Fix JsonPrinter bug on the edge case: having backslash before ending
double quotes</li>
</ul>
<p>Version 2.3.0</p>
<ul>
<li>Add org.json lib support</li>
<li>Add Jakarta lib support</li>
</ul>
<ul>
<li>Change the return type of JsonArrayCore#remove(int) from boolean to
JsonArrayCore</li>
<li>Increase JUnit code coverage to 100%</li>
</ul>
<ul>
<li>Remove Cobertura maven dependency</li>
</ul>
<p>Version 2.4.0</p>
<ul>
<li>Add #stream to JsonArrayBase and JsonObjectBase</li>
</ul>
<p>Version 2.4.1</p>
<ul>
<li>Improve OrgJsonValue#asNumber</li>
</ul>
<ul>
<li>Add JsonPrinter#toJsonString</li>
</ul>
<p>Version 2.4.2</p>
<ul>
<li>Upgrade POM</li>
</ul>
<p>Version 2.4.3</p>
<ul>
<li>Modify JsonValueUtils#toJavaNumber for preserving precise scale of
the float number</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/wnameless/json-base/commit/a2785b7b1c777b591a1d8724382c85f9dface1ba"><code>a2785b7</code></a>
[maven-release-plugin] prepare release json-base-2.4.3</li>
<li><a
href="https://github.com/wnameless/json-base/commit/849d039bf8f1728a2b091c6c6490eb4e00550c10"><code>849d039</code></a>
Improve GsonJsonValue implementation</li>
<li><a
href="https://github.com/wnameless/json-base/commit/244205004471e47cfde08a8139ff6d4f52917ca5"><code>2442050</code></a>
To preserve precise scale of the float number</li>
<li><a
href="https://github.com/wnameless/json-base/commit/10f6d999541a98d52c8a97e117dd916fad989634"><code>10f6d99</code></a>
[maven-release-plugin] prepare for next development iteration</li>
<li>See full diff in <a
href="https://github.com/wnameless/json-base/compare/json-base-2.4.2...json-base-2.4.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.github.wnameless.json:json-base&package-manager=gradle&previous-version=2.4.2&new-version=2.4.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…rch-project#3431)

Bumps commons-io:commons-io from 2.13.0 to 2.14.0.

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Peter Nied <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
… before sending the response to the channel (opensearch-project#3411)

Prior to this change, the ip auth failure listener was not called upon
challengeAuthenticator check invocation, which caused
AddressBasedRateLimiter to not be invoked. With this change
AddressBasedRateLimiter will be invoked upon multiple wrong requests
from an ip.

Signed-off-by: Darshit Chanpura <[email protected]>
peternied and others added 14 commits October 3, 2023 20:15
Signed-off-by: Peter Nied <[email protected]>
…nsearch-project#3264)

Instead of setting
`SECURITY_UNSUPPORTED_RESTAPI_ALLOW_SECURITYCONFIG_MODIFICATION`
settings to update security configuration using `PATCH` or `PUT` a new
permission was added: `restapi:admin/config/update`.

So far I decided to keep this flag as it is due to a backward
compatibility and log a deprecation message that these settings will be
removed in the future. Maybe it is better to remove it completely.

Besides, added the missed test for `SecurityConfigApiAction`

Signed-off-by: Andrey Pleskach <[email protected]>
…search-project#3458)

Update custom serialization min supported version, should be 2.11.0
since the features backport [1] was merged.

- [1] opensearch-project#3444 

Signed-off-by: Peter Nied <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
peternied and others added 13 commits October 4, 2023 21:06
Signed-off-by: Peter Nied <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
* Redirect deprecation messages to stderr to differentiate between the
two streams to make debugging and troubleshooting more efficient.

Signed-off-by: David Osorno <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
### Description
Add tracer to fix the breaking issue.

### Issues Resolved
- opensearch-project#3462

### Check List
- [ ] New functionality includes testing
- [ ] New functionality has been documented
- [x] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and
signing off your commits, please check
[here](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin).

---------

Signed-off-by: Gagan Juneja <[email protected]>
Co-authored-by: Gagan Juneja <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
@peternied peternied closed this Oct 6, 2023
@peternied peternied deleted the headerverifier branch October 17, 2023 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants