Skip to content

SpringSecurityUserProvider should populate SimpleFeatureUser with granted authorities #67

@parxier

Description

@parxier

I'm trying to implement Spring Security based ActivationStrategy that would activate feature based on authorities granted to the user. I can read authorities from authentication security context and make a decision based on that, but then passed in FeatureUser parameter would be of no use to me.

In keeping everything abstracted nicely and since SpringSecurityUserProvider already is reading and iterating through granted authorities I thought it'd be nice if SpringSecurityUserProvider could populate SimpleFeatureUser returned with collection of granted authorities via setAttribute() call. Then ActivationStrategy can simply read granted authorities from FeatureUser parameter instead of reading from security context again. This way implemented ActivationStrategy wouldn't even be tied to Spring Security granted authorities and can be used with other security frameworks as far as list of granted authorities can be read from FeatureUser attribute.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions