-
Notifications
You must be signed in to change notification settings - Fork 294
[SDK] Get IG4 Auth info from api #9145
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
Conversation
|
|
||
| if config.auth_with_client_id.enabled: | ||
| self.token_provider = mlrun.auth.OAuthClientIDTokenProvider( | ||
| token_endpoint=get_secret_or_env("MLRUN_AUTH_TOKEN_ENDPOINT"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If _init_token_provider is called after the connect, then MLRUN_AUTH_TOKEN_ENDPOINT should be available on the config. Why fetch it from the env?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just didnt touch this code flow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I think it needs to be touched because now MLRUN_AUTH_TOKEN_ENDPOINT won't be available anymore as an env var
|
Can you also refactor the refresh-access-token endpoint here?https://github.com/mlrun/mlrun/blob/development/server/py/services/api/tests/unit/runtimes/test_kubejob.py#L1489 |
next related PR |
📝 Description
Initialize Iguazio v4 OAuth token configuration automatically from
/client-spec, so users no longer need to manually set OAuth env vars before importing MLRun.🛠️ Changes Made
/client-specresponse with IG4 OAuth token config (internal svc + external ingress endpoints).HTTPRunDB.connect()to apply OAuth config before token provider initialization (IG token flow).✅ Checklist
🧪 Testing
server/py/services/api/tests/unit/api/test_client_spec.pytests/rundb/test_httpdb.py(IG4 OAuth auto-config)🔗 References
🚨 Breaking Changes?
🔍️ Additional Notes
N/A