Skip to content

l3ender/tyk-plugin-coprocess-grpc-java-custom-auth

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java gRPC plugin

Plugin overview

This repository provides a sample gRPC plugin, written in Java, intended to work as part of Tyk. Gradle is used.

Simple auth logic is implemented, based on Tyk custom middleware hooks logic. A class implements the required hook methods.

The hook

This plugin implements a single hook, it performs authorization by comparing a header value, you may see the code here.

Running the gRPC server

gradle run

Building a plugin bundle

Note that a plugin bundle is not necessary to run middleware. It's simply a deployment option. This blog post here describes how to use custom middleware without plugin bundles.

To use it you must generate a bundle and load it into your Tyk API settings. this guide will walk you through the process.

The manifest.json file describes the hooks implemented by this plugin. It can be served via http server to Tyk Gateways. A Tyk Gateway will load it into memory to understand how to talk to your custom plugin.

Included in this repo is a 'docker-compose.nginx.yaml' that will run a local Nginx instance to serve your bundle that you generated in the tutorial above using the manifest.json file.

About

A Java gRPC plugin for Tyk using Custom Middleware Authentication

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%