Quote from: PaulGregory at Aug 25, 2006, 03:39 AM
Fair enough, if it isn’t simple to change the API (I naively assumed that it was), then it does largely make more sense to wait and change things at the point that we merge web and manager users, so we have one upgrade facility. And yes, some serious discussion of the future of users needs to start post 0.9.5.
When we have a centralized, and object-oriented API, without code redundancy for everything that goes on with the core tables, we can easily change the API and deal strictly with code migration issues.
Quote from: PaulGregory at Aug 25, 2006, 03:39 AM
Your reply basically translates as "either MODx manages it and is the centre, or the other application totally does its own thing with users, because the level of faff is insane."
Faff? This idea of federated (as in aggregating) user management and identity services is hardly what I would call faff, if by faff you mean "potter about uselessly, be indecisive," and the model I am trying to describe in less technical jargon that I am used to has been implemented before, very successfully, in the J2EE world, where 5 years ago, the state of Java web applications was the same as the majority of PHP web applications, as you describe below. Now, most Java web applications know to either use the J2EE container for identity management, or to use a standards-based web-service to authenticate and get identity data.
Quote from: PaulGregory at Aug 25, 2006, 03:39 AM
I fail to see many non-MODx applications that will talk to MODx in such fancy ways without a lot of recoding. Last night I had a go at letting Vanilla use the MODx user table, which was seriously impeded by short-sightedness on the part of Vanilla and the largely pointless use of 2 tables in MODx. A user can only have one set of attributes. A user has to at least have the email attribute, and so that’s 2 tables minimum for a user. I just don’t see how the class division needs to be replicated in the tables. If items were in one easily remappable table, much more data can be shared between apps
Why do you see the isolation of that data as pointless. I fail to see how it is pointless. And users can have many different uses in a web application, potentially have different profiles from different applications that are involved in the aggregation, etc. And the need for authentication to be a quick and simple process that does not require additional information (beyond the username and password, a.k.a. credentials), definitely justifies the division to me. It’s arguable whether email address should be there as well, but I think in most cases, it is auxilary, and only needed for communication of changes to credentials (resetting password, etc.).
And I do not subscribe to a method of remapping fields in one application to match another. Integration is not that simple in most cases, and this would be the same thing as building a bridge in my model, only the MODx API could be utilized to help easily get the required data for the external application from the aggregation in MODx, even if it is managed from the external application. So each external application serves as a source of aggregation, and each application can, depending on your needs, be bridged back to the identity service, or not. MODx and other apps can still get access to the data exclusively defined for the external app at any time, but unless a specific app needs access to the aggregation, a bridge isn’t necessary. This model also allows for ultimate flexibility in integrating disparate user systems.
Quote from: PaulGregory at Aug 25, 2006, 03:39 AM
Quote from: OpenGeek at Aug 24, 2006, 09:32 PM
...Identity data that other applications can then interact with in whatever imaginable way they need to...
Except the way in which they currently interact with their own data.
If we are to integrate with existing apps, it will be because of common ground in MySQL.
If we are to get other apps to work with the MODx API, then in many cases it is a hack/rewrite. The more you rewrite of a third-party app, the more work you get to do every time they release an upgrade.
I’m concerned. I know that a big user table is inelegant, but you have to consider the speed of integration.
though I really think each individual column deserves some discussion before we decide where to move anything,
Indeed, the fields themselves could do with a rethink.
The way I see it, if you want a split, the logic is:
Required fields in _users, and anything that reasonably might be expected to be useful to other applications or that you wouldn’t expect anyone to have to enter twice.
Optional extra MODx-oriented attributes in _attributes.
Optional extra MODx-oriented settings in _settings.
Which may well only mean moving ’email’ to _users.
I have a plan to allow the MODx user framework, to be able to serve as a central source of identity which can aggregate data for each of the three classes of data I mentioned, from whatever repository it is possible to get that data from.
Great. I take this to mean that we could define where identity data is coming from. But presumably if it is possible to get data for a class from any repository, there is no need to split the tables _users and _user_attributes?
No, the split will be the same; I think this is an important organizational requirement of the data model for user identity and security. And forget MySQL, what about LDAP, Active Directory, SAML from SOAP-based identity servers, Oracle, MS SQL Server, PostgreSQL, etc. -- user data can be found in infinite varieties, and we need to be able to aggregate and integrate as deeply as possible with each one. The model I am trying to describe makes that possible with a minimum amount of effort and maximum amount of flexibility. If an app’s too difficult to hack, let the app alone and have it’s data used in the aggregation of data for the rest of your identity services, but it can continue on without knowledge or concern about the aggregation, as I mentioned.
Aggregating the profile data means additional genericism of the profile/attributes stuff, so caches of the aggregated data can be stored locally, and extended past the base set of MODx attributes with no manual intervention.