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

support auth for scan #321

Merged
merged 4 commits into from
Mar 4, 2024
Merged

support auth for scan #321

merged 4 commits into from
Mar 4, 2024

Conversation

Nicole00
Copy link
Contributor

@Nicole00 Nicole00 commented Mar 4, 2024

only useful for enterprise

@codecov-commenter
Copy link

codecov-commenter commented Mar 4, 2024

Codecov Report

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

Project coverage is 77.52%. Comparing base (f57b253) to head (9347960).

Files Patch % Lines
nebula3/sclient/GraphStorageClient.py 81.81% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #321      +/-   ##
==========================================
+ Coverage   77.50%   77.52%   +0.01%     
==========================================
  Files          18       18              
  Lines        2485     2496      +11     
==========================================
+ Hits         1926     1935       +9     
- Misses        559      561       +2     

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

@Nicole00 Nicole00 requested review from HarrisChu and critical27 March 4, 2024 05:41
@@ -42,6 +44,13 @@ def __init__(self, meta_cache, storage_addrs=None, time_out=60000):
self._connections = []
self._create_connection()

def set_userPasswd(self, user, passwd):
Copy link
Contributor

Choose a reason for hiding this comment

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

prefer set_user_passwd

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good, already refactor it.

@@ -225,6 +234,9 @@ def _scan_vertex(
req.filter = where
req.only_latest_version = only_latest_version
req.enable_read_from_follower = enable_read_from_follower
req.username = self.user.encode('utf-8')
req.password = self.passwd.encode('utf-8')
req.need_authenticate = True
Copy link
Contributor

Choose a reason for hiding this comment

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

why hard code true?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

need_authenticate is useful for storaged to distinguish the request source is graphd or clients. if the request source is clients, it will config true, and if the request source is graphd, it does not need to auth.

HarrisChu
HarrisChu previously approved these changes Mar 4, 2024
@Nicole00 Nicole00 merged commit dfe1534 into master Mar 4, 2024
11 checks passed
@Nicole00 Nicole00 deleted the scan branch March 4, 2024 06:21
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.

3 participants