Giter Site home page Giter Site logo

yahoojapan / authorization-proxy Goto Github PK

View Code? Open in Web Editor NEW
35.0 13.0 10.0 464 KB

Moved to https://github.com/AthenZ/authorization-proxy

Home Page: https://github.com/AthenZ/authorization-proxy

License: Apache License 2.0

Dockerfile 0.66% Makefile 0.40% Go 96.07% Shell 2.87%
kubernetes sidecar athenz authentication authorization golang archived

authorization-proxy's People

Contributors

ctyano avatar kevindiu avatar kpango avatar kyfujisa avatar ssunorz avatar takuyamatsu avatar windzcuhk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

authorization-proxy's Issues

better support for liveness probe and readiness probe

  • liveness probe
    1. define conditions that the sidecar needs to be restarted
    2. add endpoint for liveness probe
  • readiness probe
    1. current, health check port only check whether the proxy is up or not
    2. health check port should also report internal status (e.g. policies of all domains are cached)

expose golang transport parameters to config.go

For application handling high RPS, the default values of transport struct in golang is not enough, and causes the proxy to be unstable.

related transport parameters

related code

verify config.Proxy during startup

effect

prevent the proxy get in fatal error during runtime

Director: func(r *http.Request) {
u := *r.URL
u.Scheme = scheme
u.Host = host
req, err := http.NewRequest(r.Method, u.String(), r.Body)
if err != nil {
glg.Fatal(errors.Wrap(err, "NewRequest returned error"))
}
req.Header = r.Header
*r = *req
},

fix

return error if config.Proxy contains invalid values during startup, e.g.

  1. scheme != 'http' || scheme != 'https'
  2. host ~ '@'

// New returns a Authorization Proxy daemon, or error occurred.
// The daemon contains a token service authentication and authorization server.
// This function will also initialize the mapping rules for the authentication and authorization check.
func New(cfg config.Config) (AuthzProxyDaemon, error) {
athenz, err := newAuthzD(cfg)
if err != nil {
return nil, errors.Wrap(err, "cannot newAuthzD(cfg)")
}
debugMux := router.NewDebugRouter(cfg.Server, athenz)
return &authzProxyDaemon{
cfg: cfg,
athenz: athenz,
server: service.NewServer(
service.WithServerConfig(cfg.Server),
service.WithServerHandler(handler.New(cfg.Proxy, infra.NewBuffer(cfg.Proxy.BufferSize), athenz)),
service.WithDebugHandler(debugMux)),
}, nil
}

RFC7807Error not used

as title

// RFC7807Error represent the error message fulfilling RFC7807 standard.
type RFC7807Error struct {
Type string `json:"type"`
Title string `json:"title"`
Status int
InvalidParams []InvalidParam `json:"invalid-params,ommitempty"`
Detail string `json:"detail"`
Instance string `json:"instance"`
RoleToken string `json:"role_token"`
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.