-
Notifications
You must be signed in to change notification settings - Fork 29
Programmatic access and authentication/authorization #130
Comments
@AmadiL Am I assuming correctly that the main reason you need the authentication through the Gateway is for Kubeflow Pipelines? Or are you also needing this for KFServing? I’d like to hear more about your use case so that we can come up with a better method to handle these types of policies. The cookie method works with Oauth2-Proxy (though the name of the cookie is different). For the KFP SDK a better integration for authentication is something we’d like to work on in the future. If you need LDAP integration, OAuth2-Procy can’t handle this natively, but we provide overlays for Dex and Keycloak which can do this. For Ping I am not sure, if it is OIDC you can integrate it with OAuth2-Proxy directly. |
*Our Ping Identity is synced with LDAP If we could find a general solution it would be great for everyone :) |
@AmadiL Could you maybe expand a bit how machine2machine authentication works in this workflow. I'm not familiar with it, but reading up on it now. It does look similar to something I've seen before, which gives me hope that we can use this to provide a better authentication experience for the entire Kubeflow setup. |
M2M with OAuth2 is a little bit tricky, I'm not an expert and just researching it to solve this particular issue. I don't have the whole image of how this workflow would look like with Kubeflow. For me it doesn't really matter as long as I can either allow my app/client to generate a token, that will be used to access KF, or generate a long-lived token myself that I will store somewhere, and my app/client will use it to access KF. |
Obviously, using the client ID and secret is something that needs to be done very carefully. On GCP, the pipelines SDK has an authentication flow that I think is somewhat similar, and could hopefully be more generalized for a generic OIDC/OAuth setup. Does this setup look familiar to you? |
Yes, I believe this is exactly OAuth2 Client Credentials Grant with GCP's IAP: |
@AmadiL Here is how I got around programmatically authenticating kubeflow with cognito. It's an ugly workaround but it's the only one I could come up with.
|
It looks like oauth2-proxy only supports user flows and not the client credentials flow: oauth2-proxy/oauth2-proxy#698. This Kubeflow distribution with oauth2-proxy does work with OIDC and external IDPs like Okta. I've used the client credentials flow in the past for api calls that are not user scoped. I'm curious how that would work here since I assume with Kubeflow you would want different users to login, not just a single machine user. But I might not be understanding your requirements. |
I believe I've figured out a way to allow for generating API keys, and thus also enable programmatic access. The downside is that the changes necessary are not very trivial. This is something I'm working on as a part of my new job, that I hope I will be able to port to ArgoFlow as well. Until that time, the cookie method might be the only way to go if your IdP doesn't support generating API tokens. |
Hi,
looking into the main Kubeflow project and it seems that there is an issue when trying to programatically authenticate and authorize.
With Dex it seems to involve some workaround: kubeflow/kubeflow#5345
while with cognito it's impossible (involves pasting cookies by hand): kubeflow/pipelines#4182
Did you happen to address this issue in your project? I can see you're using oauth2-proxy - does it help here in any way?
We are trying to integrate our auth gate with external IdP like Ping Identity or LDAP. Also we consider moving to argoflow-aws.
The text was updated successfully, but these errors were encountered: