Skip navigation.

Implementer's notes

What might get caught in the gears under the hood?

Posts tagged with "published"

Refreshed SubTLD/Public Suffix drafts

, , , ...

The drafts I have written about Opera's DNS heuristic used to check cookie domains and the online "subTLD" information system that I suggested to replace it have now been refreshed.

There are no changes in the DNS heuristic draft, but the subTLD draft have been updated based on my experience with implementing the Public Suffix (a.k.a. SubTLD or Effective TLD) support that is planned for future versions of Opera (well past v10.0). As a result, the certs.opera.com server which is used for Opera's online Root Certificate repository has now started hosting Opera's XML based Public Suffix List,
based on and generated from the Public Suffix List project's list. The XML files are also available as a single download (without the digital signature, under the Mozilla Tri-license (MPL, GPL, LGPL) from our online download location.

The drafts are available at

draft-pettersen-dns-cookie-validate-05.txt (archive)

draft-pettersen-subtld-structure-05.txt (archive)

See also the Rootstore update.

draft-pettersen-dns-cookie-validate-05.txt
draft-pettersen-subtld-structure-05.txt

Refreshed Internet Drafts

, , , ...

I've once again refreshed my HTTP Cookie and Cache related Internet Drafts. The drafts have been discussed here a couple of times before, but to summarize:

draft-pettersen-dns-cookie-validate-04.txt (archive)

This Draft describes Opera's current heuristical approach to avoid sending cookies to registry-like domains like co.uk (The "Cookie Monster Bug"). First discussed here.

draft-pettersen-subtld-structure-04.txt (archive)

This Draft describes an improved approach to handling the "Cookie Monster Bug", using an online black list of registry-like domains. Also first discussed here.

The Mozilla team's work on "Effective TLDs" is based on an early version of this suggestion. The result of this work is now available from PublicSuffix.org, and is AFAIK currently used for one or more features by Chrome Beta, FF3, and IE8 Beta.

To reduce the complexity of the specification, and to avoid excluding possible solutions, I have now removed the previous suggestions for how the repository should be generated, and just shortly mention some possibilies in the Appendixes.

draft-pettersen-cookie-v2-03.txt (archive)

This Draft describes the ideal solution to the "Cookie Monster Bug", that everybody starts using a new format for cookies that completely remove the problem. First discussed here.

draft-pettersen-cache-context-03.txt (archive)

This Draft describes a method for giving sites a method to tell the client that a group of webpages are related, which can be used to better organize logouts. First discussed here.

draft-pettersen-dns-cookie-validate-04.txt
draft-pettersen-subtld-structure-04.txt
draft-pettersen-cookie-v2-03.txt
draft-pettersen-cache-context-03.txt


W3C Web Security Context: User Interface Guidelines

, , , ...

The W3C's Web Security Context Working Group have just released the Last Call version of its "User Interface Guidelines" document, which is a set of recommendations for the security related UI in Web User Agents.

This specification deals with the trust decisions that users must make online, and with ways to support them in making safe and informed decisions where possible.



This document specifies user interactions with a goal toward making security usable, based on known best practice in this area. Subsequent testing of this specification will include conformance, interoperability, and usability testing.



If you want to comment on the document you are welcome to do so:

The W3C Membership and other interested parties are invited to review the document and send comments to public-usable-authentication@w3.org (with public archive) through 15 September 2008. We appreciate if comments follow these guidelines for writing good issues.




Refreshed Internet Drafts

, , , ...

I've just refreshed my HTTP Cookie and Cache related Internet Drafts. The drafts have been discussed here a couple of times before, but to summarize:

draft-pettersen-dns-cookie-validate-03.txt (archive)

This Draft describes Opera's current heuristical approach to avoid sending cookies to registry-like domains like co.uk (The "Cookie Monster Bug"). First discussed here.

draft-pettersen-subtld-structure-03.txt (archive)

This Draft describes an improved approach to handling the "Cookie Monster Bug", using an online black list of registry-like domains. Also first discussed here.

The Mozilla team's work on "Effective TLDs" is based on an early version of this suggestion.

draft-pettersen-cookie-v2-02.txt (archive)

This Draft describes the ideal solution to the "Cookie Monster Bug", that everybody starts using a new format for cookies that completely remove the problem. First discussed here.

draft-pettersen-cache-context-02.txt (archive)

This Draft describes a method for giving sites a method to tell the client that a group of webpages are related, which can be used to better organize logouts. First discussed here.

draft-pettersen-dns-cookie-validate-03.txt
draft-pettersen-subtld-structure-03.txt
draft-pettersen-cookie-v2-02.txt
draft-pettersen-cache-context-02.txt


New Cookie and Cache Internet-Drafts

, , , ...

I've just submitted updated versions of my HTTP Cookie and Cache related Internet-Drafts to the IETF.

I've covered the background for these drafts previously in these articles: Cookie-1, Cookie-2, Cache Context.

If you have comments, suggestions, corrections, etc., feel free to discuss them here, or directly with me. General discussion of the proposal should take place on the IETF's HTTP Work Group mailing list.

In a couple of days the drafts should become available in the IETF Internet-Draft repository at these locations:

draft-pettersen-dns-cookie-validate-02.txt

draft-pettersen-subtld-structure-02.txt

draft-pettersen-cookie-v2-01.txt

draft-pettersen-cache-context-01.txt


Archive copies can be found here:

draft-pettersen-dns-cookie-validate-02.txt

draft-pettersen-subtld-structure-02.txt

draft-pettersen-cookie-v2-01.txt

draft-pettersen-cache-context-01.txt

Extended Validation v1.0 approved

, , , ...

As I posted earlier on Opera Labs, work has been under way to create an improved process, Extended Validation (EV), for issuing web site certificates that can give a higher degree of assurance to the user that the SSL/TLS website in question really is who it claims it is, and how to tell the browsers that this process has been used.

Last week, after two years of work, the members of the CA/Browser Forum, a group consisting of many Certificate issuers (for example, Verisign, Comodo, and Entrust) and browser vendors (KDE, Microsoft, Mozilla, Opera), voted to approve Version 1.0 of the Extended Validation Guidelines.

These guidelines describe which steps a CA issuer must (at least) take in order to validate that the information given is correct, such as confirming the legal existence of a business or government agency, ownership of a domain, authorization to request a certificate, etc. Compliance with the guidelines is verified by regular independent audits.

This version of the guidelines also address certain concerns about what kind of businesses are eligible to get EV certificates.

When the certificate is issued, and installed on the server, a browser supporting EV will not just verify the signature on the certificate, it will also:

  • Verify that the certificate is still valid, and has not been revoked because of some problem [link to revocation article],
  • Check for the presence of one of the CA's EV policy indicators (EV-OIDs) in the
    certificate.


If all of this is OK, then the browser will display a visible indicator to the user that the certificate for the site has been issued in accordance with the guidelines. The indicator agreed upon by the browser vendors is a green security toolbar beside the address field, perhaps with a couple of other embellishments.

EV certificates have been issued for a few months based on a preliminary version of the guidelines, and have been recognized by IE7.

No public version of Opera currently supports EV, although we built a demo version with rudimentary EV support last year. Work is going on to produce a full version that supports EV, and we are planning to include support in "Kestrel".

Work in the CA/B Forum is by no means at an end, there are a number of other areas that need similar functionality as that provided by EV to SSL/TLS, as well as possible improvements of the current guidelines.

Stay tuned.

Introducing Cache Contexts, or: Why the browser does not know you are logged out

, , , ...

One of the Opera features I often see mentioned as "good" is our history navigation where you can navigate back and forwards in the history very quickly, and without making any revalidation/refetches of the content from the server.

This is made possible by our adherence to the principle stated in RFC 2616 (HTTP 1.1) section 13.13 about history list navigation.

13.13 History Lists

[...]History mechanisms and caches are different. In particular history mechanisms SHOULD NOT try to show a semantically transparent view of the current state of a resource. Rather, a history mechanism is meant to show exactly what the user saw at the time when the resource was retrieved.

By default, an expiration time does not apply to history mechanisms. If the entity is still in storage, a history mechanism SHOULD display it even if the entity has expired, unless the user has specifically configured the agent to refresh expired history documents.[...]



Unfortunately, now and then (such as just last week) there's somebody reporting this as a bug or even a "security issue". They are in particular using the Security Issue tag when the navigation happens on a site handling sensitive data, such as online banking, after the user has logged out.

Well, I can understand that online banking sites and other sites handling sensitive information do not want the client to show information retrieved from the site while the user was logged in, after the user has logged out. It's just that they forget a simple fact, inherent in HTTP: The browser does not know the user has (been) logged out, and currently there is no way for the browser to find out!

Somebody will probably now say "but cookies/no-cache/must-revalidate can be used for that". Not really. Let's look at each of these options:

  • Cookies: More precisely known as "HTTP State Management Cookies" are used to keep information about what is going on with respect to a given client and user. However, the browser does not know anything about what a cookie means, it just stores it, and sends it back to the server(s) that are supposed to receive it. That a cookie is deleted (such as during logout) does not mean anything special to the client, and in fact a site need not delete a cookie to mark a user as logged out, it can just change a flag in its own database, without telling the browser.

  • no-cache: This Cache-Control response directive may very well be the most misunderstood parameter in all of HTTP, quite likely because of its name, and its use in requests. There seems to be a significant belief that a client must never store a document served with this flag, or produce it as a result of clicking on a link. That is not the function of this directive. RFC 2616 sec. 14.9.1 states:

    no-cache

    [...] a cache MUST NOT use the response to satisfy a subsequent request without successful revalidation with the origin server. [...]


    This only means that when you click on a link, the client must first ask the server "Has this been modified since I loaded it?", and if the server says "No, it is not modified", then it may show it to you.

    This does not apply to history navigation, because "no-cache" defines the "expiration time" of the web page, nothing else.

  • must-revalidate: If "no-cache" is the most misunderstood parameter, "must-revalidate" may well be the most abused. According to RFC 2616 section 14.9.4:

    must-revalidate

    [...] When the must-revalidate directive is present in a response received by a cache, that cache MUST NOT use the entry after it becomes stale to respond to a subsequent request without first revalidating it with the origin server. [...]



    Opera may not quite follow the letter of this specification, but that is because of how the directive will normally be used. We treat this directive's presence as an indication that 1) the resource is expired (same as with "no-cache") and 2) during history navigation of secure sites a web page is revalidated before it is displayed to the user.

    You probably noticed the "secure site" condition. The reason for this is the aforementioned abuse of the "must-revalidate" directive. Quite a lot of sites (I have personally seen a lot of PHP powered Wikis with this problem) are sending the cache-directive combination "no-cache, no-store, must-revalidate", which to Opera means "check every time the user asks for it, even during history navigation, and do not store it on disk, only in RAM while we have it".

    What this means is that when you visit such as site (and all the directives are obeyed), then the browser will ask the server to validate the content (even statics) of each page (in some cases even images) every time, which results in very slow navigation. When we introduced "must-revalidate" the forums overflowed with "slow navigation" posts, and long-time Opera supporter non-troppo actually had to patch his Opera Wiki server to keep the problem at bay.

    This abuse is the reason why must-revalidate is only obeyed for secure sites.


As indicated above, some web service providers consider failure to revalidate after logout to be a potential vulnerability for their system. This has caused them to invest quite a lot of effort into ensuring that the browser behaves as they want it to. They have not just used the above mentioned cache directives, but also various scripting technologies.

The major drawback of all the current systems is that they will most often increase traffic to the website using them, thus increasing the load on the servers, which means that to stay operative they need even more servers, which means higher cost of operating the site.

All of it (trouble, wasted money, complaints, etc.) because they are not able to tell the browser that the user has been logged out.

So, how can this be solved in a more economic and predictable manner?

A solution should have the following requirements:

  • The user should be able to navigate history as normal while logged in, no revalidation should take place.
  • Already loaded resources should not be refetched unless the proper functioning of the site requires it (for example, the account page should display the current amounts when the user click on a link going to the accounts summary page)
  • When the user is logged out, all sensitive documents should be removed, and if they are still in history, they should be revalidated with the server before being displayed to the user.

This set of requirements indicates that the server should have a way to tell the browser

  1. That a page is part of the sensitive document group.
  2. When the user is logged out (or should be logged out).


I've recently written, and submitted to the IETF, a document describing a system that tries to solve these problems: Cache Contexts.

