Skip to content

Commit

Permalink
Merge pull request #311 from derek63/fix-multiple-envs
Browse files Browse the repository at this point in the history
Fix environment validation, remove special handling for legacy certs
  • Loading branch information
derek63 committed Nov 22, 2017
2 parents af56cb7 + 4c5cef0 commit d203ef8
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,10 @@ protected Group[] getRoleSets() throws LoginException {

LOGGER.debug("Certificate principal:" + certPrincipal);

//first try getting search name from uid in certificate principle (new certificates)
String searchName = getLDAPAttribute(certPrincipal, UID);
if(StringUtils.isNotBlank(searchName)) {
//only try to validate environment if it is a certificate that contains uid

if(StringUtils.isNotBlank(environment)) {
validateEnvironment(certPrincipal);
} else {
// fallback to getting search name from cn in certificate principle (legacy certificates)
searchName = getLDAPAttribute(certPrincipal, CN);
}

Collection<String> groupNames = rolesProvider.getUserRoles(searchName);
Expand Down

0 comments on commit d203ef8

Please sign in to comment.