1602 Commits

Author SHA1 Message Date
Lucas Roesler
6df51a3516 Use context timeout to cancel the log request
**What**
- Pass the writetimeout to the logs handler to set the context timeout
of the log stream.

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2019-07-06 10:42:46 +01:00
Lucas Roesler
db6628d1a5 Remove Hyjacker log handler
**What**
- Remove the hyjacker based logs handler implementation because it is
not needed

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2019-07-06 10:42:46 +01:00
Lucas Roesler
e07a61fd0c Reimplemnt the logs proxy without hijacking
**What**
- Create an alternative proxy implementation using CloseNotifier and
Flusher

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2019-07-06 10:42:46 +01:00
Lucas Roesler
00c734a136 Verify not goroutine leaks in the log proxy
**What**
- Add test to verify that the log proxy shutsdown correctly when the
client cancels
- Add test to verify that the log proxy shutsdown correctly when the
logs provider closes the connection

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2019-07-06 10:42:46 +01:00
Lucas Roesler
e7e91ecd15 Implement log proxy handler
**What**
- Implement log handler method that will hijack the connection and clear
timeouts to allow long lived streams
- Proxies requests to the logs provider and returns the response
unmodified

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2019-07-06 10:42:46 +01:00
Rishabh Gupta
3c4077f3df Updated Belo Horizonte event
Signed-off-by: Rishabh Gupta <r.g.gupta@outlook.com>
2019-06-29 12:31:10 +01:00
Rishabh Gupta
491811f4d2 Changed event name as suggested in #1236 by @pasimoes
Signed-off-by: Rishabh Gupta <r.g.gupta@outlook.com>
2019-06-27 15:21:53 +01:00
Rishabh Gupta
9b6f3240fb Added Belo Horizonte Meetup
Signed-off-by: Rishabh Gupta <r.g.gupta@outlook.com>
2019-06-26 13:52:21 +01:00
Alex Ellis
0fab7fbe8b Update figlet and api-secret sample
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-25 21:25:38 +01:00
Alex Ellis
ab4d95c4d8 Update figlet's watchdog
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-25 21:22:26 +01:00
Alex Ellis
6799f61f12 Update nodeinfo/alpinefunction to latest mulit-stage
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-25 21:19:48 +01:00
Richard Gee
74ef6edf08 Add registry login script and reinstate to CI
Signed-off-by: Richard Gee <richard@technologee.co.uk>
2019-06-24 18:42:39 +01:00
Alex Ellis
ced4ee56dc Add Dockerfile override for ARM64
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-24 18:18:05 +01:00
Alex Ellis
0ca78b1fab Use license-check in the auth plugin
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-24 17:57:46 +01:00
Alex Ellis
b275a2010c Update Dockerfile for ARM64
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-24 17:52:21 +01:00
Richard Gee
27ebbfdccd Refactor CI and enable auto-builds for auth
Automatic builds for auth-module on x86_64 (via Travis) and on-demand on-device for arm via publish.sh

The basic-auth module is not built or pushed upon 'tag' / 'release' of the faas repo, but it should be: https://github.com/openfaas/faas/tree/master/auth.  We also don't create on-device images for this, but should do for both armhf and arm64: https://github.com/openfaas/faas/blob/master/contrib/publish-arm.sh

This change addresses these challenges and also introduces a tagAndPush script to alleviate some of the recently introduced repetition in .travis.yml.

Signed-off-by: Richard Gee <richard@technologee.co.uk>
2019-06-23 20:39:48 +01:00
Alex Ellis
9ed10f349c Add bronze sponsor
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-19 22:08:06 +01:00
Burton Rheutan
a6c9e3bb30 Remove extra customize button
The customize button was redundant to the custom tab
This could lead to confusion with the user experience,
so the additional button has been removed.

Signed-off-by: Burton Rheutan <rheutan7@gmail.com>
2019-06-17 10:20:22 +01:00
Burton Rheutan
fd39f99125 Add presentation videos to community
This adds some additional videos from previous talks
at Dockercon that have not yet been included

Signed-off-by: Burton Rheutan <rheutan7@gmail.com>
2019-06-16 16:05:01 +01:00
Radoslav Dimitrov
48c29f8ab5 Remove deploy-stack.armhf.sh script
Signed-off-by: Radoslav Dimitrov <rdimitrow@gmail.com>
2019-06-16 15:30:49 +01:00
Ron Rivera
a88c411e01 Added OpenFaaS blog post.
Signed-off-by: Ron Rivera <roncrivera@gmail.com>
2019-06-16 15:29:43 +01:00
Sargun Dhillon
b019f6ca54 Add Concurrency Limiter
This enables limiting concurrency. It is a naive approach which
will reject requests as soon as they exceed the maximum number
of in-flight requests.

It is a port of the following PR from the new watchdog code:
https://github.com/openfaas-incubator/of-watchdog/pull/54

Signed-off-by: Sargun Dhillon <sargun@sargun.me>
Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2019-06-16 15:23:20 +01:00
Richard Gee
45cf4db4cb Update FUNDING.yml to enable github/alexellis
Detail was removed on 10th June with a comment that it will be enabled once GitHub provide access to the beta.  This access was provided on 12th June hence re-enabling.

Signed-off-by: Richard Gee <richard@technologee.co.uk>
2019-06-16 15:20:55 +01:00
Burton Rheutan
a987d2147b Add additional fields to the UI
Adding additional inputs for Environment variables, Secrets,
Labels, and annotations so that more advanced functions can
be deployed through the UI.

This also allows more advanced functions to be provided via
the store. Allowing modification to secret values, and
environment variables which will allow functions like a
Slack Bot function to be deployed through the store adn
configured with an environment variable

Signed-off-by: Burton Rheutan <rheutan7@gmail.com>
2019-06-16 14:58:20 +01:00
Vivek Singh
490d74f885 Update gateway to 0.13.9 for swarm
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
2019-06-15 12:24:04 +01:00
Julien Bisconti
84d58c3425 Add talk @ GoWayFest
Signed-off-by: Julien Bisconti <julien.bisconti@gmail.com>
2019-06-15 09:08:22 +01:00
Alex Ellis
6481b683f2 Add ca-certs to multi-arch gateways
Adds package to armhf / arm64 for use with plugins.

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-14 19:19:15 +01:00
Alex Ellis
e3c976a428 Fix error handling for ExternalAuth
This corrects an issue where the error body was being hidden
for the external auth handler. It also adds the ca-certs into
the runtime Docker image for when the gateway is calling an
external plugin exposed over HTTPS.

Tested with OAuth2 plugin.

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-14 19:17:25 +01:00
Kevin Turcios
3b027d3005 Add blog post on OpenFaaS/K8s client
Signed-off-by: Kevin Turcios <kevin_turcios@outlook.com>
2019-06-11 08:36:36 +01:00
Alex Ellis
f7cfafa967
Update FUNDING.yml 2019-06-10 18:15:09 +01:00
Alex Ellis
e3b77514d0 Add error handling to basic auth injector
Fixes a problem where basic auth was disabled and a nill pointer
was hit, causing a panic.

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-09 20:08:39 +01:00
Alex Ellis
d2965df9f2 Remove un-used RoutelessProxy
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-09 20:08:39 +01:00
Alex Ellis
1cf030da48 Differentiate external service auth from user auth
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-09 20:08:39 +01:00
Alex Ellis
0758e484f7 Switch to external auth
This commit moves the OpenFaaS gateway from using in-process
basic-auth for everything to use an external auth URL instead.

When auth is not enable, this functionality is not added to the
handlers and behaves as before. When enabled, the configured
plugin with authenticate requests.

Tested on Docker Swarm with positive and negative tests.

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-09 20:08:39 +01:00
Alex Ellis
701708fe0e Update faas-provider version
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-08 10:16:30 +01:00
Alex Ellis
678e93599e Update .gitignore
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-08 10:15:55 +01:00
Alex Ellis
16aba728c7 Enable custom filename for auth credentials
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-08 10:13:34 +01:00
Alex Ellis
d6b3847fbd Add body from basic auth plugin.
Fixes issue by adding unit test to make sure the body from
the plugin is written correctly and proxied to the client.

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-07 10:11:40 +01:00
Alex Ellis
ef811783fb Pass headers back to client from auth plugin
Fix for external auth wrapper handler. Written by introducing
a broken unit test. Whenever the auth plugin returns a request
as not authorized, we must pass back any headers set by the
plugin.

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-07 09:46:30 +01:00
Alex Ellis
6beca8f59b Pass headers when using external auth
Fixes issue found in e2e testing where the headers were not
being passed to the basic-auth-plugin. This change makes sure
the upstream check gets all headers copied in before making
the call.

Tested with negative unit tests before writing fix.

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-07 09:37:03 +01:00
Carlos Panato
8fe40406fa redirect to another sample
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2019-06-06 18:55:43 +01:00
Carlos Panato
86b37acae7 update dockerfile to add user
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2019-06-06 18:55:43 +01:00
Alex Ellis
6d8ebc65f1 Deploy basic auth plugin
As part of #1209, this change deploys, but does not enable the
new basic-auth plugin service.

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-06 18:54:08 +01:00
Vivek Singh
03ebf167c0 Add missing blogs to community file
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
2019-06-05 19:58:09 +01:00
Alex Ellis
7be07e2668 Fix broken test
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-05 18:28:26 +01:00
Alex Ellis
c9b5e5f146 Move to use WithTimeout instead of WithDeadline for context
These two functions are effectively the same, with the former
being a wrapper for the later.

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-05 18:13:49 +01:00
Alex Ellis
35508ac70b Add explicit deadline for auth request
An explicit timeout is passed to the handler and a new unit test
proves that the functionality is in place. A additional return
statement was needed in the handler as pointed out by
@stefanprodan.

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-05 18:13:49 +01:00
Alex Ellis
a66097a9f9 Add config options for auth proxy
Adds two new environment variables and unit tests to validate
positive and default use-cases.

auth_proxy_url
auth_proxy_pass_body

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-05 18:13:49 +01:00
Alex Ellis
5b2a037e7e Add external auth handler
This commit adds an external auth handler which can be used to
wrap existing handlers, so that they delegate their requests
to an upstream URL before allowing a request to pass through
to an upstream API.

New handler tested with unit tests.

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-05 18:13:49 +01:00
Alex Ellis
c48be47db9 Copy response headers back to client
Headers such as Realm / etc are important for auth proxies, so
this change and unit test make sure they get copied back to the
client.

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-05 18:13:39 +01:00