I am trying to secure our REST end points using the Principal I am getting from our SSO solution.
However, I would like to have the values from principal.principal.attributes["perms_claims"] available to the Spring Security "hasAuthority()" SpEL.
I figure, if I could intercept the Principal before it reaches the Spring Controller, I could decorate it so that getAuthorities() method also returns the contents of principal.principal.attributes["perms_claims"].
I'm guessing there is a way to do it using a Spring Interceptor... but I'm not trying to intercept the request itself, but just the principal.
So, how do I intercept a Principal before Spring Web controller request?