🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

github.com/datasektionen/ldap-proxy

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/datasektionen/ldap-proxy

v0.0.0-20241219214210-58519c18735e
Source
Go
Version published
Created
Source

LDAP Proxy

Proxies lookups to KTH's ldap server allowing us to access it from servers not physically located at KTH and translates it to a nice(?) REST api returning JSON. Not exposed to the internet.

Also does a few sanity checks and logs warnings when data is not as expected.

API:

Send a GET request to /user including either kthid or ug_kthid in the query string.

Unless there are any errors, the response will have Content-Type set to application/json. Example response body:

{"kthid":"turetek","ug_kthid":"u1jwkms6","first_name":"Ture","family_name":"Teknokrat"}

If there is an error Content-Type will not be set. An error message will be sent in the body as text. If no user is found the status code will be 404. If the request is invalid the status code will be 400. If something else goes wrong the sttus code will be 500.

Testing locally:

ssh -L3389:ldap.kth.se:389 mjukglass -N
LISTEN_ADDRESS=:3000 LDAP_URL="ldap://localhost:3389" go run .

FAQs

Package last updated on 19 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts