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

Add fallback for opendistro_security_config.ssl_dual_mode_enabled #1190

Conversation

andy840314
Copy link
Contributor

opensearch-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)
    Refactoring

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

  3. Description of changes:
    Add fallback for the Dynamic setting opendistro_security_config.ssl_dual_mode_enabled

  4. Why these changes are required?

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

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

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

  8. 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.

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.

@andy840314 andy840314 force-pushed the fallback-for-ssl_dual_mode_enabled branch from e6bbca9 to b9d4dd9 Compare May 26, 2021 18:22
dblock
dblock previously approved these changes May 26, 2021
Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

Good work.

Copy link
Member

@saratvemulapalli saratvemulapalli left a comment

Choose a reason for hiding this comment

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

Looks good the me, thanks @andy840314 !

@andy840314
Copy link
Contributor Author

andy840314 commented May 26, 2021

Just found

 logger.warn("opendistro_security_config.ssl_dual_mode_enabled is enabled but plugins.security.ssl_only mode is disabled. "
                + "SSL Dual mode is supported only when security plugin is in ssl_only mode");

in org/opensearch/security/ssl/transport/SSLConfig.java

Renamed this.

@codecov-commenter
Copy link

codecov-commenter commented May 26, 2021

Codecov Report

Merging #1190 (b9d4dd9) into main (88e4e78) will decrease coverage by 0.03%.
The diff coverage is 85.71%.

❗ Current head b9d4dd9 differs from pull request most recent head c7150b5. Consider uploading reports for the commit c7150b5 to get more accurate results
Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1190      +/-   ##
============================================
- Coverage     64.52%   64.49%   -0.04%     
- Complexity     3169     3171       +2     
============================================
  Files           244      245       +1     
  Lines         17125    17128       +3     
  Branches       3035     3035              
============================================
- Hits          11050    11046       -4     
- Misses         4535     4542       +7     
  Partials       1540     1540              
Impacted Files Coverage Δ
...g/opensearch/security/support/ConfigConstants.java 94.44% <ø> (ø)
.../opensearch/security/support/SecuritySettings.java 66.66% <66.66%> (ø)
.../opensearch/security/OpenSearchSecurityPlugin.java 81.22% <100.00%> (+0.03%) ⬆️
...g/opensearch/security/ssl/transport/SSLConfig.java 90.00% <100.00%> (-0.48%) ⬇️
...urity/ssl/transport/SecuritySSLRequestHandler.java 50.00% <0.00%> (-6.42%) ⬇️
...security/configuration/DlsFlsFilterLeafReader.java 59.76% <0.00%> (-0.71%) ⬇️
.../dlic/auth/ldap2/LDAPConnectionFactoryFactory.java 58.01% <0.00%> (+1.52%) ⬆️

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 88e4e78...c7150b5. Read the comment docs.

@cliu123 cliu123 requested a review from a team May 26, 2021 20:36
@andy840314 andy840314 merged commit 9328d08 into opensearch-project:main May 26, 2021
@cliu123 cliu123 added the maintenance Project maintenance label May 26, 2021
cliu123 added a commit to cliu123/security that referenced this pull request May 26, 2021
lbreinig pushed a commit to lbreinig/security that referenced this pull request Dec 23, 2021
…ensearch-project#1190)

* Add fallback setting

* Change setting string in logger.warn
wuychn pushed a commit to ochprince/security that referenced this pull request Mar 16, 2023
…ensearch-project#1190)

* Add fallback setting

* Change setting string in logger.warn
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.

6 participants