-
Notifications
You must be signed in to change notification settings - Fork 78
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
Conversation
Codecov ReportAttention: Patch coverage is
❗ 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. |
@@ -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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefer set_user_passwd
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why hard code true?
There was a problem hiding this comment.
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.
only useful for enterprise