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

Improve security config validation [master] #1152

Merged

Conversation

srknzl
Copy link
Member

@srknzl srknzl commented Dec 29, 2021

  1. Initialized username and password with null to avoid them being undefined. With undefined value it still works due to CodecUtil.encodeNullable logic but it may be confusing.

  2. If token is not provided in token credentials we throw instead of ignoring.

@codecov
Copy link

codecov bot commented Dec 29, 2021

Codecov Report

Merging #1152 (5cc5490) into master (65bf680) will decrease coverage by 0.36%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1152      +/-   ##
==========================================
- Coverage   92.49%   92.13%   -0.37%     
==========================================
  Files         438      438              
  Lines       14519    14521       +2     
  Branches     1085     1085              
==========================================
- Hits        13430    13379      -51     
- Misses        800      849      +49     
- Partials      289      293       +4     
Impacted Files Coverage Δ
src/config/ConfigBuilder.ts 90.13% <100.00%> (-0.50%) ⬇️
src/codec/ClientAuthenticationCustomCodec.ts 42.22% <0.00%> (-33.34%) ⬇️
src/network/ConnectionManager.ts 75.17% <0.00%> (-8.52%) ⬇️
src/invocation/ClusterService.ts 93.16% <0.00%> (-0.86%) ⬇️
src/util/Util.ts 87.89% <0.00%> (-0.64%) ⬇️
src/protocol/ErrorFactory.ts 63.90% <0.00%> (+0.75%) ⬆️
src/core/HazelcastError.ts 74.79% <0.00%> (+0.81%) ⬆️

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 65bf680...5cc5490. Read the comment docs.

@srknzl srknzl merged commit 18ddca8 into hazelcast:master Dec 29, 2021
harunalpak pushed a commit to harunalpak/hazelcast-nodejs-client that referenced this pull request Dec 8, 2022
Initialize username and password with null to avoid them being `undefined`.
With `undefined` value it still works due to `CodecUtil.encodeNullable` logic
but it may be confusing.

Also, if `token` is not provided in token credentials throw instead of ignoring.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants