frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Ten years of JSON Web Token and preparing for the future

https://self-issued.info/?p=2708
109•mooreds•5h ago•37 comments

Open Source Society University – Path to a free self-taught education in CS

https://github.com/ossu/computer-science
246•saikatsg•11h ago•98 comments

Ask HN: What are you working on? (May 2025)

169•david927•8h ago•485 comments

Lottie is an open format for animated vector graphics

https://lottie.github.io/
269•marcodiego•13h ago•122 comments

Plwm – An X11 window manager written in Prolog

https://github.com/Seeker04/plwm
155•jedeusus•10h ago•35 comments

Claude 4 System Card

https://simonwillison.net/2025/May/25/claude-4-system-card/
578•pvg•22h ago•216 comments

Writing your own CUPS printer driver in 100 lines of Python (2018)

https://behind.pretix.eu/2018/01/20/cups-driver/
153•todsacerdoti•12h ago•20 comments

At Amazon, some coders say their jobs have begun to resemble warehouse work

https://www.nytimes.com/2025/05/25/business/amazon-ai-coders.html
249•milkshakes•16h ago•374 comments

Lisping at JPL (2002)

https://flownet.com/gat/jpl-lisp.html
118•adityaathalye•3d ago•37 comments

The Source of "Water" (2020)

https://jamesgill.net/waterword/
7•stakkur•2d ago•2 comments

Buying a Robot Cat and Falling into the Weird World of Animal-Robot Research

https://thereader.mitpress.mit.edu/the-weird-world-of-animal-robot-research/
14•EA-3167•3d ago•2 comments

Whippet GC notes on Guile, heuristics, and heap growth

https://wingolog.org/archives/2025/05/22/whippet-lab-notebook-guile-heuristics-and-heap-growth
21•paroneayea•3d ago•0 comments

New method for creating large 3D models of urban areas is faster and cheaper

https://techxplore.com/news/2025-05-action-movies-urban-method-large.html
11•PaulHoule•3d ago•2 comments

Trading with Claude, and writing your own MCP server

https://dangelov.com/blog/trading-with-claude/
70•dangelov•3d ago•19 comments

Remote Prompt Injection in Gitlab Duo Leads to Source Code Theft

https://www.legitsecurity.com/blog/remote-prompt-injection-in-gitlab-duo
41•chillax•2d ago•8 comments

Design Pressure: The Invisible Hand That Shapes Your Code

https://hynek.me/talks/design-pressure/
156•NeutralForest•14h ago•41 comments

You can choose tools that make you happy

https://borretti.me/article/you-can-choose-tools-that-make-you-happy
132•zdw•3d ago•44 comments

Show HN: DaedalOS – Desktop Environment in the Browser

https://github.com/DustinBrett/daedalOS
131•DustinBrett•12h ago•25 comments

Advice to Tenstorrent

https://github.com/geohot/tt-tiny
47•lexoj•6h ago•32 comments

CAPTCHAs are over (in ticketing)

https://behind.pretix.eu/2025/05/23/captchas-are-over/
124•pabs3•1d ago•174 comments

Chomsky on what ChatGPT is good for (2023)

https://chomsky.info/20230503-2/
170•mef•11h ago•209 comments

Writing a Self-Mutating x86_64 C Program (2013)

https://ephemeral.cx/2013/12/writing-a-self-mutating-x86_64-c-program/
83•kepler471•11h ago•22 comments

Tariffs in American History

https://imprimis.hillsdale.edu/tariffs-in-american-history/
107•smitty1e•1d ago•134 comments

Koog, a Kotlin-based framework to build and run Al agents in idiomatic Kotlin

https://github.com/JetBrains/koog
59•prof18•3d ago•3 comments

Show HN: Zli – A Batteries-Included CLI Framework for Zig

https://github.com/xcaeser/zli
66•caeser•11h ago•33 comments

Martin (YC S23) Is Hiring Founding AI/Product Engineers to Build a Better Siri

https://www.ycombinator.com/companies/martin/jobs
1•darweenist•11h ago

'Strange metals' point to a whole new way to understand electricity

https://www.science.org/content/article/strange-metals-point-whole-new-way-understand-electricity
112•pseudolus•14h ago•33 comments

Is TfL losing the battle against heat on the Victoria line?

https://www.swlondoner.co.uk/news/16052025-is-tfl-losing-the-battle-against-heat-on-the-victoria-line
85•zeristor•19h ago•162 comments

Denmark to raise retirement age to 70

https://www.telegraph.co.uk/world-news/2025/05/23/denmark-raise-retirement-age-70/
334•wslh•11h ago•804 comments

