Implementing terms of service check in istio

10/8/2019

We have a website and series of services hosted in a kubernetes cluster in GCP. We use Istio to control what can talk to what in the service mesh. I've been tasked with adding a terms of service check to the website (i.e. users need to sign the terms of service before using the website). The website is actually implemented as a collection of webservers, were webserver is owned by a different team. I don't want to make each team manually implement the terms of service check, as it will lead to inconsistency.

My plan is to add some sort of check on all traffic coming into the cluster, checking the origin user's ID against a database, and if the user isn't in the database, I will redirect them to an end point which serves up the terms of service, and an accept button.

This has lead me to looking at Istio's mixer adapters, which seem like a perfect candidate to use. The problem I'm having however is that I can't really find any good documentation on how I actually go about creating a mixer adapter. I can find examples of how to use them, and I can find a list of predefined ones, but I have no idea how I even begin writing my own.

Are there any predefined ones that I could use for my use case? if not, where do I get started with writing my own?

-- Andy
authorization
istio
kubernetes

0 Answers