Open bdruth opened 3 weeks ago
@bdruth Thanks for sharing. We have not explored SAML with Google's API, so this is really helpful. The information you gave is sufficient for self-hosters to set up. You may submit a doc in https://github.com/AppFlowy-IO/AppFlowy-Cloud/tree/main/doc.
@speed2exe great! I'll put something together, then :)
(note: I'm happy to contribute with a little direction)
I've just gone through and spent a good few hours trying to get SAML auth working. It seems that supabase/auth has diverged from gotrue in how SAML auth works, and I'm not entirely sure what of the existing Okta auth instructions are valid vs not.
(caveat, I was setting up Google Workspace/GSuite auth)
What I ended up having to do was define a
GOTRUE_SAML_ENABLED=true
and aGOTRUE_SAML_PRIVATE_KEY
env var for gotrue. The initial directions here helped with figuring these new vars out.In addition, the
API_EXTERNAL_URL
needed to have/gotrue
appended, otherwise the ACS URL set in the SAML configuration in Google (or whatever the IdP is) won't match up with what's expected. It's unclear to me if this will impact anything else (like emails or whatever) - ultimately gotrue doesn't know, I think, that the nginx proxy puts it behind/gotrue/*
- but you have to use this URL in the IdP, otherwise it won't redirect to a functional SAML endpoint, but gotrue needs to validate that it's URL matches the AcsURL in the request it receives.Here's the Google side of the configuration (I think this is basically what the Okta docs indicate, too), Name ID format is
EMAIL
Thanks!