On File Formats

https://solhsa.com/oldernews2025.html#ON-FILE-FORMATS
135•ibobev•4d ago•82 comments
Open in hackernews

Ten years of JSON Web Token and preparing for the future

https://self-issued.info/?p=2708
107•mooreds•5h ago

Comments

90s_dev•4h ago
> It’s often said that one sign of a standard having succeeded is that it’s used for things that the inventors never imagined.

It's certainly a sign of something's utility and versatility, for sure. Congrats.

vrosas•4h ago
If you go back and search hacker news for any article involving JWTs or OAuth you’ll find hundreds of comments of circular arguments over what a JWT is and is not. People never seem to be able to separate the two.
90s_dev•3h ago
I still don't really understand them. The last time I used them was for a client probably in 2016 or 2018, and I forgot everything I learned about them. But they have an RFC so that's pretty cool.
marifjeren•2h ago
I think an easy way to think about them is it's just a json object, with some cryptographic crud glued to it that proves who created it.
genghisjahn•3h ago
I love JWTs between servers. Between servers and clients, you just end up remaking cookies/sessions. Strictly my experience/opinion. Glad to hear from others.
slt2021•3h ago
you cant generally reuse cookies across domains, because browser controls which domain receive which cookie. Also cookies are not cryptographically signed and thus easily forgeable by the client/browser.

JWTs on the other hand allow to be used across domain, so that you can use JWT issued by your IDP on one domain, to be trusted on another domain. crypto signature helps in verifying integrity of data.

sessions are usually tied to a single backend/application server. Its hard to reuse a session data across different apps.

JWTs on the other hand allow sharing session data across different app servers/microservices.

gerdesj•2h ago
"Also cookies are not cryptographically signed and thus easily forgeable by the client/browser."

My Apache webby thingies quite happily dole out encrypted cookies:

https://httpd.apache.org/docs/2.4/mod/mod_session_crypto.htm...

Your notes on cross site issues are also described there.

JWTs are mutually shared secret passable with nobs on - you can store loads of data in them. Cookies are more one shot and one piece of data.

kevlened•1h ago
> Also cookies are not cryptographically signed and thus easily forgeable by the client/browser

While it's true that you could avoid signing cookies, this isn't the default for any server library I'm aware of. If your library doesn't require a secret to use for signing, you should report it.

I'm also unaware of JWT libraries that default to "none" for the algorithm (some go against the spec and avoid it entirely), though it's possible to use JWTs insecurely.

gerdesj•3h ago
Cookies are only controlled by the server but obviously can be negotiated for with a secret. JWTs have a mutual secret component built in and far cooler sounding ... stuff. So both ends have to trust the other and prove it with JWT and when cookies are in play, you takes your chances - you can use mutual TLS to get the same trust that JWT gives.

I have a web app that I'm doing sysops for which ended up with both. The web devs insisted on JWT and cough "forgot" about the auth bearer bit in the header because their API didn't use it. I ended up amending and recompiling an Apache module for that but to be fair, they will support it in the next version so I can revert my changes. A few db lookups in the Apache proxy JWT module I'm using and you have your claims.

On the front of that lot you have Apache session cookies generated when auth succeeds against a PrivacyIDEA instance - ie MFA.

I suppose we have cookies for authN and JWT for authZ. Cookies could do both and apart from session I'm not too familiar but it looks like claims would require multiple cookies where JWT does it all in one.

genghisjahn•2h ago
I use JWTs with RSA key pairs primarily. I tell the other service to make the pair and send me the public. I never see the private. Then I can verify all their tokens with the public key.

This way I don’t have to worry about sharing the secret. It never leaves the other service.

some_furry•2h ago
> Then I can verify all their tokens with the private key.

Mmmm. No. You're supposed to use a public key to verify the tokens, not a private key. What library are you using that tolerates this sort of misuse?

firesteelrain•1h ago
I think you meant verify with public key.
genghisjahn•1h ago
Yes. I meant verify with public key. (Facepalm and updated)
marifjeren•2h ago
Love JWTs but I wish there was a better standard for conveying detailed and compact authorization information, for systems requiring enforcement of complex authorization rules.

We experimented once with trying to put permissions on a JWT (more complex than your popular scopes) but that makes them grow quickly. And we experimented with putting role information on JWTs but that results in re-centralization of logic.

Maybe conveying complex authorization info via a single object that gets passed around repeatedly is fundamentally a flawed idea, but if I had an identity standards wishlist that would be near the top.

Bilal_io•2h ago
Oh yeah the token grows in length very quickly, we also tried using it 5 years ago to pass in roles to the client and ended up with many issues
cyberax•1h ago
Authorization is really not a generally solvable problem. Every large system ends up having its quirks.

