-
Notifications
You must be signed in to change notification settings - Fork 1
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
integrate LDAP as external auth service #1
Comments
I am studying MoE series of articles,I am interested in this direction, who should I contact? |
@XiaoYaoheihei thanks for asking. there are four projects published in "开源之夏", https://summer-ospp.ac.cn/org/projectlist?lang=zh&orgName=MOSN%20%E7%A4%BE%E5%8C%BA&pageNum=1&pageSize=50&programName= We intend to close this project in the internal discussion, so you are recommended to choose other projects. But this issue is still very useful for Envoy and MOSN, still welcome to contribute, just out of the "开源之夏" project. |
oh, is that means the project wouldn't be present at summer-ospp? I recently glance at the project in summer-ospp and have a strong willing to apply it |
according to the rule of summer-ospp, it is there. but you are recommended to choose the others, you could treat it as it is not there.
|
so disappointing, I’ve got great interest on the project. |
@jackj-ohn1 Sorry for that.
if you still are interested in it, this project is still open. |
Hello @doujiang24 , I am interested in this project, and here is my design. It is inspired by Kong. I would appreciate it if you could review my design and provide insights on areas that could be optimized. TargetLeveraging Envoy Go extension technology, we aim to integrate LDAP-based access control capabilities into Envoy. Only requests that pass the LDAP server's authentication will be proxied to the upstream service. During this process, we can optimize the system by implementing user information caching with a duration defined by UsageThe client set credentials in
An example of the
Bind Mode and Search ModeIf no filter is specified in its configuration, the middleware runs in the default bind mode, meaning it tries to make a simple bind request to the LDAP server with the credentials provided in the request headers. If the bind succeeds, the middleware forwards the request, otherwise it returns a If a filter query is specified in the middleware configuration, and the Authentication Source referenced has a ConfigRequired
Host on which the LDAP server is running.
TCP port where the LDAP server is listening. 389 is the default port for non-SSL LDAP and AD. 636 is the port required for SSL LDAP and AD. If
The
Attribute to be used to search the user; e.g., “cn”. Optional
If not empty, the middleware will run in search mode, filtering search results with the given query. Filter queries can use the
The domain name to bind to in order to authenticate to the LDAP server when running on search mode. Leaving this empty with search mode means binds are anonymous, which is rarely expected behavior. It is not used when running in bind_mode.
The password corresponding to the
Cache expiry time in seconds.
Set to
Set it to
The
An optional timeout in milliseconds when waiting for connection with LDAP server. |
@Makonike Great, it's good to ship. |
I would like to add some comments on the design:
Could we get rid of the
I am afraid that the "header_type" configuration is almost only used by Kong. The "ldap c2VydmljZXVzZXI6bXlzZWNyZXQK" is actually Kong's special implementation and "Basic c2VydmljZXVzZXI6bXlzZWNyZXQK" are actually used widely, especially in the browser. Other API gateways like APISIX and traefik only support the latter format. You don't need to keep API compatible with Kong's unique implementation. We can remove this option in the first version.
I would recommend using a general option to enable TLS, for example, "tls". So we can follow the same style in different extensions. |
BTW, I would recommend taking a look at Traefik and Tyk for the API design instead of Kong, because we are developing a Go extension, not a Lua one. For example, a Go developer may call "keepalive" as "idle_timeout" or something else. |
Thank you sincerely for the recommendations! I shall make the necessary revisions to my design shortly. |
Hello @doujiang24 @spacewander , I have already updated my design. Please take a look. Additionally, I would like to inquire about the necessity of maintaining a connection pool to reuse LDAP connections. |
@Makonike There are some issues in the new design, for example: And Besides, I think an extension level certificateAuthority is overkilled for the first version, since a certificate already has a size in KBs.
It's usually done in the LDAP client itself. I would like to use the default option first. |
I would recommend providing an MVP (all with the default value, not tls/start_tls), and then adding more features in the later iterations. |
@Makonike the next step, you could create a PR with the the MVP version, including doc, code and tests, thanks! |
OK. Thank you for your guidance!! |
Now envoy does not support it yet: envoyproxy/envoy#20920
Could be easy to do it with the envoy Golang filter extension.
Seems https://github.com/go-ldap/ldap is a proper choice.
The text was updated successfully, but these errors were encountered: