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

Feature/ldap explorer back end #7634

Merged
merged 38 commits into from Jul 5, 2023
Merged

Conversation

VakarisZ
Copy link
Contributor

@VakarisZ VakarisZ commented Apr 24, 2023

Description

Adds a service that allows ldap search
Adds an ldap search client that services can use to perform any ldap search

Impacts

Only back-end. Front-end changes will come in a separate PR.

Code / PR Dependencies

Based on this branch by @fdurand

NEW Package(s) required

Ginkgo and gomega for people who want to run the tests

Issue

(OPTIONAL. REMOVE IF NOT NEEDED)
The following syntax 'fixes #ISSUE_NUMBER' will automatically closes a Github issue on pull-request merge time.
Modify the ISSUE_NUMBER in order to reflect the Github issue that need to be closed
fixes #ISSUE_NUMBER

Delete branch after merge

YES

Checklist

  • Document the feature
  • Add unit tests
  • Add acceptance tests (TestLink)

@@ -0,0 +1,122 @@
package pfldapexplorer
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be a different package?

}

func connect(ldapServer *ldapServer, timeout time.Duration) *ldap.Conn {
ldap.DefaultTimeout = timeout
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: Check if this alters the timeout just for this call or for the whole project/service running this

Comment on lines 1 to 4
# Search

```
curl -H "Content-Type: application/json" -d '{"server":"AD","search":"(sAMAccountName=zammit)","attributes":["userPrincipalName","sAMAccountName"]}' http://127.0.0.1:22226/api/v1/ldap/search| python -m json.tool
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Todo: Delete this

@satkunas satkunas requested a review from fdurand April 24, 2023 15:35
@fdurand
Copy link
Member

fdurand commented Apr 25, 2023

Still in draft but there 2 things needs to be done:

  • Dockerize the service
  • Use pfconnector

if h.Router.Match(chiCtx, r.Method, r.URL.Path) {
h.Router.ServeHTTP(w, r)

// TODO change me and wrap actions into something that handles server errors
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this mean?

@@ -0,0 +1,8 @@
:22226 {
bind 127.0.0.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When contenerized it will need need to bind on *

@VakarisZ VakarisZ force-pushed the feature/ldap_explorer_back_end branch 2 times, most recently from 252f9aa to 3655283 Compare May 8, 2023 14:02
@VakarisZ VakarisZ force-pushed the feature/ldap_explorer_back_end branch from 3655283 to 3367938 Compare May 22, 2023 13:45
@VakarisZ VakarisZ closed this Jun 5, 2023
@VakarisZ VakarisZ deleted the feature/ldap_explorer_back_end branch June 5, 2023 13:02
@VakarisZ VakarisZ restored the feature/ldap_explorer_back_end branch June 5, 2023 13:02
@VakarisZ VakarisZ reopened this Jun 5, 2023
@VakarisZ VakarisZ mentioned this pull request Jun 5, 2023
3 tasks
@VakarisZ VakarisZ force-pushed the feature/ldap_explorer_back_end branch from 52977e9 to 3b431dd Compare June 15, 2023 14:00
@VakarisZ VakarisZ marked this pull request as ready for review June 22, 2023 15:02
@VakarisZ VakarisZ force-pushed the feature/ldap_explorer_back_end branch from ad3f13e to 60c05c8 Compare June 23, 2023 08:16
@extrafu extrafu added this to the PacketFence-13.0 milestone Jun 27, 2023
@VakarisZ VakarisZ force-pushed the feature/ldap_explorer_back_end branch from c701572 to 81e8d93 Compare July 3, 2023 09:30
@jrouzierinverse jrouzierinverse merged commit 5ae05ef into devel Jul 5, 2023
1 check passed
nqb added a commit that referenced this pull request Jul 6, 2023
nqb added a commit that referenced this pull request Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants