Skip to content
This repository has been archived by the owner on Dec 16, 2020. It is now read-only.

Commit

Permalink
Enable basic-auth
Browse files Browse the repository at this point in the history
This prevents the faas-swarm service from being accessed from
functions within the overlay network.

Tested with additional changes to the faas compose file to add
the required secrets. Overhead is minimal.

Tested on Swarm cluster.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
  • Loading branch information
alexellis committed Sep 10, 2018
1 parent be442da commit 3795853
Show file tree
Hide file tree
Showing 499 changed files with 56,978 additions and 15,807 deletions.
53 changes: 28 additions & 25 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Gopkg.toml
Expand Up @@ -16,7 +16,7 @@

[[constraint]]
name = "github.com/openfaas/faas-provider"
version = "0.6.0"
version = "0.7.1"

# match docker/distribution revision with moby
[[override]]
Expand All @@ -25,4 +25,4 @@

[[override]]
name = "github.com/moby/moby"
revision = "4a804016ab8b9fd55a45cff9687a1de12dee5eb7"
revision = "4a804016ab8b9fd55a45cff9687a1de12dee5eb7"
12 changes: 8 additions & 4 deletions server.go
Expand Up @@ -57,11 +57,15 @@ func main() {
}

bootstrapConfig := bootTypes.FaaSConfig{
ReadTimeout: cfg.ReadTimeout,
WriteTimeout: cfg.WriteTimeout,
TCPPort: &cfg.TCPPort,
EnableHealth: true,
ReadTimeout: cfg.ReadTimeout,
WriteTimeout: cfg.WriteTimeout,
TCPPort: &cfg.TCPPort,
EnableHealth: true,
EnableBasicAuth: true,
SecretMountPath: "/run/secrets",
}

log.Printf("Basic authentication: %v\n", bootstrapConfig.EnableBasicAuth)

bootstrap.Serve(&bootstrapHandlers, &bootstrapConfig)
}

0 comments on commit 3795853

Please sign in to comment.