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

RAPS fixes and LDAP fixes #21

Merged
merged 73 commits into from
Jun 4, 2024
Merged

RAPS fixes and LDAP fixes #21

merged 73 commits into from
Jun 4, 2024

Conversation

bsedwards
Copy link
Contributor

Fixing Active Directory LDAP in RAPS and LDAP in the Directory by using System.DirectoryServices.Protocols.

Splitting LDAP and ActiveDirectory into their own classes in Classes/Utilities.

Minor fixes for RAPS.

Directory code will be deployed to prod so we can make sure prod is working, but it's been locked to SVM-IT for now.

JasonRobertFrancis and others added 30 commits January 24, 2024 09:50
I'm sure there will be additional back-and-forth, but here's the next round of changes:

--- [Permission(Allow = "SVMSecure")] is probably a sufficient permission check. As it is now, this restricts the page to a much smaller set of users.
Done

--- Make sure to remove copy/pasted variables that are not needed in this class
Sorry about that; I had left in some of my early code (as I was trying to figure out how all this works!). I removed the variables, but I added back in what seemed necessary to do the permission check.

--- We might need a permission check here for the IDs. Since this data is sent to the browser via AJAX, it's visible to the user, even if not included in the page. One way to handle this would be the IndividualSearchResult class only containing data visible to everyone, and then an IndividualSearchResultWithIds child class containing the restricted data.

Maybe you can help me think about a better way of doing this. I couldn't quite figure out how to use a generic to be able to switch between the two possible resulting objects.

--- There's a static function GetOldViperRootURL() in HttpHelper that could be used to get the url for Viper on the current server, instead of hard coding viper.vetmed.

Good tip. Thanks! Its seems like vue isn't very happy with localhost, but maybe adding a local certificate will help with some of the problems I am now getting.

--- The key for the storage has to be unique across all of VIPER, so consider prefixing searchField with, e.g. directory or some other prefix.
Fixed. I am now using directory_search

--- I know I used 3 as the min length for RAPS, but it's been suggested to me that 2 might be better.
Good suggestion. Fixed.

--- Consider allowing additional ID searches - pidm, spriden id, mothra id, employee id, iam id
Done

--- I'm glad you were able to use this class!
I added phone number to the LDAP lookup. If that is getting too unwieldy, we could pull it out of RAPS and create a generic LDAPlookup class.
This is all pretty messy, but I think I can unwrap the debugging stuff once we figure out the error. The current message at /directory/search/francis/ucd is "DirectoryServicesCOMException: An invalid dn syntax has been specified." I thought the invalid username message I was getting earlier was an indication that at least the username/password was correct, but I am getting the invalid dn error even with [username] and [password]. Every filter string I have tried has returned the same error.
Next step is exploring cards for display instead of the table. I will focus more on making sure all the relevant data is displayed with the next update.
web/Classes/Utilities/LdapService.cs Dismissed Show dismissed Hide dismissed
@bsedwards bsedwards merged commit a154337 into main Jun 4, 2024
3 checks passed
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