6 ms·
What Is OIDC?
- fabian2k 3y agoQuestion for everyone saying that you should always outsource authentication, how do you handle the on-premise case? Or does this only apply to pure SaaS software?
- tarruda 3y agoAs long as the app only depends on the standard, you have some flexibility. For example, you can outsource authentication to a third party OIDC server on SaaS deployment and run a self hosted OIDC server like Ory Hydra for onprem deployments.
- jwnin 3y agoMy read of this is 'don't write your own auth library'. If you want to rely on someone else to host it, or host it yourself, that's up to you and entirely fine. Different pros and cons of each approach; neither is perfect.
- 6R1M0R4CL3 3y agobeen working with keycloak at work for years now. handles several hundred thousands users every day and works fine. we upgraded some of our keycloak servers to redhat sso (which is keycloak but with redhat support) and its a joy to use.
- mynameisnoone 3y agoPSA: Don't outsource either your authentication or authorization. Run it in-house. Don't give away the keys to the kingdom to a third-party to fail like Okta or lose the ability to police access that becomes incredibly difficult to audit and classify. There is no panacea work or headaches alleviation by relying on SaaS when the business risks are too great.
- anon84873628 3y agoBuilding an entire directory app is hard though. And you want it to be highly resilient, right? What do you recommend?
- mynameisnoone 3y agoFreeIPA is pretty good for internal users when money is tight. It's a FOSS almost AD but for *NIX and it does HA. For the SSO part, Shibboleth2 or CAS.
- smitty1110 3y agoKeycloak [1]. Rock solid, supports everything, trusted everywhere. 1: https://www.keycloak.org/ https://www.keycloak.org/
- ExoticPearTree 3y agoI have to disagree with your assessment. It's not that rock solid, "supports everything" is a very vague term and "trusted everywhere" I'm not even sure that that is supposed to mean.
- lambda_garden 3y agoThe docs are really poor. It makes me less confident that I have configured everything correctly.
- broast 3y agoThey're desperate to get off keycloak at my org. Not sure the specifics, but our users complain about Auth issues often, and the keycloak web interface is painfully slow too.
- elevation 3y agoI’ve read you need to partition usage to limit each keycloak instance to about 1500 total users to avoid performance issues. Does this hold true in your org?
- apitman 3y agoOIDC seemed complicated to me for a while. What helped the most was: 1) focusing on understanding why all the song and dance is necessary from a security perspective. Start with [0]. 2) Realizing you can ignore pretty much everything except the OAuth2 spec and the core OIDC spec until you need it. [0]: https://datatracker.ietf.org/doc/html/draft-ietf-oauth-security-topics https://datatracker.ietf.org/doc/html/draft-ietf-oauth-secur...
- krooj 3y agoYup - OIDC can be boiled down to: 1. The OG OAuth2 spec never said anything about identifying principals 2. OIDC mandated an id_token to avoid the hit of POSTing the access token to an introspection endpoint 3. The shape of the id_token is a JWT This doc is junk, btw - it's suggesting the client use the id_token for the purposes of authentication? I wouldn't trust that token beyond some basics, unless you have very strong controls over the authorization server and IdP to ensure things like email verification are propagated correctly.
- dwaite 3y ago> OIDC mandated an id_token to avoid the hit of POSTing the access token to an introspection endpoint A bit more fundamental than that, the two tokens are meant for different purposes and different audiences. The access token is meant for delegated authorization of a user against resources. A client isn't even meant to be able to interpret it (but often can, because they are often signed JWTs). In particular, clients aren't supposed to use the introspection endpoint. The id_token is meant for the client itself, about the user. This isn't meant to be shared with anyone other than the client, and must be audienced (only usable by the client). Moreso, access tokens may be indefinitely long-lived access to resources, such as offline reading of a calendar for group scheduling free/busy information. An id_token is a signal at a particular point in time of state, e.g. this browser request represents this user because they bear the id_token.
- brewmarche 3y agoTo illustrate why OIDC introduced audience validation: When you separately request user info from an endpoint with an access token (which according to OG OAuth2.0 is just an opaque string, which cannot be validated) that access token could be someone else’s, possibly from a user who logged into a different, malicious application which somehow managed to trick you into using that token
- recursive 3y agoI don't understand the diagram. We have a browser sending a request to the identity provider. Then sometime later, the relying party is responding. How does the response come from a different server than the request went to? Maybe it would help if each response was correlated to its corresponding request somehow.
- Arcanum-XIII 3y agoIt’s missing a step or two. Once you’ve selected your identifying provider, the user is redirected to it, identify itself and select there the claims he’s willing to share (most of the time only what’s needed for authorization). The identifying provider generate the proper token and claims, return them with the user to the third party site. Who can then authorize or not the identified user and return the user. This exchange of data and redirection is the core of the oauth.
- magicalhippo 3y agoThe app server requesting access has to be configured with the identity provider. Part of that is a redirect URL, which the identity provider redirects the client to once the authentication is ok. The URL is to an endpoint of the app server. When the id provider redirects, it includes the authorization code as an URL parameter or similar, so the app server can pick it up and call the id provider to exchange the authorization code for an access token. At least that's how I remeber it off the top of my head.
- mooreds 3y agoThanks for the feedback. I created the diagram and would love to improve it. I skipped a bit (as other folks have mentioned) and the 'authenticate the user' and 'obtain the user consent' steps both involve requests to the browser. I'll update the diagram to make it clearer.
- mooreds 3y agoDiagram updated. Hope it is more clear now.
- Ruarl 3y agoShould "Relying" in the article be "Relaying"? Or is it "relying" on the external auth? If the latter, it's a form of English I've never seen before.
- mooreds 3y agoIt is "relying"[0]. I think because the relying party is "relying" on the OpenID provider to authenticate the user, but I wasn't able to find the authoritative origin of the term. 0: https://openid.net/specs/openid-connect-core-1_0.html#Terminology https://openid.net/specs/openid-connect-core-1_0.html#Termin...
- Joker_vD 3y ago> OIDC leverages both OAuth [...] and OpenID Yes, give me more layers of protocols, please, I like lasagna. > It’s an extremely flexible framework that can cover both simple authentication systems and complex large-scale systems I also like coils of ropes long enough to strangle myself with. Gimme now! Even though I understand the appeal and the need, botching all of that is way too easy.
- Guid_NewGuid 3y agoI played around with consuming a few different OIDC providers as close to the raw APIs as possible (not component libraries or client SDKs) just to try and understand the flow. Each provider implemented the spec subtly differently and caused a massive headache to get working even for just a basic auth code with PKCE flow. I'm still none the wiser on why you'd even want OIDC for most apps. Granted if you have much more complex SSO needs with external IDP integrations and OAuth API stuff etc it can make sense. I don't see why it is preferable over basic forms auth with a cookie. The default answer seems to be to support mobile apps but I'm also none the wiser on why a JWT auth token is preferable to store on device and send with every request vs a cookie. They're both just 'keys' that need to accompany every API request and need to be stored securely. OIDC-by-default seems like overengineering but I appreciate I'm probably missing a critical reason.
- mickael-kerjean 3y ago> why you'd even want OIDC for most apps If you can get away from OIDC, don't touch it. It's only usefull if you don't control the source of users, need to have some seemless login across many apps or if your app is integrated with many other apps for which you need something that work everywhere and that is a standard. OIDC and SAML are the lingua franca when you need that kind of capabilities and those scenario are just the one I've faced, there's a lot more to it > I don't see why it is preferable over basic forms auth with a cookie. Cookie is how you typically persist session on a browser, this is the step that usually goes after you've authenticated / been authorised, the scope of OIDC is purely in the authentication/authorisation and doesn't even specify how you should persist the session. Also the scope of OIDC goes beyond the browser > OIDC-by-default seems like overengineering but I appreciate I'm probably missing a critical reason. By all means, if your use case doesn't need it, don't touch OIDC/SAML it would be like using kubernetes to host your mum wordpress. OIDC and SAML are complicated because SSO is made to fit the need of companies with all sort of use cases that goes beyond simple use case like the one you seem to describe.
- trommlp 3y agoI wholeheartedly agree with your last sentence that is seems overengineered, but one has to assume that there are use cases that warrant such a complex auth scheme. I cannot speak to that as I have never implemented systems of massive scale. However one thing that puts me off is that it slowly becomes the default way of implementing authentication and authorisation at work where our internal (web) services are (at best) used by 10s of people on a given day. Besides the "old" way of auth integrated much better into our existing system landscape while the "new" way requires (in our case) a Keycloak server. Again, all that would be fine if the use cased warranted the complexity, but in my employer's case it does not.