Ondemand plugin + Authelia - combined two middlewares in one host

Hi!

Guys I got one question, my searching no results. I have one container witch run via ondemand traefik plugin, can I add additional middleware like authelia before ondemand middleware?

Guys, I trying to resolve this via file config and chain from this manual, could someone help with this issue?

Here is my host file:

http:
  routers:
    remmina:
      service: remmina
      middlewares:
        - secured
      rule: "Host(`remmina.domain.com`)"
      entryPoints:
        - websecure
      tls:
        certresolver: myresolver

  middlewares:
    secured:
      chain:
        middlewares:
          - authelia
          - ondemand

    authelia:
       - "authelia@docker"

    ondemand:
       - "remmina-ondemand@docker"

  services:
    remmina:
      loadBalancer:
        servers:
        - url: "http://remmina:3000"

Where is my mistake?

Hey guys, I have implemented this finally, here is working file config for host:

http:
  routers:
    remmina:
      service: remmina
      middlewares:
        - secured       
      rule: "Host(`remmina.host.com`)"
      entryPoints:
        - websecure
      tls:
        certresolver: myresolver

  middlewares:
    secured:
      chain:
        middlewares:
        - authelia@docker
        - remmina-ondemand@docker

  services:
    remmina:
      loadBalancer:
        servers:
        - url: "http://remmina:3000"

Perhaps this will be useful to someone in the future.

The task was the following, "unclosed" host with remmina in docker:

  1. "close"
  2. stay container in stopped mode

What we have:

  1. when opening a host, the user must authenticate in authelia
    1.1 if it's not identified, it goes f*** up :grinning:
    1.2 if identified, point 2 starts working
  2. starting a stopped container with an on-demand plugin

That's it. :+1:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.