Add jwtproxy and configure verifier for /secscan/notify

This commit is contained in:
Evan Cordell 2016-04-18 11:42:17 -05:00 committed by Jimmy Zelinskie
parent 6091db983b
commit 8c8ee9c2be
6 changed files with 30 additions and 0 deletions

BIN
binary_dependencies/jwtproxy Executable file

Binary file not shown.

View file

@ -37,6 +37,9 @@ map $http_x_forwarded_proto $proper_scheme {
upstream web_app_server {
server unix:/tmp/gunicorn_web.sock fail_timeout=0;
}
upstream jwtproxy {
server unix:/tmp/jwtproxy.sock fail_timeout=0;
}
upstream verbs_app_server {
server unix:/tmp/gunicorn_verbs.sock fail_timeout=0;
}

View file

@ -0,0 +1,2 @@
#!/bin/sh
exec logger -i -t jwtproxy

8
conf/init/service/jwtproxy/run Executable file
View file

@ -0,0 +1,8 @@
#! /bin/bash
echo 'Starting jwtproxy'
cd /
/binary_dependencies/jwtproxy --config conf/jwtproxy_conf.yaml
echo 'Jwtproxy exited'

13
conf/jwtproxy_conf.yaml Normal file
View file

@ -0,0 +1,13 @@
jwtproxy:
signer_proxy:
enabled: false
verifier_proxy:
enabled: true
listen_addr: unix:/tmp/jwtproxy.sock
verifier:
upstream: unix:/tmp/gunicorn_web.sock
audience: http://quay.io
key_server:
type: keyregistry
options:
registry: unix:/tmp/gunicorn_web.sock

View file

@ -49,6 +49,10 @@ location ~ ^/(v1/repositories|v2/auth)/ {
limit_req zone=repositories burst=10;
}
location /api/v1/secscan/ {
proxy_pass http://jwtproxy;
}
location ~ ^/v2 {
# If we're being accessed via v1.quay.io, pretend we don't support v2.
if ($host = "v1.quay.io") {