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

Remove master keywords #1886

Merged
merged 2 commits into from
Jun 16, 2022
Merged

Conversation

cliu123
Copy link
Member

@cliu123 cliu123 commented Jun 14, 2022

Description

[Describe what this change achieves]

  • Category (Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation) Refactoring

Issues Resolved

#1664

Testing

ITs

Check List

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

@peternied
Copy link
Member

Please update https://github.com/opensearch-project/security/blob/main/config/checkstyle/sun_checks.xml#L204 to an error.

Will there be a separate PR for the whitelist terminology?

@cliu123
Copy link
Member Author

cliu123 commented Jun 14, 2022

https://github.com/opensearch-project/security/blob/main/config/checkstyle/sun_checks.xml#L204

The check cannot be enabled as some master keywords referencing to OpenSearch core, for example node.master.
Whitelist is not going to be removed until OpenSearch 3.0.

@cliu123 cliu123 marked this pull request as ready for review June 14, 2022 21:55
@cliu123 cliu123 requested a review from a team June 14, 2022 21:55
@codecov-commenter
Copy link

codecov-commenter commented Jun 14, 2022

Codecov Report

Merging #1886 (ba0a009) into main (001d73f) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##               main    #1886      +/-   ##
============================================
+ Coverage     61.01%   61.04%   +0.03%     
- Complexity     3232     3233       +1     
============================================
  Files           256      256              
  Lines         18085    18085              
  Branches       3222     3222              
============================================
+ Hits          11034    11040       +6     
+ Misses         5469     5466       -3     
+ Partials       1582     1579       -3     
Impacted Files Coverage Δ
...arch/security/configuration/ClusterInfoHolder.java 65.85% <100.00%> (ø)
.../security/privileges/SnapshotRestoreEvaluator.java 96.96% <100.00%> (ø)
...earch/security/resolver/IndexResolverReplacer.java 65.52% <100.00%> (ø)
...earch/security/ssl/util/SSLConnectionTestUtil.java 95.45% <0.00%> (+2.27%) ⬆️
...urity/ssl/transport/SecuritySSLNettyTransport.java 66.66% <0.00%> (+4.30%) ⬆️

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 001d73f...ba0a009. Read the comment docs.

@peternied
Copy link
Member

The check cannot be enabled as some master keywords referencing to OpenSearch core, for example node.master.

Shouldn't we be able to switch to something like node.cluster_manager? We should be able to remove all of the 'master' based language from this codebase, or its a bug on OpenSearch.

@cliu123
Copy link
Member Author

cliu123 commented Jun 15, 2022

The check cannot be enabled as some master keywords referencing to OpenSearch core, for example node.master.

Shouldn't we be able to switch to something like node.cluster_manager? We should be able to remove all of the 'master' based language from this codebase, or its a bug on OpenSearch.

node.cluster_manager is not a valid configuration in OpenSearch core.

@peternied
Copy link
Member

node.cluster_manager is not a valid configuration in OpenSearch core.

If this is the case, we should have bugs on OpenSearch because our migration effort is blocked.

To keep this effort moving could you create issues on any OpenSearch blockers and then use checkstyle exclusion comments so we can merge the progress that you've made while we chase down these outstanding items. What do you think of this?

@cliu123
Copy link
Member Author

cliu123 commented Jun 16, 2022

@peternied I've listed out the items that we cannot change in the OpenSearch issue and the security plugin issue. So we can unblock this PR.

@davidlago
Copy link

Could you please create a follow-up issue in our repo to come back and update the missing ones you reported in opensearch-project/OpenSearch#472 (comment) once they get addressed?

@cliu123
Copy link
Member Author

cliu123 commented Jun 16, 2022

Could you please create a follow-up issue in our repo to come back and update the missing ones you reported in opensearch-project/OpenSearch#472 (comment) once they get addressed?

I've created a separate issue to track the changes in Java APIs when OpenSearch core is ready: #1887

@cliu123 cliu123 merged commit 8393c71 into opensearch-project:main Jun 16, 2022
@cliu123 cliu123 deleted the remove_master_keywords branch June 16, 2022 19:04
stephen-crawford pushed a commit to stephen-crawford/security that referenced this pull request Nov 10, 2022
Signed-off-by: cliu123 <[email protected]>

Signed-off-by: Stephen Crawford <[email protected]>
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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants