jeffwils / grails-spring-security-saml

Grails Spring Security SAML2.0 Plugin for Grails 3
8 stars 24 forks source link

Implement UserDetails Initialisation with SAML Attributes #36

Closed valentingoebel closed 2 years ago

valentingoebel commented 6 years ago
  1. I have created a new class called SamlUserDetails which uses getProperty to make it possible to access the SAML attributes as if they were defined manually via a user customised UserDetails class.
  2. SpringSamlUserDetailsService now returns an instance of this class and populates it with the same attributes that were assigned to the User class.

I have added a few new test cases to the unit tests but I haven't tested this code on a real IDP so far. I'm especially concerned with missing saml attributes causing a missing property exception because this is a pain point that I've only noticed after uploading the first commit. We have some user specific saml attributes that are not available for all users so an access to e.g. principal.institute for someone who is not assigned to an institute should return null rather than crash with an exception.

Issue: https://github.com/jeffwils/grails-spring-security-saml/issues/31

irstevenson commented 6 years ago

Heya @valentingoebel

I've seen this PR and hope to review it, just not quite setup for SAML attributes being sent back across. :disappointed: And you've got two key bits that caught my attention:

But if you like, I can just review the code and run the tests. Would that help?

valentingoebel commented 2 years ago

The plugin has been rewritten for Grails 5 and I am moving the plugin to another repository. The pull request is no longer valid.