In this new system the server uses a Cache Context directive to tell the browser that the document(s) served are part of a specific group of documents, a "context", and when the context has ended its usefulness, the server can discard it, which will also tell the browser that the documents in the context should no longer be displayed to the user, unless they have been confirmed by the server.

The server can tell the client how long it should let the documents in the context live, and it may also connect the lifetime of a context to the lifetime of a cookie; when the cookie is deleted, all the documents in the context are deleted, too.

These are just some of the features offered by Cache Contexts.

If you are interested, it will be available from the IETF's Internet Draft repository in a couple of days. If you cannot wait, a copy of it can be found here.

If you have comments, suggestions, corrections, etc., feel free to discuss them here, or directly with me. General discussion of the proposal should take place on the IETF's HTTP Work Group mailing list.

draft-pettersen-cache-context-00.txt

Introducing Extended Validation Certificates

, , , ...

Last year it became clear that the procedures for verifying data used to issue SSL certificates (and other types of certificates) were not as uniform as might be desired. This led to a situation where information in certificates might be misleading.

Certificates are specially formatted documents used to identify certain entities -- persons, companies or (in our case) Web sites -- and associate them with a given public encryption key and its associated private key. A user can use this public key to verify documents digitally signed by the associated private key held by the identified entity. Alternatively, the user can use the public key to send encrypted information to the certificate's owner that can only be decrypted by that private key.

Certificates are valid for a certain period and are signed by a Certificate Authority (CA), whose name is identified in the Web site's certificate. This certificate is either signed by another CA, or it is (self)signed by the CA itself, with the private key assiociated with the public key in the certificate. In the first case the CA is called an intermediate CA (one that has been authorized to act as a CA by another CA), in the other case the certificate is called selfsigned, and the CA is called a Root CA. The Root CA certificates are the certificates that are preinstalled in clients because your only way to verify the Root CA is to have your own copy that you can use as a reference.

This sequence of Web site certificate, intermediate CAs and the Root CA is called a certificate chain. This certificate chain links the Web site's certificate to a trusted root in the browser's root certificate store through a chain of digital signatures. If it does not, your browser will tell you so.

To increase the usefulness of (in particular) SSL certificates and reduce the likelihood of misleading or incorrect information being placed in certificates, the browser vendors, the Certificate Authorities (CAs) and several others, such as the Information Security Committee of the American Bar Association, WebTrust and the Anti Phishing Working Group created the CA Browser Forum.

The forum's goal is to create a set of guidelines for how certificates used for sensitive online transactions, such as payments, are created and how the information contained in them is checked before the certificate can be issued. The guidlines also specify what kind of controls browsers should perform before indicating that the certificates have been issued according to these guidelines.

Some details, like the general UI (for example a green security toolbar, as suggested by Microsoft) and how the certificates should be identified were decided early, when the browser vendors met in Toronto1, 2, 3, 4 last year.

That was the easy part.

The more difficult part was finding methods that to a reasonable and satisfactory degree can confirm that

  • A Web site is owned and controlled by a given legal entity.
  • That this entity has the right to control the Web site.
  • Collect enough information so that it would be easier to find the Web site owner if necessary.


All of these procedures must also be possible for an auditor to verify.

There were some things that were not realistic to achieve, such as proving that the Web site owner is a law-abiding citizen, is trusthworty and reputable, and so on, or that it is safe to do business with the owner. These are critera that are far too subjective, and even if they are true at one point, that might change very quickly.

These guidelines are intended to raise the information quality of the certificates. For anyone wanting to engage in criminal activity, the guidelines also raise the bar in terms of cost, time-wise and financial, and the risk of getting caught.

What do the EV Guidelines demand?

Before issuing a certificate a CA must (for example) make sure that

  • The company is a valid legal entity in its jurisdiction
  • The person(s) signing the contract are authorized to do so.
  • The company owns the domain of the server, or is authorized by the owner to use the given server or domain.


There are also requirements for the procedures the CA must use when issuing a certificate, and what data must be included in the certificate.

All of the procedures must be audited regularly (yearly) by a WebTrust auditor (or equivalent), and if the CA fails an audit, the certificates it has issued can no longer be recognized as EV certificates.

On the browser side we must perform several checks of the certificate before we can turn on the Extended Validation indicator:

  • We must (of course) check that the certificates verify correctly (that is, the signatures are OK, and trace back to a known Root CA, and none of the certificates have expired).
  • Additionally there are requirements for the level of encryption that must be used in the certificate, as well as for the connection.
  • Then we must verify that not just the site's certificate, but all the intermediate CA certificates in the chain (but not the root) are still valid, and has not been revoked by the issuer. This will be done using OCSP (Online Certificate Status Protocol) and/or CRLs (Certificate Revocation Lists) which are regularly updated by the CA to include certificates that for some reason are no longer valid and has been revoked. A certificate can be revoked for many reasons such as when a new certificate has been issued, the private key has been stolen, or that fake data was used to get the certificate.
  • Each EV certificate will contain at least one special identifier that marks it as an EV certificate, an EV-OID, that must also be included in all the intermediate CA certificates.
  • To be recognized by the client as an EV certificate the EV-OID must be associated in the certificate store with the certificate of the Root CA. This association is contingent on the Root CA passing the yearly EV compliance audit. If the audit fails and the problems are not quickly resolved so that the CA passes a new audit, the EV-OIDs associated with the Root CA are removed during a regular update of the associations, and the certificates issued from this Root CA will no longer be recognized as EV certificates


Once a certificate has passed all these checks, the client can turn on the Extended Validation indicator, usually a green security toolbar (which in Opera is normally yellow).

Implementation plans

Current plans among the CAs are to start offering EV early 2007, when the first EV update of IE7 is planned.

Opera has not yet implemented complete support for what is needed for Extended Validation, but work is underway:

  • Opera has supported OCSP verification of certificates since version 8.0, but CRL support is not yet implemented.
  • Some of the necessary functionality have been tested in an internal demo version (see screenshot), based on a weekly release from March 2006.


There is a lot more that needs to be implemented before we can release a version with support for EV, but we will do so When It's Ready.

Stay tuned.


This article is also available on Opera Labs.

Updated Internet Drafts about HTTP cookie domain validation

, , , ...

A while back I submitted two Internet Drafts that try to fix a problem with limiting which domains a cookie can be set for (known as the "Cookie Monster Bug"), one using DNS to validate the domain (the method Opera is currently using), and one using a new protocol to retrieve information that can be used to validate the domain.

Reception to the drafts was mixed, as mentioned earlier some in the DNS/Registry community do not like the methods proposed because of the assumptions made about the DNS hierarchy. On the other hand the Mozilla developers have already started implementing a modified version of the -00 SubTLD draft.

I have now submitted updated drafts to the IETF.

The DNS validate draft is almost unchanged, there's just been some minor tuning.

The SubTLD draft has been updated with a new XML based file-format that makes the format more expandable and more readable. Thanks to Anne van Kesteren for the helping me with that.

These drafts, and the Cookie v2 draft I submitted last week are the alternatives we at Opera have been able to see for how to solve the cookie domain limitation problem. We would like suggestions not just for how to improve our proposals, but also alternative proposals (please consider submitting them as IETF Internet Drafts) that will fix the problem more efficiently that ours do.

While suggestions can be submitted directly to me, I would recommend that discussions be held in the IETF HTTP WG mailing list.

Links to the IETF Internet Drafts repository:

DNS Validate
SubTLD

Archive copies:

DNS Validate: draft-pettersen-dns-cookie-validate-01.txt
SubTLD: draft-pettersen-subtld-structure-01.txt

A new HTTP Cookie recipe

, , , ...

A while ago I presented some thoughts about whether or not a new specification for HTTP cookies is needed to address problems with limiting cookies to a real site's domain, and not to multiple sites within a registry-like domain, such as co.uk and city.state.us, a problem that I've also discussed earlier.

I've just submitted an Internet Draft that proposes some of the suggestions I put forward in my previous article.

Compared to RFC 2965, which my draft is based on, the document removes two of the attributes, replacing them with new attributes that change the domain and path rules of cookies, respectively making the server and default path define the widest domain and path distribution possible.

The draft will be available from the IETF's Internet Draft repository, but I'm also making an archive copy available here

Comments, suggestions and alternative solutions are welcome either directly to me, or in the IETF HTTP WG mailing list after the draft has been announced there (That is also where broader discussion of the issues should take place).

draft-pettersen-cookie-v2-00.txt
November 2009
S M T W T F S
October 2009December 2009
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30