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

fix(destination): empty oauth account check #2675

Merged
merged 2 commits into from
Nov 9, 2022

Conversation

sanpj2292
Copy link
Contributor

Description

The oauth account id can be empty. Due to the changes we might do as part of the regulation-worker support for Universal Analytics.

This check serves as protection when rudderAccountId is missing.

Background:

As part of the changes for supporting OAuth in regulation-worker module. We need to have one more field in destination config known as rudderUserDeleteAccountId which indicates that this account information will be used for sending delete user request to destination

This user delete feature can sometimes only require OAuth and event-delivery for the same destination might not need OAuth, int this case, we don’t populate rudderAccountId but we populate rudderUserDeleteAccountId with the access token information(which will be used for user-deletion requests)

This can cause a problem while processing the transformer proxy response for OAuth destinations. We would need to add a check to prevent any errors for such things.

Notion Ticket

https://www.notion.so/rudderstacks/Integrate-OAuth-in-regulation-worker-module-of-server-dae0cf6ef89e41eb91e9212ac524cf49

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

@codecov
Copy link

codecov bot commented Nov 9, 2022

Codecov Report

Base: 45.43% // Head: 45.45% // Increases project coverage by +0.02% 🎉

Coverage data is based on head (9e5628c) compared to base (ea8cf4c).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@                Coverage Diff                @@
##           release/1.3.x    #2675      +/-   ##
=================================================
+ Coverage          45.43%   45.45%   +0.02%     
=================================================
  Files                287      287              
  Lines              47777    47779       +2     
=================================================
+ Hits               21707    21720      +13     
+ Misses             24691    24683       -8     
+ Partials            1379     1376       -3     
Impacted Files Coverage Δ
router/router.go 73.95% <0.00%> (+0.09%) ⬆️
config/backend-config/namespace_config.go 70.83% <0.00%> (-3.13%) ⬇️
processor/processor.go 86.40% <0.00%> (+0.41%) ⬆️
services/db/recovery.go 53.01% <0.00%> (+2.40%) ⬆️
router/manager/manager.go 100.00% <0.00%> (+3.29%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@sanpj2292 sanpj2292 requested review from atzoum and cisse21 November 9, 2022 09:50
router/router.go Outdated Show resolved Hide resolved
@chandumlg chandumlg merged commit 1584352 into release/1.3.x Nov 9, 2022
@chandumlg chandumlg deleted the fix.oauth-empty-account branch November 9, 2022 11:31
This was referenced Nov 9, 2022
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.

3 participants