authzopa

package
v0.0.0-...-465fecb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2020 License: MIT Imports: 16 Imported by: 0

README

Authzopa mixer custom adpater

Content

Before Start
  • gvm
  • go1.14.6
  • istio 1.5.6
    • mixs
    • mixc
  • istio/tools
    • mixgen
# switch go version to 1.14.6
$ gvm use go1.14.6

# create istio 
$ mkdir -p $GOPATH/src/istio.io && cd $GOPATH/src/istio.io

# clone isdio 
$ git clone -b 1.5.6 --depth 1 git@github.com:istio/istio.git

#
$ export MIXER_REPO=$GOPATH/src/istio.io/istio/mixer
$ export ISTIO=$GOPATH/src/istio.io
$ pushd $ISTIO/istio && make mixs && make mixc

# prepare proto
$ go get github.com/gogo/protobuf/proto
$ go get github.com/gogo/protobuf/protoc-gen-gofast
$ go get github.com/gogo/protobuf/protoc-gen-gogoslick
$ go get github.com/gogo/protobuf/protoc-gen-gogo

# if you meet protoc-gen-docs: program not found or is not executable
# you need to clone istio/tools.git and build by yourself
$ cd $GOPATH/src/istio.io && git clone git@github.com:istio/tools.git && cd $GOPATH/src/istio.io/tools/cmd/protoc-gen-docs/
$ make build && mv protoc-gen-docs $GOPATH/bin

$ cd $GOPATH/src/istio.io/istio/mixer/tools/mixgen
$ go build && mv mixgen $GOPATH/bin
Clone authzopa repo
# git clone authzopa adapter
# fetcher: https://github.com/Gyumeijie/github-files-fetcher 
$ cd $MIXER_REPO/adapter
$ fetcher --url=https://github.com/cage1016/gokit-istio-security/tree/master/authzopa
Reference

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthzAdapter

type AuthzAdapter struct {
	// contains filtered or unexported fields
}

AuthzAdapter supports authorization template.

func (*AuthzAdapter) Addr

func (s *AuthzAdapter) Addr() string

Addr returns the listening address of the server

func (*AuthzAdapter) Close

func (s *AuthzAdapter) Close() error

Close gracefully shuts down the server; used for testing

func (*AuthzAdapter) HandleAuthorization

func (*AuthzAdapter) Run

func (s *AuthzAdapter) Run(shutdown chan error)

Run starts the server run

type Server

type Server interface {
	Addr() string
	Close() error
	Run(shutdown chan error)
}

Server is basic server interface

func NewAuthzAdapter

func NewAuthzAdapter(addr string) (Server, error)

NewAuthzAdapter creates a new IBP adapter that listens at provided port.

Directories

Path Synopsis
pb

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL