soteria icon indicating copy to clipboard operation
soteria copied to clipboard

Split SubjectParser code in Application server specific classes

Open glassfishrobot opened this issue 7 years ago • 3 comments

The SubjectParser contains package names for different servers within Strings.

This leads to some unmaintainable code.

Proposal (see also https://github.com/javaee-security-spec/soteria/issues/69#issuecomment-308394262) is to create separate maven artifacts with the application server specific code.

Proposal

  • Interface with methods to retrieve caller and groups (getGroupsFromPrincipals, getCallerPrincipalFromPrincipals, ...)
  • Server specific project contains an implementation of the interface which is defined as CDI bean. CdiUtils#getBeanReference(java.lang.Class<T>, java.lang.annotation.Annotation...) can be used then to retrieve the implementation.

glassfishrobot avatar Jun 14 '17 11:06 glassfishrobot