as we unfortunately missed the EAP phase we now jumped on the preview phase of RFC-136 and have to conclude that it is unusable for use mainly because you violate your own statements.
“Because staticView stores and returns pure ADF, external links are handled exactly the same way Confluence handles external links in any other ADF content. Since there is no app runtime or iframe loaded in the browser when the static view renders, the macro itself cannot make egress calls or execute client-side scripts. Therefore, Forge app egress rules do not apply to the rendered static view.”
However this does not seem to be true. URLs in the static output must match the app’s egress permissions (fetch.backend), otherwise links are removed (based on my tests). Our users can add any link to a citation (just as any user can add any link to a page in the editor), so we can’t declare the domains up front, and allowing all domains for backend fetch is not an option. Could plain links (link marks / <a href>) be exempt from the egress check, or could link domains be declared separately without granting network access?
Thanks for reaching out, and am sorry to hear your experience with Forge Static Macros.
I was a part of the team that implemented Forge Static Macros and can offer you some insight. As other partners pointed out in their RFC responses, allowing arbitrary URLs in the staticView response would introduce an inconsistency with the broader platform posture for egress. Therefore, the staticView responses have the same CSP enforcement applied as though the content was rendered dynamically in a Forge UI iframe.
We realise that we’ve been a little heavy handed on this by completely stripping the links rather than adopting the behaviour exhibited by Forge iframes
The fetch.client list declares which external sources are allowed for an app’s connect-src policy. Additionally, links included in the fetch.client list do not display the external link warning popup when opened with router.navigate.
Yep that’s correct, staticView macros are currently stripping all links that aren’t covered by egress.
We’re looking into making the behaviour consistent with Forge UI dynamic renders, which is:
If the link is covered by fetch.client definition (in manifest or customer managed dynamic egress), allow direct navigation
If the link is not covered by fetch.client definition (in manifest or customer managed dynamic egress), allow navigation after the user has accepted the “Opening external page” popup