Customize username depending on URL

My use case is the following: I have multiple intranet websites in my company, which use the same LDAP for authentication. The password is always the same for all websites. However some websites use authentication forms in which I must use my company username, when some other use my company email. I have setup an entry with my company username and password, and a field with my email. URLs in the Kee > URLs section are working fine.

I know I can create a second entry, with references to the first one, and configure URLs entries accordingly. I am wondering whether there is a way to use only a single entry, and configure Kee to use different field depending on the URL, or if I am stuck with the two entries with reference approach ?

URLs are only used to work out which entries could be filled, not individual fields within an entry. A layer of LDAP authentication (I’m assuming this works similarly to HTTP Basic) will always fill the username and password fields - other custom fields you’ve added to the Kee Form Fields list will be ignored. It’s not clear whether you are being shown this additional authentication step before seeing the websites in question but in any case, once you’re past any initial LDAP prompt and faced with a standard web (HTML) form you have some options.

Whether your idea will work depends a bit on how the websites are structured but you should be able to find information such as the HTML id attribute and assign that information to the Kee Form Field that contains the user/email that you need for that website.

When a field matches by id (and some other factors) it will increase the priority given to filling that specific field into that form field on the website. So if there are sufficient differentiating factors between the forms that require an email address and those that require a username, you can control the field data that gets inserted.

It’s not possible to assign multiple id attributes to a single form field in an Entry.

So, whether that is worthwhile or not will probably come down to things like how many different websites are involved, whether their forms contain the information we hope for, how often you have to change your password, and how you feel about having multiple entries for very similar credentials.

1 Like

Sorry for the late answer and thanks for yours.

Sounds like my explanation was unclear. There is no such thing as “initial LDAP prompt”. All applications use exclusively a form authentication, with a classic login/password pattern. These applications then use the provided credentials and compare them with values in an LDAP registry. The LDAP part structurally ensures that users use the same passwords across all applications. In other words, when you change your password on an application, it changes your password everywhere. However, applications expect different values in the login field. Some applications expect you to write your username (something like user1234) while others expect your email address (first.last@company.com).

The idea was to create a single entry with all 3 informations (password, username, email) and configure Kee to use different values for the login field, depending on the hostname. My understanding of your answer is that this is not feasible. What you suggest is using the “Form fields” tab with hardcoding the email address in one or multiple entries, provided applications that require an email instead of login would use a different input id.

I will look into that, but I don’t think that’s the case.

Thanks for the clarification. Your understanding is correct so yes, take a look into that, but not only the input id - the name attribute of the form field can have an influence as well.

1 Like