I have a connected app that uses SSO (and thus it points to a SAML certificate). I include a canvas app in a Lightning component via force:canvasApp tag like the following:
<force:canvasApp developerName="MyConnectedAppDeveloperName" height="660" width="600" scrolling="no" />
I use that Lightning component in an Account record page (included via the Lightning App builder).
I want to pass some account fields information to the SAML response. In other words I want to append SAML parameters with account.LegacyId__c for example. That way, the remote report would display only information relevant to the current account the user is viewing.
I tried many approaches, read many forum posts with no success.
I tried customAttributes method on the Auth.ConnectedAppPlugin class (extending the class and overrding the method), like described in this documentation: ConnectedAppPlugin Class. But it didn't work, when I examined the SAML message with SAML tracker (Firefox extension) I don't see the custom attributes that I added. The developer on the external system don't see the attributes coming in in the SAML as well.
The custom attributes that we can add declaratively to the connected app are not helpful in my case, they only get information about the environment or the current user... not information from where the force:canvasApp was called from (in my case an account record).
I also tried the parameters attribute of the force:canvasApp component like described here force:canvasApp but I don't know how to pass that to the SAML.