Closed
Bug 662859
Opened 14 years ago
Closed 14 years ago
Adding node checking
Categories
(Cloud Services Graveyard :: Server: Sync, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: tarek, Assigned: tarek)
References
Details
Attachments
(3 files, 1 obsolete file)
8.56 KB,
patch
|
telliott
:
review+
|
Details | Diff | Splinter Review |
3.48 KB,
patch
|
telliott
:
review+
tarek
:
feedback+
|
Details | Diff | Splinter Review |
11.08 KB,
text/plain
|
Details |
The storage server needs to control the user node on auth
Assignee | ||
Comment 1•14 years ago
|
||
This is the first patch required: authenticate_user can now receive a "fields" option, that contains field names that will be extracted from the user data in the DB.
For instance we can do:
authenticate_user(name, password, fields=['userNode'])
The return type of the API changes consequently: it's now a tuple of value. The first one is the user id, followed by the values of the claimed fields:
>>> authenticate_user(name, password)
(123, )
>>> authenticate_user(name, password, fields=['userNode'])
(123, ['weave:balbalba',])
If the user is not recognized or the auth fails, it returns None as usual.
The server-storage app will hae the ability to check the node value right after the authentication happens.
This change impacts all applications that use this API, which is fine as long as we deal correctly with the dependencies versions in them.
e.g. if an app is not changed, if can do: "server-core <= 1.6" , otherwise : "server-core > 1.6"
Attachment #538225 -
Flags: review?(telliott)
Comment 2•14 years ago
|
||
Comment on attachment 538225 [details] [diff] [review]
authenticate_user can return fields
This is fine, but note that the semantics are going to change again with the user rewrite. It's going to look like this:
user = User()
user['userName'] = 'foo'
uid = auth.authenticate(user, password, ['syncNode'])
Assuming a successful call, user['userId'] and user['syncNode'] will be populated
Attachment #538225 -
Flags: review?(telliott) → review+
Assignee | ||
Comment 3•14 years ago
|
||
Well maybe we should wait then because we'll be back at the current return type (id or None).
Do you think your auth work will be over within 2 weeks ? If so, let's hold this refactoring so we're not bothered by changing the return type back and forth in all applications. If so please just mark this bug as blocked by your meta-bug on auth changes
Comment 4•14 years ago
|
||
I think the code will be done in a couple weeks, but there's a lot of migration work too (see the ldap change bug). Should have the changes to account-portal out today for a working example.
Blocks: 659132
Assignee | ||
Comment 5•14 years ago
|
||
Attachment #541419 -
Flags: review?(telliott)
Attachment #541419 -
Flags: feedback?(petef)
Assignee | ||
Comment 6•14 years ago
|
||
Attachment #541419 -
Attachment is obsolete: true
Attachment #541419 -
Flags: review?(telliott)
Attachment #541419 -
Flags: feedback?(petef)
Attachment #541421 -
Flags: review?(telliott)
Attachment #541421 -
Flags: feedback?(petef)
Comment 7•14 years ago
|
||
Comment on attachment 541419 [details] [diff] [review]
temporary patch to reject users on the bad node
r+ with the addition of a host in the last chunk.
Attachment #541419 -
Flags: review+
Updated•14 years ago
|
Attachment #541421 -
Flags: review?(telliott) → review+
Assignee | ||
Comment 8•14 years ago
|
||
Comment 9•14 years ago
|
||
Updated•14 years ago
|
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•7 years ago
|
Attachment #541421 -
Flags: feedback?(petef) → feedback+
Updated•2 years ago
|
Product: Cloud Services → Cloud Services Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•