Attempting to generalize it ends up in pain, suffering, and AWS IAM.

JimDabell•53m ago
You might want to check out Biscuit:

> Biscuit is an authorization token with decentralized verification, offline attenuation and strong security policy enforcement based on a logic language

— https://www.biscuitsec.org

pelagicAustral•2h ago
JWTs are a vanity project of the JS community... I am still waiting for a use case that cannot be served by traditional key exchange...
mdaniel•2h ago
Did you mean cert exchange, because keys are just a very long password, but certs carry actual information about the holder (err, I guess pedantically of the holder with the key)
some_furry•2h ago
> Did you mean cert exchange, because keys are just a very long password

My experience differs:

My private key is only 256 bits (32 bytes, which base64 encodes up to 44 characters, if you use padding). My typical passwords are 40-64 characters (unless stupid requirements force me to go shorter).

Uvix•1h ago
What algorithm are you using? RSA keys are normally at least 2048 bits in length.
magicalhippo•1h ago
I'd put money on Ed25519[1][2].

[1]: https://en.wikipedia.org/wiki/EdDSA#Ed25519

[2]: https://www.iana.org/assignments/jose/jose.xhtml#web-signatu...

firesteelrain•2h ago
> JWTs are a vanity project of the JS community

JWTs are standardized (RFC 7519) and used outside the JS ecosystem. Not a vanity project

Though often overused and poorly misunderstood where simpler and more secure methods would suffice.

methou•2h ago
JWTs are just too fat, and JS users often forgets encoding is not encryption.

I've seen some news site trackers send JWT in url/header to some 3rd party tracker. Content is no surprise, my full name, and email address, violates its own privacy policy.

Otherwise it's very open and handy, from inspecting a jwt token I can learn a lot about the architectural design of many sites.

hdjrudni•2h ago
Every time I want to use a JWT, it seems like it's the suboptimal choice, so I've never found a genuine use case for them.

Most recently, I wanted to implement 2FA w/ TOTP. I figure I'll use 1 cookie for the session, and another cookie as a TOTP bypass. If the user doesn't have a 2FA bypass cookie, then they have to complete the 2FA challenge. Great, so user submits username & password like normal, if they pass but don't have the bypass cookie the server sends back a JWT with 10 minute expiry. They have to send back the JWT along with OTP to complete the login.

I figure this is OK, but not optimal. Worst case, hacker does not submit any username/password but attempts to forge the JWT along with OTP. User ID is in clear text in the JWT, but the key only exists on the server so it's very difficult to crack. Nevertheless, clients have unlimited attempts because JWT is stateless and they can keep extending the expiry or set it to far future as desired. Still, 256 bits, not likely they'll ever succeed, but I should probably be alerted to what's going on.

Alternative? Create a 2FA challenge key that's unique after every successful username/password combo. User submits challenge key along with OTP. Same 256 bit security, but unique for each login attempt instead of using global HMAC key. Also, now it's very easy to limit attempts to ~3 and I have a record of any such hacking attempt. Seems strictly better. Storage is not really a concern because worse case I can still prune all keys older than 10 minutes. Downside I guess is I still have to hit my DB, but it's a very efficient query and I can always move to a key-value store if it becomes a bottleneck.

I don't know, what's the use-case? Server-server interaction? Then they still need to share a key to validate the JWT. And probably all but the user-facing server doesn't need to be exposed to public internet anyway so why the hoopla adding JWT? I haven't looked into it much because I don't believe in this microservice architecture either, but if I were to go down that road I'd probably try gRPC/protobufs and still not bother with JWT.

gerdesj•2h ago
A JWT can include claims - that's the difference: JWTs are a bit more complicated data structure out of the box. You can do authN and authZ in one go.

You can do it all via individual browser cookies but it will be complicated. However you can dump session cookies to a database and then you can do claims locally on the server and use that cookie to tie it all together.

So I think you can do it either way.

JWTs are mutually authenticated (shared secret) but cookies are not.

alisonatwork•2h ago
In your scenario you could still apply additional protections to a user id after detecting X attempts of sending a forged JWT. At least you could alert on JWTs that arrive with invalid signatures. Or you could put a 2FA challenge key inside the JWT, just use the JWT as a container to hold the information you would have shared with the client anyway.

I agree that JWTs don't really do anything more than a cookie couldn't already do, but I think the use case is for apps, not web browsers. In particular apps that do raw HTTP API calls and do not implement a cookie jar. And then because most companies do "app first development", we end up having to support JWT in the web browser too, manually putting it into localstorage or the application state, instead of just leveraging the cookie jar that was already there.

