Skip to content

Ip Filter - Basic auth is a middleware plugin for Traefik which try to authorize client by IP address or at least by Basic auth.

Notifications You must be signed in to change notification settings

alexandreh2ag/traefik-ipfilter-basicauth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ip Filter - Basic auth

Ip Filter - Basic auth is a middleware plugin for Traefik which try to authorize client by IP address or at least by Basic auth.

Configuration

Static

[pilot]
  token = "xxxx"

[experimental.plugins.ipFilter_basicAuth]
  modulename = "github.com/alexandreh2ag/traefik-ipfilter-basicauth"
  version = "vX.X.X"

Dynamic

To configure the Ip Filter - Basic auth plugin you should create a middleware in your dynamic configuration as explained here.

You must define at least one source range IP and one user from configuration or file.

The configuration of middleware is quite similar then traefik middlewares (IPWhiteList / BasicAuth).

http:
  middlewares:
    my-ipFilter_basicAuth:
      plugin:
        ipFilter_basicAuth:
          basicAuth:
            realm: "Realm"
            usersFile: "/path/to/my/usersfile"
            users:
              - traefik:$apr1$imy7rq16$PbXJYj5lsqZ71HoIBfm/T0 # traefik / traefik
            headerField: "X-WebAuth-User"
            removeHeader: true
          ipWhiteList:
            sourceRange:
              - "127.0.0.1"
              - "10.0.0.1/32"

About

Ip Filter - Basic auth is a middleware plugin for Traefik which try to authorize client by IP address or at least by Basic auth.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages