Comment on How to store user's access tokens/API keys without hashing them?
JakenVeina@lemm.ee 1 year agoSeconded. In particular:
I have there’s a requirement to use an authentication method other than … any kind of token generation which requires making an extra HTTP call.
Why? What qualifies as an “extra” HTTP call, and why does it matter?
pe1uca@lemmy.pe1uca.dev 1 year ago
Well, an “extra HTTP call” is any call besides the one required for the client to access my API, in this case is an extra call to generate an access token.
Why does it matter? In words of the client: “making a call to generate a token is slow”
paysrenttobirds@sh.itjust.works 1 year ago
The client is not always right. Make them define “slow” in concrete comparison to the rest of the things that happen in their product and once you have a reasonable number, I think it’s likely you can beat it.
pe1uca@lemmy.pe1uca.dev 1 year ago
Completely agree with you, I made that comment, but most people agreed with the client '-.-
JakenVeina@lemm.ee 1 year ago
Regardless, what’s the general architecture of this app? You’ve got an HTTP API, what else? How much is under your control, versus third parties?
pe1uca@lemmy.pe1uca.dev 1 year ago
I agree, the token has a lifespan of some hours so it could be generated after that amount of time, which for a ~400ms call is not that much, but I was overruled .-.
The only thing I control is the API, the client’s implementation is outside of my control (although I know is a backend service).
JakenVeina@lemm.ee 1 year ago
Okay, so you’re building an API that another server needs to auth with? If the opposing side is a server, a pre-shared PKI cert ought to work. If the opposing side is a potentially-untrustworth client application, the truth is there’s nothing that’s going to fit such a simple definition of “extra”. The back and forth it takes to establish token exchange is not “extra” is the cost you have to pay to get security.
frezik@midwest.social 1 year ago
Are there a limited number of clients hitting the API? Would client side TLS certs be an option?