Live data from Hacker News

Ask HN: Any comprehensive courses on Auth?

news.ycombinator.com

21–30 of 93 posts

Re: Ask HN: Any comprehensive courses on Auth?

#21
FastAPI's tutorial on how to implement a basic OAuth server helped me a lot in understanding the basic concepts.

https://fastapi.tiangolo.com/tutorial/security/

After getting familiar, I self hosted Keycloak and integrated it with my FastAPI server.

https://www.keycloak.org/

Though not exactly a course, learning by doing helped me :)

Re: Ask HN: Any comprehensive courses on Auth?

#22
I recently had to learn OIDC which is the standard for auth that most people really mean when they say OAuth now, I think. I learned by implementing (using Keycloak) and most importantly by reading the OIDC specs. It may seem intimidating, but the real core of it is not that large.

It's a topic I'd be interested in writing more about, and I'm happy to start here if you would find it useful.

Re: Ask HN: Any comprehensive courses on Auth?

#23

Earlier quoted context omitted.

I would add: * on the client side, store the token as a secure https only cookie, as local storage is accessible by any module of your app, see supply-chain attacks. * be extra careful with oAuth [1] * for APIs, be strict with CORS [2] [1] https://salt.security/blog/oh-auth-abusing-oauth-to-take-ove... [2] https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS

I'm having to deal with this stuff right now. Firebase stores their refresh token in local storage and that allows minting new session tokens once they expire, are they wrong? Is there any other way to remain signed in "forever"? (until logout or until token is revoked)

I didn't work with Firebase myself, isn't this something relevant?

https://firebase.google.com/docs/auth/admin/manage-cookies

Re: Ask HN: Any comprehensive courses on Auth?

#24

Huh, I always forget a lot of programmers weren't around when this stuff was invented. It's all actually pretty simple, and very little complexity. However, there are so many "gotchas" (that can result in zero security) that anyone writing a guide like this would probably have you sign a waiver, then any company you work for sign a waiver, and include your firstborn child. For example, user/pass is pretty simple on t…

Actually, I think we're doing a huge disservice to our profession as programmers when we call stuff like this "an insane number of gotchas". This is no critique of you or your post specifically, mind you, and I know where you're coming from. But it's a critique of a general tendency among programmers to call anything that requires a bit of knowledge and thought beyond the simplest surface level solution "complex" or…

I don't know why you're getting downvoted (I have no idea why people are on HN if they think this is just Reddit. If you downvote, say why and start a discussion), but you're right. My intent wasn't to imply "just don't do it" or "leave it to libraries." I was trying to say why you can't really find a guide like the post is asking for (at least for free!) and it likely has a lot to do with liability and things like that.

I was trying to say exactly what you are saying, and that is just get in there and learn. It isn't that complex to implement this stuff yourself if you need to. I've implemented this stuff myself dozens of times over the years... but I try to use a library before implementing it myself. Interestingly, over the years, I've reviewed libraries and found bugs in them. So, do read the code of the library you're using. Once you've reviewed a few of them (and implemented it yourself a few times), you kinda get an idea of what to look for.

Re: Ask HN: Any comprehensive courses on Auth?

#25

Earlier quoted context omitted.

I'm having to deal with this stuff right now. Firebase stores their refresh token in local storage and that allows minting new session tokens once they expire, are they wrong? Is there any other way to remain signed in "forever"? (until logout or until token is revoked)

I didn't work with Firebase myself, isn't this something relevant? https://firebase.google.com/docs/auth/admin/manage-cookies

That is what I'm using but I have to authenticate again every few days. If I used the client library it would autorefresh the token periodically, but that stores the refresh token in local storage. Since that is something you recommend against, I was wondering why.

Re: Ask HN: Any comprehensive courses on Auth?

#26
post #7

I have not seen a course that covers all of the things you are asking for. The best courses on the oidc/oauth and saml I have seen were the paid ones here: https://www.hackmanit.de/en/training/portfolio On linkedinlearning this one was quite ok: https://www.linkedin.com/learning/web-security-oauth-and-ope... Free ressources check: - https://aaronparecki.com/ -OAuth 2.0 and OpenID Connect (in plain English): https://m…

Aaron Parecki has two courses on OAuth:

The Nuts and Bolts of OAuth 2.0

https://www.udemy.com/course/oauth-2-simplified/

Advanced OAuth Security

https://www.udemy.com/course/advanced-oauth-security/

Re: Ask HN: Any comprehensive courses on Auth?

#27
post #16
post #7

I have not seen a course that covers all of the things you are asking for. The best courses on the oidc/oauth and saml I have seen were the paid ones here: https://www.hackmanit.de/en/training/portfolio On linkedinlearning this one was quite ok: https://www.linkedin.com/learning/web-security-oauth-and-ope... Free ressources check: - https://aaronparecki.com/ -OAuth 2.0 and OpenID Connect (in plain English): https://m…

all of that, plus the rfcs for oauth2 and oidc are pretty great as well!

Yeah start with https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-... Deprecating the unsecure&outdated/it's easy to shoot yourself and summarizing so you don't need to go through the rabbit hole of specs...

Also follow the BCP that will remain in a draft state forever(at least for the near future): https://datatracker.ietf.org/doc/html/draft-ietf-oauth-secur...

Re: Ask HN: Any comprehensive courses on Auth?

#30
Perhaps the higher level architecture reference guides can provide a good overview of all these items? Written from a GCP perspective, but nevertheless the concepts can be shared cross cloud:

Security & IAM - https://cloud.google.com/architecture/security-iam

Other - https://cloud.google.com/architecture?_ga=2.121060044.-59389...

Post reply on HN