-
Notifications
You must be signed in to change notification settings - Fork 14
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
Adds Username field to AD authentication screen #446
Conversation
… when user enters wrong username and password
<td> | ||
<input type="password" name="password" class="form-control" id="id_password" placeholder="AD Administrator password"> | ||
<input type="text" name="username" class="form-control" id="user_name" placeholder="AD Server Username" value="{{form.username.value|default_if_none:''}}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id="id_username" placeholder="Enter AD Admnistrator's username"
@@ -35,9 +35,16 @@ | |||
<td> {{ form.realm.errors }} </td> | |||
</tr> | |||
<tr> | |||
<td> <b>AD Admininstrator password </b><br> (Never stored. Used only to initially join AD realm) </td> | |||
<th> AD Server Username: </th> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AD Administrator's username
<td>{{ form.username.errors }}</td> | ||
</tr> | ||
<tr> | ||
<td> <b>AD User password </b><br> (Never stored. Used only to initially join AD realm) </td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AD administrator's password
raise Exception("Invalid Credentials, Please try again") | ||
elif "not found" in err: | ||
raise Exception("Could not find an Active Directory user with the username: '%s'! " % cd["username"]) | ||
elif cd["password"] in err: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have this condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the original error message looked a bit cryptic and couple of users complained about the echo password | kinit
statement in the error message. So we decided to add these exception messages.
AD authentication screen uses administrator user by default to bind to an AD server, these changes adds an Username field so that users have an option to use any privileged user to bind to the AD server. Exception messages have also been modified to inform user about incorrect username and password. (Addresses issue - #438)