CasdoorMarketplace

Higress · App integration

Protect the services behind Higress with Casdoor

The Casdoor Wasm plugin for Higress signs browsers in through Casdoor with the authorization code flow and PKCE, checks the Casdoor tokens of API calls against the JWKS, and passes the user to the upstream in X-Casdoor-User, X-Casdoor-Email and X-Casdoor-Organization headers. It runs only with a Casdoor that has a commercial edition license.

Verified by CasdoorCommercial editionOIDCPKCEAPI gatewayJWT
You need a running Casdoor, self-hosted or on Casdoor Cloud. In the examples, replace https://auth.example.com with your Casdoor address (on Casdoor Cloud, something like https://acme.casdoor.com) and the other example.com addresses with your own.

Set up Higress with Casdoor

  1. 1

    Register Higress in Casdoor

    In the Casdoor console, open Applications, add an application for Higress, and on its OIDC/OAuth tab copy the Client ID and Client secret. Add these redirect URLs to Redirect URLs:

    • https://app.example.com/casdoor/callback
    • https://app.example.com/
  2. 2

    Install from the Marketplace

    On the Marketplace page of Casdoor, install Higress with the address of the protected site. Casdoor creates the application with the callback /casdoor/callback and the logout landing page as redirect URLs. Then download casdoor-higress.wasm from the same dialog.

  3. 3

    Publish the module

    Put the module where Higress can fetch it, such as an OCI image built with the plugin's Dockerfile or an HTTPS URL, and let the gateway reach Casdoor with a DNS service in McpBridge.

  4. 4

    Add the WasmPlugin

    Create a WasmPlugin that points to the module, with the application's client ID and secret.

    apiVersion: extensions.higress.io/v1alpha1
    kind: WasmPlugin
    metadata:
      name: casdoor
      namespace: higress-system
    spec:
      url: oci://registry.example.com/casdoor-higress:1.0.0
      phase: AUTHN
      defaultConfig:
        casdoor_endpoint: https://door.casdoor.com
        casdoor_service: casdoor.dns
        client_id: <client id>
        client_secret: <client secret>
        cookie_secret: <at least 32 random characters>
  5. 5

    Try it

    Open the protected site in a private window: it sends you to Casdoor, and after sign-in back to the page. /casdoor/logout signs you out.

Good to know

  • The plugin asks Casdoor for its license every 10 minutes and answers 403 when Casdoor runs as the Community edition.

Higress settings are from its documentation as of November 2026 (Higress: Wasm plugins). Higress is a trademark of its owner.