{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/8712","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/8712/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/8712/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/8712/events","html_url":"https://github.com/dotnet/corefx/issues/8712","id":155974070,"number":8712,"title":"JwtBearer validation failes on osx but works on windows","user":{"login":"Tratcher","id":1821173,"avatar_url":"https://avatars.githubusercontent.com/u/1821173?v=3","gravatar_id":"","url":"https://api.github.com/users/Tratcher","html_url":"https://github.com/Tratcher","followers_url":"https://api.github.com/users/Tratcher/followers","following_url":"https://api.github.com/users/Tratcher/following{/other_user}","gists_url":"https://api.github.com/users/Tratcher/gists{/gist_id}","starred_url":"https://api.github.com/users/Tratcher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tratcher/subscriptions","organizations_url":"https://api.github.com/users/Tratcher/orgs","repos_url":"https://api.github.com/users/Tratcher/repos","events_url":"https://api.github.com/users/Tratcher/events{/privacy}","received_events_url":"https://api.github.com/users/Tratcher/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/corefx/labels/bug","name":"bug","color":"207de5"},{"url":"https://api.github.com/repos/dotnet/corefx/labels/os-mac-os-x","name":"os-mac-os-x","color":"fef2c0"},{"url":"https://api.github.com/repos/dotnet/corefx/labels/System.Security","name":"System.Security","color":"d4c5f9"}],"state":"open","locked":false,"assignee":{"login":"bartonjs","id":10642668,"avatar_url":"https://avatars.githubusercontent.com/u/10642668?v=3","gravatar_id":"","url":"https://api.github.com/users/bartonjs","html_url":"https://github.com/bartonjs","followers_url":"https://api.github.com/users/bartonjs/followers","following_url":"https://api.github.com/users/bartonjs/following{/other_user}","gists_url":"https://api.github.com/users/bartonjs/gists{/gist_id}","starred_url":"https://api.github.com/users/bartonjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartonjs/subscriptions","organizations_url":"https://api.github.com/users/bartonjs/orgs","repos_url":"https://api.github.com/users/bartonjs/repos","events_url":"https://api.github.com/users/bartonjs/events{/privacy}","received_events_url":"https://api.github.com/users/bartonjs/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dotnet/corefx/milestones/4","html_url":"https://github.com/dotnet/corefx/milestones/1.1.0","labels_url":"https://api.github.com/repos/dotnet/corefx/milestones/4/labels","id":1248719,"number":4,"title":"1.1.0","description":"Features associated with 1.1.0 unfortunately won't make it into the initial 1.0.0 RTM release.  We are tentatively planning on shipping them in the initial feature release after 1.0.0 RTM.\r\n\r\nNo calendar date is set.\r\n\r\nhttps://github.com/aspnet/Home/wiki/Roadmap","creator":{"login":"joshfree","id":1302850,"avatar_url":"https://avatars.githubusercontent.com/u/1302850?v=3","gravatar_id":"","url":"https://api.github.com/users/joshfree","html_url":"https://github.com/joshfree","followers_url":"https://api.github.com/users/joshfree/followers","following_url":"https://api.github.com/users/joshfree/following{/other_user}","gists_url":"https://api.github.com/users/joshfree/gists{/gist_id}","starred_url":"https://api.github.com/users/joshfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshfree/subscriptions","organizations_url":"https://api.github.com/users/joshfree/orgs","repos_url":"https://api.github.com/users/joshfree/repos","events_url":"https://api.github.com/users/joshfree/events{/privacy}","received_events_url":"https://api.github.com/users/joshfree/received_events","type":"User","site_admin":false},"open_issues":458,"closed_issues":811,"state":"open","created_at":"2015-08-10T18:04:00Z","updated_at":"2016-06-21T20:32:23Z","due_on":"2016-11-30T08:00:00Z","closed_at":null},"comments":9,"created_at":"2016-05-20T14:20:54Z","updated_at":"2016-06-21T21:47:45Z","closed_at":null,"body":"_From @hsorbo on May 20, 2016 14:16_\n\nBeen struggeling with exceptions porting from rc1 to rc2 on os x. On windows it seems to work, but failes with this on os x. Im using RS256.\r\n\r\nAm i missing something?\r\n\r\n```\r\ninfo: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerMiddleware[7]\r\n      auth0 was not authenticated. Failure message: IDX10503: Signature validation failed. Keys tried: 'Microsoft.IdentityModel.Tokens.X509SecurityKey , KeyId: RkUxNDU0QTg0RTNCRTNEQjk5ODg5MDBGRjIxQTJFQkM0NThBODgwQg\r\n      '.\r\n      Exceptions caught:\r\n       'System.ArgumentNullException: Value cannot be null.\r\n      Parameter name: SafeHandle cannot be null.\r\n         at System.StubHelpers.StubHelpers.SafeHandleAddRef(SafeHandle pHandle, Boolean& success)\r\n         at Interop.Crypto.RsaVerify(Int32 type, Byte[] m, Int32 m_len, Byte[] sigbuf, Int32 siglen, SafeRsaHandle rsa)\r\n         at System.Security.Cryptography.RSAOpenSsl.VerifyHash(Byte[] hash, Byte[] signature, HashAlgorithmName hashAlgorithmName)\r\n         at System.Security.Cryptography.RSAOpenSsl.VerifyHash(Byte[] hash, Byte[] signature, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding)\r\n         at System.Security.Cryptography.RSA.VerifyData(Byte[] data, Int32 offset, Int32 count, Byte[] signature, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding)\r\n         at System.Security.Cryptography.RSA.VerifyData(Byte[] data, Byte[] signature, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding)\r\n         at Microsoft.IdentityModel.Tokens.AsymmetricSignatureProvider.Verify(Byte[] input, Byte[] signature)\r\n         at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateSignature(Byte[] encodedBytes, Byte[] signature, SecurityKey key, String algorithm)\r\n         at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateSignature(String token, TokenValidationParameters validationParameters)\r\n```\r\n\r\nThe setup code is fairly trivial:\r\n```\r\napp.UseJwtBearerAuthentication(new JwtBearerOptions\r\n            {\r\n                AuthenticationScheme = \"auth0\",\r\n                Audience = Configuration[\"Auth0:Audience\"],\r\n                Authority = Configuration[\"Auth0:Authority\"],\r\n                AutomaticAuthenticate = true,\r\n                AutomaticChallenge = true,\r\n            });\r\n```\r\n\r\n```\r\nbrew info openssl\r\nopenssl: stable 1.0.2h (bottled) [keg-only]\r\n```\r\n\r\n```\r\ndotnet --version\r\n1.0.0-preview1-002702`\r\n```\r\n```\r\nuname -a\r\nDarwin Macarena.local 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64`\r\n```\r\n\n\n_Copied from original issue: aspnet/Security#826_"},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/227582774","html_url":"https://github.com/dotnet/corefx/issues/8712#issuecomment-227582774","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/8712","id":227582774,"user":{"login":"bartonjs","id":10642668,"avatar_url":"https://avatars.githubusercontent.com/u/10642668?v=3","gravatar_id":"","url":"https://api.github.com/users/bartonjs","html_url":"https://github.com/bartonjs","followers_url":"https://api.github.com/users/bartonjs/followers","following_url":"https://api.github.com/users/bartonjs/following{/other_user}","gists_url":"https://api.github.com/users/bartonjs/gists{/gist_id}","starred_url":"https://api.github.com/users/bartonjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartonjs/subscriptions","organizations_url":"https://api.github.com/users/bartonjs/orgs","repos_url":"https://api.github.com/users/bartonjs/repos","events_url":"https://api.github.com/users/bartonjs/events{/privacy}","received_events_url":"https://api.github.com/users/bartonjs/received_events","type":"User","site_admin":false},"created_at":"2016-06-21T21:47:45Z","updated_at":"2016-06-21T21:47:45Z","body":"@hsorbo Thanks.  I've been able to consistently repro this on my mac.  My current suspicion is that there's a bug in the release build of Lazy\\<T\\> for RC2 on OSX.  This doesn't repro on RTM (which should be releasing on Monday), nor on Linux RC2 (which has the same System.Security.Cryptography.OpenSsl.dll).\r\n\r\nI'm going to keep poking around a bit, but I think that this is a solved problem.  Definitely thanks for reporting it, and sorry that you're having to experience it."}}
{"actor":{"display_login":"bartonjs"}}