| # Istio Apigee Adapter |
| |
| This workspace holds an apigee adapter for Istio. It can be tested by itself, but in order |
| to really use it you need a build of the Istio mixer that pulls it in. Instructions for that |
| are forthcoming. |
| |
| ## Building |
| |
| You need Bazel, just like with Istio. |
| |
| make |
| |
| Builds everything, and |
| |
| make test |
| |
| Runs the tests. |
| |
| ## Launching with the mixer |
| |
| Assuming that you have built a Mixer that includes it, you can launch the mixer as follows: |
| |
| First, edit testdata/global/adapters.yml to specify the organization and environment name for |
| your Apigee adapter to use. If you deployed "edgemicro-auth" to a production org, then |
| that is all you need. Otherwise, you can use "validationURL" to specify the base path |
| to another proxy. |
| |
| Now, launch the Mixer binary: |
| |
| $MIXER_HOME/bazel-bin/cmd/server/mixs server --logtostderr --configStoreURL fs://$THIS_ROOT/testdata/configroot |
| |
| (In other words the "config store URL" needs to be the absolute path of the "testdata/configroot" |
| directory of this repo. If you get this wrong then the mixer will silently do nothing |
| and always return "OK!") |
| |
| Once that's running, here's a sample command: |
| |
| $MIXER_HOME/bazel-bin/cmd/client/mixc check -a target.service=fault.svc.cluster.local \ |
| --stringmap_attributes request.headers=apikey:SOME_VALID_API_KEY |
| |
| That will send a "check" RPC to the mixer, which will respond "OK" if and only if the |
| API key is valid. |
| |
| You can also run "bazel-bin/cmd/mockserver," which will implement the same API as |
| edgemicro-auth, but it will do it locally so that you can test easily. With the mock |
| server, "12345" is a valid API key. |
| |
| ## Development Guide |
| |
| ref: |
| https://docs.google.com/a/google.com/document/d/19RoFLwplpVkr606AqORnS4Y12gUb5xZUftBM-upRdX4/edit?usp=sharing |