TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Introducing TAuth: Why OAuth 2.0 is bad for banking APIs and how we're fixing it

311 pointsby AffableSpatulaabout 9 years ago

39 comments

JoshMandelabout 9 years ago
1. To my mind, the fundamental problem OAuth solves is &quot;letting a user decide&quot; to share data with an app, without making the user responsible for jumping back and forth between the app and her API provider (her bank, in this case). OAuth holds the user&#x27;s hand through a series of redirects, and the user doesn&#x27;t have to copy&#x2F;paste tokens, or remember where she is in the flow, or know what comes next. Does TAuth have a similar capability? The blog post mentions &quot;User Tokens&quot; in passing, but doesn&#x27;t define or describe them.<p>2. OAuth 2.0 is published as an RFC from IETF. It may be a bear to read (and yes, it&#x27;s a framework rather than a protocol!), but the spec is open, easy to find, and carefully edited (<a href="https:&#x2F;&#x2F;tools.ietf.org&#x2F;html&#x2F;rfc6749" rel="nofollow">https:&#x2F;&#x2F;tools.ietf.org&#x2F;html&#x2F;rfc6749</a>). Is TAuth meant as a specification, or a one-off API design? If it&#x27;s a specification, has there been an attempt to write it down as such?
评论 #11637881 未加载
评论 #11639002 未加载
chatmastaabout 9 years ago
One big problem with OAuth on mobile apps is this scenario. I&#x27;ve seen this in the wild for non security-critical apps. As far as I can tell, it&#x27;s not a bug so much as it is a problem with the OAuth protocol and webview permissions:<p>1) MyLittleApp wants OAuth access to BankOfMars<p>2) MyLittleApp bundles BankOfMars SDK into MyLittleApp<p>3) MyLittleApp requests oauth access via SDK<p>4) SDK opens WebView for user to log into BankOfMars<p>5) MyLittleApp has full control over the DOM presented to the user since the WebView is technically its own.<p>6) MyLittleApp extracts the user&#x27;s password from the DOM of the WebView<p>7) MyLittleApp disappears and... profit?
评论 #11637372 未加载
评论 #11639035 未加载
评论 #11637310 未加载
评论 #11637343 未加载
评论 #11637931 未加载
评论 #11637842 未加载
评论 #11638196 未加载
评论 #11637849 未加载
评论 #11638902 未加载
评论 #11638937 未加载
评论 #11639657 未加载
andrewstuart2about 9 years ago
In my opinion, having worked extensively with OAuth2 (mostly in the form of OIDC) and other modern AuthN&#x2F;Z protocols, the author of this post does not truly understand OAuth 2, nor have they looked in any appropriate depth into supplements like OIDC or alternatives.<p>For one, bearer token [1] is only one type of &quot;Access Token&quot; described by the OAuth2 spec [2]. In fact, the OAuth2 spec is very vague on quite a few implementation details (such as how to obtain user info, how to validate an Access Token), which the author seems to just assume are part of the spec, as he does with bearer token. Other parts, like the client&#x2F;user distinction, and the recommendation for separate validation of clients, the author ignores completely, generating his own (ironically mostly OAuth2-compliant [3]) spec.<p>&gt; Shared secrets mean no non-repudiation.<p>Again, not true. Diffie-Hellman provides a great way to come to a shared secret that you can be cryptographically sure (the adversary&#x27;s advantage is negligible) is shared between you and a single verifiable keyholder.<p>&gt; Most importantly using JWT tokens make it basically impossible for you to experiment with an API using cURL.<p><i>sigh</i>. If only there was a way to write one orthogonal program that can speak HTTP, and in a single cli command send that program&#x27;s output to another program that can understand the output. Maybe we could call it a pipe. And use this symbol: |. If only.<p>&gt; OAuth 2.0 is simply a security car crash from a bank&#x27;s perspective. They have no way to prove that an API transaction is bona fide, exposing them to unlimited liability.<p>TL;DR: This article, led by comments like this (&quot;unlimited&quot;, really?), strikes me as pure marketing (aimed at a naive audience) for a &quot;spec&quot; that probably would not exist had proper due diligence into alternatives, or perhaps some public discussion, occurred. At the very least, inconsistencies (a few of which I&#x27;ve mentioned above) could have been avoided.<p>[1] <a href="https:&#x2F;&#x2F;tools.ietf.org&#x2F;html&#x2F;rfc6750" rel="nofollow">https:&#x2F;&#x2F;tools.ietf.org&#x2F;html&#x2F;rfc6750</a> [2] <a href="https:&#x2F;&#x2F;tools.ietf.org&#x2F;html&#x2F;rfc6749" rel="nofollow">https:&#x2F;&#x2F;tools.ietf.org&#x2F;html&#x2F;rfc6749</a> [3] <a href="https:&#x2F;&#x2F;tools.ietf.org&#x2F;html&#x2F;rfc6749#section-2.3.2" rel="nofollow">https:&#x2F;&#x2F;tools.ietf.org&#x2F;html&#x2F;rfc6749#section-2.3.2</a>
评论 #11637967 未加载
评论 #11638172 未加载
amlutoabout 9 years ago
Some features that I think a system like this should have:<p>1. The client (or the device holding the authentication token, or the app, etc) should be able to maintain (on its own storage!) an audit log of all transactions it has authorized, that log should be cryptographically verifiable to be append-only (think blockchain but without all the Bitcoin connotations), and the server should store audit log hashes <i>and verify that they were only ever appended to</i>. And the server should send a non-repudiable confirmation of this back to the client.<p>Why? If someone compromises the bank or the bank-issued credentials (it seems quite likely that, in at least one implementation, the bank will know the client private keys), the client should be able to give strong evidence that they did <i>not</i> initiate a given transaction by showing (a) their audit log that does not contain that transaction and (b) the server&#x27;s signature on that audit log.<p>2. Direct support for non-repudiable signatures on the transactions themselves. Unless I&#x27;m misunderstanding what the client certs are doing in this protocol, TAuth seems to give non-repudiation on the session setup but not on the transactions themselves. Did I read it wrong?<p>3. An obvious place where an HSM fits in.<p>How does TAuth stack up here?<p>Also, there&#x27;s a very strange statement on the website:<p>&gt; to unimpeachably attribute a request to a given developer. In cryptography this is known as non-repudiation.<p>Is that actually correct as written or did you mean &quot;to a given user&quot;?
评论 #11637538 未加载
评论 #11637597 未加载
评论 #11637455 未加载
jhuckesteinabout 9 years ago
As much as I love Stevie, teller.io and this demo: Why not both?<p>OAuth 2 is not &quot;bad&quot; in general, you just need to consider the implications of using it. If you have an API that allows clients to move customers&#x27; money or take out loans, you should take additional steps to defend against MITM attacks. For example using client side certificates :)<p>That said, TAuth looks really good and tidy. Of course the developer may still lose the private key, so in the end you&#x27;ll always need to additionally monitor API requests for suspicious behaviour.
评论 #11637144 未加载
评论 #11637699 未加载
btillyabout 9 years ago
The main complaint about OAuth 2.0 seems to be that bearer tokens are a bad idea. Well, you can implement OAuth 2.0 to use any kind of token you want, with any property you want. People do bearer tokens because it is easy, not because it is required.<p>The secondary complaint seems to be that OAuth 2.0 is a mess. That one I heartily agree with! A few years ago I wound up having to figure out OAuth 2.0 and wrote <a href="http:&#x2F;&#x2F;search.cpan.org&#x2F;~tilly&#x2F;LWP-Authen-OAuth2-0.07&#x2F;lib&#x2F;LWP&#x2F;Authen&#x2F;OAuth2&#x2F;Overview.pod" rel="nofollow">http:&#x2F;&#x2F;search.cpan.org&#x2F;~tilly&#x2F;LWP-Authen-OAuth2-0.07&#x2F;lib&#x2F;LWP...</a> as the explanation that I wish I had to start. In the process I figured out why most of the complexity exists, and whose interests the specification serves.<p>The key point is this: <i>OAuth 2 makes it easy for large service providers to write many APIs that users can securely authorize third party consumers to use on their behalf. Everything good (and bad!) about the specification comes from this fact.</i><p>In other words, it serves the need of service providers like Google and Facebook. API consumers use it because we want to access those APIs. And not because it is a good protocol for us. (It most emphatically is a mess for us!)
ForHackernewsabout 9 years ago
&gt; One of the biggest problems with OAuth 2.0 is that it delegates all security concerns to TLS but only the client authenticates the server (via it&#x27;s SSL certificate), the server does not authenticate the client. This means the server has no way of knowing who is actually sending the request.<p>That&#x27;s not just plain not true. In the OAuth2 authorization_code grant, a &quot;confidential&quot; client is REQUIRED to send a client_id and client_secret to authenticate itself to the server.<p><a href="https:&#x2F;&#x2F;tools.ietf.org&#x2F;html&#x2F;rfc6749#section-4.1.3" rel="nofollow">https:&#x2F;&#x2F;tools.ietf.org&#x2F;html&#x2F;rfc6749#section-4.1.3</a><p>&gt; If the client type is confidential or the client was issued client credentials (or assigned other authentication requirements), the client MUST authenticate with the authorization server as described in Section 3.2.1.<p>Now, this doesn&#x27;t work for &quot;public&quot; clients like a pure-javascript webapp, but that&#x27;s a separate question.<p>Count me as pretty dubious of letting some unknown group try to re-implement bank authentication without fully understanding the specification they&#x27;re trying to fix.
评论 #11637846 未加载
kroojabout 9 years ago
Their description of the MITM attack is entirely dependent upon how the authorization server validates redirects in the implicit and authorization code grant flows. This is tied to how client registration is performed. So, if you want to ensure that the authorization code or access token is only delivered to a redirect URI that is trusted, that should be part of the policy enforced in your infrastructure... More specifically, you can require domain verification and validation as part of the client registration process, and I would expect that at a minimum when dealing with delegated access to financials.<p>Another alternative to this would be to perform an OOB flow, wherein the redirect URI is actually hosted on the authorization sever itself and the client can scrape the access token from the Location header.
评论 #11637615 未加载
thallium205about 9 years ago
This is unnecessary. Many banks can and will enforce 2-factor authentication with their oauth flow, which sufficiently validates the client and would prevent a MITM attack.<p>Your whole premise is surrounded by the threat a client browser would not properly validate a server certificate... come on... really?
评论 #11638143 未加载
评论 #11638197 未加载
JDDunn9about 9 years ago
I visited the homepage (<a href="https:&#x2F;&#x2F;www.teller.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.teller.io&#x2F;</a>) and got a warning about the SSL cert being invalid. Kind of ironic. :)
评论 #11637899 未加载
评论 #11637859 未加载
bgidleyabout 9 years ago
This is unlikely to work - developers in general can&#x27;t cope with managing SSL certificates. They won&#x27;t know what to do with them or handle them securely.<p>You need full integrity verification, with a secure store and whitebox crypto keys to make such a scheme secure.
评论 #11637085 未加载
评论 #11637407 未加载
评论 #11637123 未加载
评论 #11658698 未加载
pkulakabout 9 years ago
Problem one exists because, apparently, MITM is a problem with TLS because it&#x27;s possible for bogus certificates to get through? Well... I guess. But then that&#x27;s a TLS problem. And your entire banking website is served through TLS. So, if it really is an issue, then solving it just for auth is like putting an Abus padlock on a screen door.<p>Problem two bemoans the bearer token in Oauth 2. Yes, it&#x27;s not as secure as OAuth 1, but it&#x27;s also far simpler. But you don&#x27;t have to use bearer tokens; you are free to use MAC tokens instead. Why reinvent the wheel?
wyattjohabout 9 years ago
I think my biggest bug here is that as far as I understand this flow, it essentially says that a given certificate that is generated and signed by a third party (Teller in this case) would be expected to bundle this private certificate with the application. Isn&#x27;t it possible to extract the certificate from the app bundle after the fact? Or am I missing something here...
zarothabout 9 years ago
The premise for adding client certificates is a MITM made possible because careless app developers will disable server certificate validation.<p>So, how exactly does adding a client certificate solve that problem? If server certificate validation is disabled on the client, the MITM can still accept the client certificate and substitute their own.<p>The difference is that in this case the attacker will gain access to the API but the client will not, unless they are being actively MITM. If the client tries to access the API outside the MITM their client cert will be rejected as invalid.
评论 #11637566 未加载
arnarbiabout 9 years ago
Client certs are still a bit of a pain. There is already an IETF spec in the works, called Token Binding, on how to bind tokens to key pairs that clients maintain, and create on demand.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;TokenBinding&#x2F;Internet-Drafts" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;TokenBinding&#x2F;Internet-Drafts</a><p><a href="http:&#x2F;&#x2F;www.browserauth.net&#x2F;home" rel="nofollow">http:&#x2F;&#x2F;www.browserauth.net&#x2F;home</a><p>It&#x27;s already implemented in Chrome.
0x0about 9 years ago
I thought client certificates were being phased out, didn&#x27;t Chrome just remove the &lt;keygen&gt; html tag?
评论 #11637110 未加载
评论 #11637721 未加载
评论 #11637334 未加载
评论 #11637159 未加载
gueloabout 9 years ago
&gt; The EU is forcing all European banks to expose account APIs<p>I&#x27;m so jealous!
EGregabout 9 years ago
Actually oAuth 1.0 is less secure than oAuth 2.0 because it engages in security theater. It doesn&#x27;t even require https and as a result any man in the middle can eavesdrop on the requests. And if the token is leaked, it&#x27;s game over.
评论 #11640514 未加载
yodasanabout 9 years ago
So, it seems like the main concern here is that a client will not validate the SSL certificate, so the SSL layer is now manually added into javascript code using the WebCrypto API to prevent this? I see not validating SSL certificates being a potential problem with something like a REST API, but is it common to disable SSL verification at the browser level where you would need to use javascript to do this?
educarabout 9 years ago
One of the things about OAuth is that the user needs to check the website url where he is giving his credentials. Amusingly, many mobile apps seems to forget this important bit. The redirect me to a web ui <i>inside</i> the app itself and expect me to enter my password inside the app. I guess they thought this was a better user experience than handing over control to the browser :&#x2F;
cakooseabout 9 years ago
Two things: 1. Why not just add client-side certificates to an OAuth-based API? 2. Client certificates do not prevent an attacker from pretending to the be server.<p>Let&#x27;s say your API server followed the standard OAuth 2.0 protocol except required client-side certificates? Would that be as secure as TAuth?<p>If so, then the OAuth 2.0 option has the advantage of being well-supported by existing libraries and well-understood from a security perspective. It&#x27;s less likely that a previously-unknown issue with OAuth 2.0 will crop up and force everyone to scramble for a fix.<p>And while client certificates prevent an attacker from forging client requests (i.e. tricking the API server) an attacker can still trick the client. An attacker capable of MITM&#x27;ing server-cert-only HTTPS can also trick TAuth clients into sending it&#x27;s banking API requests the attacker&#x27;s servers. It can respond to those requests with whatever it wants.<p>To summon the activation energy to adopt (or switch to) a new, less-popular protocol, I&#x27;d expect more security benefits.
deathanatosabout 9 years ago
&gt; <i>Most importantly using JWT tokens make it basically impossible for you to experiment with an API using cURL. A major impediment to developer experience.</i><p>Why can&#x27;t a developer do exactly what you did in your second video, which is to save the JWT to a variable, and then use it in the request?<p>Heck, you could create a quick wrapper &quot;jwt_curl&quot;&#x2F;&quot;jwt_http&quot; or something that automatically pulled in that variable…<p>There&#x27;s two big things about this scheme that leave me confused: how do you know what the correct certificate for the client is? Do you just send it over HTTPS? But then, one of your opening premises is that we don&#x27;t get TLS verification correct and are open to MitM, so this seems to contradict that, or are we hoping that &quot;that one request won&#x27;t be MitM&#x27;d&quot;, like in HSTS? (which seems fine)
iffycanabout 9 years ago
How does this compare with SimpleFIN: <a href="https:&#x2F;&#x2F;bridge.simplefin.org&#x2F;info&#x2F;developer" rel="nofollow">https:&#x2F;&#x2F;bridge.simplefin.org&#x2F;info&#x2F;developer</a><p>SimpleFIN seems simple and still secure. But maybe I&#x27;m missing something?
hobarreraabout 9 years ago
It&#x27;s still a bit unclear to me how a client generates his certificates and somehow links it to his bank account. The demo shows a web-UI generating it, but would a mobile user have to visit the website to fetch a certificate?
makecheckabout 9 years ago
By logging into a 3rd-party site using Google+, for instance, you remain logged-in to Google when you go to <i>any</i> other web site.<p>And the authenticator clearly does not require this global behavior: if you immediately log out from a Google page, you remain “logged in” at the 3rd-party site that you started from. So why doesn’t it log you out globally? Probably to convenience Google, at the expense of security when you auto-identify yourself to who knows how many other web sites before you realize what happened.<p>Logging into one page with one set of permissions should mean “LOG INTO THIS PAGE”, not “REVEAL MY SECRETS TO THE INTERNET”.
e12eabout 9 years ago
Let me see if I understand this correctly:<p>1) Problem: app authors disable TLS (server) cert validation.<p>2) Solution: give each app author the responsibility of managing and distributing a client side certificate.<p>Sounds like now you have two problems? In particular, you now have to make sure that every lost&#x2F;compromised certificate is added to your growing CRL? And you need app developers that demonstrably do not even have the vaguest idea how public key cryptography can be used for authentication to take responsibility for doing this? And there&#x27;s still no guarantee that they won&#x27;t disable certificate verification?<p>Did I miss anything?
EGregabout 9 years ago
At Qbix we developed a much more secure way than oAuth to <i>instantly</i> personalize a person&#x27;s session -- and even connect the user to all their friends -- while maintaining privacy of the user and preventing tracking across domains by everyone except those they choose to tell &quot;I am X on Y network&quot; ... it also restores the social graph automatically on every network and tells you when your friends joined one of your networks.
eemphabout 9 years ago
&gt;The EU is forcing all European banks to expose account APIs with PSD II by end of 2017.<p>Any reference for this? The text of PSD II is here — <a href="http:&#x2F;&#x2F;eur-lex.europa.eu&#x2F;legal-content&#x2F;EN&#x2F;TXT&#x2F;?uri=CELEX:32015L2366" rel="nofollow">http:&#x2F;&#x2F;eur-lex.europa.eu&#x2F;legal-content&#x2F;EN&#x2F;TXT&#x2F;?uri=CELEX:320...</a> — but it&#x27;s too long and it isn&#x27;t clear to me whether it is actually ratified.
seanwilsonabout 9 years ago
What bothers me about OAuth is the way you&#x27;re on one website and are then asked with a pop-up to enter your Gmail or Facebook etc. password as a normal part of the flow. Users aren&#x27;t savvy enough to check the URL or understand what&#x27;s going on here so getting them used to this flow is asking for phishing by the look of it. Something that forced two factor authentication would be good.
smarx007about 9 years ago
It&#x27;s pretty strange to see a new authentication protocol (they describe it as authorization protocol, but they do authentication as well), just as W3C&#x27;s WebID-TLS is being finalised. Oh, did I mention it uses client X.509 certificates as well? And how does the author imagine that banks would rely on his new protocol to ensure non-repudiation?
0xdeadbeefbabeabout 9 years ago
&gt; The most realistic threat is the client developer not properly verifying the server certificate, i.e. was it ultimately signed by a trusted certificate authority?<p>From an attackers point of view, this sounds like a very tiny ray of hope. It sounds like a cool feature&#x2F;vulnerability that will probably be going away soon because it is so easy to fix.
评论 #11637525 未加载
defiancedigitalabout 9 years ago
I didn&#x27;t see anything about renegotiation. If clients present their certificates during first handshake, it will lead to security concerns. Attackers could observe client&#x27;s certificates (extract meta-data, de-ano clients ...). If renegotiation is used it will drastically reduce &quot;Bonus DDOS mitigation&quot;
baohaabout 9 years ago
tl;dr: it forces client to have a certificate so that the server can verify.<p>This is kind of a pet peeve. Anyone who ignores or wants to disable server certificate verification has to understand the risk.
jeremiahleeabout 9 years ago
How is this better than Hawk and Oz by OAuth&#x27;s creator, Eran Hammer? TAuth seems to solve fewer problems, as it cannot be used by public clients.
gyre007about 9 years ago
It&#x27;s kinda crazy that it has taken so long for someone to actually take an initiative and attempt to make the authentication more secure.<p>I wonder if this is a custom built solution or if Teller.io is using something like HashiCorps Vault to do the whole SSL cert dance.<p>Either way, this looks promising.
评论 #11637243 未加载
chrisallickabout 9 years ago
Has this been tested against a broad user base? It seems rather involved.
imaginenoreabout 9 years ago
Relying on SMS for bank security has always seemed crazy to me. It&#x27;s not secure. Didn&#x27;t Telegram creator just got hacked by the Russian mobile provider that sent an SMS to itself?
评论 #11638147 未加载
评论 #11638096 未加载
poormanabout 9 years ago
Must be British... &quot;authorisation&quot; ?
评论 #11637285 未加载
robinduckettabout 9 years ago
<a href="https:&#x2F;&#x2F;xkcd.com&#x2F;927&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xkcd.com&#x2F;927&#x2F;</a>
评论 #11637619 未加载