New optional callbackUrl request parameter#41
Conversation
🦙 MegaLinter status: ✅ SUCCESS
See detailed report in MegaLinter reports |
|
My comment was not addressed. The callback url must be preregistered and validated the same way as redirect_uri in authorization code flow. This not about consent info replacing OIDC authorization code flow but about security. |
|
The API Consumer should not allow arbitrary callback url. An attacker might succeed to insert its own callback url. Should the PR contain a note to API consumers that the size of Should PR contain a note that the state should be opaque and MUST not contain visible PII? |
Thanks for the feedback, @AxelNennker. We fully understand the reasoning behind the requirement for precise, pre-registered callback URIs, as implemented for redirect_uri in OIDC Authorization Code flows. This approach offers the strongest security. However, two practical considerations lead us to recommend the current wording ('SHOULD') rather than a mandatory ('MUST') requirement in the API specification:
Additionally, the CAMARA Commonalities (the Event Subscription and Notification Guide) already recommend that Event Producers may require pre-registration of notification URLs as part of their internal security measures. However, this is done in a flexible way that leaves enforcement to Providers' onboarding processes. Using the same 'SHOULD/Provider choice' model here maintains consistency across CAMARA APIs, and aligns with Commonalities security recommendations for notification endpoints with similar requirements.
|
@AxelNennker To be honest, I don't have a strong opinion on this one. I'm happy with it as it is. |
@AxelNennker We can add it if you think it needs to be explicitly clarified. Do you want me to do so? |
|
As discussed in today's ICM meeting https://lf-camaraproject.atlassian.net/wiki/spaces/CAM/pages/357597203/2025-11-19+Draft+Agenda+ICM+Minutes, the group agreed to set a deadline to make a final decision on this topic at the next ICM meeting (Wednesday, December 3). This PR has been around for several weeks already, and the goal is to close it before the Christmas break. |
@AxelNennker @sebdewet A kind reminder to take a look at the discussion above regarding security restrictions for the callback URL. We should make a decision by next Wednesday. Thanks. |
What type of PR is this?
What this PR does / why we need it:
This pull request enhances the consent API definition by introducing support for callback URLs during the consent capture flow, clarifying denial scenarios, and improving status handling. The changes add new functionality for redirecting users after consent actions and provide more explicit documentation and examples for denied consent cases.
Callback URL support and consent denial handling:
callbackUrlparameter in the consent capture request, allowing API Consumers to specify where the user should be redirected after completing the consent flow. Detailed documentation covers its behavior, security requirements, and possible outcome values in the callback.ONE_SCOPE_CALLBACK_URL) demonstrating usage of thecallbackUrlfield in API requests.CONSENT_DENIED) to illustrate how the API responds when consent is explicitly denied for a scope and purpose.UPDATEExtended test scenarios to cover callback URL behavior, including handling thestateparameter and verifying correct redirection and result propagation.UPDATEStatus value improvements:REVOKEDwithDENIEDthroughout the API, updating both the schema and the documentation to clarify thatDENIEDcovers both explicit refusal and withdrawal of consent.UPDATEError Handling Improvements:CONSENT_INFO.INVALID_CALLBACK_URL) and example for invalid callback URLs, ensuring that API Providers return a clear 403 error when the callback URL fails validation.Which issue(s) this PR fixes:
Fixes #40
Special notes for reviewers:
N/A
Changelog input
Additional documentation
N/A