Previous month:
October 2014
Next month:
March 2015

November 2014

Running Thinktecture Identity Server v3 with ASP.NET vNext on Ubuntu

Thinktecture was at the MVP Summit 2014 ASP.NET Hackathon: after Dominick and Brock had Identity Server running on ASP.NET vNext, I took a stab at getting that code working on Linux/Ubuntu.

For this I needed to clone and build Mono as there are a couple of necessary patches which are not yet in any released Mono build (see this blog post for details).

This is a very easy thing to do on Ubuntu:

git clone git://github.com/mono/mono.git
cd mono
./autogen.sh --prefix=/usr/local
make
sudo make install


After this executed successfully – bring … some… time! – we have the latest Mono version:

image

Next thing to do is bringing Kestrel as the HTTP server into the picture:

{
    "webroot": "wwwroot",
    "version": "1.0.0-*",
    "exclude": [
        "wwwroot"
    ],
    "packExclude": [
        "**.kproj",
        "**.user",
        "**.vspscc"
    ],
    "dependencies": {
       "Kestrel": "1.0.0-*",
        "Microsoft.AspNet.Server.IIS": "1.0.0-beta1",
        "Microsoft.AspNet.Owin": "1.0.0-beta1",
        "Microsoft.AspNet.Diagnostics": "1.0.0-beta1",
        "Microsoft.AspNet.WebApi.Owin": "5.2.2",
        "Microsoft.Owin": "3.0.0",
        "Thinktecture.IdentityServer.v3": "1.0.0-beta3-1",
        "Thinktecture.IdentityModel.Core": "1.2.0",
        "Microsoft.Owin.Security": "3.0.0",
        "Microsoft.Owin.Security.Google": "3.0.0",
        "Microsoft.Owin.Security.OpenIdConnect": "3.0.0"
    },
    "commands": {
        "Kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5005",
    },
    "frameworks" : {
        "aspnet50" : { }
    }
}


As Identity Server comes with its own Test X509 certificate it is necessary to import this cert into the Mono certificate store – like this:

certmgr -add -c -p idsrv3test -m My idsrv3test.pfx

One thing that was left to get IdSrv finally running successfully was working around a bug in the ASP.NET vNext HTTP abstractions (GitHub issue – it has already been fixed Smile).


Once that was sorted out – tadaa!

image

Hope that helps.