Closed Bug 662859 Opened 14 years ago Closed 14 years ago

Adding node checking

Categories

(Cloud Services Graveyard :: Server: Sync, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: tarek, Assigned: tarek)

References

Details

Attachments

(3 files, 1 obsolete file)

The storage server needs to control the user node on auth
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 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+
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
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
Attachment #541419 - Flags: review?(telliott)
Attachment #541419 - Flags: feedback?(petef)
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 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+
Attachment #541421 - Flags: review?(telliott) → review+
Blocks: 669525
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Attachment #541421 - Flags: feedback?(petef) → feedback+
Product: Cloud Services → Cloud Services Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: