Hi Andy,

finally I found it out:

the principal attributes are not added because of this class is not 
triggered:

SurrogateAuthenticationMetaDataPopulator.java

I tried to fix it and create a pull request by acting 
on SurrogateInitialAuthenticationAction.java but then i had to modify 
webflow and SurrogateAuthenticationPostProcessor.java
but i didn't find any acceptable solution.


I ended up with a quick and dirty solution consisting into adding the 
authentication attributes afterwards:

SurrogatePrincipalBuilder.java

            authentication.getAttributes().put(
SurrogateAuthenticationService.AUTHENTICATION_ATTR_SURROGATE_PRINCIPAL, 
authentication.getPrincipal().getId());
           authentication.getAttributes().put(SurrogateAuthenticationService
.AUTHENTICATION_ATTR_SURROGATE_USER, surrogatePrincipal.getId());
           authentication.getAttributes().put(SurrogateAuthenticationService
.AUTHENTICATION_ATTR_SURROGATE_ENABLED, Boolean.TRUE.toString());

just in case anyone else may need it.

Thank you again for your time
Regards
Michele

On Sunday, February 23, 2020 at 5:59:59 AM UTC+1, Andy Ng wrote:
>
> Hi Michele,
>
> I recalled I spent a few hours looking and testing into this issue, and 
> didn't find any meaningful progress so I stopped my research.
>
> Sorry to disappoint, let see if the others in the communities have more 
> idea into this issue...
>
> Cheers!
> - Andy
>
>
>

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/40e3d317-528b-40ee-b239-17b90ada54ac%40apereo.org.

Reply via email to