Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added regexWhiteList feature. #251

Open
wants to merge 472 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
472 commits
Select commit Hold shift + click to select a range
b93059d
Add openresty examples to readme.
artagel Apr 16, 2019
858813f
update example nginx config
bnfinet Apr 17, 2019
bcd18a0
Move tokens from user to jwt.
artagel Apr 17, 2019
ca02f10
Add tests for tokens in jwt.
artagel Apr 17, 2019
46226ff
Rework cookie handling to split and reassemble cookies if they are ov…
artagel Apr 18, 2019
68b64b7
Update warning message.
artagel Apr 18, 2019
442d3ac
Set warning to be more specific.
artagel Apr 18, 2019
f9f4450
Add cfg param in cookies to support customizable maxage. Also allows …
artagel Apr 13, 2019
998906f
fix #92 default to jwt.maxage, warn if exceeds jwt.maxage, as minutes
bnfinet Apr 19, 2019
0e554fb
Fix areas where errors weren't handled.
artagel Apr 21, 2019
f6b6b1c
Fix error with template path.
artagel Apr 22, 2019
e2d6005
Merge pull request #1 from vouch/master
artagel Apr 22, 2019
33ac20f
Merge branch 'master' into split_cookies
artagel Apr 22, 2019
f7aeb76
Merge pull request #3 from artagel/split_cookies
artagel Apr 22, 2019
6461880
Merge branch 'master' into add_support_to_pass_tokens
artagel Apr 22, 2019
dcf8201
Add header claims to cfg
artagel Apr 13, 2019
0c33884
Add custom claims to JWT
artagel Apr 13, 2019
2ced6e1
Remove redunant claim object. Fix Claim to be a map of strings.
artagel Apr 13, 2019
aa2a4a2
Properly add claims to user object.
artagel Apr 13, 2019
e24bd02
Add support for grabbing claims from the return of getuserinfo functi…
artagel Apr 13, 2019
cc27f86
Fix function argument order for updated customclaim support.
artagel Apr 13, 2019
ee16254
Create the JWT token with newly added customClaims.
artagel Apr 13, 2019
7d6ae61
Add new config option 'claimheader'
artagel Apr 13, 2019
27cd957
Make ClaimHeader default to X-Vouch-IdP-Claims-
artagel Apr 13, 2019
5d7b562
Add claims to headers.
artagel Apr 13, 2019
4d58a80
Rework customClaims variable into a struct to be reusable and passabl…
artagel Apr 13, 2019
5ce18bd
Add some useful logging.
artagel Apr 13, 2019
ca7d295
Update README and config example to include custom claim support.
artagel Apr 13, 2019
8d5f25f
Ensure config example comments out the optional param for header cust…
artagel Apr 13, 2019
06a0c49
Update jwt tests to support claims.
artagel Apr 13, 2019
346ac40
fix #115 state variable alpha num
bnfinet May 3, 2019
c98e490
Merge branch 'master' into artagel-allow_users_to_store_claims_in_JWT
bnfinet May 3, 2019
f85c582
Make client_secret optional for oidc and adfs. Keycloak (generic oidc…
artagel Mar 28, 2019
229f735
Merge branch 'artagel-make_client_secret_optional'
bnfinet May 3, 2019
265ee5d
Merge branch 'general_fixes_and_unit_testing' of git://github.com/art…
bnfinet May 3, 2019
85c593f
#113 rename variables, formatting
bnfinet May 3, 2019
5939a7e
Merge branch 'add_support_to_pass_tokens' of git://github.com/artagel…
bnfinet May 3, 2019
b1bb31d
#104 use 1of3 2of3 4of3 for multipart cookies
bnfinet May 3, 2019
534f3a7
Load templates relative to VOUCH_ROOT.
rayward May 14, 2019
06ab191
#104 and #109 large cookies full of tokens
bnfinet May 22, 2019
5930747
#109 test cookie split
bnfinet May 22, 2019
3193e7f
Merge branch 'artagel-add_support_to_pass_tokens'
bnfinet May 22, 2019
aad7468
#109 SplitCookie comment
bnfinet May 22, 2019
8b99bae
Merge branch 'add_openresty_authorization_examples' of git://github.c…
bnfinet May 22, 2019
8e71631
fix #121 auth-url should be /validate
bnfinet May 22, 2019
0897685
fix #122 link to helm charts
bnfinet May 22, 2019
59059a2
use `./do.sh` for build instructions
bnfinet May 22, 2019
52f973b
Merge branch 'fix-template-root' of git://github.com/rayward/vouch-pr…
bnfinet May 22, 2019
e58ec54
#120 set path to static assets using VOUCH_ROOT
bnfinet May 22, 2019
88a150c
#120 log the RootDir especially if set from VOUCH_ROOT, use filepath.Dir
bnfinet May 22, 2019
e761e29
add link to helm site that does installations
halkeye May 23, 2019
455b19f
use explicit declaration in struct
bnfinet May 23, 2019
758df6e
Merge branch 'patch-1' of git://github.com/halkeye/lasso into halkeye…
bnfinet May 23, 2019
3d3e45a
#123 halkeye helm chart URL
bnfinet May 23, 2019
f66d2a5
Merge branch 'halkeye-patch-1'
bnfinet May 23, 2019
88d444f
Load templates relative to VOUCH_ROOT.
rayward May 14, 2019
fea7b17
#120 set path to static assets using VOUCH_ROOT
bnfinet May 22, 2019
4a23a69
#120 log the RootDir especially if set from VOUCH_ROOT, use filepath.Dir
bnfinet May 22, 2019
2af2883
loc --> stats
bnfinet Jul 3, 2019
9d47e12
Merge branch 'master' into artagel-add_openresty_authorization_examples
bnfinet Jul 16, 2019
f1c98d4
Merge branch 'master' into rayward-fix-template-root
bnfinet Jul 16, 2019
305d381
Merge branch 'fix-template-root' of git://github.com/rayward/vouch-proxy
bnfinet Jul 16, 2019
98e009a
remove name change notice
bnfinet Jul 16, 2019
fe82f8b
Added badges.
artagel Jul 18, 2019
cea7cfe
Update openresty docs area to point to examples.
artagel Jul 18, 2019
6a8e12d
Add individual examples.
artagel Jul 31, 2019
30f60af
Merge branch 'master' into feature/readme_updates
bnfinet Aug 6, 2019
bea25be
update paste instructions
bnfinet Aug 6, 2019
e9269ce
Update issue templates
bnfinet Aug 6, 2019
5bfa8ad
please use a paste service such as https://hasteb.in
bnfinet Aug 6, 2019
1b88059
Merge branch 'master' of github.com:vouch/vouch-proxy
bnfinet Aug 6, 2019
feddd1f
Merge branch 'add_individual_examples' of git://github.com/artagel/vo…
bnfinet Aug 6, 2019
abd2d89
#137 minor edits, additional badges
bnfinet Aug 6, 2019
0052bb1
Merge branch 'artagel-add_individual_examples'
bnfinet Aug 6, 2019
5f336c4
badge updates
bnfinet Aug 6, 2019
8b6745a
don't clobber username if present
reedstrm Aug 9, 2019
6edeb1d
test for valid provider
reedstrm Aug 9, 2019
687c40c
add OpenStax provider
reedstrm Aug 9, 2019
b7eeb65
Add HomeAssistant IndieAuth/Oauth provider
talltechdude Sep 5, 2019
856dd89
Add ptokens to ADFS
simongottschlag Sep 7, 2019
e953177
Change from idToken to data for mapClaims
simongottschlag Sep 10, 2019
2c791a7
Add case for ADFS redirect to add resource
simongottschlag Sep 13, 2019
ae05041
Merge branch 'reedstrm-anticlobber'
bnfinet Sep 13, 2019
cda7bd7
#141 minor formatting fixes for linter errors
bnfinet Sep 13, 2019
43f82f9
Merge pull request #141 from reedstrm:master
bnfinet Sep 13, 2019
350a3ea
Merge branch 'pr/reedstrm/141'
bnfinet Sep 13, 2019
fe5058a
Merge branch 'master' of github.com:vouch/vouch-proxy
bnfinet Sep 13, 2019
5bee174
add OpenStax to the supported list
bnfinet Sep 13, 2019
9884301
Merge branch 'master' into pr/talltechdude/146
bnfinet Sep 13, 2019
797945c
Merge branch 'master' into v0.6.6-ADFS01
bnfinet Sep 13, 2019
cd52aa7
Added -healthcheck command
madworx Sep 23, 2019
c158898
Added HEALTHCHECK statements to Dockerfiles.
madworx Sep 23, 2019
1681297
Before this, we didn't have do.sh in the final image
davidgibbons Sep 28, 2019
8bba049
Capitalize Nginx
bnfinet Oct 1, 2019
ca8243f
Add an example using a single server stanza
davidgibbons Oct 1, 2019
cfa0cc1
#151 set log level to error for `-healthcheck`
bnfinet Oct 10, 2019
fd4510f
Merge branch 'pr/madworx/151'
bnfinet Oct 10, 2019
fca79fe
Merge branch 'pr/davidgibbons/152'
bnfinet Oct 10, 2019
90ab7e4
Merge pull request #155 from davidgibbons/nginx_single_server_example
bnfinet Oct 10, 2019
ac608a8
Allow scopes to be set for Google OAuth config
leshik Oct 11, 2019
001424f
fix logout URL
bnfinet Oct 11, 2019
9d96f0d
Allow multiple callback_urls for all backends
libussa Oct 14, 2019
a11e860
add semicolon after "access_by_lua_file" directive
jchapman77 Oct 16, 2019
d9682cb
add semicolon after "access_by_lua_file" directive
jchapman77 Oct 16, 2019
737e7cc
antiquated TODOs
bnfinet Oct 16, 2019
f8506e9
slightly better markup
bnfinet Oct 16, 2019
636255b
Merge branch 'master' into pr/jchapman77/163
bnfinet Oct 16, 2019
e5542c9
Merge branch 'master' of github.com:vouch/vouch-proxy
bnfinet Oct 16, 2019
480d7c9
Merge branch 'pr/jchapman77/163'
bnfinet Oct 16, 2019
1334d25
Merge branch 'master' into pr/jchapman77/162
bnfinet Oct 16, 2019
7c16a71
#159 can set scopes for google
bnfinet Oct 16, 2019
e7ec181
Merge branch 'pr/leshik/159'
bnfinet Oct 16, 2019
ddd5ca6
return ok200 for publicaccess==true
bnfinet Oct 16, 2019
80fcfdb
support boolean claims
bnfinet Oct 16, 2019
5014339
Merge branch 'pr/libussa/161'
bnfinet Oct 16, 2019
01f8c66
Merge branch 'master' into feature/handle_bool_claim
bnfinet Oct 16, 2019
a2a6960
Added missing check for homeassistant in BasicTest
Dobli Oct 19, 2019
421d64f
Don't assume that id_token is present
fizzyduck Oct 30, 2019
0442137
Fix issue with claims for ADFS.
artagel Oct 31, 2019
c5e9781
Update openresty groups example with proper names and variables.
artagel Oct 31, 2019
cf8c780
Merge pull request #166 from Dobli:fix/missing_homeassistant_check
bnfinet Nov 6, 2019
b58d1bc
#170 add Gitea provider
bnfinet Nov 6, 2019
c171285
Merge branch 'master' of github.com:vouch/vouch-proxy
bnfinet Nov 6, 2019
366b97e
Merge branch 'pr/artagel/171'
bnfinet Nov 6, 2019
ed36b58
Merge branch 'master' into feature/handle_bool_claim
bnfinet Nov 6, 2019
ded2e25
convert int to string
bnfinet Nov 6, 2019
da0f8a3
fix getUserInfo* log msg formatting
nolta Nov 12, 2019
367ee04
remove dup coverage in usage
bnfinet Dec 11, 2019
14b5740
fix #185 ignore JSON for User.ID
bnfinet Dec 19, 2019
908d1f1
add example config for gitea
aaronpk Feb 2, 2020
12e7fa2
Fix domain checks
eikehartmann Jan 26, 2020
b463f83
Merge branch 'pr/nolta/177'
bnfinet Feb 7, 2020
7d4e410
Merge branch 'master' into pr/eikehartmann/199
bnfinet Feb 7, 2020
8eda1d8
Merge branch 'master' into pr/aaronpk/204
bnfinet Feb 7, 2020
f29993b
update README to clarify cookie settings that get filed as issues
aaronpk Feb 9, 2020
5507bd6
Check GitHub user team memberships and store them in User struct
eikehartmann Jan 23, 2020
7b0f0a3
Evaluate team memberships when verifying user
eikehartmann Jan 31, 2020
0b99ff8
Remover Org from config and use <orgId>/<teamSlug> as format for gith…
eikehartmann Jan 31, 2020
fd72962
Add test assertions on urls called
eikehartmann Jan 31, 2020
4ad1f13
Add org membership url to config and github defaults
eikehartmann Jan 31, 2020
4a9d20a
Add method to check for github org membership
eikehartmann Jan 31, 2020
6ad9c84
Check for GitHub Org membership if no team qualified in TeamWhiteList…
eikehartmann Jan 31, 2020
227cd5b
Add documentation for teamWhitelist to github example config
eikehartmann Feb 3, 2020
fd1019a
Move Github-related handler stuff to own package
eikehartmann Feb 9, 2020
cfb5be2
Move IndieAuth-related handler stuff to own package
eikehartmann Feb 9, 2020
82f7c18
Move ADFS-related handler stuff to own package
eikehartmann Feb 9, 2020
eacccd5
Move HomeAssistant-related handler stuff to own package
eikehartmann Feb 9, 2020
d367704
Move OpenStax-related handler stuff to own package
eikehartmann Feb 9, 2020
2b6659d
Move Google-related handler stuff to own package
eikehartmann Feb 9, 2020
fb73f16
Move OpenID-related handler stuff to own package
eikehartmann Feb 9, 2020
02dd4da
Refactor to common parameters for different vendor methods
eikehartmann Feb 9, 2020
1244cbd
Use strategy pattern-like switch to select vendor-specific handler
eikehartmann Feb 9, 2020
6e05f94
Add org/team configuration relevant urls to github enterprise sample …
eikehartmann Feb 9, 2020
785ec9f
Add read:org scope if team whitelist is configured for github
eikehartmann Feb 10, 2020
2c32809
Treat slice claim values with higher priority before treating all cla…
rmak-cpi Jan 27, 2020
e26ea0c
Improve logging and error handling in github org/team membership retr…
eikehartmann Feb 10, 2020
d9c5530
#208 standardize on yourdomain.com
bnfinet Feb 13, 2020
ab31b28
Adding vouch.cookie.SameSite configuration option
jbwtan Feb 15, 2020
25cc8d6
Using vouch.cookie.SameSite configuration option to set SameSite attr…
jbwtan Feb 15, 2020
561e102
#216 how to handle OPTIONS
bnfinet Feb 20, 2020
d62cfc1
#206 return errors from ADFS user call
bnfinet Mar 11, 2020
35dbe19
remove port before testing host
bnfinet Mar 11, 2020
8dce88f
Merge branch 'pr/eikehartmann/205'
bnfinet Mar 12, 2020
cbc810d
fix #217 no verstioned alpine Docker Hub build
bnfinet Mar 12, 2020
3566012
Updating samesite config type to string
jbwtan Mar 12, 2020
de2a149
Updating documentation for samesite configuration
jbwtan Mar 12, 2020
41e7276
Merge branch 'feature/cookie-samesite-config-1' of https://github.com…
jbwtan Mar 12, 2020
63a2a34
Updating to use samesite behaviour string
jbwtan Mar 12, 2020
2d0ed97
Added initial support for Nextcloud
Dobli Feb 22, 2020
81661c5
Added nextcloud config example
Dobli Feb 22, 2020
3e51f1b
Add nextcloud entry to README
Dobli Mar 12, 2020
b3887c1
print full line in stats
bnfinet Mar 15, 2020
ba38e85
unused
bnfinet Mar 16, 2020
dde922f
key field in struct literal
bnfinet Mar 16, 2020
1aab02c
Merge branch 'pr/Dobli/218'
bnfinet Mar 16, 2020
80047fa
Merge branch 'master' into pr/jbwtan/214
bnfinet Mar 16, 2020
e4cccd0
#82 improve VerifyUser structure and log messages
bnfinet Mar 16, 2020
e9bd691
#82 improve VerifyUser structure and log messages
bnfinet Mar 16, 2020
076114f
Updated default same site behaviour to not write SameSite attribute t…
jbwtan Mar 16, 2020
f8b9d44
Merge branch 'master' into feature/better_web_interface
bnfinet Mar 18, 2020
39b30da
Fix cookie splitting to account for _
oferrigni Mar 25, 2020
e0cc5a3
config -> Config for use in templates
bnfinet Mar 25, 2020
c92b3e9
Update config.yml_example_homeassistant
mjnaylor8 Mar 29, 2020
8cd1fd5
Handler -> Provider, Url -> URL, lint comments
bnfinet Apr 1, 2020
7069684
#205 err should be returned at the end
bnfinet Apr 1, 2020
7418a39
remove uneccessary pkgs model, transciever, cors
bnfinet Apr 1, 2020
da293df
#240 cfg.Configure called from main()
bnfinet Apr 2, 2020
55da1ca
move port check to main.go
bnfinet Apr 4, 2020
7e83194
move help to main.go
bnfinet Apr 4, 2020
82bc879
#240 cleanup cfg, healthcheck separate pkg
bnfinet Apr 8, 2020
f61ce39
#240 fix tests
bnfinet Apr 8, 2020
264ede1
Merge pull request #236 from mjnaylor8/master
bnfinet Apr 8, 2020
532c3f7
#234 splitCookie needn't be public
bnfinet Apr 8, 2020
3aa74f2
Merge branch 'master' of github.com:vouch/vouch-proxy
bnfinet Apr 8, 2020
4ea8e18
Merge branch 'pr/oferrigni/234'
bnfinet Apr 8, 2020
a7ed581
delete session log message
bnfinet Apr 8, 2020
9d03bcd
Merge branch 'feature/cookie-samesite-config-2' of github.com:jbwtan/…
bnfinet Apr 8, 2020
ff990a6
fix test name
bnfinet Apr 8, 2020
8fb7a80
Merge branch 'pr/jbwtan/214'
bnfinet Apr 8, 2020
9f20a80
Merge branch 'feature/better_web_interface' into feature/golang_1.13_…
bnfinet Apr 8, 2020
0e44dc3
Merge branch 'feature/fix_formatting_and_naming' into feature/golang_…
bnfinet Apr 8, 2020
504870e
#240 upgrade to go 1.13
bnfinet Apr 8, 2020
549fe87
database has been removed
bnfinet Apr 9, 2020
1d15844
#192 Cfg.Logging object, set loglevel
bnfinet Apr 11, 2020
1779bc9
fix #244 segfault on uninitialized oldconfig
bnfinet Apr 11, 2020
df7505f
Merge branch 'master' into bug/206_return_ADFS_errors
bnfinet Apr 11, 2020
e934cf2
merge master
bnfinet Apr 11, 2020
f1770b7
Merge branch 'master' into bug/192_loglevel
bnfinet Apr 13, 2020
397abc4
chore: New deployment for extra architectures
Apr 14, 2020
f1cdc16
chore: Fix Github Workflow
Apr 14, 2020
4c669e7
chore: Disable build for other users
Apr 14, 2020
0b29da9
fix #192 allow log levels to be set to any level
bnfinet Apr 16, 2020
ef2e01f
#192 use blank objects and mod singleton
bnfinet Apr 16, 2020
af5fa1b
#247 tag as :latest-arm
bnfinet Apr 16, 2020
57d88f1
Merge branch 'pr/svrooij/247'
bnfinet Apr 16, 2020
dfc66fc
#247 adjust name of job
bnfinet Apr 16, 2020
86cb218
Merge branch 'master' into bug/206_return_ADFS_errors
bnfinet Apr 21, 2020
75fb74d
fix #191 add example config
bnfinet Apr 21, 2020
9a62beb
fix filename
bnfinet Apr 21, 2020
b941f66
move oauth and jwt configuring to their own files
bnfinet Apr 21, 2020
d32b602
remove ./data references
bnfinet Apr 21, 2020
62a3a36
fix #183 clean claims to present proper headers
bnfinet Apr 22, 2020
113daf5
#183 document claims --> headers
bnfinet Apr 22, 2020
25f0a2b
Merge branch 'master' into pr/rmak-cpi/209
bnfinet Apr 22, 2020
acffb5a
#200 add single string test
bnfinet Apr 22, 2020
6706dbf
#183 convert period to dash in header
bnfinet Apr 23, 2020
85e98f6
always perform `/auth` check on callback_url(s)
bnfinet Apr 24, 2020
364ec46
add coverage to stats
bnfinet Apr 24, 2020
2db0a03
fix #255 improve log tests, simplify setLoglevel
bnfinet Apr 28, 2020
58a57b9
#210 set session cookie SameSite
bnfinet Apr 28, 2020
2e6b7be
check if config file is well formed
bnfinet Apr 29, 2020
d5f63cd
brand as Vouch Proxy in log messages
bnfinet Apr 30, 2020
91135a1
split handler.go: one file each handler, responses
bnfinet Apr 30, 2020
55033f1
validate requested URL
bnfinet Apr 30, 2020
8f109da
check oauth.callback_url for cookie.domain
bnfinet May 1, 2020
96fe9ce
general cleanup, err400 method
bnfinet May 1, 2020
db8cf1b
test redirected URL param
bnfinet May 1, 2020
9881d66
please read before submitting a PR
bnfinet May 1, 2020
42e7e38
cleanup comments
bnfinet May 1, 2020
23a7095
/logout?url=NEXT_URL must be on allowed list
bnfinet May 1, 2020
0bec1f8
/login and /logout URL redirection documentation
bnfinet May 1, 2020
1ef7494
post_logout_redirect_uri
bnfinet May 4, 2020
566dbd0
add copyright and license
bnfinet May 5, 2020
01b5ed2
case insensitive, no javascript
bnfinet May 5, 2020
fe766d2
test callback url check
bnfinet May 5, 2020
7fd21bb
no protocol-less URLs
bnfinet May 5, 2020
0765273
Merge branch 'master' into feature/license
bnfinet May 5, 2020
7685ddf
Rebase on Master
danielewood May 5, 2020
5045000
Fix FatalF
danielewood May 5, 2020
8287526
Fix for new test variable
danielewood May 5, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
config/config.yml
pkg/model/storage-test.db
main
config/google_config.json
.vscode/*
lasso
config/config.yml_google
config/config.yml_github
config/secret
config/config.yml_orig
.dockerignore
Dockerfile
handlers/rice-box.go
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/open-a-github-issue-to-receive-support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: open a GitHub Issue to receive support
about: Create a report to receive support with your config and to help us improve
title: ''
labels: ''
assignees: ''

---

**First read the README**
Specifically ***[Troubleshooting, Support and Feature Requests](https://github.com/vouch/vouch-proxy#troubleshooting-support-and-feature-requests)***.

And turn on `vouch.testing` before you ask for support.

**Use a Paste Service**
We like [hasteb.in](https://hasteb.in/), but a [gist](https://gist.github.com/) is also acceptable
Do not post logs and configs to this issue

**Describe the problem**
A clear and concise description of the behavior you are observing.
Please include which OAuth provider you are using.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
43 changes: 43 additions & 0 deletions .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Docker build and push voucher/vouch-proxy:latest-arm

on:
push:
branches:
- master

jobs:
Publish-to-docker:
runs-on: ubuntu-latest
env:
DOCKER_TAG: latest-arm
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: latest
- name: List available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Docker login (set DOCKER_USERNAME and DOCKER_PASSWORD in secrets)
if: ${{ success() && startsWith(github.repository, 'vouch/')}} # Remove this line, if you want everybody to publish to docker hub
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
- name: Publish to docker as voucher/vouch-proxy
if: ${{ success() && startsWith(github.repository, 'vouch/')}}
run: |
docker buildx build \
--platform linux/arm/v7,linux/arm64 \
--push \
-t voucher/vouch-proxy:$DOCKER_TAG \
.
# Uncomment below to have github build to docker for every user. Watch out for indentation
# -
# name: Publish to docker as github_user/github_repo
# if: ${{ success() && !startsWith(github.repository, 'vouch/')}}
# run: |
# docker buildx build \
# --platform linux/amd64,linux/arm/v7,linux/arm64 \
# --push \
# -t $GITHUB_REPOSITORY:latest \
# .
15 changes: 11 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
config/config.yml
data/lasso_bolt.db
pkg/model/storage-test.db
vouch
vouch-proxy
main
config/config.yml
config/*config.yml
config/config.yml_*
config/google_config.json
.vscode/*
config/secret
!config/testing/*
pkg/model/storage-test.db
.vscode/*
coverage.out
coverage.html
35 changes: 35 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
language: go
go_import_path: github.com/vouch/vouch-proxy

sudo: false

services:
- docker

go:
- "1.13"

before_install:
- ./do.sh goget

script:
- ./do.sh build
- ./do.sh test
# - docker build -t $TRAVIS_REPO_SLUG .

#deploy:
# - provider: script
# skip_cleanup: true
# script: bash .travis/docker_push
# on:
# go: "1.10"
# branch: master
# - provider: script
# skip_cleanup: true
# script: bash .travis/docker_push
# on:
# go: "1.10"
# tags: true
#
notifications:
irc: "chat.freenode.net#vouch"
7 changes: 7 additions & 0 deletions .travis/docker_push
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker push $TRAVIS_REPO_SLUG
if [ "$TRAVIS_BRANCH" != "master" ]; then
docker tag $TRAVIS_REPO_SLUG $TRAVIS_REPO_SLUG:$TRAVIS_BRANCH
docker push $TRAVIS_REPO_SLUG:$TRAVIS_BRANCH
fi
2 changes: 2 additions & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bnfinet
aaronpk
35 changes: 23 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
# bfoote/lasso
# https://github.com/bnfinet/lasso
FROM golang:1.8
# voucher/vouch-proxy
# https://github.com/vouch/vouch-proxy
FROM golang:1.13 AS builder

LABEL maintainer="vouch@bnf.net"

RUN mkdir -p ${GOPATH}/src/github.com/vouch/vouch-proxy
WORKDIR ${GOPATH}/src/github.com/vouch/vouch-proxy

RUN mkdir -p ${GOPATH}/src/github.com/bnfinet/lasso
WORKDIR ${GOPATH}/src/github.com/bnfinet/lasso

COPY . .

RUN go-wrapper download # "go get -d -v ./..."
RUN go-wrapper install # "go install -v ./..."
# RUN go-wrapper download # "go get -d -v ./..."
# RUN ./do.sh build # see `do.sh` for vouch build details
# RUN go-wrapper install # "go install -v ./..."

RUN rm -rf ./config ./data \
&& ln -s /config ./config \
&& ln -s /data ./data
RUN ./do.sh goget
RUN ./do.sh gobuildstatic # see `do.sh` for vouch-proxy build details
RUN ./do.sh install

FROM scratch
LABEL maintainer="vouch@bnf.net"
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY templates/ templates/
# see note for /static in main.go
COPY static /static
COPY --from=builder /go/bin/vouch-proxy /vouch-proxy
EXPOSE 9090
CMD ["/go/bin/lasso"]
ENTRYPOINT ["/vouch-proxy"]
HEALTHCHECK --interval=1m --timeout=5s CMD [ "/vouch-proxy", "-healthcheck" ]
30 changes: 30 additions & 0 deletions Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# voucher/vouch-proxy
# https://github.com/vouch/vouch-proxy
FROM golang:1.13 AS builder

LABEL maintainer="vouch@bnf.net"

RUN mkdir -p ${GOPATH}/src/github.com/vouch/vouch-proxy
WORKDIR ${GOPATH}/src/github.com/vouch/vouch-proxy

COPY . .

# RUN go-wrapper download # "go get -d -v ./..."
# RUN ./do.sh build # see `do.sh` for vouch build details
# RUN go-wrapper install # "go install -v ./..."

RUN ./do.sh goget
RUN ./do.sh gobuildstatic # see `do.sh` for vouch-proxy build details
RUN ./do.sh install

FROM alpine:latest
LABEL maintainer="vouch@bnf.net"
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY templates/ templates/
# see note for /static in main.go
COPY static /static
COPY do.sh /do.sh
COPY --from=builder /go/bin/vouch-proxy /vouch-proxy
EXPOSE 9090
ENTRYPOINT ["/vouch-proxy"]
HEALTHCHECK --interval=1m --timeout=5s CMD [ "/vouch-proxy", "-healthcheck" ]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017 Benjamin Foote
Copyright (c) 2017 The Vouch Proxy Authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading