10 ms·
Google's CardDAV server isn't standards compliant (2014)
- jacquesm 9y agoI can confirm just about all of this because of a recent job in this space. Whatever you do, do not do two way sync with Google's CardDAV servers or you will end up with a lot of lost data. I wonder if they should even be allowed to call it CardDAV since you'd expect it to actually adhere to the standard. Google is large enough not to care about this though, as long as it works with their address books on Android phones it is probably good enough for them. Note that this post seems to be from 2014 and the situation isn't much better today!
- jtbayly 9y agoYes, I’ve actually lost data because of this... :/
- leephillips 9y ago"Google is large enough not to care about this" They also operate "SMTP servers" that violate the applicable RFPs, have done so for many years, and are not concerned about the potential damage that can result: https://lee-phillips.org/gmailRewriting/ https://lee-phillips.org/gmailRewriting/
- NateyJay 9y agoThis does suck, but you can actually use From: aliases if you set them up first in the Gmail interface. You also have to enable two factor auth. Hard to be too mad about spam fighting measures.
- leephillips 9y agoSounds like I need to update my article. Thanks for this information. But note that they are still violating the RFPs, if they rewrite headers for people who fail to jump through these hoops. They can implement their spam protections (if that's the purpose) while remaining compliant by rejecting the emails in question.
- Aelius 9y agoMaybe I've misunderstood something, but if gmail didn't do this, what's to stop me from sending emails that look like they come from your address?
- leephillips 9y agoNothing. The standard allows you to put anything you want in the From: header. Sometimes I send emails from Santa Claus or God. The envelope information is still there.
- leephillips 9y agoActually, not "nothing." If the MSA doesn't like this, it is free to reject the email. But not to change its content.
- ebikelaw 9y agoYou don’t seem to understand the standards you are complaining about. You are using mail submission, not relaying. RFC5321 specifically says that it does not cover submission, and defers to RFC4409 (3.6.1) which specifically allows From header rewriting (8.8). If you’re going to complain about the standards-compliance of other people's services it’s important to understand the standard first.
- leephillips 9y agoI discuss exactly this in the article. I even referred to sec. 8.8 (of the current 6409; 4409 is superseded (but 8.8 is the same)).
- ebikelaw 9y agoYeah but you don’t seem to really grok it. “ The MSA MAY rewrite local parts and/or domains in the SMTP envelope and, optionally, in address fields of the header, according to local policy.“ Generally MSAs are permitted to do almost anything. Your reading of the RFC which requires MSAs to merely reject instead of modifying messages is not backed by any of the language in the RFC. Essentially, you seem to misunderstand “may” “must” and “should” as used in these documents.
- leephillips 9y agoYou're extracting one sentence out of several paragraphs. The following paragraph restricts the permissible rewriting, and Google is going beyond what is permitted. If your interpretation differs from mine, that's fine. I don't think you need to support your view by selective quotations and accusing me of not being aware of what I explicitly dealt with. The meaning of the whole section is clear, and I stand behind what I wrote.
- ebikelaw 9y agoAgain, the only thing that seems clear here is that you don't know how to read an RFC. The only "must not" in 8.8 is the prohibition of changing the destination local parts. "must not" appears nowhere else in section 8, and 8 is not strongly prescriptive as it "describes a number of such modifications that are often considered useful". The described modifications are not thought to be exhaustive. Moreover, 5321 describes MSA as "arrangements are private and fall outside the scope of this specification, they are not described here." 5321 does not control MSA and 4409/6409 do not defer to 5321 on any point. 4409/6490 do _refer_ to 5321, of course. There are only 5 MUST NOTs in 6409 and there are zero SHOULD NOTs. The standard permits the MSA to do pretty much anything it wants to do. I think you should begin by reading 2119 "Key words for use in RFCs to Indicate Requirement Levels".
- leephillips 9y agoAfter considering some of the comments below, I retract my statement that Google is violating the relevant RFPs. They are operating their servers in violation of reasonable user expectations, and potentially causing harm in doing so, but they are still, strictly speaking, in compliance. I plan to update my article to reflect this.
- digi_owl 9y agoGoogle, Microsoft, both wants to put us in a cage and milk us for every cent. Perhaps even Apple, but their cage seems to have a bit more gilded...
- criddell 9y agoI doubt their poor compliance to standards is done maliciously. I'm guessing it's more about needing some service, finding an open standard or code that does what they need, making changes that are convenient for them, then moving on to the next project.
- walshemj 9y agoAh just like when I worked in x.400 Sprint was notorious for just ignoring stuff in the standard. Also Goole doesn't even parse the date time in xml sitemaps 100% correctly and that's only a 4 page RFC!
- IntronExon 9y agoHow is that kind of carelessness not a form of malice?
- criddell 9y agoYou think on some PowerPoint a manager had the bullet: * break compatibility with Outlook
- IntronExon 9y agoNo, but I think a huge company saying, “Oh who gives a tupenny fuck about compatibility” is sort of malicious.
- enzolovesbacon 9y agoI don't think they have a "compatibility" slide anywhere at all at Google.
- 9y ago
- Tepix 9y agoQuote from the DAVdroid project: Address books, calendars and task list contain private and sensitive data by their nature. We believe that individuals and companies should be able to be in full control of their own data. This means the freedom to choose where and how the data are stored, and freedom in choice of software. CalDAV/CardDAV are open protocols and thus can be used with various server and client software. Setting up your own CalDAV + CardDAV server such as Radicale is easy. Chances are if you are reading HN, you can do it yourself. Do it.
- Avamander 9y agoCan you recommend any good webGUIs when running my own CalDAV server? I'm struggling to find one and I really need one.
- 1wilkens 9y agoI've found infcloud [0] to be decent. It's a bit messy to set up but the config file is extensively documented and you generally only need to touch it in the initial setup. [0]: https://www.inf-it.com/open-source/clients/infcloud/ https://www.inf-it.com/open-source/clients/infcloud/
- synchrone 9y agoFor CalDAV: http://agendav.org/ http://agendav.org/ is much prettier than infCloud, but actually has it's own php-backend and mysql database. A bit heavier and is not strictly only-CalDAV. Could be a viable solution though. For CardDAV: https://github.com/owncloud/contacts https://github.com/owncloud/contacts could be used as a frontend, since it advertises it's talking to CardDAV-backend, but it's not actually deployable as a standalone interface. It's better than infCloud both architecture-wise and UI-wise, and could be the best opensource solution available, if you're willing to adapt this frontend to stand-alone usage (or integrate into whatever you need it for)
- kennydude 9y agoNextcloud works for me
- 9y ago
- nik736 9y agoIn the CalDAV space a lot of people do whatever they want, so there is a standard but most people are not compliant with it. I would imagine the same is true for CardDAV, not only at Google.
- torarnv 9y agoTangent: What are people's experience with Google's CalDAV support? Is it just as bad?
- untitaker_ 9y agoIt isn't. CalDAV is a separate team. The support is quite good. The deviations from the standard are documented.
- yosamino 9y ago> this isn’t just a 400 Bad Request [...] Any (valid) vCard that the CardDAV server does not understand, will result in our HTTP requests timing out That's just terrible. Why would such a thing be implemented ? The only valid explaination I can think of, is to deter abuse. But even for that there are better solutions than this.
- thrillgore 9y agoI get the sense that Google cared about open protocols, and then Android changed that, to simply being another mechanism to lock users into their walled garden.
- djsumdog 9y agoI don't think you can pin the change on Android. It's a slow progression at Google from the days of the unofficial "don't be evil." Even their official standards have been awful. IMAP was, and still is, hopelessly broken on gmail. Where GTalk once had XMPP with federation, they silently removed federation and XMPP entirely. I didn't realize how bad their Card/Caldav implementations where because I switched to Radicalie back in 2013. There just isn't any money is letting users access and control their own data in a standard way.
- drawkbox 9y agoGoogle doesn't like existing standards, and have generally been bad stewards of their power in that place, they like to make new ones though that they expect everyone to jump on. I am wondering if the engineers and product developers are still in charge at Google?
- gumby 9y agoThis (good, but sad article) is actually about "How" it's different, not "Why". Why don't they care at all about standards? I don't know; they talk a good game. At least some companies who violate standards are open about it -- Google trumpets it but often simply pays lip service.
- nolok 9y agoI think to get past such issues with providers like this, you first need to understand what it is and what it is not. Forget the brochure, the ads and the nice tutorial, those are NOT CardDAV/SMTP/IMAP/... servers. What they are instead are ways to access their own proprietary special thing using standard protocols that your software and tools already supports, if you can't use the dedicated api. It applies to pretty much every system for which Google has made their own thing, with their own api (contact api, mail api, ...), and then offer an alternate way to access their system by standard protocols. And what this means is that the ruling system is the underlying one, the one which can be accessed in several ways, including that standard protocol. If their contact system discards the field "foobar" because it doesn't want it, then it doesn't matter if CardDAV says it should be kept. Sure Google should totally make this clearer, and sure as an user I'm not a big fan, and yes I totally understand and agree with the "but as a result they break the standard, lose data and cause unexpected behavior and that's terrible", but from a purely engineering perspective it also makes total sense as to why those things happen this way, and is actually rather predictable. You're feeding data to a special system that just so happens to have a CardDAV/SMTP/IMAP/... endpoint plugged on top of it. Of course that endpoint doesn't rule how the special system will behave. And frankly any one who has had to build/support that kind of "api on top of an api" for some time has faced that sort of situation before. In fact you don't need to go that far; I mean how many of your web applications take PUT or DELETE requests ? The HTTP protocol certainly says it should work and the http server you're using supports it. And let's not talk about all those sites that give a full page answer to a HEAD request. PS: again, I am most definitely NOT saying I like that it works that way, I'm just saying ... "well no big surprise there".
- untitaker_ 9y agoThe distinction between being a "real CardDAV server" and being a server that exposes CardDAV is undefined and irrelevant, possibly non-existent. There is a spec, and if you implement it, you have a server that implements that spec. That's it. You can of course deviate from certain parts of the spec... dropping unknown fields as you mentioned might be a reasonable tradeoff. But then that deviation has to be documented. It isn't. You're completely leaving out the other issues that the author describes: Timing out TCP sessions, discarding UIDs. Both things are not reasonable design choices in any world. And then the response to bug reports.
- splitrocket 9y agoAhh, the good old days of “embrace and extend” are back. Delightful.
- captn3m0 9y agoRelevant: The author of the post worked on Sabre/dav, an open source CardDAV/CalDAV server (linked at bottom of the post). Unfortunately, it is no longer under development: http://sabre.io/blog/2017/development-on-hold/ http://sabre.io/blog/2017/development-on-hold/
- treve 9y agoA bunch of people have since picked up development and are working on new releases.
- smhg 9y agoSlightly related: try to sync an external calendar feed in iCalendar format (also used in CalDAV) with Google Calendar. Google Calendar will use random intervals to synchronize. Often taking more than 24 hours... which is, in most use cases, quite useless. Sync in the same way with Facebook's event feed (same format) and changes appear within minutes. This has been the case for years. Google Groups are full of questions about this. I don't want to demand anything from a free product (Google Calendar is very useful in many ways). But somehow some feedback about 'shortcomings' like these would be hugely appreciated.
- remusrm 9y agoThis explains why the hell I kept loosing contact info when exporting to other web clients. Always something was missing or out of place! F U Google!
- privateSFacct 9y agoMy impression is that https://developers.google.com/people/v1/libraries https://developers.google.com/people/v1/libraries Is the current recommended solution for this sort of thing. Libraries look to be available for GO JAVA JAVASCRIPT .NET NODE.JS OBJ-C PHP PYTHON RUBY and you can roll your own using HTTP. CardDAV is not well maintained, and even the contacts API using GData is superseded with the above. With over 1 billion active users - my guess is engineering efforts are focused on serving that customer base, especially the growth in paying customers through google apps. Not sure where strict compliance with CardDAV would fall in the analysis. A note that actually using some of these API's through their client libraries isn't totally the nightmare described - though my experience is very limited.
- forgotmypw 9y agoEmbrace, Extend, Extinguish.