We just recently had to implement an SSO solution using JWT because the platform only gave out JWTs, so we ended up putting the JWT inside an encrypted HttpOnly cookie. Seemed a bit like a hat-on-a-hat, but eh.

harrall•1h ago
Long before JWT existed, if you wanted to pass some trusted data through an untrusted channel, you would make a payload with an expiry, encrypt or sign it with your secret key, then send it. However, you would need to make up your own way to send this info. For example, if this were a website, you might dump the signed/encrypted payload into several form fields and upon receiving it back, you would verify that it was signed with your key.

Now that JWT exists, there is a standard way to do it so you don’t have to write the same boring code a bunch of times in different languages. You just have one string you pass in one field and if you tell someone else that it’s a JWT, they know how to parse it. You don’t have to document your own special way anymore.

At the end of the day, it’s just a standard for that specific problem that didn’t have a standard solution before. If passing data like that is not a problem for your use case, then you don’t need the tool.

To use your Protobuf example, there was a time before Protobuf or tools like it existed. I can tell you that writing the exact same protocol code by hand in Java, PHP, and Python is absolute tedious work. But if it never came up that you had to write your own protocol, you neither know the pain of doing it manually nor the pleasure of using Protobuf, and that’s fine.

stephenr•1h ago
> what's the use-case?

The use-case I always remember people presenting for JWTs was mostly part of the "serverless" fad/hype.

The theory was presented like this: If you use a JWT your application logic can be stateless when it comes to authentication; So you don't need to load user info from a session database/kv store, it's right there in the request...

The only way that makes any sense to me, is if your application has zero storage of its own: it's all remote APIs/services, including your authentication source. I'm sure there are some applications like that, but I find it hard to believe that's how/why it's used most of the time.

Never underestimate this industry's ability to get obsessed with the new shiny.

I had an eye opening experience many years ago with a junior dev (I was significantly more experienced than he was then, but wouldn't have called myself "senior" at the time).

He had written an internal tool for the agency we both worked for/through. I don't recall the exact specifics, but I remember the accountant was involved somewhat, and it was a fairly basic CRUD-y PHP/MySQL app. Nothing to write home about, but it worked fine.

At some point he had an issue getting his php/mysql environment configured (I guess on a new laptop?) - this was before the time of Docker; Vagrant was likely already a thing but he wasn't using it.

From what he explained afterwards I believe it was just the extremely common issue that connecting to "localhost" causes the mysql client to attempt a socket connection, and the default socket location provided in php isn't always correct.

As I said, I heard about this after he'd decided that connection issue (with an app that had already been working well enough to show off to powers-that-be and get approval to spend more paid time on it) was enough to warrant re-writing the entire thing to use MongoDB.

As I said: never underestimate this industry's ability to get obsessed with the new shiny.

francislavoie•2h ago
Paseto is better https://paseto.io/, but unfortunately OAuth forces the usage of JWT.
cyberax•1h ago
I fail to see how it's better, except for hand-waving about potential crypto attacks?

It seems to be a NIH-ed serialization format with hard-coded ciphersuits. It doesn't seem to support use-cases like delegation and claims.

francislavoie•1h ago
Watch the talk at the bottom of the page. JWT/JOSE are chock full of dangerous footguns that aren't just theoretical, they have repeatedly been shown to be poorly designed and too risky to implement correctly as written. Using fewer, known secure cryptographic primitives as part of the spec ensures it's impossible to get the security wrong, can't be misused.
JimDabell•1h ago
I believe OAuth doesn’t require JWT (just an opaque token, which in practice is often JWT), but OpenID Connect – which is based on OAuth – does require JWT.
nssnsjsjsjs•1h ago
Is there an RSS feed for this blog?
JimDabell•50m ago
Yes, it’s linked using the standard autodiscovery rel=alternate meta element. You should be able to just paste the site URL into whichever feed reader you use to subscribe.
jrvarela56•1h ago
Pre-req from HN lore: https://fly.io/blog/api-tokens-a-tedious-survey/
martinald•35m ago
The problem I've got with JWTs is that actually you can rarely (never, really in my experience?) assume anything in the JWT apart from user id are valid for a long period of time.

For the most simple use case of an client auth state; you want to be able to revoke auth straight away if an account is compromised. This means you have to check the auth database for every request anyway, and you probably could have got whatever else was in the claim there quickly.

Same with roles; if you downgrade an admin user to a lower 'class' of user then you don't want it to take minutes to take effect.

So then all you are left with is a unified client id format, which is somewhat useful, but not really the 'promise' of JWTs (I feel?).