Coder Social home page Coder Social logo

authx-interceptors's Introduction

authx-interceptor

The authx-interceptor repository contains gRPC interceptors used throughout the Nalej platform in order to validate incoming requests into the system.

Getting Started

This repository makes use of the client gRPC interface of authx in order to send the required requests to validate different types of token and/or token information.

The existing interceptors in this package are:

  • apikey: The API Key gRPC interceptor expects an API Key as the method to authorize the request, and connects to a generic backend for the API key check implementation. Components using this interceptor are expected to provide a structure implementing the APIKeyAccess interface.
	cfg := config.NewConfig(&config.AuthorizationConfig{
		AllowsAll: false,
		Permissions: map[string]config.Permission{
			"/ping.Ping/Ping": {Must: []string{KeyAccessPrimitive}},
		}}, "globalSecret", "authorization")

	tokenProvider = APIKeyAccessImpl()

	grpcServer = grpc.NewServer(WithAPIKeyInterceptor(tokenProvider, cfg))

Prerequisites

The following components are required for the interceptors to work

Build and compile

In order to build and compile this repository use the provided Makefile:

make all

This operation generates the binaries for this repo, download dependencies, run existing tests and generate ready-to-deploy Kubernetes files.

Run tests

Tests are executed using Ginkgo. To run all the available tests:

make test

Update dependencies

Dependencies are managed using Godep. For an automatic dependencies download use:

make dep

In order to have all dependencies up-to-date run:

dep ensure -update -v

Known Issues

  • Consider this repository as WIP, some of the interceptors have not been migrated to the repository but they will be in future releases.

Contributing

Please read contributing.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the Apache 2.0 License - see the LICENSE-2.0.txt file for details.

authx-interceptors's People

Contributors

dhiguero avatar rodynnz avatar

Watchers

 avatar

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.