Skip to content

Commit

Permalink
Move examples and build helpers to new repo (#7)
Browse files Browse the repository at this point in the history
* Move examples and build helpers to new repo
* Remove unused deps
  • Loading branch information
marcogschmidt authored and soloio-bulldozer[bot] committed Aug 20, 2019
1 parent 07591cd commit 5c8b4bc
Show file tree
Hide file tree
Showing 16 changed files with 70 additions and 625 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
.idea
vendor
**.so
_glooe
vendor
32 changes: 0 additions & 32 deletions Dockerfile

This file was deleted.

54 changes: 0 additions & 54 deletions Gopkg.lock

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

74 changes: 1 addition & 73 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,78 +2,6 @@
go-tests = true
unused-packages = true

[[override]]
name = "gopkg.in/fsnotify.v1"
source = "https://github.com/fsnotify/fsnotify.git"

[[constraint]]
name = "github.com/solo-io/go-utils"
version = "=v0.9.17"

[[constraint]]
name = "github.com/envoyproxy/go-control-plane"
version = "=v0.8.2"

[[override]]
name = "github.com/envoyproxy/protoc-gen-validate"
revision = "9b492f1473afa33350d86b62c298b45da868a33f"

[[override]]
name = "go.uber.org/zap"
version = "=v1.10.0"

[[override]]
name = "go.uber.org/atomic"
version = "=v1.3.2"

[[override]]
name = "github.com/golang/protobuf"
version = "=v1.2.0"

[[override]]
name = "gopkg.in/tomb.v1"
revision = "c131134a1947e9afd9cecfe11f4c6dff0732ae58"

[[override]]
name = "github.com/hpcloud/tail"
revision = "a1dbeea552b7c8df4b542c66073e393de198a800"

[[override]]
name = "github.com/onsi/ginkgo"
version = "=v1.7.0"

[[override]]
name = "github.com/onsi/gomega"
version = "=v1.4.3"

[[override]]
name = "gopkg.in/yaml.v2"
version = "=v2.2.1"

[[override]]
name = "google.golang.org/grpc"
revision = "168a6198bcb0ef175f7dacec0b8691fc141dc9b8"

[[override]]
name = "github.com/gogo/googleapis"
version = "=v1.0.0"

[[override]]
name = "github.com/pelletier/go-toml"
version = "=v1.2.0"

[[override]]
name = "google.golang.org/genproto"
revision = "02b4e95473316948020af0b7a4f0f22c73929b0e"

[[override]]
name = "golang.org/x/sys"
revision = "ac767d655b305d4e9612f5f6e33120b9176c4ad4"

[[override]]
name = "golang.org/x/net"
revision = "3f473d35a33aa6fdd203e306dc439b797820e3f1"

[[override]]
name = "golang.org/x/text"
revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0"
version = "=v0.8.2"
73 changes: 0 additions & 73 deletions Makefile

This file was deleted.

7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
# ext-auth-plugins
# External auth plugins
This repository contains two public interfaces:
- `AuthService`: is the interface implemented by all [Gloo ext auth implementations](https://gloo.solo.io/gloo_routing/virtual_services/authentication/)
- `ExtAuthPlugin`: is the interface that needs to be implemented by custom go ext auth plugins

Be sure to check out the docs at gloo.solo.io for more information!
49 changes: 49 additions & 0 deletions api/api_suite_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package api_test

import (
"context"
"github.com/envoyproxy/go-control-plane/envoy/service/auth/v2"
"github.com/solo-io/ext-auth-plugins/api"
"testing"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)

func TestApi(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Api Suite")
}

var _ = Describe("api has no errors", func() {

It("can compile everything", func() {
var pluginImpl api.ExtAuthPlugin = &pluginImpl{}
_, err := pluginImpl.NewConfigInstance(context.Background())
Expect(err).NotTo(HaveOccurred())

svc, err := pluginImpl.GetAuthService(context.Background(), nil)
Expect(err).NotTo(HaveOccurred())
Expect(svc).NotTo(BeNil())
})
})

type pluginImpl struct{}

func (pluginImpl) NewConfigInstance(ctx context.Context) (configInstance interface{}, err error) {
return nil, nil
}

func (pluginImpl) GetAuthService(ctx context.Context, configInstance interface{}) (api.AuthService, error) {
return &serviceImpl{}, nil
}

type serviceImpl struct{}

func (serviceImpl) Start(ctx context.Context) error {
return nil
}

func (serviceImpl) Authorize(ctx context.Context, request *v2.CheckRequest) (*api.AuthorizationResponse, error) {
return nil, nil
}
11 changes: 6 additions & 5 deletions api/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ type ExtAuthPlugin interface {
// configs:
// extauth:
// plugin_auth:
// name: MyAuthPlugin
// config:
// some_key: value-1
// some_struct:
// another_key: value-2
// plugins:
// - name: MyAuthPlugin
// config:
// some_key: value-1
// some_struct:
// another_key: value-2
//
// the `NewConfigInstance` function on your `ExtAuthPlugin` implementation should return a pointer to
// the following Go struct:
Expand Down
5 changes: 5 additions & 0 deletions changelog/v0.0.3/verify-plugins-script.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
changelog:
- type: NON_USER_FACING
description: >
Move example plugins and build tools to [new repo](https://github.com/solo-io/ext-auth-plugin-examples).
This is needed to avoid circular dependencies between GlooE and this repo.
Loading

0 comments on commit 5c8b4bc

Please sign in to comment.