Starting new thread … We’d want the User to define the mappings between the client and server. They would map between the logical data model (SCIM) to the physical data model (LDAP)
Here’s an example of how the mapping could be defined: ``` structure: - users ocs: - inetorgperson - posixaccount - myuser type: employeeType name: uid rdn: uid full_name: cn last_name: sn first_name: name address: - physicalDeliveryOfficeName - roomNumber - postOfficeBox - city - st - l policy: pwPolicy phones: - mobiles emails: - emails id: uidNumber home: homeDirectory login: loginShell misc: - description - groups ocs: - groupofmembers - posixgroup name: cn rdn: cn id: gidNumber members: - members ``` — Shawn > On Oct 22, 2024, at 12:56 PM, Shawn McKinney <smckin...@apache.org> wrote: > >> On Oct 22, 2024, at 12:20 PM, Brian Demers <bdem...@apache.org> wrote: >> >> but while we are hacking on things, the thinking was that keeping it outside >> the repo would make it easier to get started. > > Something I wanted to get input on is how best to create a flexible interface > with the LDAP API. Need to allow the user the ability to define the data > structures. Don't want to reinvent the wheel. Are there any recommendations > on how to proceed? > > I’ve got in mind some kind of meta file that maps from the physical data > model to a logical one. > > A template or hashmap would do well here. > > Once the data mappings are in place, it would be a simple matter to pass a > map to the data access object for operations with the backend. > > e.g. Pass a simple user entry via a HashMap: > > ``` > HashMap map = new HashMap<String, String>(); > String uid = "foo"; > map.put(SchemaConstants.OBJECT_CLASS_AT, Config.getString( > Ids.USERS_OBJECT_CLASS )); > map.put(SchemaConstants.CN_AT, "foo bar"); > map.put(SchemaConstants.SN_AT, "bar"); > map.put(SchemaConstants.UID_AT, uid); > map.put(SchemaConstants.DESCRIPTION_AT, " ... "); > … > > map.put("DN", SchemaConstants.UID_AT + "=" + uid + "," + Config.getString( > Ids.USERS )); > ``` > > Thoughts? > > — > Shawn --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@directory.apache.org For additional commands, e-mail: dev-h...@directory.apache.org