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

TDL-16139 Support of service account authentication #53

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

prijendev
Copy link
Contributor

@prijendev prijendev commented Oct 7, 2022

Description of change

  • Provided support of service account authentication (link).
  • User need to enter following param value in config
    • service_account_username
    • service_account_secret
    • project_id
  • Added unit test and integration test to verify the service account authentication.

Note: Currently, the build is failing because config parameters for the service account authentication are not added in the UI.

Manual QA steps

Risks

Rollback steps

  • revert this branch

@prijendev prijendev requested a review from dbshah1212 October 10, 2022 05:12
@kethan1122 kethan1122 changed the base branch from TDL-20804-format-code-with-standard-formatters to master June 15, 2023 03:46
tap_mixpanel/client.py Outdated Show resolved Hide resolved
tap_mixpanel/client.py Outdated Show resolved Hide resolved
Comment on lines +42 to +44
with self.assertRaises(Exception) as e:
with MixpanelClient(None, None, None, None,"api_domain", 300) as client_:
pass

Choose a reason for hiding this comment

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

Suggested change
with self.assertRaises(Exception) as e:
with MixpanelClient(None, None, None, None,"api_domain", 300) as client_:
pass
with self.assertRaises(Exception) as e:
MixpanelClient(None, None, None, None,"api_domain", 300)

Comment on lines +17 to +19
"""
with MixpanelClient("api_secret", None, None, None,"api_domain", 300) as client_:
pass
Copy link

@RushiT0122 RushiT0122 Dec 1, 2023

Choose a reason for hiding this comment

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

Suggested change
"""
with MixpanelClient("api_secret", None, None, None,"api_domain", 300) as client_:
pass
MixpanelClient("api_secret", None, None, None,"api_domain", 300)

Choose a reason for hiding this comment

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

Unless I am missing something here.

Comment on lines +28 to +30
mock_check_access: Mock the check_access method to test authentication.
"""
with MixpanelClient(None, "service_account_username", "service_account_secret", "project_id","api_domain", 300, auth_type="saa") as client_:

Choose a reason for hiding this comment

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

Suggested change
mock_check_access: Mock the check_access method to test authentication.
"""
with MixpanelClient(None, "service_account_username", "service_account_secret", "project_id","api_domain", 300, auth_type="saa") as client_:
MixpanelClient(None, "service_account_username", "service_account_secret", "project_id","api_domain", 300)

Copy link

@RushiT0122 RushiT0122 left a comment

Choose a reason for hiding this comment

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

Requested few changes in-line.

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.

7 participants