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

Adds Username field to AD authentication screen #446

Merged
merged 3 commits into from
May 28, 2019

Conversation

purushotham-s
Copy link
Collaborator

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)

… 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:''}}">
Copy link
Contributor

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>
Copy link
Contributor

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>
Copy link
Contributor

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:
Copy link
Contributor

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?

Copy link
Collaborator Author

@purushotham-s purushotham-s May 28, 2019

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.

@fractalram fractalram merged commit 0328ba5 into integralstor:master May 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants