Has UID/GUID syntax changed from CalendarServer-5.2.2 to 6.0
This was a valid XML in CalendarServer-5.2.2. It used to be 'user' now its 'record' I could have a UID as 'gauravj' <directory realm="Test Realm"> <record> <uid>0C8BDE62-E600-4696-83D3-8B5ECABDFD2E</uid> <guid>0C8BDE62-E600-4696-83D3-8B5ECABDFD2E</guid> <short-name>admin</short-name> <password>admin</password> <full-name>Super User</full-name> <email>admin@example.com</email> </record> <record> * <uid>gauravj</uid> <guid>gauravj</gui*d> <password>some_password</password> <email>gauravj@example.com</email> <full-name>G J</full-name> <short-name>G</short-name> </record> </directory> But I CalendarServer-6.0, I get File "/usr/lib/python2.7/uuid.py", line 134, in __init__ raise ValueError('badly formed hexadecimal UUID string') exceptions.ValueError: badly formed hexadecimal UUID string Could you please tell me if I could use the above xml with 6.0?? Best Regards,
Full Stacktrace Traceback (most recent call last): File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/local/lib/python2.7/site-packages/twisted/internet/_baseprocess.py", line 60, in maybeCallProcessEnded proto.processEnded(Failure(reason)) File "/var/caldav/CalendarServer-6.0/txdav/base/datastore/subpostgres.py", line 164, in processEnded self.deferred.callback(''.join(self.output)) File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 382, in callback self._startRunCallbacks(result) File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 490, in _startRunCallbacks self._runCallbacks() --- <exception caught here> --- File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 577, in _runCallbacks current.result = callback(current.result, *args, **kw) File "/var/caldav/CalendarServer-6.0/txdav/base/datastore/subpostgres.py", line 500, in gotStatus self.ready(*createConnection()) File "/var/caldav/CalendarServer-6.0/txdav/base/datastore/subpostgres.py", line 390, in ready self.produceConnection, self File "/var/caldav/CalendarServer-6.0/calendarserver/tap/caldav.py", line 1513, in subServiceFactory config, store=store, serversDB=serversDB File "/var/caldav/CalendarServer-6.0/txdav/who/util.py", line 75, in directoryFromConfig serversDB=serversDB File "/var/caldav/CalendarServer-6.0/txdav/who/util.py", line 245, in buildDirectory userDirectory.realmName, File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/src/twextpy/twext/who/xml.py", line 198, in realmName self.loadRecords() File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/src/twextpy/twext/who/xml.py", line 307, in loadRecords self.parseRecordNode(recordNode, unknownFieldElements) File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/src/twextpy/twext/who/xml.py", line 370, in parseRecordNode value = valueType(fieldNode.text) File "/usr/lib/python2.7/uuid.py", line 134, in __init__ raise ValueError('badly formed hexadecimal UUID string') exceptions.ValueError: badly formed hexadecimal UUID string On Wed, Mar 18, 2015 at 11:09 AM, Gaurav Jain <monkeyfdude@gmail.com> wrote:
This was a valid XML in CalendarServer-5.2.2. It used to be 'user' now its 'record'
I could have a UID as 'gauravj'
<directory realm="Test Realm"> <record> <uid>0C8BDE62-E600-4696-83D3-8B5ECABDFD2E</uid> <guid>0C8BDE62-E600-4696-83D3-8B5ECABDFD2E</guid> <short-name>admin</short-name> <password>admin</password> <full-name>Super User</full-name> <email>admin@example.com</email> </record> <record>
* <uid>gauravj</uid> <guid>gauravj</gui*d> <password>some_password</password> <email>gauravj@example.com</email> <full-name>G J</full-name> <short-name>G</short-name> </record> </directory>
But I CalendarServer-6.0, I get
File "/usr/lib/python2.7/uuid.py", line 134, in __init__ raise ValueError('badly formed hexadecimal UUID string') exceptions.ValueError: badly formed hexadecimal UUID string
Could you please tell me if I could use the above xml with 6.0??
Best Regards,
Hi, This is OK: <record type="user"> <uid>dre</uid> <guid>10000042-0000-0000-0000-000000000001</guid> <short-name>dre</short-name> <password>dre</password> <full-name>Andre LaBranche</full-name> <email>dre@apple.com</email> </record> e.g. andre@xomg [~/cs] % ./bin/calendarserver_manage_principals --search dre 1 matches found: Andre LaBranche (user) UID: dre Record name: dre Email: dre@apple.com <mailto:dre@apple.com> However, this is not OK: <record type="user"> <uid>dre</uid> <guid>dre</guid> <short-name>dre</short-name> <password>dre</password> <full-name>Andre LaBranche</full-name> <email>dre@apple.com</email> </record> Startup fails: 2015-03-18 13:32:47-0700 [-] [txdav.base.datastore.subpostgres#critical] Can't start or connect to postgres: badly formed hexadecimal UUID string To summarize, UID can be a short string or an actual UUID, however GUID must be a UUID if it is present. It doesn’t seem to be an error to omit GUID. -dre
On Mar 18, 2015, at 11:19 AM, Gaurav Jain <monkeyfdude@gmail.com> wrote:
Full Stacktrace
Traceback (most recent call last): File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/local/lib/python2.7/site-packages/twisted/internet/_baseprocess.py", line 60, in maybeCallProcessEnded proto.processEnded(Failure(reason)) File "/var/caldav/CalendarServer-6.0/txdav/base/datastore/subpostgres.py", line 164, in processEnded self.deferred.callback(''.join(self.output)) File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 382, in callback self._startRunCallbacks(result) File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 490, in _startRunCallbacks self._runCallbacks() --- <exception caught here> --- File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 577, in _runCallbacks current.result = callback(current.result, *args, **kw) File "/var/caldav/CalendarServer-6.0/txdav/base/datastore/subpostgres.py", line 500, in gotStatus self.ready(*createConnection()) File "/var/caldav/CalendarServer-6.0/txdav/base/datastore/subpostgres.py", line 390, in ready self.produceConnection, self File "/var/caldav/CalendarServer-6.0/calendarserver/tap/caldav.py", line 1513, in subServiceFactory config, store=store, serversDB=serversDB File "/var/caldav/CalendarServer-6.0/txdav/who/util.py", line 75, in directoryFromConfig serversDB=serversDB File "/var/caldav/CalendarServer-6.0/txdav/who/util.py", line 245, in buildDirectory userDirectory.realmName, File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/src/twextpy/twext/who/xml.py", line 198, in realmName self.loadRecords() File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/src/twextpy/twext/who/xml.py", line 307, in loadRecords self.parseRecordNode(recordNode, unknownFieldElements) File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/src/twextpy/twext/who/xml.py", line 370, in parseRecordNode value = valueType(fieldNode.text) File "/usr/lib/python2.7/uuid.py", line 134, in __init__ raise ValueError('badly formed hexadecimal UUID string') exceptions.ValueError: badly formed hexadecimal UUID string
On Wed, Mar 18, 2015 at 11:09 AM, Gaurav Jain <monkeyfdude@gmail.com <mailto:monkeyfdude@gmail.com>> wrote: This was a valid XML in CalendarServer-5.2.2. It used to be 'user' now its 'record'
I could have a UID as 'gauravj'
<directory realm="Test Realm"> <record> <uid>0C8BDE62-E600-4696-83D3-8B5ECABDFD2E</uid> <guid>0C8BDE62-E600-4696-83D3-8B5ECABDFD2E</guid> <short-name>admin</short-name> <password>admin</password> <full-name>Super User</full-name> <email>admin@example.com <mailto:admin@example.com></email> </record> <record> <uid>gauravj</uid> <guid>gauravj</guid> <password>some_password</password> <email>gauravj@example.com <mailto:gauravj@example.com></email> <full-name>G J</full-name> <short-name>G</short-name> </record> </directory>
But I CalendarServer-6.0, I get
File "/usr/lib/python2.7/uuid.py", line 134, in __init__ raise ValueError('badly formed hexadecimal UUID string') exceptions.ValueError: badly formed hexadecimal UUID string
Could you please tell me if I could use the above xml with 6.0??
Best Regards,
_______________________________________________ calendarserver-users mailing list calendarserver-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/calendarserver-users
Thank you very much for clarifications. I have one more question, for GET requests what is the identifier for the user is it UID, GUID, short-name or emailAdress?? I mean in following URL /calendars/users/_____$________/calendar.......what is the value of $ in DCS 6.0??? On Wed, Mar 18, 2015 at 1:36 PM, Andre LaBranche <dre@apple.com> wrote:
Hi,
This is OK:
<record type="user"> <uid>dre</uid> <guid>10000042-0000-0000-0000-000000000001</guid> <short-name>dre</short-name> <password>dre</password> <full-name>Andre LaBranche</full-name> <email>dre@apple.com</email> </record>
e.g.
andre@xomg [~/cs] % ./bin/calendarserver_manage_principals --search dre 1 matches found:
Andre LaBranche (user) UID: dre Record name: dre Email: dre@apple.com
However, this is not OK:
<record type="user"> <uid>dre</uid> <guid>dre</guid> <short-name>dre</short-name> <password>dre</password> <full-name>Andre LaBranche</full-name> <email>dre@apple.com</email> </record>
Startup fails: 2015-03-18 13:32:47-0700 [-] [txdav.base.datastore.subpostgres#critical] Can't start or connect to postgres: badly formed hexadecimal UUID string
To summarize, UID can be a short string or an actual UUID, however GUID must be a UUID if it is present. It doesn’t seem to be an error to omit GUID.
-dre
On Mar 18, 2015, at 11:19 AM, Gaurav Jain <monkeyfdude@gmail.com> wrote:
Full Stacktrace
Traceback (most recent call last): File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/local/lib/python2.7/site-packages/twisted/internet/_baseprocess.py", line 60, in maybeCallProcessEnded proto.processEnded(Failure(reason)) File "/var/caldav/CalendarServer-6.0/txdav/base/datastore/subpostgres.py", line 164, in processEnded self.deferred.callback(''.join(self.output)) File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 382, in callback self._startRunCallbacks(result) File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 490, in _startRunCallbacks self._runCallbacks() --- <exception caught here> --- File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 577, in _runCallbacks current.result = callback(current.result, *args, **kw) File "/var/caldav/CalendarServer-6.0/txdav/base/datastore/subpostgres.py", line 500, in gotStatus self.ready(*createConnection()) File "/var/caldav/CalendarServer-6.0/txdav/base/datastore/subpostgres.py", line 390, in ready self.produceConnection, self File "/var/caldav/CalendarServer-6.0/calendarserver/tap/caldav.py", line 1513, in subServiceFactory config, store=store, serversDB=serversDB File "/var/caldav/CalendarServer-6.0/txdav/who/util.py", line 75, in directoryFromConfig serversDB=serversDB File "/var/caldav/CalendarServer-6.0/txdav/who/util.py", line 245, in buildDirectory userDirectory.realmName, File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/src/twextpy/twext/who/xml.py", line 198, in realmName self.loadRecords() File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/src/twextpy/twext/who/xml.py", line 307, in loadRecords self.parseRecordNode(recordNode, unknownFieldElements) File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/src/twextpy/twext/who/xml.py", line 370, in parseRecordNode value = valueType(fieldNode.text) File "/usr/lib/python2.7/uuid.py", line 134, in __init__ raise ValueError('badly formed hexadecimal UUID string') exceptions.ValueError: badly formed hexadecimal UUID string
On Wed, Mar 18, 2015 at 11:09 AM, Gaurav Jain <monkeyfdude@gmail.com> wrote:
This was a valid XML in CalendarServer-5.2.2. It used to be 'user' now its 'record'
I could have a UID as 'gauravj'
<directory realm="Test Realm"> <record> <uid>0C8BDE62-E600-4696-83D3-8B5ECABDFD2E</uid> <guid>0C8BDE62-E600-4696-83D3-8B5ECABDFD2E</guid> <short-name>admin</short-name> <password>admin</password> <full-name>Super User</full-name> <email>admin@example.com</email> </record> <record>
* <uid>gauravj</uid> <guid>gauravj</gui*d> <password>some_password</password> <email>gauravj@example.com</email> <full-name>G J</full-name> <short-name>G</short-name> </record> </directory>
But I CalendarServer-6.0, I get
File "/usr/lib/python2.7/uuid.py", line 134, in __init__ raise ValueError('badly formed hexadecimal UUID string') exceptions.ValueError: badly formed hexadecimal UUID string
Could you please tell me if I could use the above xml with 6.0??
Best Regards,
_______________________________________________ calendarserver-users mailing list calendarserver-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/calendarserver-users
Hi, The path component in /calendars/users/____ is the UID value from the user record, which typically looks like a shortname. You can also use /principals/__uids__/____, where the missing component is the GUID. In cases where GUID is not specified in the record, the UID value appears to be usable instead. To see this all in action, use a web browser to load up /principals/users/foo (where ‘foo’ is a valid user UID). Note the Principal URL, Alternate URIs, and Calendar Homes. -dre
On Mar 18, 2015, at 1:44 PM, Gaurav Jain <monkeyfdude@gmail.com> wrote:
Thank you very much for clarifications.
I have one more question, for GET requests what is the identifier for the user
is it UID, GUID, short-name or emailAdress??
I mean in following URL
/calendars/users/_____$________/calendar.......what is the value of $ in DCS 6.0???
On Wed, Mar 18, 2015 at 1:36 PM, Andre LaBranche <dre@apple.com <mailto:dre@apple.com>> wrote: Hi,
This is OK:
<record type="user"> <uid>dre</uid> <guid>10000042-0000-0000-0000-000000000001</guid> <short-name>dre</short-name> <password>dre</password> <full-name>Andre LaBranche</full-name> <email>dre@apple.com <mailto:dre@apple.com></email> </record>
e.g.
andre@xomg [~/cs] % ./bin/calendarserver_manage_principals --search dre 1 matches found:
Andre LaBranche (user) UID: dre Record name: dre Email: dre@apple.com <mailto:dre@apple.com>
However, this is not OK:
<record type="user"> <uid>dre</uid> <guid>dre</guid> <short-name>dre</short-name> <password>dre</password> <full-name>Andre LaBranche</full-name> <email>dre@apple.com <mailto:dre@apple.com></email> </record>
Startup fails: 2015-03-18 13:32:47-0700 [-] [txdav.base.datastore.subpostgres#critical] Can't start or connect to postgres: badly formed hexadecimal UUID string
To summarize, UID can be a short string or an actual UUID, however GUID must be a UUID if it is present. It doesn’t seem to be an error to omit GUID.
-dre
On Mar 18, 2015, at 11:19 AM, Gaurav Jain <monkeyfdude@gmail.com <mailto:monkeyfdude@gmail.com>> wrote:
Full Stacktrace
Traceback (most recent call last): File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/local/lib/python2.7/site-packages/twisted/internet/_baseprocess.py", line 60, in maybeCallProcessEnded proto.processEnded(Failure(reason)) File "/var/caldav/CalendarServer-6.0/txdav/base/datastore/subpostgres.py", line 164, in processEnded self.deferred.callback(''.join(self.output)) File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 382, in callback self._startRunCallbacks(result) File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 490, in _startRunCallbacks self._runCallbacks() --- <exception caught here> --- File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 577, in _runCallbacks current.result = callback(current.result, *args, **kw) File "/var/caldav/CalendarServer-6.0/txdav/base/datastore/subpostgres.py", line 500, in gotStatus self.ready(*createConnection()) File "/var/caldav/CalendarServer-6.0/txdav/base/datastore/subpostgres.py", line 390, in ready self.produceConnection, self File "/var/caldav/CalendarServer-6.0/calendarserver/tap/caldav.py", line 1513, in subServiceFactory config, store=store, serversDB=serversDB File "/var/caldav/CalendarServer-6.0/txdav/who/util.py", line 75, in directoryFromConfig serversDB=serversDB File "/var/caldav/CalendarServer-6.0/txdav/who/util.py", line 245, in buildDirectory userDirectory.realmName, File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/src/twextpy/twext/who/xml.py", line 198, in realmName self.loadRecords() File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/src/twextpy/twext/who/xml.py", line 307, in loadRecords self.parseRecordNode(recordNode, unknownFieldElements) File "/var/caldav/CalendarServer-6.0/.develop/virtualenv/src/twextpy/twext/who/xml.py", line 370, in parseRecordNode value = valueType(fieldNode.text) File "/usr/lib/python2.7/uuid.py", line 134, in __init__ raise ValueError('badly formed hexadecimal UUID string') exceptions.ValueError: badly formed hexadecimal UUID string
On Wed, Mar 18, 2015 at 11:09 AM, Gaurav Jain <monkeyfdude@gmail.com <mailto:monkeyfdude@gmail.com>> wrote: This was a valid XML in CalendarServer-5.2.2. It used to be 'user' now its 'record'
I could have a UID as 'gauravj'
<directory realm="Test Realm"> <record> <uid>0C8BDE62-E600-4696-83D3-8B5ECABDFD2E</uid> <guid>0C8BDE62-E600-4696-83D3-8B5ECABDFD2E</guid> <short-name>admin</short-name> <password>admin</password> <full-name>Super User</full-name> <email>admin@example.com <mailto:admin@example.com></email> </record> <record> <uid>gauravj</uid> <guid>gauravj</guid> <password>some_password</password> <email>gauravj@example.com <mailto:gauravj@example.com></email> <full-name>G J</full-name> <short-name>G</short-name> </record> </directory>
But I CalendarServer-6.0, I get
File "/usr/lib/python2.7/uuid.py", line 134, in __init__ raise ValueError('badly formed hexadecimal UUID string') exceptions.ValueError: badly formed hexadecimal UUID string
Could you please tell me if I could use the above xml with 6.0??
Best Regards,
_______________________________________________ calendarserver-users mailing list calendarserver-users@lists.macosforge.org <mailto:calendarserver-users@lists.macosforge.org> https://lists.macosforge.org/mailman/listinfo/calendarserver-users <https://lists.macosforge.org/mailman/listinfo/calendarserver-users>
participants (2)
-
Andre LaBranche
-
Gaurav Jain