-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sso-auth: implement Azure AD provider #98
Comments
@sporkmonger opened a separate issue for implementing the Azure AD provider. |
Just as a clarification, I'm also porting the OIDC provider as part of this work. I may try to land it as a preceding PR. |
|
I'm only doing v2. And yes, I think you need #95 for v2 to work at all. |
I now have the Azure AD provider working, just working out some issues w/ groups propagating through to the proxy side of things and writing tests. |
Sounds good @sporkmonger, I'd be happy to help with testing! |
@shrayolacrayon I'm almost done with the AD provider, but the main hang-up I still have is that for whatever reason, the |
@sporkmonger got the code up somewhere public? I got all of this week to work on this at work so I’m happy to help. |
@sporkmonger, I can take a look at the changes if they're up somewhere! The |
Hmmm, would it strip groups that didn’t validate?
|
It would error if the groups are not valid and |
Yeah, I probably won't try to do that simplification as part of this PR, but I do suspect when this is done it'll be more obvious what could benefit from some more attention. The caching for the Google provider also strikes me as something in that vein. I opted to use the Hashicorp LRU cache in lieu because the existing cache mechanism was much too specific to the initial use-case. |
I didn't implement |
Oh wait, there's two different inGroups := []string{}
if len(allowedGroups) == 0 {
return inGroups, true, nil
} This seems surprising? |
Yeah I agree that simplifying these things would be out of the scope of this task. There is a
Side note: We want to remove |
Yeah, I looked through that PR. Definitely expecting merge conflicts, but that's OK. Also agree w/ rationale, makes it easier to do useful compile-time interface verification as well. If default provider satisfies interface, compile-time check would always pass. New status quo, now that I'm explicitly setting I think this design has some advantages and disadvantages. The main disadvantage is that I believe apps should preferentially be responsible for their own authorization logic. Which implies that the proxy should not be deciding what groups are allowed or disallowed. However, in practice, many apps are not going to be written by the people deploying them (e.g. basically anything open source or supplied by a vendor). These should have |
OK, got groups plumbed through end-to-end. Bit hacked together at the moment, still gotta do a bunch of clean-up. |
Success, got things fully working (no longer just hacked together). Just working on clean-up and tests. |
@sporkmonger I'm curious about the timeline for your PR. I'd like to test the Azure AD integration sometime late this week and I would rather try it with your work than the hacking that I've done (which works well enough but is not pretty). |
So I could publish a branch that's not done w/ the understanding that it's, well, not done. The implementation works but there's setup documentation that I haven't done yet and the tests don't currently pass. I've also been coding against a weird custom merge branch because I've got a couple other PRs out there that our internal staging environment relies on. If there's a desire for early access, I'm totally happy to facilitate that, but it probably would be in the form of commits against our "internal" branch. The biggest caveat is that currently there's a still huge time delay the first time someone logs in after a new deploy while the group membership cache warms up thanks to Microsoft's questionable API design requiring so many round trips. That tends to result in annoying timeouts for the first couple of logins if the people logging in belong to a large number of groups. In terms of when I think it'll actually be done, I made a ton of progress today after being completely roadblocked for most of the week on a super-obscure test mock bug. I might be able to get a PR up by Friday, but I definitely wouldn't promise that. |
OK, I've committed everything and pushed to our custom merge branch: https://github.com/Remitly/sso/tree/production I've still got 3 groups related test cases I need to get passing. The mock for OIDC was gnarly. |
see #118 |
Add Azure AD as a provider to sso-auth as a part of #27
The text was updated successfully, but these errors were encountered: