Loginsrv: JWT login microservice with back ends like OAuth2, Google, GitHub
github.com
github.com
"Open Source Identity Infrastructure and Services Run User Management, Permission and Role Management, and OAuth 2.0 & OpenID Connect anywhere from your cloud to a Raspberry Pi."
There is a branch with slack integration in progress ATM
If a passwordless option was available too, i.e. email a TOTP code that is a nonce, and presentation of the TOTP would generate a JWT with the email address as the claim... then this would become my new login manager.
I'm presently using auth0 free plan. Which is nice, but passwordless lock (their JS library) is old, and their docs are not great as to how to update to their other lock library (I've concluded you can't stay passwordless with the main auth0 lock library).
Controlling non logged in user claims / access without having to have special "no token" caveats or endpoints (i.e. any user can have read access to an endpoint, but only if they have a token / have come via your website).
Is anything like this supported anywhere?
API keys kind of do the job, but they're basically deprecated through a lot of JWT providers, and you need to support two Auth systems if you're using JWT for logged in users.
Flow is:
* Arrive at website * Generate an access token without any user input (anon user with default read only privileges) * Use the same APIs as logged in users, with restricted access defined in the JWT / Auth provider.
The two sides of it, am I allowed to access this API, coupled with what can I do once accessed seem to be the basic use case for JWT.
I appreciate the response. My terminology is likely a bit off, it's been a while :)
- Htpasswd (Dedicated credentials file)
- Simple (user/password pairs by configuration)
- Httpupstream (HTTP API Basic auth configuration)
It mentions "OSIAM" which I'm not familiar with.
Is there a way to use this to "enhance" a basic JWT auth server implementation that does a bcrypt/Argon2 hash or hash comparison on password with these social-sign-on OAuth providers?
Or any similar library, that would be really useful.
[0] https://developers.google.com/identity/branding-guidelines
The assets are also not a good foundation to build a customized (yet compliant) button.
I've also seen so many buttons that cannot possibly be compliant without those guidelines, but Google doesn't seem to care, do they?
Honest question: what gave you that impression?
There's a good Go library detailing this approach, along with a blog post: https://github.com/endiangroup/compandauth https://endian.io/articles/compandauth/
Or am I misremembering?
that feels like a weird place to be in with server side state for stuff that is supposed to be stateless. i guess the revoked set is smaller than the full set of active tokens so maybe that is a win? curious if anyone has experience with this.
The JWT tokens we get for m2m from Maskinporten[1] have a TTL of a couple of minutes.
No refresh tokens though, I guess they figure it doesn't make much difference since the "user" is a machine so no hassle just sending a full request again.
[1]: https://difi.github.io/felleslosninger/maskinporten_protocol...
Yeah, it seems to me the difference between having a revocation / blacklist and a non-JWT based sessions isn't the number of queries to a redis cache, since each request to the resource server will result in a check first. It's the in-memory size of the cache.
I think that clears up my question about the benefits of using JWT. Thanks! :)
My checklist: https://egbert.net/blog/articles/authentication-for-api.html
...I also have to wonder why no CORS. When properly managed (e.g. static-whitelisted allowed origins + allowed credentials from/to dedicated domains) and combined with other best practices around your web SSO framework of choice, it's fine for contexts such as SSO with no back-end sync.
Here's an HN search for his comments on JWTs:
https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...
Here is one of his comments about JWT:
In cryptography, we have a concept of "misuse resistance".
But there is some confusion over the role of CORS on a server. CORS should only dictate the cross-origin policy for a particular resource. In other words, the CORS headers are only meant to indicate whether requests from different origins are allowed. I think the confusion comes in because servers sometimes use CORS to dictate security policy as well. CORS is not security. If servers have resources that need to be protected from certain users, it is not safe to rely solely on the Origin header to enforce this. Your server needs some other mechanism for security (such as OAuth2 and CSRF protection).
In short, CORS is not about security of the server. And it is not even considered a whole security for end-users but about the preventing your server from misusing your clients’ “WebOS” resources by your 3rd party affiliates (advertisers), and pretty much nothing else.