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

[ISSUE #8046] Fix authentication context build for no extFields #8102

Merged
merged 4 commits into from
May 9, 2024

Conversation

dingshuangxi888
Copy link
Contributor

Which Issue(s) This PR Fixes

Fixes #8046

Brief Description

Fix authentication context build for no extFields

How Did You Test This Change?

start producer/consumer without ak/sk

@codecov-commenter
Copy link

codecov-commenter commented May 7, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 42.86%. Comparing base (dcf892a) to head (466bf44).

Files Patch % Lines
...n/builder/DefaultAuthenticationContextBuilder.java 0.00% 1 Missing and 1 partial ⚠️
...on/builder/DefaultAuthorizationContextBuilder.java 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #8102   +/-   ##
==========================================
  Coverage      42.86%   42.86%           
- Complexity     10360    10362    +2     
==========================================
  Files           1270     1270           
  Lines          88690    88692    +2     
  Branches       11399    11400    +1     
==========================================
+ Hits           38017    38020    +3     
+ Misses         45976    45973    -3     
- Partials        4697     4699    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cserwen
Copy link
Member

cserwen commented May 8, 2024

If the client sets ak/sk, then all request headers will have ak/sk information, including heartbeats.
And if ak/sk is not set on the client, those configurations should also be turned off on the server. Maybe this is not a bug @dingshuangxi888

authenticationEnabled=false
authorizationEnabled=false

@dingshuangxi888
Copy link
Contributor Author

dingshuangxi888 commented May 8, 2024

If the client sets ak/sk, then all request headers will have ak/sk information, including heartbeats. And if ak/sk is not set on the client, those configurations should also be turned off on the server. Maybe this is not a bug @dingshuangxi888

authenticationEnabled=false
authorizationEnabled=false

The old client may has no ReqeustHeader, such as Heartbeat api, if the ak/sk is not set, the extFields will be null and it will get NPE error.

@cserwen
Copy link
Member

cserwen commented May 8, 2024

If the client sets ak/sk, then all request headers will have ak/sk information, including heartbeats. And if ak/sk is not set on the client, those configurations should also be turned off on the server. Maybe this is not a bug @dingshuangxi888

authenticationEnabled=false
authorizationEnabled=false

The old client may has no ReqeustHeader, such as Heartbeat api, if the ak/sk is not set, the extFields will be null and it will get NPE error.

OK

@cserwen
Copy link
Member

cserwen commented May 8, 2024

@dingshuangxi888 Some unit-tests maybe need to be resolved.

@lizhimins lizhimins merged commit 89c1509 into apache:develop May 9, 2024
10 checks passed
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.

[Bug] Fix authentication context build for no extFields
4 participants