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

Correcting setupSslOnlyMode to use AbstractSecurityUnitTest.hasCustom… #1057

Merged
merged 1 commit into from
Mar 3, 2021

Conversation

debjanibnrj
Copy link
Contributor

@debjanibnrj debjanibnrj commented Feb 25, 2021

…TransportSettings()

opendistro-for-elasticsearch/security pull request intake form

Please provide as much details as possible to get feedback/acceptance on your PR quickly

  1. Category: (Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation)
    Test fix

  2. Github Issue # or road-map entry, if available:
    N/A

  3. Description of changes:
    The setupSslOnlyMode helper method was incorrectly assuming that the hasCustomTransportSettings would always be false. Making this change to use AbstractSecurityUnitTest.hasCustomTransportSettings() helper.

I have also modified AbstractSecurityUnitTest.hasCustomTransportSettings() to return false if OPENDISTRO_SECURITY_SSL_TRANSPORT_EXTENDED_KEY_USAGE_ENABLED flag is defined in the settings

  1. Why these changes are required?
    See description.

  2. What is the old behavior before changes and new behavior after changes? (Please add any example/logs/screen-shot if available)

  3. Testing done: (Please provide details of testing done: Unit testing, integration testing and manual testing)

  4. TO-DOs, if any: (Please describe pending items and provide Github issues# for each of them)

  5. Is it backport from main branch? (If yes, please add backport PR # and commits #)

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.

@codecov
Copy link

codecov bot commented Feb 25, 2021

Codecov Report

Merging #1057 (7b0cb1b) into main (3014f2b) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##               main    #1057   +/-   ##
=========================================
  Coverage     64.49%   64.49%           
  Complexity     3168     3168           
=========================================
  Files           244      244           
  Lines         17035    17035           
  Branches       3023     3023           
=========================================
  Hits          10986    10986           
  Misses         4515     4515           
  Partials       1534     1534           
Impacted Files Coverage Δ Complexity Δ
...search/security/tools/OpenDistroSecurityAdmin.java 47.26% <0.00%> (-0.27%) 76.00% <0.00%> (-1.00%)
.../dlic/auth/ldap2/LDAPConnectionFactoryFactory.java 58.01% <0.00%> (+1.52%) 24.00% <0.00%> (+1.00%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3014f2b...0e7cec2. Read the comment docs.

@cliu123
Copy link
Member

cliu123 commented Feb 25, 2021

CI failed.

Copy link
Contributor

@vrozov vrozov left a comment

Choose a reason for hiding this comment

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

Please track all places where minimumSecuritySettings... should be replaced from hardcoded flag to a call to hasCustomTransportSettings. Please also revert the changes related to the introduction of the flag introduced in #493

Copy link
Contributor

@vrozov vrozov left a comment

Choose a reason for hiding this comment

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

LGTM

@sujithvm sujithvm merged commit 70a4f70 into opensearch-project:main Mar 3, 2021
chrousto referenced this pull request in chrousto/security Mar 6, 2021
niravpi pushed a commit to niravpi/security that referenced this pull request Jun 16, 2021
niravpi pushed a commit to niravpi/security that referenced this pull request Jun 16, 2021
niravpi pushed a commit to niravpi/security that referenced this pull request Jun 16, 2021
niravpi pushed a commit to niravpi/security that referenced this pull request Jun 16, 2021
niravpi pushed a commit to niravpi/security that referenced this pull request Jun 16, 2021
niravpi pushed a commit to niravpi/security that referenced this pull request Jun 16, 2021
niravpi pushed a commit to niravpi/security that referenced this pull request Jun 16, 2021
niravpi pushed a commit to niravpi/security that referenced this pull request Jun 16, 2021
niravpi pushed a commit to niravpi/security that referenced this pull request Jun 16, 2021
niravpi pushed a commit to niravpi/security that referenced this pull request Jun 16, 2021
niravpi pushed a commit to niravpi/security that referenced this pull request Jun 16, 2021
vrozov pushed a commit that referenced this pull request Jun 21, 2021
vrozov pushed a commit that referenced this pull request Jun 21, 2021
vrozov pushed a commit that referenced this pull request Jun 21, 2021
vrozov pushed a commit that referenced this pull request Jun 21, 2021
vrozov pushed a commit that referenced this pull request Jun 21, 2021
vrozov pushed a commit that referenced this pull request Jun 21, 2021
vrozov pushed a commit that referenced this pull request Jun 21, 2021
vrozov pushed a commit that referenced this pull request Jun 21, 2021
vrozov pushed a commit that referenced this pull request Jun 22, 2021
andy840314 pushed a commit that referenced this pull request Jun 28, 2021
andy840314 pushed a commit that referenced this pull request Jun 28, 2021
cliu123 pushed a commit that referenced this pull request Jul 15, 2021
* Correcting setupSslOnlyMode to use AbstractSecurityUnitTest.hasCustomTransportSettings() (#1057)
(cherry picked from commit 70a4f70)

* Introducing passive_intertransport_auth to facilitate communication between nodes with adv sec enabled and nodes without adv sec enabled.(#1156)
(Cherry picked from commit 9adcd20)

Co-authored-by: Debjani Banerjee <56744681+debjanibnrj@users.noreply.github.com>
Co-authored-by: dhiAmzn <81139246+dhiAmzn@users.noreply.github.com>
cliu123 pushed a commit that referenced this pull request Jul 15, 2021
* Correcting setupSslOnlyMode to use AbstractSecurityUnitTest.hasCustomTransportSettings() (#1057)
(cherry picked from commit 70a4f70)

* Introducing passive_intertransport_auth to facilitate communication between nodes with adv sec enabled and nodes without adv sec enabled.(#1156)
(Cherry picked from commit 9adcd20)

Co-authored-by: Debjani Banerjee <56744681+debjanibnrj@users.noreply.github.com>
Co-authored-by: dhiAmzn <81139246+dhiAmzn@users.noreply.github.com>
cliu123 pushed a commit that referenced this pull request Jul 16, 2021
* Correcting setupSslOnlyMode to use AbstractSecurityUnitTest.hasCustomTransportSettings() (#1057)
(cherry picked from commit 70a4f70)

* Introducing passive_intertransport_auth to facilitate communication between nodes with adv sec enabled and nodes without adv sec enabled.(#1156)
(Cherry picked from commit 9adcd20)

Co-authored-by: Debjani Banerjee <56744681+debjanibnrj@users.noreply.github.com>
Co-authored-by: dhiAmzn <81139246+dhiAmzn@users.noreply.github.com>
lbreinig pushed a commit to lbreinig/security that referenced this pull request Dec 23, 2021
wuychn pushed a commit to ochprince/security that referenced this pull request Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Project maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants