apple / ccs-calendarserver

The Calendar and Contacts Server.
https://www.calendarserver.org
Apache License 2.0
486 stars 136 forks source link

Regression between r7850 and r7985: cannot login anymore #355

Closed macosforgebot closed 13 years ago

macosforgebot commented 13 years ago

mail@… originally submitted this as ticket:460


I tried to update my calendar server today.

But the system totally broke, I cannot login anymore.

When visiting the side with firefox I get:

Unauthorized
You are not authorized to view the resource at /calendars/. Perhaps you entered a wrong password, or perhaps your browser doesn't support authentication.

Downgrading makes it work again.

In the logs I have:

2011-08-13 19:02:30+0200 [-] [caldav-0]  [HTTPChannel,4,92.201.116.230] [twext.web2.server#info] GET /calendars/ HTTP/1.1
2011-08-13 19:02:30+0200 [-] [caldav-0]  [HTTPChannel,4,92.201.116.230] [twistedcaldav.directory.digest.DigestCredentialsMemcache#debug] Getting Cache Token for '1814181732836391079733155546'
2011-08-13 19:02:30+0200 [-] [caldav-0]  [HTTPChannel,4,92.201.116.230] [twistedcaldav.memcachepool.MemCachePool#debug] Busied client: <twistedcaldav.memcachepool.PooledMemCacheProtocol instance at 0x94f702c>
2011-08-13 19:02:30+0200 [-] [caldav-0]  [HTTPChannel,4,92.201.116.230] [twistedcaldav.memcachepool.MemCachePool#debug] Clients #free: 0, #busy: 1, #pending: 0, #queued: 0
2011-08-13 19:02:30+0200 [-] [caldav-0]  [PooledMemCacheProtocol,client] [twistedcaldav.memcachepool.MemCachePool#debug] Freed client: <twistedcaldav.memcachepool.PooledMemCacheProtocol instance at 0x94f702c>
2011-08-13 19:02:30+0200 [-] [caldav-0]  [PooledMemCacheProtocol,client] [twistedcaldav.memcachepool.MemCachePool#debug] Clients #free: 1, #busy: 0, #pending: 0, #queued: 0
2011-08-13 19:02:30+0200 [-] [caldav-0]  [PooledMemCacheProtocol,client] [twistedcaldav.extensions#info] Could not find the principal resource for user id: felix

I have the following in my accounts.xml:

<!DOCTYPE accounts SYSTEM "accounts.dtd">

<accounts realm="Test Realm">
  <user>
    <uid>felix</uid>
    <password>****</password>
    <name>Felix Möller</name>
    <first-name>Felix</first-name>
    <last-name>Moeller</last-name>
    <email-address>*@*.de</email-address> 
  </user>
macosforgebot commented 13 years ago

@m0rgen originally submitted this as comment:1:⁠ticket:460


I suspect it's the recent change to the default value for the AugmentService in the config:

https://trac.calendarserver.org/changeset/7861/CalendarServer/trunk/twistedcaldav/stdconfig.py

The default prior to that change was to have an XML-based augment service using augments.xml. However, we needed a way to disable AugmentService completely (because the LDAP service now allows the augment info to come from the directory itself. So the new default is to not have an AugmentService if none is specified in the caldavd plist. It's likely you need something like this in your plist:

<!-- XML File Augment Service -->

<key>AugmentService</key> <dict>

<key>type</key> <string>twistedcaldav.directory.augment.AugmentXMLDB</string>

<key>params</key> <dict>

<key>xmlFiles</key> <array>

<string>augments.xml</string>

</array>

</dict>

</dict>

If you don't have an AugmentService explicitly specified, your XML directory records will not have 'enabled' set to True.

macosforgebot commented 13 years ago

mail@… originally submitted this as comment:2:⁠ticket:460


sagen thanks alot for commenting. Copying this auguments-default.xml to /etc/caldavd/auguments.xml indeed fixes the issue for me.

Better error messages would be appreciated ;)

Thanks for the fast help!

macosforgebot commented 13 years ago

mail@… originally submitted this as comment:3:⁠ticket:460


I think this is fixed with r7998?

macosforgebot commented 13 years ago

@m0rgen originally submitted this as comment:4:⁠ticket:460