Skip to content

activeDirectoryRealm.principalSuffix isn't honoured#20

Closed
prabhjyotsingh wants to merge 1 commit intoapache:masterfrom
prabhjyotsingh:activeDirectoryRealm.principalSuffix
Closed

activeDirectoryRealm.principalSuffix isn't honoured#20
prabhjyotsingh wants to merge 1 commit intoapache:masterfrom
prabhjyotsingh:activeDirectoryRealm.principalSuffix

Conversation

@prabhjyotsingh
Copy link
Copy Markdown

While using shiro for auth in my project I noticed that, activeDirectoryRealm.principalSuffix is not honoured for authentication, however, for getRoleNamesForUser it does append the same.

Looking at the tcpdump, it appears activeDirectoryRealm.principalSuffix isn't honoured. As a result, the bind request searches for user_name, rather than user_name@company.com. Also note that if I try to login as username "user_name@company.com", I do authenticate as I'm found in the directory server

String userPrincipalName = upToken.getUsername();
if (this.principalSuffix != null) {
userPrincipalName = upToken.getUsername() + this.principalSuffix;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@prabhjyotsingh
Copy link
Copy Markdown
Author

I see this working now, not sure why it was not working earlier. Closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants