Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selected username format to be domain\sam but it imported domain-sam #15

Closed
shivinders opened this issue Jun 1, 2018 · 5 comments
Closed
Labels

Comments

@shivinders
Copy link

Selected username format to be domain\sam but it imported domain-sam. Is this a bug or I did something wrong?

@petrsvihlik
Copy link
Contributor

This is intentional. Usernames in Kentico support only characters that are valid in URLs. All invalid characters are replaced with a dash (or a character configurable in web.config).

https://docs.kentico.com/k11/references/reference-web-config-application-keys#Reference-Web.configapplicationkeys-Settingsforforbiddencharactersinuserandrolenames

@shivinders
Copy link
Author

Kudos to flexibility in Kentico. These options in web.config are amazing!

My question is how is the replacement of / with - supposed to work with claims based authentication? We have an ADFS server which is sending the samaccountname in the domain\sam format. After running ADImport tool, how will Kentico make a decision that eagle\jdoe the ADFS sends is the same guy as eagle-jdoe that ADImport created?

@petrsvihlik
Copy link
Contributor

One solution would be to implement a custom (claims-based) authentication module, run the username through ValidationHelper.GetSafeUserName() method, and match it with user in the database.

@shivinders
Copy link
Author

But why are we supposed to go through the hassle in the first place :)
I think it would be easier if the domain name is stripped out from the claim altogether. And ADImport as well.

@petrsvihlik
Copy link
Contributor

You can choose to import just SAM and omit the domain name. Isn't that what you need?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants