[AuthN] Support Using Service Account Tokens For Internal System Requests #9171
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 Description
This pull request introduces enhancements and fixes related to authentication and service account token handling in the MLRun framework.
🛠️ Changes Made
Claimsclass for JWT claims constants inmlrun/auth/utils.py.is_token_expiredand_decode_token_unverifiedutility functions for JWT token handling.igz_authenticator_kindheader constant inmlrun/common/schemas/constants.py.service_accountconfiguration section inmlrun/config.pyfor Kubernetes service account tokens.service_account_token.pyclient for managing service account tokens.service_account_token.pyclient.test_auth_utils.pyto cover token expiration scenarios.✅ Checklist
🧪 Testing
service_account_token.pyclient to validate token caching, expiration handling, and header escalation.test_auth_utils.pyto cover token expiration and missing claims scenarios.🔗 References
🚨 Breaking Changes?
🔍️ Additional Notes
create_default_project_policiesmethod currently relies on incoming request auth info. Future updates to the Iguazio API are required to support explicit owner parameters.