security(CASA-11): remove API key from donke URL query parameters #1025
+6
−3
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.
Summary
This PR addresses CASA-11 security requirement by removing API keys from URL query parameters in all Donke API calls.
Changes
Updated 3 Donke API calls to use Azure Functions' native
x-functions-keyheader authentication instead of exposing the API key in URL query parameters (?code=).Files Modified:
backend/airweave/billing/webhook_handler.py(2 locations)_notify_donke_subscriptionfunction_send_team_welcome_emailfunctionbackend/airweave/api/v1/endpoints/organizations.py(1 location)_notify_donke_signupfunctionSecurity Impact
✅ No more API keys in URLs - Prevents exposure in:
✅ Azure Functions native support - Both methods (
?code=andx-functions-keyheader) are officially supported byAuthLevel.FUNCTION, no Donke changes required.Testing
Please test:
References
Summary by cubic
Removed API keys from Donke API URLs by switching to x-functions-key header auth to satisfy CASA-11. Prevents key exposure in logs, referrers, and history; addresses Linear ENG-165.