Re: [hybi] hybi Digest, Vol 51, Issue 14

Takeshi Yoshino <> Thu, 06 June 2013 04:18 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 85F7911E80D3 for <>; Wed, 5 Jun 2013 21:18:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, NO_RELAYS=-0.001]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id dF6Zs+pNIWDt for <>; Wed, 5 Jun 2013 21:18:53 -0700 (PDT)
Received: from ( [IPv6:2a00:1450:4013:c01::236]) by (Postfix) with ESMTP id 36F8E11E80E4 for <>; Wed, 5 Jun 2013 21:18:52 -0700 (PDT)
Received: by with SMTP id r16so2154038ead.41 for <>; Wed, 05 Jun 2013 21:18:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=y3yk2HRFmEetD5BZhaYuvp9IahpjortEgd4pvI8hN0o=; b=C6TXGIJZPz3PSLRrQl4nmyMoUFY6UbaYsZU/VdEk5Edckl0YoxEHjGAIxk8niNOhJW XzuVxj2nhXxVvMdw2N8YM76ptPyxscE041Qc38w8RGnAlVwPSN3fPodMOONBego6+Xg+ 36VhKiccYIaoESfgTN7j8odAkbrG9odjbuvRhUWuQ/QpHsEB4nPfVTD61ZX1ogks54Wu uVFeu/yHqtkDxN38crPg9NOcMyEjXCK1x9cVxe4ETN8d4BSnZBaLIggzSr2EXgJkWmhg UjTWXYFzCczfvm+ZfA2byFOhBfoq80FnUrtIQuY5gm2SI0t9g7MWAyh5Px8jlhoMR2I8 3PvA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:x-gm-message-state; bh=y3yk2HRFmEetD5BZhaYuvp9IahpjortEgd4pvI8hN0o=; b=o71+YTodGGlbVBop+TRDbStkv53Uu1Qh+hbvJC0MUxMK7m7gw5k9Y+QuCkIL590VRz eVzkei55zNZJkumpPDgXgqXQiAe6AoQwj8owu/IK7OWEgzX+b9ZiZ9X5smAS02D/qzmK XZ1+c6w5Y1YnffNGHej7nqB4SoTgd3FUvlof7pZx+OYZaiHVUYmSiOVLMFkWD1Cylngc M3ynfBgzmZWvCxM7vWESIK0Cfu04RSQCoG5ZVrfmEQZQ3Erdf086Qhm02/T17cC56GLB jzxXn9KdSfLZ3CCd+B9gELjykWVJrEWZEjxyf0ZvHcVNvam4+p5HTPmOXVhrOxY2UylE Ohfw==
X-Received: by with SMTP id a14mr31768900eev.152.1370492332117; Wed, 05 Jun 2013 21:18:52 -0700 (PDT)
MIME-Version: 1.0
Received: by with HTTP; Wed, 5 Jun 2013 21:18:31 -0700 (PDT)
In-Reply-To: <>
References: <> <> <> <>
From: Takeshi Yoshino <>
Date: Thu, 6 Jun 2013 13:18:31 +0900
Message-ID: <>
To: Scott Morgan <>
Content-Type: multipart/alternative; boundary=089e016352109fc63904de749ca5
X-Gm-Message-State: ALoCoQmvGu2mZc67A1iseYR9PWXyjGSquZzMjnTJFIld2j6mV2tpbEER1L8BTUMHNfbBiUlCSS9FjFAsntsIrkKxkWd2eLzmfQL3pvDEnhiTcTFD8b2nDBkUlmgHrN0C0EInUhH8okiGhUAvaljaJdnrd4Fu+XyuuAQZsUV1wKSIEkWowglAxDil4yH0Ml0hvA/HeSL2qhXK
Cc: "" <>
Subject: Re: [hybi] hybi Digest, Vol 51, Issue 14
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Server-Initiated HTTP <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Thu, 06 Jun 2013 04:18:54 -0000

On Sun, Jun 2, 2013 at 2:55 AM, Scott Morgan <> wrote:

> On Tue, May 28, 2013 at 10:36 PM, Takeshi Yoshino <>wrote;wrote:

>  Could you elaborate?
> Yes and actually I am going to change the way I do this after reading the
> rfc.   I am going to use regular http(s) for the authentication part so
> this would change to the following.
> 1 Browser sends authentication to the server over https
> 2 Server notes the ip address of the request and responds with a ws url to
> the client if successful ie.  wss://
> 3 Browser connects to url wss://
> 4 Server checks the ip address of the original https request with the wss
> connection
>     to make sure they are the same, and takes appropriate action (closes
> the wss connection if they are NOT, or some other appropriate action)

I see.

>  1 Browser connects to a wss server
>>> 2 User does some authentication (ie user id, password)
>>> 3 wss server does authentication using user id, password and ip address
>>> (for either some privileges or as a additional authentication parameter
>>> for a success fail style authentication)
>> That is that only access from some IP address X will have some high
>> privilege?
> Yes the ip address of the user may allow the user to gain additional
> privileges, ie something like;
> John logs in to the Bank from a public computer he can't do much, but see
> the accounts.
> John logs in from his office (and the office ips addresses are marked as
> secure locations)
>   he gets to transfer money
Sounds fine.

> Note my application is not a bank application, this is just a example.
>>>  4 after successful auth message at the browser an the wss connection
>>> is closed
>>>  and a different wss is opened on the same port with a different path in
>>> the url
>>> 5 The wss server only allows the different wss connection to open if
>>> there is a http session from the original wss connection from the same ip
>>> address of the first connection.
>> Does the server get a session parameter over the new connection and also
>> check the source IP address? Or the server here just checks if there was
>> successful authentication on some prior connection with the same IP address
>> as the new one?
> My main goal was to attempt to validate the IP address of the sender by
> comparing the ip address of multiple connections, (originally both wss, now
> https and wss).

Even without multiplexing, it's possible that both auth and application
traffic come over the same TCP connection. RFC 6455 doesn't prohibit using
the same TCP connection for HTTPS and WSS. It's not about multiplexing but
keep-alive. IIRC, it's still under discussion but technically you can do an
HTTPS for auth and then send WS handshake on the same connection.