You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "hanahmily (via GitHub)" <gi...@apache.org> on 2026/08/23 22:57:31 UTC

[I] [Feature] Support LDAP authorization in Canopy [skywalking]

hanahmily opened a new issue, #13991:
URL: https://github.com/apache/skywalking/issues/13991

   ## Summary
   Add **LDAP authorization** support to the Canopy web console, mirroring the authentication/authorization model used by SkyWalking Horizon UI.
   
   ## Background
   Canopy currently supports only local users (configured via `CANOPY_USERS` as JSON/YAML) with two roles: `admin` and `readonly`. For enterprise deployments, integration with the organization's LDAP/AD directory is required so users can log in with their corporate credentials and inherit role/group mappings from directory attributes.
   
   Reference implementation: **SkyWalking Horizon UI** (see https://github.com/apache/skywalking-horizon-ui and its OAP LDAP provider used by SkyWalking OAP backend).
   
   ## Goals
   - Allow Canopy users to authenticate against an LDAP/AD server.
   - Map LDAP users/groups to Canopy roles (`admin` / `readonly`) via configurable rules.
   - Keep the existing local-user auth path working as a fallback / for dev.
   
   ## Tasks
   1. **Research** — study SkyWalking Horizon UI's LDAP auth flow and SkyWalking OAP's LDAP provider; document the existing Canopy auth model (`server/src/routes/auth.ts`, `server/src/plugins/session.ts`, `server/src/lib/role.ts`).
   2. **Design doc** — propose:
      - LDAP server config (host, port, TLS, base DN, bind DN, user search filter, group search base/filter).
      - Role-mapping strategy (group → role, attribute → role, or static default).
      - Session/cache strategy (cache LDAP group membership per session vs. re-query per request).
      - Security considerations (bind credentials in env, TLS verification, error messages that don't leak info).
   3. **PoC** — implement a minimal LDAP login path in the BFF that:
      - Accepts username/password on `/auth/login`.
      - Performs an LDAP bind/search.
      - Issues the existing secure-session cookie.
      - Maps the user to a role and exposes it via `/auth/me`.
   4. **Tests** — unit tests with a mock LDAP server (e.g., `ldapjs` test server) covering: successful bind, invalid credentials, group → role mapping, TLS-required config, and fallback to local users when LDAP is disabled.
   5. **Docs** — update `canopy/README.md` with the new env vars and an LDAP setup example; add a design note under `canopy/docs/`.
   
   ## Acceptance Criteria
   - Configurable via env vars (no code change to enable/disable LDAP).
   - `admin` / `readonly` role mapping from LDAP groups or attributes.
   - Existing local-user auth still works when LDAP is not configured.
   - Unit + integration tests pass.
   - `canopy/README.md` and a new `canopy/docs/ldap-design.md` updated.
   - Backward-compatible: no breaking changes to current `/auth/*` endpoints or session shape beyond adding a `provider` field.
   
   ## Out of Scope
   - OAuth/OIDC / SAML (separate issues).
   - Multi-LDAP / failover.
   - Password rotation / self-service.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature] Support LDAP authorization in Canopy [skywalking]

Posted by "hanahmily (via GitHub)" <gi...@apache.org>.
hanahmily commented on issue #13991:
URL: https://github.com/apache/skywalking/issues/13991#issuecomment-5402085136

   Replaced by a new issue that adopts the same auth model SkyWalking Horizon UI uses for its public deployment (SSO + local users + API tokens), rather than introducing LDAP. See the new issue for context. Horizon does not ship LDAP as the primary auth path for its hosted demo, so following the same pattern gives operators one mental model across both UIs and reduces the number of bespoke auth integrations BanyanDB has to maintain.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature] Support LDAP authorization in Canopy [skywalking]

Posted by "hanahmily (via GitHub)" <gi...@apache.org>.
hanahmily closed issue #13991: [Feature] Support LDAP authorization in Canopy
URL: https://github.com/apache/skywalking/issues/13991


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org