You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-08-10 22:51:31 +02:00
Compare commits
2027 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
4eaa1bcfd5 | ||
|
c0a928eded | ||
|
9ffafad4b2 | ||
|
f4b33b64bd | ||
|
e75a258299 | ||
|
b905f2cd93 | ||
|
dc8b1623a2 | ||
|
137e59d526 | ||
|
a88306be98 | ||
|
4d17bc1d68 | ||
|
3ac834dbcf | ||
|
5e7f14bdcb | ||
|
b57c82181d | ||
|
d5f8507cc8 | ||
|
20f561cf70 | ||
|
c403d61d73 | ||
|
658256d566 | ||
|
313a2cb38b | ||
|
78d2a3658f | ||
|
e25f9ec9d7 | ||
|
5808f5376a | ||
|
07a388d17e | ||
|
0e1dc9bb84 | ||
|
6c30a3c70b | ||
|
b05bdc0fbd | ||
|
40f3ef1ea5 | ||
|
d390877945 | ||
|
c4a02ecc95 | ||
|
abb0a35bf3 | ||
|
1a03217208 | ||
|
c8c160da79 | ||
|
7731437af4 | ||
|
fb7e33519a | ||
|
1225d611e9 | ||
|
09f6252ebf | ||
|
f82e90426a | ||
|
14d5355655 | ||
|
bae509d2ec | ||
|
2ecb2c64aa | ||
|
b7ff804506 | ||
|
7b41c8e987 | ||
|
367183d7b8 | ||
|
4237358ac3 | ||
|
fc6ca1dde6 | ||
|
7d85c99d8e | ||
|
3afae76103 | ||
|
07b60b1553 | ||
|
16e453e9f6 | ||
|
8abdbb5a18 | ||
|
bb6ff4ed14 | ||
|
7cee02cac3 | ||
|
3325dcb2bd | ||
|
f6b95c0df8 | ||
|
b34b617aad | ||
|
99c4c654d9 | ||
|
b2c69e25eb | ||
|
44d035c32c | ||
|
2ab22bd9f1 | ||
|
46554b5bff | ||
|
669acb9811 | ||
|
4e2100a287 | ||
|
ef51685491 | ||
|
8a8fcab580 | ||
|
9ac8f4b5de | ||
|
a01abbd9b2 | ||
|
67c1cd6ee7 | ||
|
089c0eaae1 | ||
|
33e7c052dc | ||
|
ee7d79c5d9 | ||
|
b05be4b1af | ||
|
8a36a6622d | ||
|
5f4fdbba24 | ||
|
cc87465e9b | ||
|
a25fef7cbf | ||
|
a393ea3ca0 | ||
|
80189a9973 | ||
|
876feeeb3f | ||
|
38bb15300e | ||
|
2d29cee51e | ||
|
b72a9f41ea | ||
|
8b6e845f27 | ||
|
0364f1b32f | ||
|
39bae25aa2 | ||
|
67f3da232a | ||
|
3cf74c21f8 | ||
|
9b32699c26 | ||
|
58527ec6c9 | ||
|
4c823a66c7 | ||
|
b7a8d38b9d | ||
|
04cc932976 | ||
|
0edecd381e | ||
|
c580b7fad7 | ||
|
46b3b261af | ||
|
a29eda3a6d | ||
|
f31e02cebd | ||
|
f1a5011108 | ||
|
fafb47e45a | ||
|
8dd2cbec4d | ||
|
ae5b5dc45f | ||
|
f2ce83b154 | ||
|
f400e6f340 | ||
|
c90487926c | ||
|
f5631a657c | ||
|
01b01d82a1 | ||
|
e28603f7af | ||
|
ae8fb08a89 | ||
|
60570cc60e | ||
|
5df6053280 | ||
|
75a1099a8f | ||
|
1c3bc31665 | ||
|
5260633103 | ||
|
507d63e05b | ||
|
140674e492 | ||
|
cdcc62014d | ||
|
f41a686b43 | ||
|
c1a21aa877 | ||
|
1346ae6079 | ||
|
fe6f8ddb65 | ||
|
5edff8fe1a | ||
|
5f188e5b6b | ||
|
c64ec1251b | ||
|
47638db231 | ||
|
bcf20346cf | ||
|
0dca9af6d7 | ||
|
ef8ba75987 | ||
|
5042203625 | ||
|
bc1224291c | ||
|
05b91f310a | ||
|
2fd2f8c63d | ||
|
4e2013e6ba | ||
|
3ceef0cff4 | ||
|
64e736f668 | ||
|
96f0288a36 | ||
|
0bc8dd98e2 | ||
|
50ec7fa902 | ||
|
b4f7e0603e | ||
|
4d2b5c30a1 | ||
|
5ec03ab0e9 | ||
|
9945b68a06 | ||
|
6743a9cc89 | ||
|
bc8e7162db | ||
|
e00c7a7edd | ||
|
66f1063722 | ||
|
798b846643 | ||
|
c555f5f6d5 | ||
|
defc456ba0 | ||
|
ab448cf38e | ||
|
6fb020149a | ||
|
055a63432c | ||
|
ff761d2523 | ||
|
642ba174d4 | ||
|
d68336dcf4 | ||
|
4bd920b208 | ||
|
bae168f06a | ||
|
8fd7312a90 | ||
|
cda641473f | ||
|
07230ead91 | ||
|
f5d36705fa | ||
|
1dd4a412b0 | ||
|
3c7dadcbd2 | ||
|
6e32bd6e38 | ||
|
f0fe33e032 | ||
|
715995843c | ||
|
f432cf79e2 | ||
|
f978388e28 | ||
|
65e83fc3cc | ||
|
021d940dcd | ||
|
ad3ee0f66c | ||
|
41c8d5bfce | ||
|
fff5dd358f | ||
|
bc034454f6 | ||
|
d365d5fc41 | ||
|
4fe0d5659b | ||
|
e91f09875a | ||
|
d436e19183 | ||
|
e293dddef4 | ||
|
e12ae03801 | ||
|
51c65c9e79 | ||
|
16f032bce9 | ||
|
cb53401c3a | ||
|
b618ed7150 | ||
|
076d2df246 | ||
|
1ba2353685 | ||
|
87b598c3c5 | ||
|
f71a7fd2a2 | ||
|
ecfa2ca83f | ||
|
e22b8d0eca | ||
|
f9a0a4a280 | ||
|
9a9e7b7a37 | ||
|
95cbd0cdfb | ||
|
12105c446f | ||
|
a15eba427d | ||
|
100ffdcb3d | ||
|
5aea780e46 | ||
|
4929dc4112 | ||
|
ce8b63bc21 | ||
|
ca25c906bb | ||
|
49aa69b162 | ||
|
0e4962a9e8 | ||
|
f60b7f321f | ||
|
343bd61ebb | ||
|
211c605875 | ||
|
a22668eb8c | ||
|
3045392c17 | ||
|
45ec12bcae | ||
|
8a6a3ef3a4 | ||
|
9e23b57038 | ||
|
4122e64dbc | ||
|
45fe2dcfd1 | ||
|
9f64c67d65 | ||
|
6c0d1c5672 | ||
|
8dfb7e9b26 | ||
|
3460cd4c74 | ||
|
70057d3056 | ||
|
72ee8c8146 | ||
|
ece8145bd4 | ||
|
94aa62eece | ||
|
a472392b81 | ||
|
2bb7ea5cc9 | ||
|
3f042de6fc | ||
|
f201dff10c | ||
|
65225ba397 | ||
|
5053a5d20e | ||
|
7508c62c1f | ||
|
02a272340f | ||
|
907b957018 | ||
|
f583dd0b80 | ||
|
38d70fef7f | ||
|
10f26364c6 | ||
|
92c2f06bf7 | ||
|
0f5abe55d2 | ||
|
ca9c0fbe7d | ||
|
7dd8640f21 | ||
|
252c978c5b | ||
|
a5fdb35b28 | ||
|
8ee859bdfe | ||
|
f450bf4563 | ||
|
0998ca6964 | ||
|
5c315cd7ad | ||
|
2d07c08811 | ||
|
60b879f409 | ||
|
e058c4d636 | ||
|
2c65f396e2 | ||
|
ed51762065 | ||
|
e02086f467 | ||
|
fc701bfd6a | ||
|
36f8dbcbcc | ||
|
2ffa92b1c9 | ||
|
bdd65ebab6 | ||
|
33088053a5 | ||
|
0678626e63 | ||
|
8f7209ba1a | ||
|
bb6aba4a00 | ||
|
3b11a51a70 | ||
|
913d38f3c2 | ||
|
95fd69b5bf | ||
|
5a05847186 | ||
|
58ad054053 | ||
|
c6b723f993 | ||
|
d35d23f75f | ||
|
554cd0c732 | ||
|
6d1ef82aa6 | ||
|
f8efdbae5f | ||
|
d60b8460ee | ||
|
448684abe2 | ||
|
cdcc6fb4c0 | ||
|
5d1eb25629 | ||
|
e3dc927e57 | ||
|
5a059510af | ||
|
98a2ec766b | ||
|
c5ec06de5a | ||
|
2afe933083 | ||
|
9b54fcdd66 | ||
|
cf7d1e57e5 | ||
|
687f5d90a1 | ||
|
a448d4798d | ||
|
bf0c151510 | ||
|
69a6c03c06 | ||
|
3170c07318 | ||
|
2f9bb540d1 | ||
|
4b4703f4d7 | ||
|
7af1e42788 | ||
|
c63605127b | ||
|
4178ac4e54 | ||
|
40efe7989a | ||
|
b009395223 | ||
|
975c739b62 | ||
|
ff91a56847 | ||
|
47388f4b62 | ||
|
6374ad1d31 | ||
|
3c06739a8f | ||
|
dd5576f2b2 | ||
|
84e1cc24e3 | ||
|
d2b37d813b | ||
|
fc63fc8dc5 | ||
|
e7d20519df | ||
|
6c2c115d30 | ||
|
de0b6dd8a9 | ||
|
ec13ae03c9 | ||
|
b1929c740c | ||
|
509287b555 | ||
|
82ab37b9df | ||
|
5123910071 | ||
|
74519f618d | ||
|
6a03a110bb | ||
|
327345250a | ||
|
d5c0dc4d53 | ||
|
2742c85ec6 | ||
|
5b21a8408c | ||
|
83c3c602ab | ||
|
508df756e4 | ||
|
7851428ce6 | ||
|
67445052d1 | ||
|
5e68dad636 | ||
|
b98f820abc | ||
|
8141895070 | ||
|
2df301cc21 | ||
|
f88f09f962 | ||
|
b8ae6448e1 | ||
|
daea40d628 | ||
|
f3dbca600f | ||
|
4c2bf5a2fe | ||
|
184c5820af | ||
|
0b24f45965 | ||
|
2f3c811e6a | ||
|
ee3e9b8841 | ||
|
51a5765f77 | ||
|
5ba54df3e7 | ||
|
bc022fbfd1 | ||
|
be84906fbc | ||
|
c7185e7005 | ||
|
bfd667e4a2 | ||
|
71561f637d | ||
|
5d5f7ce343 | ||
|
0762267ac4 | ||
|
52ad31752d | ||
|
53ae4c8c17 | ||
|
5e30a6fe94 | ||
|
fc6e7fdbd1 | ||
|
0ddb5e7b61 | ||
|
551b6c9056 | ||
|
600f5774f9 | ||
|
1e61b65e28 | ||
|
bee7879cb2 | ||
|
53cd0b83d3 | ||
|
5e8956b52f | ||
|
66bfd8ebd5 | ||
|
66a81e6eeb | ||
|
8142c9eeec | ||
|
e55ac342f0 | ||
|
76bc2cf73f | ||
|
a53da415c9 | ||
|
70571d96e1 | ||
|
4816e87316 | ||
|
0061bbeaee | ||
|
d41141f23b | ||
|
7f6109f469 | ||
|
48247d3e79 | ||
|
a5006fd606 | ||
|
601477a52c | ||
|
464f3bcf53 | ||
|
3862182039 | ||
|
dcf3bd1bcf | ||
|
e13a5048eb | ||
|
8d03adfd04 | ||
|
b78c391adc | ||
|
20244470a4 | ||
|
ef95957990 | ||
|
13af1b4786 | ||
|
225dc92adf | ||
|
854401ec00 | ||
|
7683902a42 | ||
|
3c2d67d367 | ||
|
62056a59c2 | ||
|
982ae7e9d2 | ||
|
f3269b3f26 | ||
|
5f2f95e118 | ||
|
9f06dc873c | ||
|
6f6039c82b | ||
|
01386bf303 | ||
|
bfc04fa84c | ||
|
07591fc93a | ||
|
a6e8ec81e8 | ||
|
738c09095b | ||
|
9215944ccc | ||
|
40ee2bb944 | ||
|
bc4acd7434 | ||
|
a02ab7c04e | ||
|
bd867b5138 | ||
|
d9b9bcf9d4 | ||
|
2d22530f8f | ||
|
7529095e1a | ||
|
7b3a36b854 | ||
|
cbe9dccbc0 | ||
|
8c60b64cf4 | ||
|
a84e9f4d26 | ||
|
d107d885e4 | ||
|
d9416c3630 | ||
|
63d05c54d9 | ||
|
0868dda244 | ||
|
cae9690067 | ||
|
6f11e60c0a | ||
|
dd4fa414ea | ||
|
155b437769 | ||
|
5d60177d3e | ||
|
487a0a5b99 | ||
|
1bb3fbcea6 | ||
|
e079c60dfe | ||
|
f204625791 | ||
|
2faa91eb74 | ||
|
fd50a35784 | ||
|
a061cd52e9 | ||
|
cbc973c8d9 | ||
|
df8df9b536 | ||
|
13202fd5ea | ||
|
5577cf0151 | ||
|
82bb08609f | ||
|
2d674959a2 | ||
|
cefeff5561 | ||
|
f753ec1ca5 | ||
|
8b77c97009 | ||
|
ddcc433a97 | ||
|
311d210ec4 | ||
|
0832488af3 | ||
|
f4f5b7756c | ||
|
fd2807c091 | ||
|
e9a4654358 | ||
|
92b2231c6f | ||
|
9484a67afc | ||
|
86011e8ac7 | ||
|
aafa966550 | ||
|
efe9aed559 | ||
|
2c21b2830d | ||
|
4993a5ac8b | ||
|
d4e3bf4df0 | ||
|
4a2cf153cf | ||
|
0586a9e072 | ||
|
b333ef89bc | ||
|
7034f0db53 | ||
|
5dfefb6d9b | ||
|
f55d24bfcf | ||
|
95e56e3445 | ||
|
1e21a56f99 | ||
|
5b5894af07 | ||
|
ece3d62d64 | ||
|
cfcba1a7fc | ||
|
d9a33df29d | ||
|
2f1fecae39 | ||
|
b3df9aecc2 | ||
|
19bb0d0e86 | ||
|
a5d918898c | ||
|
7fe6384f38 | ||
|
a6c8f6f04a | ||
|
6afcae295a | ||
|
c395669649 | ||
|
51d3d55a69 | ||
|
965fab422d | ||
|
b82593b9cc | ||
|
fbe7e6f58d | ||
|
f53754808b | ||
|
037cb041d3 | ||
|
fcecbeb13c | ||
|
d19182c740 | ||
|
ebacc2d7e4 | ||
|
a1ff878fdc | ||
|
f8bd853702 | ||
|
723f6cc5d5 | ||
|
c228d9e273 | ||
|
ff03c43842 | ||
|
884c4ee484 | ||
|
3d6ccc7cf7 | ||
|
0cfb9c6da0 | ||
|
6e02bb496b | ||
|
bcadad4c30 | ||
|
7a784a460d | ||
|
33a3a602bc | ||
|
52cf162843 | ||
|
cbda3cf618 | ||
|
db74661e10 | ||
|
4344610f80 | ||
|
95e1a4973e | ||
|
d3f428a1a6 | ||
|
c900c51a1b | ||
|
01da2ac352 | ||
|
167acf7f09 | ||
|
fc686ae95c | ||
|
c6a98369a0 | ||
|
743c344fdc | ||
|
086b869945 | ||
|
7a27cb04df | ||
|
27f4bb6a0e | ||
|
1aef90f9a9 | ||
|
f8ddc130d8 | ||
|
b794248176 | ||
|
333e68637f | ||
|
2e9c30ac12 | ||
|
f820deb96d | ||
|
ce750e9b30 | ||
|
a392cc1098 | ||
|
45ef848b0a | ||
|
5b89e975d1 | ||
|
b2f780c394 | ||
|
6dfa3021e8 | ||
|
d34644e160 | ||
|
eb43b17750 | ||
|
b999c41a5a | ||
|
4ed564901e | ||
|
db71dd8c55 | ||
|
cc94be0314 | ||
|
c232136196 | ||
|
3ac51f5e2f | ||
|
08b9b0c100 | ||
|
54ff3b96a7 | ||
|
7dc984e664 | ||
|
e1d570c1a2 | ||
|
63727103db | ||
|
b547fe0b37 | ||
|
c3158ebc48 | ||
|
474a3b049e | ||
|
82710a7ac1 | ||
|
1f992b3f87 | ||
|
e3678aaaff | ||
|
3bb9621f5d | ||
|
ed3892296e | ||
|
979c3e8cbc | ||
|
1578d90d0b | ||
|
25ef843115 | ||
|
07aba7db09 | ||
|
74e2f5069c | ||
|
515d0f255e | ||
|
873ce3f1c3 | ||
|
ac3b36f57a | ||
|
e4c32df61e | ||
|
24c826c883 | ||
|
f9fb530c11 | ||
|
263a5df820 | ||
|
ceda5329eb | ||
|
4eb2a35aa8 | ||
|
f6aa7600ea | ||
|
eda5eb9243 | ||
|
0791aef8cc | ||
|
2e15f57b70 | ||
|
d162b018a8 | ||
|
95dd2745c7 | ||
|
9832844c8a | ||
|
edb1bc1a11 | ||
|
967051314e | ||
|
537e596904 | ||
|
44dc3cad77 | ||
|
da92648e54 | ||
|
54d42c5829 | ||
|
e2c7ff6ddd | ||
|
dc5d2a5cd7 | ||
|
25371ea4af | ||
|
2b4c8a9846 | ||
|
c5a98c6d03 | ||
|
590b7a612e | ||
|
ad4f7bcb0e | ||
|
05ebaf5158 | ||
|
c1b01b5bc0 | ||
|
433b93d08a | ||
|
cbbecb81bd | ||
|
e03cf87dd8 | ||
|
11699a822a | ||
|
88709d8b69 | ||
|
bd0c4a3296 | ||
|
4f5efd4074 | ||
|
92c4ca9c58 | ||
|
dede6fd531 | ||
|
0e10fb8967 | ||
|
576184924d | ||
|
5515918436 | ||
|
95839a2896 | ||
|
7eaf98b5fe | ||
|
c278e0aa4e | ||
|
8a951b2b4a | ||
|
a654c9ec24 | ||
|
5933000b86 | ||
|
0fa8fca276 | ||
|
bdfca925a3 | ||
|
1621ea3bba | ||
|
4980f6af7d | ||
|
a53198725e | ||
|
1b335a056d | ||
|
ceb015ee22 | ||
|
8dea8134eb | ||
|
60b6dd850a | ||
|
6e54ac2745 | ||
|
0693856bc3 | ||
|
7ed4e3c830 | ||
|
2c668a52d4 | ||
|
9caf8c7040 | ||
|
1e761bf8fd | ||
|
6c379f74db | ||
|
4ee3f13c46 | ||
|
976dc35805 | ||
|
d82c268696 | ||
|
7eb3a4fbd5 | ||
|
b49e62f9b2 | ||
|
ea261ca014 | ||
|
543a71efad | ||
|
bdab6feb0c | ||
|
85c02821bf | ||
|
2ce93b6b31 | ||
|
9d8093f470 | ||
|
d8deaa124b | ||
|
6cc7da8993 | ||
|
d3e036d619 | ||
|
fd5e23e1c5 | ||
|
3957183fd5 | ||
|
a87c27b6bf | ||
|
b0ab60b0b8 | ||
|
044b022608 | ||
|
6ced2e5ad4 | ||
|
826ebc230a | ||
|
81cfd24962 | ||
|
e25158dda6 | ||
|
f6b2848e9a | ||
|
e4a8c98e1b | ||
|
95f9de5979 | ||
|
11c2177f18 | ||
|
c84a5a418f | ||
|
3092941c57 | ||
|
05a4e77c4c | ||
|
ee7c405bd8 | ||
|
88f32aeaa1 | ||
|
fe9159572c | ||
|
662fa72e8c | ||
|
d51556515e | ||
|
733b3fe642 | ||
|
12ab4ef529 | ||
|
ae72beb24e | ||
|
ccbb98acd9 | ||
|
54d44ccb8f | ||
|
7cf3065111 | ||
|
5928fe5485 | ||
|
45e45303ad | ||
|
31f7c5bb59 | ||
|
42c16efa38 | ||
|
526aff8c84 | ||
|
e6223383e5 | ||
|
ab54de38cc | ||
|
4c0beb373f | ||
|
8967873659 | ||
|
a35db2ae8a | ||
|
0b4bc36554 | ||
|
ef697afc6d | ||
|
777556c97e | ||
|
98f8195902 | ||
|
1faa5c47ce | ||
|
7a83d18f23 | ||
|
d359ab75e1 | ||
|
5063b31b62 | ||
|
ac188b129f | ||
|
9ce962be08 | ||
|
075cb9c3a0 | ||
|
8a06779d41 | ||
|
6c62b25bf1 | ||
|
d2d62bb452 | ||
|
16a9893a19 | ||
|
ff914d7e17 | ||
|
baf6cf3816 | ||
|
d91c3f867d | ||
|
593125152d | ||
|
7fa6d2d024 | ||
|
7e80e5596b | ||
|
5f4ac25b1e | ||
|
1c151b4b27 | ||
|
c2325ecbd5 | ||
|
d8b91efcc7 | ||
|
bd2fa9d7d8 | ||
|
273ab1f591 | ||
|
e1764d4221 | ||
|
e7f304fc96 | ||
|
62436dbc02 | ||
|
a8c9b2903d | ||
|
c00d36159e | ||
|
a296936a0f | ||
|
a14c0c2121 | ||
|
381ac91752 | ||
|
41cd418a5d | ||
|
cfd82daaf0 | ||
|
f648c54d87 | ||
|
67bfa4b43f | ||
|
818938add2 | ||
|
823cb14d01 | ||
|
a0e2f785f3 | ||
|
06808704a3 | ||
|
befcdd9d04 | ||
|
725ae543d5 | ||
|
095e1db801 | ||
|
88122f641d | ||
|
2dd4a9647a | ||
|
f9de0e840c | ||
|
d6de11aa98 | ||
|
544ba2a21c | ||
|
7eeaea0b3f | ||
|
d3423408c7 | ||
|
42475c28f7 | ||
|
9d20b4e0e2 | ||
|
fbe5743dd4 | ||
|
7ebeecb128 | ||
|
3fc194ee72 | ||
|
3315e5d4b8 | ||
|
c0654e3d9f | ||
|
8c25f5be0b | ||
|
8c91adcaf0 | ||
|
4daa66e1c9 | ||
|
46c3296330 | ||
|
5497310673 | ||
|
17009d8363 | ||
|
d64d717e63 | ||
|
05c3fa7601 | ||
|
333418983c | ||
|
f86e25aec2 | ||
|
b0949a4efb | ||
|
0279fa7dff | ||
|
73d9f3809e | ||
|
5788bebfee | ||
|
7262945c6a | ||
|
64f0a9f580 | ||
|
b82182763e | ||
|
92ae5d9d24 | ||
|
025ef3eca4 | ||
|
f0963b3444 | ||
|
2e5b229637 | ||
|
455d649165 | ||
|
0615a6a663 | ||
|
6c6fd4f862 | ||
|
f3bd61b371 | ||
|
9782fc7fa4 | ||
|
c1267bb92d | ||
|
4d9de06b1d | ||
|
20cf033065 | ||
|
9dbd5f5afd | ||
|
f3209a40e1 | ||
|
6894738d97 | ||
|
36887a05b5 | ||
|
f4b3115dd3 | ||
|
86e672e21e | ||
|
8d2fc409d8 | ||
|
2c54ee703f | ||
|
d8aca8ac30 | ||
|
3d457a8cdf | ||
|
602dac7852 | ||
|
220b3708fc | ||
|
d3147c3ab2 | ||
|
23e545a639 | ||
|
ad2d7b1ae7 | ||
|
d1e7ae6f11 | ||
|
756d385154 | ||
|
5fe947eb07 | ||
|
322308aab5 | ||
|
9cea4ea89b | ||
|
76269a13b7 | ||
|
845235185d | ||
|
b2d0b728ef | ||
|
59aeefcd8b | ||
|
a7c8a233ba | ||
|
ce29b16d84 | ||
|
425cff7af1 | ||
|
225ff478a1 | ||
|
e8e2af73df | ||
|
dba6989054 | ||
|
1e3d8547d7 | ||
|
9e8c2af86b | ||
|
6ecbc7bc4e | ||
|
a63ed0225c | ||
|
ef457b1765 | ||
|
9cdcd2b2d4 | ||
|
881f43f793 | ||
|
0151ca11f6 | ||
|
84f76c6060 | ||
|
801edeba23 | ||
|
465789b044 | ||
|
b6cca79cb9 | ||
|
4fa607f173 | ||
|
e87a51f0e5 | ||
|
7def4bf360 | ||
|
0f859215f0 | ||
|
b97c83297e | ||
|
c9d9769f6f | ||
|
ae17e38403 | ||
|
9df3a752a6 | ||
|
c3f31b4dd5 | ||
|
06985879e1 | ||
|
1ccaea7710 | ||
|
d1a249262f | ||
|
a909d33355 | ||
|
780ae4f3c9 | ||
|
48b1658e5d | ||
|
b541805dc1 | ||
|
8087de7a03 | ||
|
57640764c0 | ||
|
56075e3776 | ||
|
fbfc0959cb | ||
|
5c64e236fb | ||
|
eb129a342c | ||
|
9c126f5740 | ||
|
da02914a9c | ||
|
fa6a785eaf | ||
|
73fc7706bc | ||
|
f054682fb7 | ||
|
6fb3274ca3 | ||
|
b625de9490 | ||
|
8e02fac2cc | ||
|
e50e6ed373 | ||
|
a0d37518e0 | ||
|
81bf1ef8ce | ||
|
dd60fe4fef | ||
|
d08b9b7cc4 | ||
|
597ffeb121 | ||
|
1d74a51cd7 | ||
|
91b3f5973e | ||
|
4b28e6886c | ||
|
816d9a4566 | ||
|
f07a5630f1 | ||
|
138a6b128a | ||
|
0886f8035c | ||
|
3369799853 | ||
|
89e0a77a8f | ||
|
753f6c548a | ||
|
65e15f24c1 | ||
|
025056cba0 | ||
|
44d83e5f95 | ||
|
23b2355f85 | ||
|
8bd2409342 | ||
|
d2ffef2c7e | ||
|
42f6cef7d6 | ||
|
ea5b8cc21f | ||
|
eb56f24d6d | ||
|
74ac4274c6 | ||
|
a1877434b2 | ||
|
4fda907830 | ||
|
a5466bb96d | ||
|
d67d6e3152 | ||
|
5117f2314f | ||
|
f260c3707a | ||
|
87c67b09a7 | ||
|
d749c11e73 | ||
|
b201dbb2d3 | ||
|
5b683a7631 | ||
|
f36dfbb494 | ||
|
5b003a5657 | ||
|
d587030019 | ||
|
26ed080bed | ||
|
f6ae15e8c3 | ||
|
57a8ef06b4 | ||
|
5f8f856260 | ||
|
22f60e9b63 | ||
|
44fa8316a1 | ||
|
3e9717d489 | ||
|
e9f787957e | ||
|
2706909fe3 | ||
|
7407fbd3a7 | ||
|
2549b722d3 | ||
|
3ff0c23a9e | ||
|
527c0c311c | ||
|
8bed7aafbd | ||
|
482cd32a17 | ||
|
eb07005a5c | ||
|
aed43a54da | ||
|
8e582ac02a | ||
|
d353d94631 | ||
|
b6d6f31ac1 | ||
|
ed92df3537 | ||
|
430355b203 | ||
|
3a4660414a | ||
|
c377466411 | ||
|
d7fa979060 | ||
|
b9661cb6fe | ||
|
f21b3b8b20 | ||
|
1b3b00443a | ||
|
b92fd4b0bb | ||
|
eb58ea2ed9 | ||
|
e7ac793044 | ||
|
df56a34ea3 | ||
|
45ae87e4b7 | ||
|
6254ed24ea | ||
|
66550db7b9 | ||
|
c8a70c6243 | ||
|
6c483e5674 | ||
|
cc6532a282 | ||
|
47710d0094 | ||
|
2b15ba0bcf | ||
|
289f4f3c5f | ||
|
7d6ff03d13 | ||
|
1c26539ef0 | ||
|
14fd934b32 | ||
|
5cba642938 | ||
|
1270104806 | ||
|
92d09343d2 | ||
|
8d1bbf33b1 | ||
|
1dac1419b3 | ||
|
8059a812cd | ||
|
d26c65ba8d | ||
|
2dc0d1e7ee | ||
|
ab3cd58df6 | ||
|
39f57c6b28 | ||
|
5a7ae59f2a | ||
|
ef2628d5b2 | ||
|
899c743afc | ||
|
11bfd15566 | ||
|
3ccf74746e | ||
|
0e119d7c84 | ||
|
e9d46bfe32 | ||
|
65016c8da1 | ||
|
cc6b808c17 | ||
|
8abc4e6d87 | ||
|
2aa04c9720 | ||
|
4a54c9421c | ||
|
d9c141ae7c | ||
|
0da45e97e1 | ||
|
e51f5fe7c9 | ||
|
2b9e1bbba0 | ||
|
b6061f0803 | ||
|
0bd8eb3191 | ||
|
add45c360c | ||
|
8b44ddd547 | ||
|
420a34f814 | ||
|
f4c292b6c7 | ||
|
132c2cb210 | ||
|
70c585812e | ||
|
b848663a3d | ||
|
7861a707cd | ||
|
f705d2b5d3 | ||
|
a835fc5192 | ||
|
70990327d1 | ||
|
c9b3422801 | ||
|
6743e3991d | ||
|
fc2ff19a19 | ||
|
eec7565c52 | ||
|
d8b0d9059d | ||
|
b7b7ade7c4 | ||
|
89a8ac8c1f | ||
|
fa4ba5e7ea | ||
|
cfd3de807c | ||
|
183cb124a4 | ||
|
fcb83c48f4 | ||
|
581c6c3259 | ||
|
5c62690653 | ||
|
3d203a1a03 | ||
|
dc7dbc5d28 | ||
|
8be97f25e7 | ||
|
9bc618bb08 | ||
|
e64322b070 | ||
|
3fa42edb73 | ||
|
7c4479791c | ||
|
d046782f61 | ||
|
090eff0197 | ||
|
74918c40d8 | ||
|
4eb9612679 | ||
|
9a64e67d5b | ||
|
fde09bea4e | ||
|
97e95fd4ff | ||
|
017b9bcfb7 | ||
|
8cbf9219bc | ||
|
e9aa7acf4e | ||
|
e0d915cc03 | ||
|
3371284a36 | ||
|
160685abd7 | ||
|
6db1aeb9c6 | ||
|
93870ec0ff | ||
|
56f199a24f | ||
|
55a941b76e | ||
|
4a04ff4529 | ||
|
8eb9c69a9a | ||
|
9d59519a96 | ||
|
a87beab1a0 | ||
|
e14d6ab791 | ||
|
ef08d01b98 | ||
|
0eb0024e87 | ||
|
e4e5580852 | ||
|
1337f56188 | ||
|
841bf77f7f | ||
|
bd619ab63e | ||
|
b40517bbe3 | ||
|
73f0094486 | ||
|
29b24793e3 | ||
|
bd5fab478d | ||
|
37026b60ce | ||
|
43bf36425d | ||
|
4134a9010e | ||
|
105d5acb7b | ||
|
d7abd56981 | ||
|
5fa5b3186f | ||
|
d05e08cba3 | ||
|
9a338d8a34 | ||
|
16a30002df | ||
|
aceb9e2762 | ||
|
0645e19c24 | ||
|
dcc75410a8 | ||
|
514db45d1a | ||
|
8515da3e91 | ||
|
51a9062044 | ||
|
35ed7a313b | ||
|
b6e78efc1e | ||
|
d69fd6af22 | ||
|
33e04cc52f | ||
|
a1358d2070 | ||
|
e88d29f16a | ||
|
46cc21d8cf | ||
|
45222395e0 | ||
|
542bf1fad1 | ||
|
ad52587ae6 | ||
|
2bb0160bf3 | ||
|
1c8c5b08d7 | ||
|
65c228394f | ||
|
7b21f53aad | ||
|
81ec9edf53 | ||
|
0cf0fd88e8 | ||
|
6e31eb28d5 | ||
|
bbf00bc92b | ||
|
43189a7854 | ||
|
2318716a89 | ||
|
19836f85ac | ||
|
88ef888752 | ||
|
c5da3dff9c | ||
|
9643a0b10c | ||
|
f141f7cea0 | ||
|
1aac37d2b1 | ||
|
d4dd34a65a | ||
|
3f00143175 | ||
|
eb234011eb | ||
|
034f057b60 | ||
|
7d6f2a3f45 | ||
|
c81a7ed197 | ||
|
2768321929 | ||
|
d43b372ca9 | ||
|
6b27069812 | ||
|
71dc70222b | ||
|
5dbcd73722 | ||
|
e932381ba7 | ||
|
e02f99eb58 | ||
|
e73db7df7b | ||
|
2981a5ed1a | ||
|
7d8ee61254 | ||
|
895403cb9b | ||
|
abeb0236d8 | ||
|
bb5977095f | ||
|
a09eecc6a2 | ||
|
dd36138965 | ||
|
18716142b4 | ||
|
19b5606126 | ||
|
d1c7be565b | ||
|
64ae31b5a0 | ||
|
e6903d8c1f | ||
|
7ffe9b7620 | ||
|
a999270cf3 | ||
|
d29766609b | ||
|
de9e65a63a | ||
|
d0b6c04960 | ||
|
fbf4063245 | ||
|
02410d3919 | ||
|
028a0ed62e | ||
|
53142455b6 | ||
|
21ef86b594 | ||
|
0bc0feb4bb | ||
|
9d39816709 | ||
|
830065a128 | ||
|
efa1e9b448 | ||
|
97ab3fa005 | ||
|
4c1047866b | ||
|
416c8b0a5c | ||
|
215aeec8b9 | ||
|
6346dafc1e | ||
|
99481b3a39 | ||
|
37c76b6376 | ||
|
5b95ed3033 | ||
|
fa8e1ee033 | ||
|
e1c3e938cc | ||
|
b6b5194190 | ||
|
fb1bef2757 | ||
|
3e13f3197f | ||
|
eb933cc3f4 | ||
|
211fd3a010 | ||
|
285c65a2d4 | ||
|
900061b88a | ||
|
b3ba2594c6 | ||
|
016f4aa276 | ||
|
48a2aaadc1 | ||
|
c6f1daba2f | ||
|
c4cf15f3e1 | ||
|
1c1106721e | ||
|
39c01d5930 | ||
|
5c8a66bcc9 | ||
|
b0375e85fa | ||
|
390d479d28 | ||
|
4313553122 | ||
|
34137f7305 | ||
|
d9a45a3b47 | ||
|
6e1b3b9660 | ||
|
778463906a | ||
|
5ce9e75c21 | ||
|
c8dbf1cf60 | ||
|
d9af3ffc5e | ||
|
6b43b41638 | ||
|
25154ede41 | ||
|
ee5662e0f5 | ||
|
1b6c54cae1 | ||
|
daedbbd353 | ||
|
054979978f | ||
|
3686b0b442 | ||
|
88a8a70537 | ||
|
8bec67beb7 | ||
|
e8fce0b14d | ||
|
a3eef1709a | ||
|
c2c1caa404 | ||
|
788d8ecc1b | ||
|
5817028bb1 | ||
|
dc756b9de3 | ||
|
713c3927a9 | ||
|
84360114e2 | ||
|
fa7855a99d | ||
|
c85e5297b5 | ||
|
11c033e2c8 | ||
|
9a495e996b | ||
|
ba3e40ab1c | ||
|
9bbd6adce9 | ||
|
ca416a2ebb | ||
|
43f214ce8b | ||
|
a197a17bc3 | ||
|
1979627534 | ||
|
014fa682be | ||
|
e43c65cc76 | ||
|
c6939a40c5 | ||
|
9382293b0b | ||
|
7bb5fc0a81 | ||
|
e823d874b0 | ||
|
559152a10f | ||
|
f60e24d9c3 | ||
|
ce2e92bc57 | ||
|
b6931aa4ea | ||
|
f7cca1d0b3 | ||
|
b4530b9292 | ||
|
f9025a8f8f | ||
|
363eaf1fac | ||
|
dbf1b451d9 | ||
|
a73d0ec268 | ||
|
0f343cf0ad | ||
|
1683aa5978 | ||
|
808084b744 | ||
|
2c851fcd4f | ||
|
160bbaf98e | ||
|
3aeca4368c | ||
|
d8d43bb51b | ||
|
a17c48810f | ||
|
94e31f8b65 | ||
|
f7c88f53d1 | ||
|
bbc4eee17e | ||
|
3cbac6122d | ||
|
3afcadae76 | ||
|
f7b28cb1d3 | ||
|
6a88da7f7a | ||
|
11c8a983c8 | ||
|
d1bab0e22e | ||
|
03a0e1a0e3 | ||
|
276d1c6f19 | ||
|
0c9795a964 | ||
|
810a9e9967 | ||
|
fc11d8d508 | ||
|
a0085e9015 | ||
|
236c7fa60e | ||
|
cce2c680d8 | ||
|
c3f9cbeb3d | ||
|
189ed4de8f | ||
|
1fd4ebe546 | ||
|
44b27e0208 | ||
|
de0c92af06 | ||
|
7e5c8bb579 | ||
|
d228d5a928 | ||
|
111d17efde | ||
|
d0cfca4b73 | ||
|
2e37da4dc4 | ||
|
afef9c7588 | ||
|
0ccfc73ab2 | ||
|
4e3dd09cf2 | ||
|
7cf685140b | ||
|
e642daef4e | ||
|
53d8e99f05 | ||
|
de280824de | ||
|
24cdfa68b6 | ||
|
be9eaaeb48 | ||
|
9d626265e8 | ||
|
07df29db37 | ||
|
9ed5a43516 | ||
|
8d3de2dc75 | ||
|
0d5fa211df | ||
|
36da6e2be9 | ||
|
f7c050e7ba | ||
|
eae652d986 | ||
|
00fed1a31f | ||
|
c5be09ca48 | ||
|
8749cbb424 | ||
|
e49f8542bc | ||
|
458710149c | ||
|
842d764a5f | ||
|
e27f7e0bcb | ||
|
1961424561 | ||
|
4d21b8a04f | ||
|
c6294c40a3 | ||
|
6fa3d6c74c | ||
|
5fc6bd0e6f | ||
|
dd05e7ff0b | ||
|
581475feec | ||
|
4341ab4420 | ||
|
fcd52e042e | ||
|
a659b9558e | ||
|
7f72a22227 | ||
|
b0b87563dc | ||
|
7efc162aaa | ||
|
7c3efe4f42 | ||
|
f9f98cb3a7 | ||
|
c7bfbdecef | ||
|
bdc686103e | ||
|
3f7837b955 | ||
|
eb31850470 | ||
|
c02d560bf4 | ||
|
8641bc4738 | ||
|
c0fb7e81fc | ||
|
f832eb1446 | ||
|
802754caad | ||
|
4cdedc8f50 | ||
|
9dcd8255bf | ||
|
8d69d55de4 | ||
|
362cdf7713 | ||
|
3108f765a5 | ||
|
4eef21cf3d | ||
|
4d7349f9c6 | ||
|
81b9a63e51 | ||
|
400aea3653 | ||
|
fad6fff16d | ||
|
b1c81e2abe | ||
|
0fc4131c72 | ||
|
8d0149ccf8 | ||
|
e3fb25efe6 | ||
|
4cd43ef397 | ||
|
666d4c3db1 | ||
|
d94cf45ea8 | ||
|
8ee8bd8bc2 | ||
|
85891a2261 | ||
|
d934309b44 | ||
|
0bca3564b5 | ||
|
51f4d88028 | ||
|
0c7400a924 | ||
|
907de4e141 | ||
|
4f553bcfc8 | ||
|
bd79b976da | ||
|
edd6ad6ae5 | ||
|
2033ce81c3 | ||
|
7a6204c8fd | ||
|
f2661c47ba | ||
|
3a843f815d | ||
|
10adb5c516 | ||
|
18d20364a8 | ||
|
3ae261031e | ||
|
61007250f2 | ||
|
9670f54dd0 | ||
|
c49d3628cd | ||
|
3b0e8c3cb3 | ||
|
a316f8a06f | ||
|
e21f09817e | ||
|
8c765779b5 | ||
|
fc59a6d683 | ||
|
c32a7d8e2c | ||
|
5c8220d085 | ||
|
1d808a47d1 | ||
|
0198dd6e93 | ||
|
d9362d3bb9 | ||
|
79a0759c10 | ||
|
cfc2daa220 | ||
|
dec3647669 | ||
|
14db073807 | ||
|
5f86ea5c75 | ||
|
a7672c82bc | ||
|
ec72ee8bf1 | ||
|
17d9961cb9 | ||
|
038ee169bd | ||
|
11cc396059 | ||
|
eee4b55e0f | ||
|
625909e445 | ||
|
f94dee6f0d | ||
|
5489d1624e | ||
|
afb7247ad5 | ||
|
5d0827a028 | ||
|
90f8117fba | ||
|
7663565cd3 | ||
|
effe1e0bdb | ||
|
bb55b13242 | ||
|
3a8b33a017 | ||
|
1fb6fb8173 | ||
|
8602aa4f13 | ||
|
b8bfa226dd | ||
|
61137f67a9 | ||
|
c5ae0afea9 | ||
|
28d64c90d9 | ||
|
ef8b7b5e25 | ||
|
8165f6c483 | ||
|
f6790265e1 | ||
|
227ea5da44 | ||
|
11205c7399 | ||
|
ca0b8375da | ||
|
68abf7b2d8 | ||
|
6d74a42e57 | ||
|
5c9a0f8308 | ||
|
6d1b5fc4b0 | ||
|
898b6b81c9 | ||
|
9fdb8acec6 | ||
|
6326660699 | ||
|
9f920b0fc1 | ||
|
06a283e581 | ||
|
befab0521a | ||
|
d7a51e4aab | ||
|
3c10aee62c | ||
|
3f7ed36e46 | ||
|
fef940da9a | ||
|
2a07983a36 | ||
|
9e4a7ee84e | ||
|
004b74332b | ||
|
0df5a77c53 | ||
|
bb8b6c0d51 | ||
|
acb0d3ab79 | ||
|
14601093c4 | ||
|
f40dab8748 | ||
|
ba21c90c7a | ||
|
292d2dc639 | ||
|
572654a27b | ||
|
90a6915ab1 | ||
|
eb89047e3a | ||
|
35f2ae9a36 | ||
|
1af7c208ee | ||
|
3a84033989 | ||
|
a12bae35ca | ||
|
6b8d2bdcc3 | ||
|
c0bfe0357a | ||
|
fe9efba0c5 | ||
|
8d1a4c527f | ||
|
dcc430f6f1 | ||
|
535f6b8e63 | ||
|
e34f18ef2c | ||
|
9d0a0c7426 | ||
|
052451edef | ||
|
56d195a433 | ||
|
9cecc01aac | ||
|
bed0336608 | ||
|
86977f7c7f | ||
|
271efe776e | ||
|
aae91b0ad6 | ||
|
e24e4ef880 | ||
|
c3cdcae49b | ||
|
e04411a789 | ||
|
ae4e9155d2 | ||
|
610ee6d0ec | ||
|
bfb22506ff | ||
|
eb1d64a666 | ||
|
0d256a329f | ||
|
e71797b409 | ||
|
f570fb9f58 | ||
|
3d17159c5c | ||
|
a46ee952a6 | ||
|
dc36836800 | ||
|
1295f87b33 | ||
|
31d7b61cc4 | ||
|
62bf233682 | ||
|
1afaf46656 | ||
|
e64e6fa514 | ||
|
63da5c64db | ||
|
486521da96 | ||
|
a97710d3d2 | ||
|
e270dd0066 | ||
|
de16df232d | ||
|
ef22a0f4b6 | ||
|
ac10bc04ed | ||
|
1c36b5e2e9 | ||
|
0b2eb91fa4 | ||
|
b515b90b34 | ||
|
d8d4c687df | ||
|
49f1320be6 | ||
|
513af9b714 | ||
|
721d28bd4f | ||
|
ac0d010371 | ||
|
44cdcc79c3 | ||
|
a122ac60e4 | ||
|
85a1ed5135 | ||
|
8098094fc2 | ||
|
18a77e6618 | ||
|
1aad87d7ca | ||
|
21aba50ea5 | ||
|
b4afbae0d3 | ||
|
41ed9f7429 | ||
|
eb5a31e48f | ||
|
311f14c7eb | ||
|
0c541f6f5e | ||
|
c8a89eca08 | ||
|
82a3d5afdc | ||
|
6683e35008 | ||
|
b83b7565f3 | ||
|
a209a52df1 | ||
|
71dfd44149 | ||
|
d00c14a2a7 | ||
|
44ea6920a7 | ||
|
fa6c4792a1 | ||
|
a165928458 | ||
|
d5d4878a29 | ||
|
c4559ea372 | ||
|
a65d38d181 | ||
|
57851f6850 | ||
|
7e3ad6b215 | ||
|
c941f3ce0d | ||
|
9240538939 | ||
|
272fb96024 | ||
|
bc5fc5a513 | ||
|
49e124eb87 | ||
|
6453e78db3 | ||
|
b167744b0a | ||
|
fb52bdb90c | ||
|
c457eeb711 | ||
|
9938bb95d9 | ||
|
4b985992d8 | ||
|
8b61559b8d | ||
|
e1b70dc9f0 | ||
|
9e37de53e3 | ||
|
18156713e3 | ||
|
14c25c1d8a | ||
|
a91cce7ab9 | ||
|
02dfa87f11 | ||
|
7134d22bcc | ||
|
d85660248c | ||
|
64672c34eb | ||
|
c3eac4f6d4 | ||
|
4de49983fb | ||
|
5f9a65f6b1 | ||
|
7d910c0ae8 | ||
|
69c723af81 | ||
|
a882788efb | ||
|
88a7f9f483 | ||
|
8a24dd797f | ||
|
d346219293 | ||
|
1ab63304a1 | ||
|
436936836d | ||
|
a025228a6d | ||
|
4eab98e65b | ||
|
53524875d1 | ||
|
800a3694c2 | ||
|
583ec18fa2 | ||
|
3f219bd85c | ||
|
23309adc7c | ||
|
6c4aca957e | ||
|
e48d28d1b9 | ||
|
4a6b703c54 | ||
|
93cb575d7c | ||
|
f537720b52 | ||
|
122ec45dd8 | ||
|
0d94f5e515 | ||
|
2eecf756e4 | ||
|
8635391543 | ||
|
f29e353586 | ||
|
2c104c4e7d | ||
|
7bf00b7f4a | ||
|
7b1132df13 | ||
|
6bf3f2a51b | ||
|
f00a474d91 | ||
|
b57d7f77e1 | ||
|
84da3c3d8c | ||
|
9ed5623f2a | ||
|
7236039b9d | ||
|
289dfce28a | ||
|
4e10cc76e0 | ||
|
08021429ea | ||
|
c4f20fff3d | ||
|
ec97000169 | ||
|
03f218a63c | ||
|
bc81a0f6e4 | ||
|
e952ab4bdf | ||
|
56f51417ae | ||
|
816c2a6da9 | ||
|
d7e88a4718 | ||
|
874c147e04 | ||
|
bdcdfb74f9 | ||
|
f0d006259e | ||
|
6311fa2950 | ||
|
630db3769b | ||
|
4bc0a91e2e | ||
|
179ee6c2db | ||
|
e92e2f0cb4 | ||
|
27bdb194b1 | ||
|
c98ff79aba | ||
|
e245ef4854 | ||
|
a83c5eabb6 | ||
|
9823971b7d | ||
|
776d063b98 | ||
|
39b6a42d43 | ||
|
018a25be04 | ||
|
ecd0f89c84 | ||
|
387a7267e1 | ||
|
4eefc01600 | ||
|
aa37564655 | ||
|
85c5cef783 | ||
|
ce7e384095 | ||
|
b9cfa8f49f | ||
|
924eab6355 | ||
|
5bcb998e6b | ||
|
d24aacdb5c | ||
|
411adf6f21 | ||
|
317f09f41e | ||
|
3881955605 | ||
|
bd651df3c2 | ||
|
058ffd1047 | ||
|
5a50f6223f | ||
|
100f126405 | ||
|
2f6dcf3b5f | ||
|
48dbb391bc | ||
|
54d91c69cc | ||
|
350c1cd127 | ||
|
58b06ce761 | ||
|
79acef9036 | ||
|
10f65e0381 | ||
|
1ff74d322a | ||
|
69cb34a04e | ||
|
187960e9d8 | ||
|
8413c30c26 | ||
|
b895f49c52 | ||
|
8083501da6 | ||
|
0af18d6d7c | ||
|
77e1fff753 | ||
|
0d6fa6216d | ||
|
6366690927 | ||
|
417fde190c | ||
|
fb9616160e | ||
|
d1ef14becc | ||
|
d69560d020 | ||
|
7a8fb58ad1 | ||
|
8027cc454e | ||
|
f35c82bb0f | ||
|
9e59b4f62e | ||
|
572646e0d5 | ||
|
78feaec6fa | ||
|
55a853cf51 | ||
|
405f9b3bb0 | ||
|
4721da02f2 | ||
|
c1ae0ca807 | ||
|
22199fa417 | ||
|
3155ada287 | ||
|
2e2327af6c | ||
|
ae0258a203 | ||
|
518c1d3e8e | ||
|
fc06e2dbef | ||
|
5095c3647d | ||
|
4f5dbace9f | ||
|
7e7bfb5daf | ||
|
bc3d75a2ed | ||
|
42f14a41d9 | ||
|
a7693cc72a | ||
|
93df7d9132 | ||
|
a6b8f7bde2 | ||
|
2f61e42c37 | ||
|
f435fa68ab | ||
|
130d03758d | ||
|
7a1fc52e33 | ||
|
b255ed56ef | ||
|
2c566a5f5b | ||
|
296d989e58 | ||
|
f2562e8973 | ||
|
42731f0617 | ||
|
b1bd3280db | ||
|
e881612ea6 | ||
|
b6c60f52ee | ||
|
1355c1ce30 | ||
|
df6b6b7ce0 | ||
|
40cf6b2626 | ||
|
006322562d | ||
|
f0b6f1525b | ||
|
29fb71fac5 | ||
|
37475637cd | ||
|
e7d29590cd | ||
|
b05eb71adf | ||
|
0d56a4c570 | ||
|
60bb8fc7ea | ||
|
076484297e | ||
|
e374805f8e | ||
|
d3f0cb43ca | ||
|
f26ed5f3d1 | ||
|
91346df5ac | ||
|
10e240c8bf | ||
|
d40a61613e | ||
|
093f9da881 | ||
|
76bd23738f | ||
|
37e31b5f09 | ||
|
c61f3a1c65 | ||
|
34cbe0497c | ||
|
fbee5eae16 | ||
|
17e97ab884 | ||
|
4ad4b11411 | ||
|
72fd3b96a6 | ||
|
54393b91ed | ||
|
1d29a0d094 | ||
|
455e0004b8 | ||
|
1048584075 | ||
|
65302ed34b | ||
|
02e80b7aab | ||
|
553cf89579 | ||
|
1c2ee715b3 | ||
|
b965f25c10 | ||
|
15a2cf8b9e | ||
|
8b3a3853eb | ||
|
965d95fd4f | ||
|
0204054005 | ||
|
6d162a1d78 | ||
|
530acff38c | ||
|
fd6655411b | ||
|
2da89f8425 | ||
|
14d559939f | ||
|
2ab8a7d95d | ||
|
a1130e41a3 | ||
|
e10b8860a6 | ||
|
5d7d0c4b4b | ||
|
16734dbee8 | ||
|
090bc50ec3 | ||
|
f262ec84d5 | ||
|
bd3bbbdf54 | ||
|
4d233c44dc | ||
|
701c012567 | ||
|
9200eb8e97 | ||
|
b8137ba666 | ||
|
908ac24257 | ||
|
d4341ec40c | ||
|
39d2f28a40 | ||
|
ec036d1005 | ||
|
7179c5796a | ||
|
1a8bd70b46 | ||
|
56da8387c0 | ||
|
15f48fb95e | ||
|
3f2d21dde9 | ||
|
8519e7ccae | ||
|
8b06d255f7 | ||
|
81c9185ee3 | ||
|
8fca58cf49 | ||
|
308bcc06a4 | ||
|
3f2fab10e6 | ||
|
93b7d31332 | ||
|
9eaa9fdcbf | ||
|
8a17ef8d71 | ||
|
72da47509f | ||
|
88c518885c | ||
|
46a0d7ca54 | ||
|
1ae62a3343 | ||
|
79bcfebb77 | ||
|
40ba565975 | ||
|
d77119be55 | ||
|
1f15631547 | ||
|
562db1e2da | ||
|
c22731afa0 | ||
|
37c415b889 | ||
|
8ec025f536 | ||
|
ee4ebe53bf | ||
|
6545a33f93 | ||
|
bf9fedb3cf | ||
|
66a82435de | ||
|
484771b98a | ||
|
70c4ca95b6 | ||
|
6df85b9787 | ||
|
dd3244e465 | ||
|
2511f1cd75 | ||
|
a8a68284c9 | ||
|
d3b8232876 | ||
|
d00e3bddf5 | ||
|
3f4420fd58 | ||
|
bd64aeb7ee | ||
|
f7c85a4d16 | ||
|
862e75a4e4 | ||
|
dc8934ca93 | ||
|
f5f64e7d6c | ||
|
071d17b521 | ||
|
f5a6609b45 | ||
|
6da6ee7f84 | ||
|
4f7517b2f9 | ||
|
e9d4f6e0a1 | ||
|
da0d4ac50d | ||
|
6bb32c8059 | ||
|
9660839667 | ||
|
2679579f44 | ||
|
d44f58f0e2 | ||
|
ff4e5588d8 | ||
|
1ff17a3fa1 | ||
|
e2755624ec | ||
|
189bda3781 | ||
|
3d22a11658 | ||
|
a38b0dcec2 | ||
|
b67614c90f | ||
|
978c0a33e4 | ||
|
e9f36fa4b5 | ||
|
2147ae8cfd | ||
|
3476daf322 | ||
|
24f36f27a7 | ||
|
95ee4358b2 | ||
|
ca89bb833d | ||
|
6f9eac5190 | ||
|
2070fae47c | ||
|
a656435d00 | ||
|
8cc5fbf859 | ||
|
6d15fe004e | ||
|
f715c9371b | ||
|
e73f6501f0 | ||
|
3c19c364bd | ||
|
cfd1fd83bd | ||
|
e195a74e26 | ||
|
58b8bbe491 | ||
|
b49aeb222b | ||
|
056089bbcc | ||
|
c7193b4085 | ||
|
21c9d38ada | ||
|
4e6593bc60 | ||
|
7acec6243b | ||
|
84d7c51bb6 | ||
|
bfccc1f261 | ||
|
549766666e | ||
|
66c5eb3174 | ||
|
eacba4ec7d | ||
|
80b5873a26 | ||
|
8816a2a972 | ||
|
2ca2c48bd9 | ||
|
45742d326d | ||
|
fb1614c873 | ||
|
1c16c2c055 | ||
|
2280b42f59 | ||
|
8d73740425 | ||
|
c83335324e | ||
|
398f85c30f | ||
|
8a2dc3c51d | ||
|
b8da1dec4a | ||
|
da7d340519 | ||
|
7404195c6e | ||
|
2e5c877dd1 | ||
|
b46e34be72 | ||
|
ec4444fa3b | ||
|
09c6bd77ed | ||
|
5b95ed3552 | ||
|
402ce6f0cb | ||
|
bdf68cc5f0 | ||
|
b7fd0a1b7e | ||
|
2ca5de9d44 | ||
|
dd9781ddfe | ||
|
2bfcb4ca22 | ||
|
92c4424639 | ||
|
fb13ee87c8 | ||
|
fa2545636b | ||
|
72d4c49be0 | ||
|
cd37a14fc0 | ||
|
f289543dc6 | ||
|
90e6bd278e | ||
|
c574346086 | ||
|
c6d2126dcc | ||
|
2bdf00a692 | ||
|
a339baf94e | ||
|
b5b0633e0b | ||
|
3326194422 | ||
|
c12db0ebf7 | ||
|
01c5f5ae3b | ||
|
787d3da9d2 | ||
|
6a775b97c9 | ||
|
987b25fae7 | ||
|
52b50a49ed | ||
|
9007d66559 | ||
|
81f77a55de | ||
|
bc4d5941fc | ||
|
fd875fc663 | ||
|
768a6ce989 | ||
|
2a1691a994 | ||
|
090ff11923 | ||
|
440d2f32bf | ||
|
0925b88d17 | ||
|
cac2c9728d | ||
|
1b638f32ac | ||
|
714e2bdfba | ||
|
d4b588dbe9 | ||
|
6aa35a9ecf | ||
|
68d4164897 | ||
|
c8ca0c8295 | ||
|
77766f0b2b | ||
|
c922a09ee7 | ||
|
ccaa6e96cd | ||
|
cb41a91a65 | ||
|
2943da00e2 | ||
|
473112216f | ||
|
f35efd1e9c | ||
|
78872725eb | ||
|
9e9b1f97f2 | ||
|
d08594436f | ||
|
d472cf1645 | ||
|
e1f45dd941 | ||
|
f80ce246f3 | ||
|
2eb2754cb1 | ||
|
85d76be6b1 | ||
|
1dddd818c4 | ||
|
eded761cc1 | ||
|
372ecd0cf8 | ||
|
9096c70e96 | ||
|
381e878574 | ||
|
39d11b486f | ||
|
52f27f76dd | ||
|
3253bef854 | ||
|
8564ab6e86 | ||
|
7fa913e51c | ||
|
d37cc2889e | ||
|
e200bd5c20 | ||
|
a65ceb2c41 | ||
|
ee913fb788 | ||
|
8ee802d4e5 | ||
|
990873eb42 | ||
|
fa21208005 | ||
|
d41089d315 | ||
|
bc93198aa7 | ||
|
847cf25228 | ||
|
bfdccf681a | ||
|
a94b0a8b25 | ||
|
1c1db881c3 | ||
|
ae78840614 | ||
|
542ef54093 | ||
|
2db0443e04 | ||
|
008ffae3bb | ||
|
ae49c7d23c | ||
|
a6e247825c | ||
|
1209c63b58 | ||
|
1a82180376 | ||
|
74d0fbc868 | ||
|
20e87edde8 | ||
|
d75f626cdd | ||
|
882fcf0a01 | ||
|
faff555c55 | ||
|
1cefc96311 | ||
|
69550cbb23 | ||
|
9341dcbf79 | ||
|
085c6cf79b | ||
|
842a45b1db | ||
|
dc65ff800f | ||
|
b0c1c85177 | ||
|
731fa9f8e0 | ||
|
6ddbb2c572 | ||
|
e955d2be0e | ||
|
a7c5d9c478 | ||
|
781bd0851e | ||
|
c4905f2347 | ||
|
363a0dda16 | ||
|
e241fe86d3 | ||
|
28e217dc8f | ||
|
f2a995b8d9 | ||
|
bfda078caa | ||
|
bc1b839f7f | ||
|
8a77cfcac3 | ||
|
fd3925d204 | ||
|
b7f9438b8a | ||
|
f6828631cf | ||
|
d118cb7bbb | ||
|
34d96f8d84 | ||
|
7b26256df6 | ||
|
a32ff08d68 | ||
|
982439a8d8 | ||
|
e87c3eee13 | ||
|
cb48577ede | ||
|
94574df274 | ||
|
b1e29c329b | ||
|
678290035c | ||
|
01ef8162a8 | ||
|
23cef89236 | ||
|
11bdcc96c5 | ||
|
79fff53531 | ||
|
3d8b59ef71 | ||
|
e9bbecface | ||
|
0b117133b9 | ||
|
f4321c4b45 | ||
|
ba67e5c847 | ||
|
8d6e16bf22 | ||
|
e6e60c4b60 | ||
|
b640a69d63 | ||
|
3c51c914ac | ||
|
7fea71a4ce | ||
|
cddd2fcd7c | ||
|
c8c6b66465 | ||
|
6d6cb7e1f8 | ||
|
17b1fa31dd | ||
|
f4c356637f | ||
|
6d295f8446 | ||
|
7f5672b433 | ||
|
ea2540bc89 | ||
|
68e3178812 | ||
|
d7e327d712 | ||
|
b6bd878f27 | ||
|
b90a23473f | ||
|
f457a9042a | ||
|
3fa5635d6c | ||
|
f511cac6a6 | ||
|
120a47a526 | ||
|
1e7d2a08a3 | ||
|
f983933d88 | ||
|
af7be2d622 | ||
|
fe44b89f57 | ||
|
90a22b2f39 | ||
|
829b442302 | ||
|
93852a24cb | ||
|
dcf62d06df | ||
|
bb9b607440 | ||
|
c5fc7baa86 | ||
|
c1116ea506 | ||
|
4464655276 | ||
|
55085d9697 | ||
|
6c690b699b | ||
|
107b4811b4 | ||
|
cd0d13e3fb | ||
|
86d083266b | ||
|
289a6ccf46 | ||
|
652f43ed38 | ||
|
712739f777 | ||
|
2ebab604eb | ||
|
b884b36f26 | ||
|
951b5f325b | ||
|
9167c8ace8 | ||
|
a2eeec2b7a | ||
|
2024dc34ac | ||
|
86c9638572 | ||
|
7d920c98a6 | ||
|
bc3fe00be4 | ||
|
87847316d4 | ||
|
562cc2e466 | ||
|
3379e05fec | ||
|
24f91a0b60 | ||
|
89ba1d813a | ||
|
4203c26d7c | ||
|
a9c55bd6d1 | ||
|
e0a1831452 | ||
|
a0e4a36821 | ||
|
c566648127 | ||
|
78f2fe1306 | ||
|
116b84906e | ||
|
2f0f95b523 | ||
|
6cbc339442 | ||
|
c015075996 | ||
|
17f412e407 | ||
|
da0bb7656a | ||
|
9babca599b | ||
|
5acf96b75d | ||
|
f9e649456b | ||
|
56bf3f8add | ||
|
a66f7c50ea | ||
|
671f00e60e | ||
|
3bba24ab31 | ||
|
27cc412d79 | ||
|
4c6b579480 | ||
|
a0763477c5 | ||
|
3a79827af2 | ||
|
f6778c79f8 | ||
|
9b68e8be8d | ||
|
bcb8064831 | ||
|
2fa0a35c7f | ||
|
cdebfd6436 | ||
|
57f82ed71e | ||
|
168cff9d4b | ||
|
fe143ca9e8 | ||
|
0a7a90b7a8 | ||
|
a631197138 | ||
|
d579db4a2d | ||
|
0b2e8991db | ||
|
62c80df1a5 | ||
|
60a59ce7b1 | ||
|
42f1651ba5 | ||
|
87d80d6d22 | ||
|
293d674e14 | ||
|
338e99773a | ||
|
bfb8dc13bf | ||
|
034612bf8b | ||
|
54efb1a2e1 | ||
|
97ec9995aa | ||
|
51dbc9fb9b | ||
|
b1ccb058d3 | ||
|
c0a18a5cb3 | ||
|
b14be4974f | ||
|
36128e971f | ||
|
f74ad56599 | ||
|
79b548dae6 | ||
|
a9cf8b3313 | ||
|
10f47e325b | ||
|
d5a332c3f2 | ||
|
f957a1e435 | ||
|
613a342115 | ||
|
dd4642813b | ||
|
beebf4dff9 | ||
|
0fad1da1df | ||
|
e4626c1360 | ||
|
35547a40cb | ||
|
7c241ec1fe | ||
|
d247274b06 | ||
|
462f6d03d2 | ||
|
e61fc9e7a6 | ||
|
e6e2dbe459 | ||
|
6db18804f3 | ||
|
1ff2fce25b | ||
|
51a2e4e48c | ||
|
1b0144ba75 | ||
|
a653c3eeeb | ||
|
3ed828ef45 | ||
|
ffeccfe552 | ||
|
2a784ae0d0 | ||
|
3fd8f911c2 | ||
|
d1c0208824 | ||
|
ba81a0d30a | ||
|
8da7325683 | ||
|
7ba51ba9f2 | ||
|
85fcd66be6 | ||
|
33045a792b | ||
|
5ff8aa3581 | ||
|
221c99b1ec | ||
|
f3353c0eea | ||
|
0692c3763f | ||
|
c1bf1ad167 | ||
|
1e48d89e00 | ||
|
c086bddcbe | ||
|
7dd5d299e1 | ||
|
58d2b88406 | ||
|
6cd3e72e09 | ||
|
3a792555f1 | ||
|
51852c045a | ||
|
01c9d04feb | ||
|
d49c3e167f | ||
|
b9ae5dc8d7 | ||
|
aa0a725a3a | ||
|
8d50b372e4 | ||
|
ae2a1e55ab | ||
|
e9b5631eed |
14
.devcontainer/Dockerfile
Normal file
14
.devcontainer/Dockerfile
Normal file
@@ -0,0 +1,14 @@
|
||||
FROM mcr.microsoft.com/vscode/devcontainers/go:1-1.23
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
pre-commit \
|
||||
vim \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& mkdir -p /go/pkg \
|
||||
&& chmod -R a+w /go/pkg
|
||||
|
||||
WORKDIR /workspace
|
45
.devcontainer/devcontainer.json
Normal file
45
.devcontainer/devcontainer.json
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"name": "oauth2-proxy Dev",
|
||||
"context": "..",
|
||||
"dockerFile": "./Dockerfile",
|
||||
"postCreateCommand": "pre-commit install && go mod download",
|
||||
"containerEnv": { "DEVCONTAINER": "1" },
|
||||
"appPort": ["4180:4180"],
|
||||
"runArgs": ["-e", "GIT_EDITOR=code --wait"],
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"golang.go",
|
||||
"ms-vscode.makefile-tools",
|
||||
"visualstudioexptteam.vscodeintellicode",
|
||||
"redhat.vscode-yaml",
|
||||
"esbenp.prettier-vscode",
|
||||
"GitHub.vscode-pull-request-github"
|
||||
],
|
||||
"settings": {
|
||||
"editor.formatOnPaste": false,
|
||||
"editor.formatOnSave": true,
|
||||
"editor.formatOnType": true,
|
||||
"files.trimTrailingWhitespace": true,
|
||||
"yaml.customTags": [
|
||||
"!input scalar",
|
||||
"!secret scalar",
|
||||
"!include_dir_named scalar",
|
||||
"!include_dir_list scalar",
|
||||
"!include_dir_merge_list scalar",
|
||||
"!include_dir_merge_named scalar"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/docker-in-docker": {},
|
||||
"ghcr.io/devcontainers/features/common-utils": {
|
||||
"configureZshAsDefaultShell": true,
|
||||
"username": "vscode",
|
||||
"userUid": 1000,
|
||||
"userGid": 1000
|
||||
},
|
||||
"ghcr.io/devcontainers/features/kubectl-helm-minikube": {}
|
||||
}
|
||||
}
|
6
.dockerignore
Normal file
6
.dockerignore
Normal file
@@ -0,0 +1,6 @@
|
||||
Dockerfile.dev
|
||||
Dockerfile
|
||||
docs
|
||||
vendor
|
||||
.git
|
||||
oauth2-proxy
|
23
.github/CODEOWNERS
vendored
Normal file
23
.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
# Default owner should be a core org reviewers unless overridden by later rules in this file
|
||||
* @oauth2-proxy/reviewers
|
||||
|
||||
# login.gov provider
|
||||
# Note: If @timothy-spencer terms out of his appointment, your best bet
|
||||
# for finding somebody who can test the oauth2-proxy would be to ask somebody
|
||||
# in the login.gov team (https://login.gov/developers/), the cloud.gov team
|
||||
# (https://cloud.gov/docs/help/), or the 18F org (https://18f.gsa.gov/contact/
|
||||
# or the public devops channel at https://chat.18f.gov/).
|
||||
providers/logingov.go @timothy-spencer
|
||||
providers/logingov_test.go @timothy-spencer
|
||||
|
||||
# Bitbucket provider
|
||||
providers/bitbucket.go @aledeganopix4d
|
||||
providers/bitbucket_test.go @aledeganopix4d
|
||||
|
||||
# Nextcloud provider
|
||||
providers/nextcloud.go @Ramblurr
|
||||
providers/nextcloud_test.go @Ramblurr
|
||||
|
||||
# DigitalOcean provider
|
||||
providers/digitalocean.go @kamaln7
|
||||
providers/digitalocean_test.go @kamaln7
|
15
.github/FUNDING.yml
vendored
Normal file
15
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: tuunit # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: oauth2-proxy # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||
polar: # Replace with a single Polar username
|
||||
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
|
||||
thanks_dev: # Replace with a single thanks.dev username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
73
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
Normal file
73
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
name: Bug report
|
||||
description: Bug descriptions or unexpected behaviour
|
||||
title: "[Bug]: <Short description>"
|
||||
labels: ["bug","help wanted"]
|
||||
body:
|
||||
- type: input
|
||||
attributes:
|
||||
label: OAuth2-Proxy Version
|
||||
description: Which version of oauth2-proxy are you using?
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Provider
|
||||
description: Which identity provider are you using?
|
||||
options:
|
||||
- adfs
|
||||
- azure
|
||||
- bitbucket
|
||||
- digitalocean
|
||||
- entra-id
|
||||
- facebook
|
||||
- gitea
|
||||
- github
|
||||
- gitlab
|
||||
- google
|
||||
- keycloak
|
||||
- keycloak-oidc
|
||||
- linkedin
|
||||
- logingov
|
||||
- nextcloud
|
||||
- oidc
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Expected Behaviour
|
||||
description: Tell us what you expect to happen.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Current Behaviour
|
||||
description: Tell us what happens instead of the expected behavior.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Steps To Reproduce
|
||||
description: Steps to reproduce the behavior.
|
||||
placeholder: |
|
||||
1. In this environment...
|
||||
1. With this config...
|
||||
1. Run '...'
|
||||
1. See error...
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Possible Solutions
|
||||
description: Not obligatory, but suggest a fix/reason for the bug.
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Configuration details or additional information
|
||||
description: |
|
||||
Please share more details about your environment and how you configured oauth2-proxy.
|
||||
|
||||
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
|
||||
validations:
|
||||
required: false
|
||||
|
6
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
6
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: OAuth2-Proxy Slack
|
||||
url: https://gophers.slack.com/messages/CM2RSS25N
|
||||
about: Feel free to ask any questions here.
|
||||
|
61
.github/ISSUE_TEMPLATE/configuration-support.yml
vendored
Normal file
61
.github/ISSUE_TEMPLATE/configuration-support.yml
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
name: Configuration support
|
||||
description: Configuration problems and overall requests on how to properly use oauth2-proxy.
|
||||
title: "[Support]: <Short description>"
|
||||
labels: ["configuration", "help wanted"]
|
||||
body:
|
||||
- type: input
|
||||
attributes:
|
||||
label: OAuth2-Proxy Version
|
||||
description: Which version of oauth2-proxy are you using?
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Provider
|
||||
description: Which identity provider are you using?
|
||||
options:
|
||||
- adfs
|
||||
- azure
|
||||
- bitbucket
|
||||
- digitalocean
|
||||
- entra-id
|
||||
- facebook
|
||||
- gitea
|
||||
- github
|
||||
- gitlab
|
||||
- google
|
||||
- keycloak
|
||||
- keycloak-oidc
|
||||
- linkedin
|
||||
- logingov
|
||||
- nextcloud
|
||||
- oidc
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Current Behaviour of your Problem
|
||||
description: Tell us what you expect to happen and what happens instead.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Configuration details or additional information
|
||||
description: |
|
||||
Please share more details about your environment and how you configured oauth2-proxy.
|
||||
|
||||
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Steps To Reproduce
|
||||
description: Steps to reproduce the behavior.
|
||||
placeholder: |
|
||||
1. In this environment...
|
||||
1. With this config...
|
||||
1. Run '...'
|
||||
1. See error...
|
||||
validations:
|
||||
required: false
|
||||
|
51
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
Normal file
51
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
name: Feature request
|
||||
description: Feature requests or proposals related to the overall project or specific providers
|
||||
title: "[Feature]: <Short description>"
|
||||
labels: ["enhancement"]
|
||||
body:
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Motivation
|
||||
description: Tell us the motivation behind your feature request or proposal.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Possible solution
|
||||
description: |
|
||||
If you already have a possible solution in mind. Write some more details about it or add some pseudo code.
|
||||
|
||||
Tip 1: You can attach images or log files by clicking this area to highlight it and then dragging files in.
|
||||
Tip 2: You can add code snippets in triple backtiks like so:
|
||||
\`\`\`golang
|
||||
func hello() {
|
||||
fmt.Println("world")
|
||||
}
|
||||
\`\`\`
|
||||
validations:
|
||||
required: false
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Provider
|
||||
description: Is it a feature request for a specific provider. Not mandatory.
|
||||
options:
|
||||
- new provider
|
||||
- adfs
|
||||
- azure
|
||||
- bitbucket
|
||||
- digitalocean
|
||||
- entra-id
|
||||
- facebook
|
||||
- gitea
|
||||
- github
|
||||
- gitlab
|
||||
- google
|
||||
- keycloak
|
||||
- keycloak-oidc
|
||||
- linkedin
|
||||
- logingov
|
||||
- nextcloud
|
||||
- oidc
|
||||
validations:
|
||||
required: false
|
||||
|
26
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
26
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
<!--- Provide a general summary of your changes in the Title above -->
|
||||
|
||||
## Description
|
||||
|
||||
<!--- Describe your changes in detail -->
|
||||
|
||||
## Motivation and Context
|
||||
|
||||
<!--- Why is this change required? What problem does it solve? -->
|
||||
<!--- If it fixes an open issue, please link to the issue here. -->
|
||||
|
||||
## How Has This Been Tested?
|
||||
|
||||
<!--- Please describe in detail how you tested your changes. -->
|
||||
<!--- Include details of your testing environment, and the tests you ran to -->
|
||||
<!--- see how your change affects other areas of the code, etc. -->
|
||||
|
||||
## Checklist:
|
||||
|
||||
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
|
||||
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
|
||||
|
||||
- [ ] My change requires a change to the documentation or CHANGELOG.
|
||||
- [ ] I have updated the documentation/CHANGELOG accordingly.
|
||||
- [ ] I have created a feature (non-master) branch for my PR.
|
||||
- [ ] I have written tests for my code changes.
|
35
.github/labeler.yml
vendored
Normal file
35
.github/labeler.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
go:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- '**/*.go'
|
||||
|
||||
docs:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- '**/*.md'
|
||||
|
||||
changelog:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'CHAGELOG.md'
|
||||
|
||||
tests:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- '**/*_test.go'
|
||||
|
||||
provider:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'providers/**/*'
|
||||
|
||||
dependencies:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'go.mod'
|
||||
- 'go.sum'
|
||||
|
||||
docker:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- '**/Dockerfile'
|
58
.github/renovate.json5
vendored
Normal file
58
.github/renovate.json5
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
{
|
||||
$schema: "https://docs.renovatebot.com/renovate-schema.json",
|
||||
semanticCommits: "enabled",
|
||||
schedule: [
|
||||
"after 8am on sunday"
|
||||
],
|
||||
prConcurrentLimit: 0,
|
||||
prHourlyLimit: 0,
|
||||
enabledManagers: [
|
||||
"dockerfile",
|
||||
"docker-compose",
|
||||
"gomod",
|
||||
"github-actions",
|
||||
"helmv3",
|
||||
"npm",
|
||||
"regex",
|
||||
],
|
||||
packageRules: [
|
||||
{
|
||||
matchManagers: [
|
||||
"dockerfile",
|
||||
"docker-compose",
|
||||
"gomod",
|
||||
"helmv3",
|
||||
"npm",
|
||||
],
|
||||
groupName: "{{{manager}}}",
|
||||
},
|
||||
{
|
||||
matchDepNames: [
|
||||
"docker.io/library/golang",
|
||||
"mcr.microsoft.com/vscode/devcontainers/go",
|
||||
],
|
||||
groupName: "golang",
|
||||
},
|
||||
],
|
||||
customManagers: [
|
||||
{
|
||||
customType: "regex",
|
||||
fileMatch: [
|
||||
"^Makefile",
|
||||
],
|
||||
matchStrings: [
|
||||
"DOCKER_BUILD_RUNTIME_IMAGE_ALPINE\\s+?\\?= alpine:(?<currentValue>.*)\\s"
|
||||
],
|
||||
depNameTemplate: "alpine",
|
||||
datasourceTemplate: "docker",
|
||||
},
|
||||
{
|
||||
customType: "regex",
|
||||
fileMatch: ["(^|/)\\.github/workflows/[^/]+\\.ya?ml$"],
|
||||
matchStrings: [
|
||||
"# renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s+?[\\w\\s-]*?version: (?<currentValue>.*)\\s",
|
||||
"# renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s+?[\\w\\s]*?_VERSION: (?<currentValue>.*)\\s",
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
81
.github/workflows/ci.yml
vendored
Normal file
81
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
name: Continuous Integration
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
COVER: true
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
id: go
|
||||
|
||||
- name: Get dependencies
|
||||
env:
|
||||
# renovate: datasource=github-tags depName=golangci/golangci-lint
|
||||
GOLANGCI_LINT_VERSION: v2.2.2
|
||||
run: |
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_LINT_VERSION}
|
||||
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
||||
chmod +x ./cc-test-reporter
|
||||
|
||||
- name: Verify Code Generation
|
||||
run: |
|
||||
make verify-generate
|
||||
|
||||
- name: Lint
|
||||
run: |
|
||||
make lint
|
||||
|
||||
- name: Build
|
||||
if: (!startsWith(github.head_ref, 'release'))
|
||||
run: |
|
||||
make build
|
||||
|
||||
# For release testing
|
||||
- name: Build All
|
||||
if: github.base_ref == 'master' && startsWith(github.head_ref, 'release')
|
||||
run: |
|
||||
make release
|
||||
|
||||
- name: Test
|
||||
env:
|
||||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
||||
run: |
|
||||
./.github/workflows/test.sh
|
||||
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Docker Build
|
||||
if: (!startsWith(github.head_ref, 'release'))
|
||||
run: |
|
||||
make build-docker
|
||||
|
||||
# For release testing
|
||||
- name: Docker Build All
|
||||
if: github.base_ref == 'master' && startsWith(github.head_ref, 'release')
|
||||
run: |
|
||||
make build-docker-all
|
60
.github/workflows/codeql.yml
vendored
Normal file
60
.github/workflows/codeql.yml
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
name: "Code scanning - action"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '.devcontainer/**'
|
||||
- '.vscode/**'
|
||||
- 'contrib/**'
|
||||
- 'docs/**'
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '.devcontainer/**'
|
||||
- '.vscode/**'
|
||||
- 'contrib/**'
|
||||
- 'docs/**'
|
||||
schedule:
|
||||
- cron: '0 15 * * 2'
|
||||
|
||||
jobs:
|
||||
CodeQL-Build:
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
# CodeQL runs on ubuntu-latest and windows-latest
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: go
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v3
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
119
.github/workflows/create-release.yml
vendored
Normal file
119
.github/workflows/create-release.yml
vendored
Normal file
@@ -0,0 +1,119 @@
|
||||
name: Create Release
|
||||
run-name: Create release ${{ inputs.version }}
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Version for new release'
|
||||
required: true
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: master
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
|
||||
- name: Validate version
|
||||
id: validate
|
||||
run: |
|
||||
function ver { printf "%03d%03d%03d%03d" $(echo "$1" | tr '.' ' '); }
|
||||
|
||||
NEW_VERSION=${{ inputs.version }}
|
||||
NEW_VERSION=${NEW_VERSION#v} # Remove v prefix
|
||||
|
||||
LATEST_VERSION=$(git describe --abbrev=0 --tags)
|
||||
LATEST_VERSION=${LATEST_VERSION#v} # Remove v prefix
|
||||
|
||||
# check that new version can be parsed
|
||||
if [ ! $(ver $NEW_VERSION ) -gt $(ver 0) ]; then
|
||||
echo "::error::Entered version '${{ inputs.version }}' cannot be parsed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check version continuity
|
||||
if [ ! $(ver $LATEST_VERSION) -lt $(ver $NEW_VERSION) ]; then
|
||||
echo "::error::Entered version '${{ inputs.version }}' is smaller then latest version $LATEST_VERSION"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "version=${NEW_VERSION}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Prepare Github Actions Bot
|
||||
run: |
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: docs/package.json
|
||||
|
||||
- name: Update documentation
|
||||
run: |
|
||||
cd docs
|
||||
|
||||
FULL_VERSION=${{ steps.validate.outputs.version }}
|
||||
VERSION=${FULL_VERSION%.*}.x
|
||||
|
||||
if [ ! -d "versioned_docs/version-${VERSION}" ]; then
|
||||
npm install
|
||||
npm run docusaurus docs:version ${VERSION}
|
||||
|
||||
git add .
|
||||
git commit -m "add new docs version ${VERSION}"
|
||||
fi
|
||||
|
||||
sed -i "s/(current release is .*)/(current release is \`v${FULL_VERSION}\`)/g" docs/installation.md
|
||||
sed -i "s/(current release is .*)/(current release is \`v${FULL_VERSION}\`)/g" versioned_docs/version-${VERSION}/installation.md
|
||||
|
||||
- name: Update Changelog
|
||||
run: |
|
||||
VERSION=${{ steps.validate.outputs.version }}
|
||||
|
||||
sed -i "s/#.*(Pre-release)/# V${VERSION}/g" CHANGELOG.md
|
||||
|
||||
cat << EOF > /tmp/CHANGELOG.prepend
|
||||
# Vx.x.x (Pre-release)
|
||||
|
||||
## Release Highlights
|
||||
|
||||
## Important Notes
|
||||
|
||||
## Breaking Changes
|
||||
|
||||
## Changes since v${VERSION}
|
||||
EOF
|
||||
|
||||
echo -e "$(cat /tmp/CHANGELOG.prepend)\n\n$(cat CHANGELOG.md)" > CHANGELOG.md
|
||||
|
||||
- name: Update development files
|
||||
run: |
|
||||
VERSION=${{ steps.validate.outputs.version }}
|
||||
cd contrib
|
||||
grep -rl "quay.io/oauth2-proxy/oauth2-proxy:" | \
|
||||
xargs sed -i "s#quay.io/oauth2-proxy/oauth2-proxy:v[0-9]\+\.[0-9]\+\.[0-9]\+#quay.io/oauth2-proxy/oauth2-proxy:v${VERSION}#g"
|
||||
|
||||
- name: Commit and push
|
||||
run: |
|
||||
VERSION=${{ steps.validate.outputs.version }}
|
||||
|
||||
git checkout -b release/v${VERSION}
|
||||
git commit -am "update to release version v${VERSION}"
|
||||
git push -u origin release/v${VERSION}
|
||||
|
||||
- name: Create PR
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
VERSION=v${{ steps.validate.outputs.version }}
|
||||
gh pr create -B master -H release/${VERSION} --title "release ${VERSION}" --body "Release branch and changes created by GitHub Actions. This PR should include changes to the docs, CHANGELOG and local environment files."
|
68
.github/workflows/docs.yml
vendored
Normal file
68
.github/workflows/docs.yml
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
name: documentation
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
paths: ['docs/**']
|
||||
push:
|
||||
branches: [master]
|
||||
paths: ['docs/**']
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
pull-request-check:
|
||||
if: github.event_name == 'pull_request'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Pages
|
||||
id: pages
|
||||
uses: actions/configure-pages@v5
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
# renovate: datasource=node-version depName=node
|
||||
node-version: 22
|
||||
|
||||
- name: Test Build
|
||||
working-directory: ./docs
|
||||
run: |
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
build-docs:
|
||||
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
# renovate: datasource=node-version depName=node
|
||||
node-version: 22
|
||||
|
||||
- name: Build docusaurus
|
||||
working-directory: ./docs
|
||||
run: |
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: ./docs/build
|
||||
|
||||
deploy-docs:
|
||||
needs: build-docs
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pages: write # to deploy to Pages
|
||||
id-token: write # to verify the deployment originates from an appropriate source
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
15
.github/workflows/labeler.yml
vendored
Normal file
15
.github/workflows/labeler.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
name: "Pull Request Labeler"
|
||||
on:
|
||||
pull_request_target:
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/labeler@v5
|
||||
with:
|
||||
sync-labels: true
|
||||
dot: true
|
41
.github/workflows/nightly.yml
vendored
Normal file
41
.github/workflows/nightly.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
name: Nightly builds
|
||||
|
||||
on:
|
||||
schedule: # Run every day at 03:00 UTC
|
||||
- cron: '0 3 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
# only run this build in the main repository, not in forks
|
||||
if: github.repository == 'oauth2-proxy/oauth2-proxy'
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: master
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to quay.io
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: quay.io/oauth2-proxy
|
||||
username: ${{ secrets.REGISTRY_USERNAME_NIGHTLY }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD_NIGHTLY }}
|
||||
|
||||
- name: Build images
|
||||
run: |
|
||||
make nightly-build
|
||||
|
||||
- name: Push images
|
||||
run: |
|
||||
make nightly-push
|
129
.github/workflows/publish-release.yml
vendored
Normal file
129
.github/workflows/publish-release.yml
vendored
Normal file
@@ -0,0 +1,129 @@
|
||||
name: Publish Release
|
||||
run-name: ${{ github.event.pull_request.head.ref }}
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
branches:
|
||||
- master
|
||||
types:
|
||||
- closed
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
if: github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release/')
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
tag: ${{ steps.tag.outputs.version }}
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.merge_commit_sha }}
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
|
||||
- name: Tag release
|
||||
run: |
|
||||
# Set up github-actions[bot] user
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
# Get the version from the branch name
|
||||
branch="${{ github.event.pull_request.head.ref }}"
|
||||
version="${branch#release/}"
|
||||
echo ${version}
|
||||
|
||||
# Tag and create release
|
||||
git tag -a "${version}" -m "Release ${version}"
|
||||
echo "version=${version}" >> $GITHUB_OUTPUT
|
||||
id: tag
|
||||
|
||||
- name: Set up go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Get dependencies
|
||||
env:
|
||||
# renovate: datasource=github-tags depName=golangci/golangci-lint
|
||||
GOLANGCI_LINT_VERSION: v2.2.2
|
||||
run: |
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_LINT_VERSION}
|
||||
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
||||
chmod +x ./cc-test-reporter
|
||||
|
||||
# Install go dependencies
|
||||
go mod download
|
||||
|
||||
- name: Build Artifacts
|
||||
run: make release
|
||||
|
||||
# Upload artifacts in case of workflow failure
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: oauth2-proxy-artifacts
|
||||
path: |
|
||||
release/*.tar.gz
|
||||
release/*.txt
|
||||
|
||||
- name: Create release
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
# Get version from tag
|
||||
version=$(git describe --tags --abbrev=0)
|
||||
|
||||
# Extract CHANGELOG
|
||||
numericVersion="${version#v}"
|
||||
notes=$(sed -E "/^# (v|V)$numericVersion$/,/^# (v|V)/!d;//d" CHANGELOG.md)
|
||||
|
||||
# Publish release tag
|
||||
git push origin "${version}"
|
||||
|
||||
# Create github release
|
||||
gh release create "${version}" \
|
||||
--title "${version}" \
|
||||
--notes "${notes}" \
|
||||
--prerelease
|
||||
|
||||
# Upload artifacts
|
||||
gh release upload "${version}" release/*.tar.gz
|
||||
gh release upload "${version}" release/*.txt
|
||||
|
||||
docker:
|
||||
needs: publish
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ needs.publish.outputs.tag }}
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to quay.io
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: quay.io/oauth2-proxy
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Build images
|
||||
run: |
|
||||
make build-docker-all
|
||||
|
||||
- name: Push images
|
||||
run: |
|
||||
make push-docker-all
|
21
.github/workflows/stale.yml
vendored
Normal file
21
.github/workflows/stale.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: Mark stale issues and pull requests
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-stale: 180
|
||||
days-before-close: 14
|
||||
stale-issue-message: 'This issue has been inactive for 180 days. If the issue is still relevant please comment to re-activate the issue. If no action is taken within 14 days, the issue will be marked closed.'
|
||||
stale-pr-message: 'This pull request has been inactive for 180 days. If the pull request is still relevant please comment to re-activate the pull request. If no action is taken within 14 days, the pull request will be marked closed.'
|
||||
exempt-issue-labels: bug,high-priority
|
||||
exempt-pr-labels: bug,high-priority
|
26
.github/workflows/test.sh
vendored
Executable file
26
.github/workflows/test.sh
vendored
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
# manually exiting from script, because after-build needs to run always
|
||||
set +e
|
||||
|
||||
if [ -z $CC_TEST_REPORTER_ID ]; then
|
||||
echo "1. CC_TEST_REPORTER_ID is unset, skipping"
|
||||
else
|
||||
echo "1. Running before-build"
|
||||
./cc-test-reporter before-build
|
||||
fi
|
||||
|
||||
echo "2. Running test"
|
||||
make test
|
||||
TEST_STATUS=$?
|
||||
|
||||
if [ -z $CC_TEST_REPORTER_ID ]; then
|
||||
echo "3. CC_TEST_REPORTER_ID is unset, skipping"
|
||||
else
|
||||
echo "3. Running after-build"
|
||||
./cc-test-reporter after-build --exit-code $TEST_STATUS --prefix $(go list -m)
|
||||
fi
|
||||
|
||||
if [ "$TEST_STATUS" -ne 0 ]; then
|
||||
echo "Test failed, status code: $TEST_STATUS"
|
||||
exit $TEST_STATUS
|
||||
fi
|
27
.gitignore
vendored
27
.gitignore
vendored
@@ -1,5 +1,13 @@
|
||||
google_auth_proxy
|
||||
oauth2_proxy
|
||||
oauth2-proxy
|
||||
vendor
|
||||
dist
|
||||
release
|
||||
.godeps
|
||||
*.exe
|
||||
.env
|
||||
.bundle
|
||||
c.out
|
||||
|
||||
# Go.gitignore
|
||||
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
||||
*.o
|
||||
@@ -9,6 +17,10 @@ oauth2_proxy
|
||||
# Folders
|
||||
_obj
|
||||
_test
|
||||
.DS_Store
|
||||
.idea/
|
||||
.vscode/*
|
||||
!/.vscode/tasks.json
|
||||
|
||||
# Architecture specific extensions/prefixes
|
||||
*.[568vq]
|
||||
@@ -22,9 +34,12 @@ _cgo_export.*
|
||||
|
||||
_testmain.go
|
||||
|
||||
*.exe
|
||||
dist
|
||||
.godeps
|
||||
|
||||
# Editor swap/temp files
|
||||
.*.swp
|
||||
|
||||
# Dockerfile.dev is ignored by both git and docker
|
||||
# for faster development cycle of docker build
|
||||
# cp Dockerfile Dockerfile.dev
|
||||
# vi Dockerfile.dev
|
||||
# docker build -f Dockerfile.dev .
|
||||
Dockerfile.dev
|
||||
|
69
.golangci.yml
Normal file
69
.golangci.yml
Normal file
@@ -0,0 +1,69 @@
|
||||
version: "2"
|
||||
linters:
|
||||
default: none
|
||||
enable:
|
||||
- bodyclose
|
||||
- copyloopvar
|
||||
- dogsled
|
||||
- goconst
|
||||
- gocritic
|
||||
- goprintffuncname
|
||||
- gosec
|
||||
- govet
|
||||
- ineffassign
|
||||
- misspell
|
||||
- prealloc
|
||||
- revive
|
||||
- staticcheck
|
||||
- unconvert
|
||||
- unused
|
||||
exclusions:
|
||||
generated: lax
|
||||
presets:
|
||||
- comments
|
||||
- common-false-positives
|
||||
- legacy
|
||||
- std-error-handling
|
||||
rules:
|
||||
- linters:
|
||||
- bodyclose
|
||||
- goconst
|
||||
- gocritic
|
||||
- gosec
|
||||
- revive
|
||||
- scopelint
|
||||
- unconvert
|
||||
path: _test\.go
|
||||
- linters:
|
||||
- revive
|
||||
path: _test\.go
|
||||
text: 'dot-imports:'
|
||||
# # If we have tests in shared test folders, these can be less strictly linted
|
||||
- linters:
|
||||
- bodyclose
|
||||
- revive
|
||||
- staticcheck
|
||||
path: tests/.*_tests\.go
|
||||
# See https://github.com/oauth2-proxy/oauth2-proxy/issues/3060
|
||||
# https://staticcheck.dev/docs/checks/#QF1008
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: QF1008
|
||||
- linters:
|
||||
- revive
|
||||
path: util/.*\.go$
|
||||
text: "var-naming: avoid meaningless package names"
|
||||
paths:
|
||||
- third_party$
|
||||
- builtin$
|
||||
- examples$
|
||||
formatters:
|
||||
enable:
|
||||
- gofmt
|
||||
- goimports
|
||||
exclusions:
|
||||
generated: lax
|
||||
paths:
|
||||
- third_party$
|
||||
- builtin$
|
||||
- examples$
|
13
.pre-commit-config.yaml
Normal file
13
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.3.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: end-of-file-fixer
|
||||
- id: check-yaml
|
||||
- id: check-added-large-files
|
||||
- repo: https://github.com/dnephin/pre-commit-golang
|
||||
rev: v0.5.0
|
||||
hooks:
|
||||
- id: golangci-lint
|
||||
- id: go-build
|
13
.travis.yml
13
.travis.yml
@@ -1,13 +0,0 @@
|
||||
language: go
|
||||
go:
|
||||
- 1.3.3
|
||||
- 1.4.2
|
||||
script:
|
||||
- curl -s https://raw.githubusercontent.com/pote/gpm/v1.3.2/bin/gpm > gpm
|
||||
- chmod +x gpm
|
||||
- ./gpm install
|
||||
- ./test.sh
|
||||
sudo: false
|
||||
notifications:
|
||||
email: false
|
||||
|
36
.vscode/launch.json
vendored
Normal file
36
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "OAuth2 Proxy for Dex",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${workspaceFolder}",
|
||||
"args": [
|
||||
"--config", "contrib/local-environment/oauth2-proxy.cfg"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "OAuth2 Proxy for Keycloak",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${workspaceFolder}",
|
||||
"args": [
|
||||
"--config", "contrib/local-environment/oauth2-proxy-keycloak.cfg"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "OAuth2 Proxy with Alpha Config",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${workspaceFolder}",
|
||||
"args": [
|
||||
"--config", "contrib/local-environment/oauth2-proxy-alpha-config.cfg",
|
||||
"--alpha-config", "contrib/local-environment/oauth2-proxy-alpha-config.yaml"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
76
.vscode/tasks.json
vendored
Normal file
76
.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Run oauth2-proxy",
|
||||
"type": "shell",
|
||||
"command": "./oauth2-proxy --config contrib/local-environment/oauth2-proxy.cfg --alpha-config contrib/local-environment/oauth2-proxy-alpha0config.cfg",
|
||||
"dependsOn": ["Build"],
|
||||
"group": {
|
||||
"kind": "test",
|
||||
"isDefault": true
|
||||
},
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "new"
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Test",
|
||||
"type": "shell",
|
||||
"command": "make test",
|
||||
"group": {
|
||||
"kind": "test",
|
||||
"isDefault": true
|
||||
},
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "new"
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Ruff",
|
||||
"type": "shell",
|
||||
"command": "pre-commit run ruff --all-files",
|
||||
"group": {
|
||||
"kind": "test",
|
||||
"isDefault": true
|
||||
},
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "new"
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "golint",
|
||||
"type": "shell",
|
||||
"command": "make lint",
|
||||
"group": {
|
||||
"kind": "test",
|
||||
"isDefault": true
|
||||
},
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "new"
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Build",
|
||||
"type": "shell",
|
||||
"command": "make build",
|
||||
"group": {
|
||||
"kind": "test",
|
||||
"isDefault": true
|
||||
},
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "new"
|
||||
},
|
||||
"problemMatcher": []
|
||||
}
|
||||
]
|
||||
}
|
28
ADOPTERS.md
Normal file
28
ADOPTERS.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Adopters
|
||||
|
||||
This list showcases organizations that leverage OAuth2-Proxy within their
|
||||
infrastructure. If your organization uses OAuth2-Proxy and isn't yet listed, we
|
||||
encourage you to add it!
|
||||
|
||||
This list aims to be a comprehensive and trusted resource for the OAuth2-Proxy
|
||||
community, demonstrating successful adoption across all kinds of industries.
|
||||
|
||||
Contributing to this list is a simple way to impact the project's growth,
|
||||
maturity, and momentum. Thank you to all adopters and contributors of the
|
||||
OAuth2-Proxy project!
|
||||
|
||||
## Updating this list
|
||||
|
||||
To add your organization to this list, you can just [open a PR](https://github.com/oauth2-proxy/oauth2-proxy/pulls)
|
||||
to directly update this list.
|
||||
|
||||
Add your organization name, your github username and if you desire a short
|
||||
description on how you utilize oauth2-proxy.
|
||||
|
||||
## OAuth2-Proxy Adopters
|
||||
|
||||
This list is sorted in the order that organizations were added to it.
|
||||
|
||||
| Organization | Contact | Description of Use |
|
||||
| ------------ | ------- | ------------------ |
|
||||
| | | |
|
1339
CHANGELOG.md
Normal file
1339
CHANGELOG.md
Normal file
File diff suppressed because it is too large
Load Diff
134
CODE_OF_CONDUCT.md
Normal file
134
CODE_OF_CONDUCT.md
Normal file
@@ -0,0 +1,134 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio-economic status,
|
||||
nationality, personal appearance, race, caste, color, religion, or sexual
|
||||
identity and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the overall
|
||||
community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery, and sexual attention or advances of
|
||||
any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email address,
|
||||
without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||
decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official email address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at
|
||||
https://gophers.slack.com/messages/CM2RSS25N or directly contacting one of the
|
||||
maintainers from the MAINTAINERS file.
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series of
|
||||
actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or permanent
|
||||
ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within the
|
||||
community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.1, available at
|
||||
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
||||
|
||||
Community Impact Guidelines were inspired by
|
||||
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
||||
[https://www.contributor-covenant.org/translations][translations].
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
||||
[Mozilla CoC]: https://github.com/mozilla/diversity
|
||||
[FAQ]: https://www.contributor-covenant.org/faq
|
||||
[translations]: https://www.contributor-covenant.org/translations
|
||||
|
23
CONTRIBUTING.md
Normal file
23
CONTRIBUTING.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Contributing
|
||||
|
||||
To develop on this project, please fork the repo and clone into your `$GOPATH`.
|
||||
|
||||
Dependencies are **not** checked in so please download those separately.
|
||||
Download the dependencies using `go mod download`.
|
||||
|
||||
```bash
|
||||
cd $GOPATH/src/github.com # Create this directory if it doesn't exist
|
||||
git clone git@github.com:<YOUR_FORK>/oauth2-proxy oauth2-proxy/oauth2-proxy
|
||||
cd oauth2-proxy/oauth2-proxy
|
||||
go mod download
|
||||
```
|
||||
|
||||
## Pull Requests and Issues
|
||||
|
||||
We track bugs and issues using Github.
|
||||
|
||||
If you find a bug, please open an Issue.
|
||||
|
||||
If you want to fix a bug, please fork, create a feature branch, fix the bug and
|
||||
open a PR back to this repo.
|
||||
Please mention the open bug issue number within your PR if applicable.
|
74
Dockerfile
Normal file
74
Dockerfile
Normal file
@@ -0,0 +1,74 @@
|
||||
# The image ARGs have to be at the top, otherwise the docker daemon cannot validate
|
||||
# the FROM statements and overall Dockerfile
|
||||
#
|
||||
# Argument for setting the build image
|
||||
ARG BUILD_IMAGE=placeholder
|
||||
# Argument for setting the runtime image
|
||||
ARG RUNTIME_IMAGE=placeholder
|
||||
# Argument for setting the oauth2-proxy build version
|
||||
ARG VERSION
|
||||
|
||||
# All builds should be done using the platform native to the build node to allow
|
||||
# cache sharing of the go mod download step.
|
||||
# Go cross compilation is also faster than emulation the go compilation across
|
||||
# multiple platforms.
|
||||
FROM --platform=${BUILDPLATFORM} ${BUILD_IMAGE} AS builder
|
||||
|
||||
# Copy sources
|
||||
WORKDIR $GOPATH/src/github.com/oauth2-proxy/oauth2-proxy
|
||||
|
||||
# Fetch dependencies
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
# Now pull in our code
|
||||
COPY . .
|
||||
|
||||
# Arguments go here so that the previous steps can be cached if no external sources
|
||||
# have changed. These arguments are automatically set by the docker engine.
|
||||
ARG TARGETPLATFORM
|
||||
ARG BUILDPLATFORM
|
||||
|
||||
# Reload version argument
|
||||
ARG VERSION
|
||||
|
||||
# Build binary and make sure there is at least an empty key file.
|
||||
# This is useful for GCP App Engine custom runtime builds, because
|
||||
# you cannot use multiline variables in their app.yaml, so you have to
|
||||
# build the key into the container and then tell it where it is
|
||||
# by setting OAUTH2_PROXY_JWT_KEY_FILE=/etc/ssl/private/jwt_signing_key.pem
|
||||
# in app.yaml instead.
|
||||
# Set the cross compilation arguments based on the TARGETPLATFORM which is
|
||||
# automatically set by the docker engine.
|
||||
RUN case ${TARGETPLATFORM} in \
|
||||
"linux/amd64") GOARCH=amd64 ;; \
|
||||
# arm64 and arm64v8 are equivalent in go and do not require a goarm
|
||||
# https://github.com/golang/go/wiki/GoArm
|
||||
"linux/arm64" | "linux/arm/v8") GOARCH=arm64 ;; \
|
||||
"linux/ppc64le") GOARCH=ppc64le ;; \
|
||||
"linux/s390x") GOARCH=s390x ;; \
|
||||
"linux/arm/v6") GOARCH=arm GOARM=6 ;; \
|
||||
"linux/arm/v7") GOARCH=arm GOARM=7 ;; \
|
||||
esac && \
|
||||
printf "Building OAuth2 Proxy for arch ${GOARCH}\n" && \
|
||||
GOARCH=${GOARCH} VERSION=${VERSION} make build && touch jwt_signing_key.pem
|
||||
|
||||
# Reload runtime image
|
||||
ARG RUNTIME_IMAGE
|
||||
# Copy binary to runtime image
|
||||
FROM ${RUNTIME_IMAGE}
|
||||
# Reload version
|
||||
ARG VERSION
|
||||
|
||||
COPY --from=builder /go/src/github.com/oauth2-proxy/oauth2-proxy/oauth2-proxy /bin/oauth2-proxy
|
||||
COPY --from=builder /go/src/github.com/oauth2-proxy/oauth2-proxy/jwt_signing_key.pem /etc/ssl/private/jwt_signing_key.pem
|
||||
|
||||
LABEL org.opencontainers.image.licenses=MIT \
|
||||
org.opencontainers.image.description="A reverse proxy that provides authentication with Google, Azure, OpenID Connect and many more identity providers." \
|
||||
org.opencontainers.image.documentation=https://oauth2-proxy.github.io/oauth2-proxy/ \
|
||||
org.opencontainers.image.source=https://github.com/oauth2-proxy/oauth2-proxy \
|
||||
org.opencontainers.image.url=https://quay.io/oauth2-proxy/oauth2-proxy \
|
||||
org.opencontainers.image.title=oauth2-proxy \
|
||||
org.opencontainers.image.version=${VERSION}
|
||||
|
||||
ENTRYPOINT ["/bin/oauth2-proxy"]
|
5
Godeps
5
Godeps
@@ -1,5 +0,0 @@
|
||||
github.com/BurntSushi/toml 3883ac1ce943878302255f538fce319d23226223
|
||||
github.com/bitly/go-simplejson 3378bdcb5cebedcbf8b5750edee28010f128fe24
|
||||
github.com/mreiferson/go-options ee94b57f2fbf116075426f853e5abbcdfeca8b3d
|
||||
github.com/bmizerany/assert e17e99893cb6509f428e1728281c2ad60a6b31e3
|
||||
gopkg.in/fsnotify.v1 v1.2.0
|
5
MAINTAINERS
Normal file
5
MAINTAINERS
Normal file
@@ -0,0 +1,5 @@
|
||||
Joel Speed <joel@oauth2-proxy.dev> (@JoelSpeed)
|
||||
Nick Meves <nick@oauth2-proxy.dev> (@NickMeves)
|
||||
Braunson <braunson@oauth2-proxy.dev> (@braunsonm)
|
||||
Jan Larwig <jan@oauth2-proxy.dev> (@tuunit)
|
||||
Koen van Zuijlen <koen@oauth2-proxy.dev> (@kvanzuijlen)
|
179
Makefile
Normal file
179
Makefile
Normal file
@@ -0,0 +1,179 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#
|
||||
# Makefile with some common workflow for dev, build and test
|
||||
#
|
||||
|
||||
##@ General
|
||||
|
||||
# The help target prints out all targets with their descriptions organized
|
||||
# beneath their categories. The categories are represented by '##@' and the
|
||||
# target descriptions by '##'. The awk command is responsible for reading the
|
||||
# entire set of makefiles included in this invocation, looking for lines of the
|
||||
# file as xyz: ## something, and then pretty-format the target and help. Then,
|
||||
# if there's a line with ##@ something, that gets pretty-printed as a category.
|
||||
# More info on the usage of ANSI control characters for terminal formatting:
|
||||
# https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters
|
||||
# More info on the awk command:
|
||||
# http://linuxcommand.org/lc3_adv_awk.php
|
||||
|
||||
# The following help command is Licensed under the Apache License, Version 2.0 (the "License")
|
||||
# Copyright 2023 The Kubernetes Authors.
|
||||
.PHONY: help
|
||||
help: ## Display this help
|
||||
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
|
||||
|
||||
|
||||
GO ?= go
|
||||
GOLANGCILINT ?= golangci-lint
|
||||
|
||||
BINARY := oauth2-proxy
|
||||
VERSION ?= $(shell git describe --always --dirty --tags 2>/dev/null || echo "undefined")
|
||||
# Allow to override image registry.
|
||||
REGISTRY ?= quay.io/oauth2-proxy
|
||||
REPOSITORY ?= oauth2-proxy
|
||||
|
||||
DATE := $(shell date +"%Y%m%d")
|
||||
.NOTPARALLEL:
|
||||
|
||||
GO_MAJOR_VERSION = $(shell $(GO) version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f1)
|
||||
GO_MINOR_VERSION = $(shell $(GO) version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f2)
|
||||
|
||||
GO_MOD_VERSION = $(shell sed -En 's/^go ([[:digit:]]\.[[:digit:]]+)\.[[:digit:]]+/\1/p' go.mod)
|
||||
MINIMUM_SUPPORTED_GO_MAJOR_VERSION = $(shell echo ${GO_MOD_VERSION} | cut -d' ' -f1 | cut -d'.' -f1)
|
||||
MINIMUM_SUPPORTED_GO_MINOR_VERSION = $(shell echo ${GO_MOD_VERSION} | cut -d' ' -f1 | cut -d'.' -f2)
|
||||
GO_VERSION_VALIDATION_ERR_MSG = Golang version is not supported, please update to at least $(MINIMUM_SUPPORTED_GO_MAJOR_VERSION).$(MINIMUM_SUPPORTED_GO_MINOR_VERSION)
|
||||
|
||||
ifeq ($(COVER),true)
|
||||
TESTCOVER ?= -coverprofile c.out
|
||||
endif
|
||||
|
||||
##@ Build
|
||||
|
||||
.PHONY: build
|
||||
build: validate-go-version clean $(BINARY) ## Build and create oauth2-proxy binary from current source code
|
||||
|
||||
$(BINARY):
|
||||
CGO_ENABLED=0 $(GO) build -a -installsuffix cgo -ldflags="-X github.com/oauth2-proxy/oauth2-proxy/v7/pkg/version.VERSION=${VERSION}" -o $@ github.com/oauth2-proxy/oauth2-proxy/v7
|
||||
|
||||
DOCKER_BUILDX_COMMON_ARGS ?= --build-arg BUILD_IMAGE=docker.io/library/golang:${GO_MOD_VERSION}-bookworm --build-arg VERSION=${VERSION}
|
||||
|
||||
DOCKER_BUILD_PLATFORM ?= linux/amd64,linux/arm64,linux/ppc64le,linux/arm/v7,linux/s390x
|
||||
DOCKER_BUILD_RUNTIME_IMAGE ?= gcr.io/distroless/static:nonroot
|
||||
DOCKER_BUILDX_ARGS ?= --build-arg RUNTIME_IMAGE=${DOCKER_BUILD_RUNTIME_IMAGE} ${DOCKER_BUILDX_COMMON_ARGS}
|
||||
DOCKER_BUILDX := docker buildx build ${DOCKER_BUILDX_ARGS} --pull
|
||||
DOCKER_BUILDX_X_PLATFORM := $(DOCKER_BUILDX) --platform ${DOCKER_BUILD_PLATFORM}
|
||||
DOCKER_BUILDX_PUSH := $(DOCKER_BUILDX) --push
|
||||
DOCKER_BUILDX_PUSH_X_PLATFORM := $(DOCKER_BUILDX_PUSH) --platform ${DOCKER_BUILD_PLATFORM}
|
||||
|
||||
DOCKER_BUILD_PLATFORM_ALPINE ?= linux/amd64,linux/arm64,linux/ppc64le,linux/arm/v6,linux/arm/v7,linux/s390x
|
||||
DOCKER_BUILD_RUNTIME_IMAGE_ALPINE ?= alpine:3.22.1
|
||||
DOCKER_BUILDX_ARGS_ALPINE ?= --build-arg RUNTIME_IMAGE=${DOCKER_BUILD_RUNTIME_IMAGE_ALPINE} ${DOCKER_BUILDX_COMMON_ARGS}
|
||||
DOCKER_BUILDX_X_PLATFORM_ALPINE := docker buildx build ${DOCKER_BUILDX_ARGS_ALPINE} --platform ${DOCKER_BUILD_PLATFORM_ALPINE}
|
||||
DOCKER_BUILDX_PUSH_X_PLATFORM_ALPINE := $(DOCKER_BUILDX_X_PLATFORM_ALPINE) --push
|
||||
|
||||
.PHONY: build-docker
|
||||
build-docker: build-distroless build-alpine ## Build multi architecture docker images in both flavours (distroless / alpine)
|
||||
|
||||
.PHONY: build-distroless
|
||||
build-distroless: ## Build multi architecture distroless based docker image
|
||||
$(DOCKER_BUILDX_X_PLATFORM) -t $(REGISTRY)/$(REPOSITORY):latest -t $(REGISTRY)/$(REPOSITORY):${VERSION} .
|
||||
|
||||
.PHONY: build-alpine
|
||||
build-alpine: ## Build multi architecture alpine based docker image
|
||||
$(DOCKER_BUILDX_X_PLATFORM_ALPINE) -t $(REGISTRY)/$(REPOSITORY):latest-alpine -t $(REGISTRY)/$(REPOSITORY):${VERSION}-alpine .
|
||||
|
||||
.PHONY: build-docker-all
|
||||
build-docker-all: build-docker ## Build docker images for all supported architectures in both flavours (distroless / alpine)
|
||||
$(DOCKER_BUILDX) --platform linux/amd64 -t $(REGISTRY)/$(REPOSITORY):latest-amd64 -t $(REGISTRY)/$(REPOSITORY):${VERSION}-amd64 .
|
||||
$(DOCKER_BUILDX) --platform linux/arm64 -t $(REGISTRY)/$(REPOSITORY):latest-arm64 -t $(REGISTRY)/$(REPOSITORY):${VERSION}-arm64 .
|
||||
$(DOCKER_BUILDX) --platform linux/ppc64le -t $(REGISTRY)/$(REPOSITORY):latest-ppc64le -t $(REGISTRY)/$(REPOSITORY):${VERSION}-ppc64le .
|
||||
$(DOCKER_BUILDX) --platform linux/arm/v7 -t $(REGISTRY)/$(REPOSITORY):latest-armv7 -t $(REGISTRY)/$(REPOSITORY):${VERSION}-armv7 .
|
||||
$(DOCKER_BUILDX) --platform linux/s390x -t $(REGISTRY)/$(REPOSITORY):latest-s390x -t $(REGISTRY)/$(REPOSITORY):${VERSION}-s390x .
|
||||
|
||||
|
||||
##@ Publish
|
||||
|
||||
.PHONY: push-docker
|
||||
push-docker: push-distroless push-alpine ## Push multi architecture docker images for both flavours (distroless / alpine)
|
||||
|
||||
.PHONY: push-distroless
|
||||
push-distroless: ## Push multi architecture distroless based docker image
|
||||
$(DOCKER_BUILDX_PUSH_X_PLATFORM) -t $(REGISTRY)/$(REPOSITORY):latest -t $(REGISTRY)/$(REPOSITORY):${VERSION} .
|
||||
|
||||
.PHONY: push-alpine
|
||||
push-alpine: ## Push multi architecture alpine based docker image
|
||||
$(DOCKER_BUILDX_PUSH_X_PLATFORM_ALPINE) -t $(REGISTRY)/$(REPOSITORY):latest-alpine -t $(REGISTRY)/$(REPOSITORY):${VERSION}-alpine .
|
||||
|
||||
.PHONY: push-docker-all
|
||||
push-docker-all: push-docker ## Push docker images for all supported architectures for both flavours (distroless / alpine)
|
||||
$(DOCKER_BUILDX_PUSH) --platform linux/amd64 -t $(REGISTRY)/$(REPOSITORY):latest-amd64 -t $(REGISTRY)/$(REPOSITORY):${VERSION}-amd64 .
|
||||
$(DOCKER_BUILDX_PUSH) --platform linux/arm64 -t $(REGISTRY)/$(REPOSITORY):latest-arm64 -t $(REGISTRY)/$(REPOSITORY):${VERSION}-arm64 .
|
||||
$(DOCKER_BUILDX_PUSH) --platform linux/ppc64le -t $(REGISTRY)/$(REPOSITORY):latest-ppc64le -t $(REGISTRY)/$(REPOSITORY):${VERSION}-ppc64le .
|
||||
$(DOCKER_BUILDX_PUSH) --platform linux/arm/v7 -t $(REGISTRY)/$(REPOSITORY):latest-armv7 -t $(REGISTRY)/$(REPOSITORY):${VERSION}-armv7 .
|
||||
$(DOCKER_BUILDX_PUSH) --platform linux/s390x -t $(REGISTRY)/$(REPOSITORY):latest-s390x -t $(REGISTRY)/$(REPOSITORY):${VERSION}-s390x .
|
||||
|
||||
|
||||
##@ Nightly scheduling
|
||||
|
||||
.PHONY: nightly-build
|
||||
nightly-build: ## Nightly build command for docker images in both flavours (distroless / alpine)
|
||||
$(DOCKER_BUILDX_X_PLATFORM) -t $(REGISTRY)/$(REPOSITORY)-nightly:latest -t $(REGISTRY)/$(REPOSITORY)-nightly:${DATE} .
|
||||
$(DOCKER_BUILDX_X_PLATFORM_ALPINE) -t ${REGISTRY}/$(REPOSITORY)-nightly:latest-alpine -t $(REGISTRY)/$(REPOSITORY)-nightly:${DATE}-alpine .
|
||||
|
||||
.PHONY: nightly-push
|
||||
nightly-push: ## Nightly push command for docker images in both flavours (distroless / alpine)
|
||||
$(DOCKER_BUILDX_PUSH_X_PLATFORM) -t $(REGISTRY)/$(REPOSITORY)-nightly:latest -t $(REGISTRY)/$(REPOSITORY)-nightly:${DATE} .
|
||||
$(DOCKER_BUILDX_PUSH_X_PLATFORM_ALPINE) -t ${REGISTRY}/$(REPOSITORY)-nightly:latest-alpine -t $(REGISTRY)/$(REPOSITORY)-nightly:${DATE}-alpine .
|
||||
|
||||
|
||||
##@ Docs
|
||||
|
||||
.PHONY: generate
|
||||
generate: ## Generate alpha config docs from golang structs
|
||||
go generate ./pkg/...
|
||||
|
||||
.PHONY: verify-generate
|
||||
verify-generate: generate ## Verify command to check if alpha config docs are in line with golang struct changes
|
||||
git diff --exit-code
|
||||
|
||||
##@ Miscellaneous
|
||||
|
||||
.PHONY: test
|
||||
test: lint ## Run all Go tests
|
||||
GO111MODULE=on $(GO) test $(TESTCOVER) -v -race ./...
|
||||
|
||||
.PHONY: release
|
||||
release: validate-go-version lint test ## Create a full release for all architectures (binaries and checksums)
|
||||
BINARY=${BINARY} VERSION=${VERSION} ./dist.sh
|
||||
|
||||
.PHONY: clean
|
||||
clean: ## Cleanup release and build files
|
||||
-rm -rf release
|
||||
-rm -f $(BINARY)
|
||||
|
||||
.PHONY: lint
|
||||
lint: validate-go-version ## Lint all files using golangci-lint
|
||||
GO111MODULE=on $(GOLANGCILINT) run
|
||||
|
||||
.PHONY: validate-go-version
|
||||
validate-go-version: ## Validate Go environment requirements
|
||||
@if [ $(GO_MAJOR_VERSION) -gt $(MINIMUM_SUPPORTED_GO_MAJOR_VERSION) ]; then \
|
||||
exit 0 ;\
|
||||
elif [ $(GO_MAJOR_VERSION) -lt $(MINIMUM_SUPPORTED_GO_MAJOR_VERSION) ]; then \
|
||||
echo '$(GO_VERSION_VALIDATION_ERR_MSG)';\
|
||||
exit 1; \
|
||||
elif [ $(GO_MINOR_VERSION) -lt $(MINIMUM_SUPPORTED_GO_MINOR_VERSION) ] ; then \
|
||||
echo '$(GO_VERSION_VALIDATION_ERR_MSG)';\
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
# local-env can be used to interact with the local development environment
|
||||
# eg:
|
||||
# make local-env-up # Bring up a basic test environment
|
||||
# make local-env-down # Tear down the basic test environment
|
||||
# make local-env-nginx-up # Bring up an nginx based test environment
|
||||
# make local-env-nginx-down # Tead down the nginx based test environment
|
||||
.PHONY: local-env-%
|
||||
local-env-%:
|
||||
make -C contrib/local-environment $*
|
245
README.md
245
README.md
@@ -1,229 +1,86 @@
|
||||
oauth2_proxy
|
||||
=================
|
||||
[](https://github.com/oauth2-proxy/oauth2-proxy/actions/workflows/ci.yml)
|
||||
[](https://goreportcard.com/report/github.com/oauth2-proxy/oauth2-proxy)
|
||||
[](https://godoc.org/github.com/oauth2-proxy/oauth2-proxy)
|
||||
[](./LICENSE)
|
||||
[](https://codeclimate.com/github/oauth2-proxy/oauth2-proxy/maintainability)
|
||||
[](https://codeclimate.com/github/oauth2-proxy/oauth2-proxy/test_coverage)
|
||||
|
||||
<small>(This project was renamed from Google Auth Proxy - May 2015)</small>
|
||||

|
||||
|
||||
A reverse proxy that provides authentication using Providers (Google, Github, and others)
|
||||
to validate accounts by email, domain or group.
|
||||
OAuth2-Proxy is a flexible, open-source tool that can act as either a standalone reverse proxy or a middleware component integrated into existing reverse proxy or load balancer setups. It provides a simple and secure way to protect your web applications with OAuth2 / OIDC authentication. As a reverse proxy, it intercepts requests to your application and redirects users to an OAuth2 provider for authentication. As a middleware, it can be seamlessly integrated into your existing infrastructure to handle authentication for multiple applications.
|
||||
|
||||
[](http://travis-ci.org/bitly/oauth2_proxy)
|
||||
OAuth2-Proxy supports a lot of OAuth2 as well as OIDC providers. Either through a generic OIDC client or a specific implementation for Google, Microsoft Entra ID, GitHub, login.gov and others. Through specialised provider implementations oauth2-proxy can extract more details about the user like preferred usernames and groups. Those details can then be forwarded as HTTP headers to your upstream applications.
|
||||
|
||||

|
||||
|
||||

|
||||
## Get Started
|
||||
|
||||
## Architecture
|
||||
OAuth2-Proxy's [Installation Docs](https://oauth2-proxy.github.io/oauth2-proxy/installation) cover how to install and configure your setup. Additionally you can take a further look at the [example setup files](https://github.com/oauth2-proxy/oauth2-proxy/tree/master/contrib/local-environment).
|
||||
|
||||

|
||||
## Releases
|
||||
|
||||
## Installation
|
||||
### Binaries
|
||||
We publish oauth2-proxy as compiled binaries on GitHub for all major architectures as well as more exotic ones like `ppc64le` as well as `s390x`.
|
||||
|
||||
1. Download [Prebuilt Binary](https://github.com/bitly/oauth2_proxy/releases) (current release is `v2.0`) or build with `$ go get github.com/bitly/oauth2_proxy` which will put the binary in `$GOROOT/bin`
|
||||
2. Select a Provider and Register an OAuth Application with a Provider
|
||||
3. Configure OAuth2 Proxy using config file, command line options, or environment variables
|
||||
4. Configure SSL or Deploy behind a SSL endpoint (example provided for Nginx)
|
||||
Check out the [latest release](https://github.com/oauth2-proxy/oauth2-proxy/releases/latest).
|
||||
|
||||
## OAuth Provider Configuration
|
||||
### Images
|
||||
|
||||
You will need to register an OAuth application with a Provider (Google, Github or another provider), and configure it with Redirect URI(s) for the domain you intend to run `oauth2_proxy` on.
|
||||
From `v7.6.0` and up the base image has been changed from Alpine to [GoogleContainerTools/distroless](https://github.com/GoogleContainerTools/distroless).
|
||||
This image comes with even fewer installed dependencies and thus should improve security. The image therefore is also slightly smaller than Alpine.
|
||||
For debugging purposes (and those who really need it. e.g. `armv6`) we still provide images based on Alpine. The tags of these images are suffixed with `-alpine`.
|
||||
|
||||
Valid providers are :
|
||||
Since 2023-11-18 we build nightly images directly from the `master` branch and provide them at `quay.io/oauth2-proxy/oauth2-proxy-nightly`.
|
||||
These images are considered unstable and therefore should **NOT** be used for production purposes unless you know what you're doing.
|
||||
|
||||
* [Google](#google-auth-provider) *default*
|
||||
* [GitHub](#github-auth-provider)
|
||||
* [LinkedIn](#linkedin-auth-provider)
|
||||
* [MyUSA](#myusa-auth-provider)
|
||||
## Sponsors
|
||||
|
||||
The provider can be selected using the `provider` configuration value.
|
||||

|
||||
Microsoft Azure credits for open source projects
|
||||
|
||||
### Google Auth Provider
|
||||
Would you like to sponsor the project then please contact us at [sponsors@oauth2-proxy.dev](mailto:sponsors@oauth2-proxy.dev)
|
||||
|
||||
For Google, the registration steps are:
|
||||
## Getting Involved
|
||||
[](https://gophers.slack.com/archives/CM2RSS25N)
|
||||
|
||||
1. Create a new project: https://console.developers.google.com/project
|
||||
2. Under "APIs & Auth", choose "Credentials"
|
||||
3. Now, choose "Create new Client ID"
|
||||
* The Application Type should be **Web application**
|
||||
* Enter your domain in the Authorized Javascript Origins `https://internal.yourcompany.com`
|
||||
* Enter the correct Authorized Redirect URL `https://internal.yourcompany.com/oauth2/callback`
|
||||
* NOTE: `oauth2_proxy` will _only_ callback on the path `/oauth2/callback`
|
||||
4. Under "APIs & Auth" choose "Consent Screen"
|
||||
* Fill in the necessary fields and Save (this is _required_)
|
||||
5. Take note of the **Client ID** and **Client Secret**
|
||||
Join the #oauth2-proxy [Slack channel](https://gophers.slack.com/archives/CM2RSS25N) to chat with other users of oauth2-proxy or reach out to the maintainers directly. Use the [public invite link](https://invite.slack.golangbridge.org/) to get an invite for the Gopher Slack space.
|
||||
|
||||
### GitHub Auth Provider
|
||||
OAuth2-Proxy is a community-driven project. We rely on the contribut️ions of our users to continually improve it. While review times can vary, we appreciate your patience and understanding. As a volunteer-driven project, we strive to keep this project stable and might take longer to merge changes.
|
||||
|
||||
1. Create a new project: https://github.com/settings/developers
|
||||
2. Under `Authorization callback URL` enter the correct url ie `https://internal.yourcompany.com/oauth2/callback`
|
||||
If you want to contribute to the project. Please see our [Contributing](https://oauth2-proxy.github.io/oauth2-proxy/community/contribution) guide.
|
||||
|
||||
The GitHub auth provider supports two additional parameters to restrict authentication to Organization or Team level access. Restricting by org and team is normally accompanied with `--email-domain=*`
|
||||
Who uses OAuth2-Proxy? Have a look at our new [ADOPTERS](ADOPTERS.md) file and
|
||||
feel free to open a PR to add your organisation.
|
||||
|
||||
-github-org="": restrict logins to members of this organisation
|
||||
-github-team="": restrict logins to members of this team
|
||||
Thanks to all the people who already contributed ❤
|
||||
|
||||
<a href="https://github.com/oauth2-proxy/oauth2-proxy/graphs/contributors">
|
||||
<img src="https://contrib.rocks/image?repo=oauth2-proxy/oauth2-proxy&columns=15&max=75" />
|
||||
<img src="https://img.shields.io/github/contributors/oauth2-proxy/oauth2-proxy" />
|
||||
</a>
|
||||
|
||||
### LinkedIn Auth Provider
|
||||
Made with [contrib.rocks](https://contrib.rocks).
|
||||
|
||||
For LinkedIn, the registration steps are:
|
||||
## Security
|
||||
|
||||
1. Create a new project: https://www.linkedin.com/secure/developer
|
||||
2. In the OAuth User Agreement section:
|
||||
* In default scope, select r_basicprofile and r_emailaddress.
|
||||
* In "OAuth 2.0 Redirect URLs", enter `https://internal.yourcompany.com/oauth2/callback`
|
||||
3. Fill in the remaining required fields and Save.
|
||||
4. Take note of the **Consumer Key / API Key** and **Consumer Secret / Secret Key**
|
||||
If you believe you have found a vulnerability within OAuth2 Proxy or any of its dependencies, please do **NOT** open an issue or PR on GitHub, please do **NOT** post any details publicly.
|
||||
|
||||
### MyUSA Auth Provider
|
||||
Security disclosures **MUST** be done in private. If you have found an issue that you would like to bring to the attention of the maintainers, please compose an email and send it to the list of people listed in our [MAINTAINERS](MAINTAINERS) file.
|
||||
|
||||
The [MyUSA](https://alpha.my.usa.gov) authentication service ([GitHub](https://github.com/18F/myusa))
|
||||
For more details read our full [Security Docs](https://oauth2-proxy.github.io/oauth2-proxy/community/security#security-disclosures)
|
||||
|
||||
## Email Authentication
|
||||
### Security Notice for v6.0.0 and older
|
||||
|
||||
To authorize by email domain use `--email-domain=yourcompany.com`. To authorize individual email addresses use `--authenticated-emails-file=/path/to/file` with one email per line. To authorize all email addresse use `--email-domain=*`.
|
||||
If you are running a version older than v6.0.0 we **strongly recommend** to the current version.
|
||||
|
||||
## Configuration
|
||||
See [open redirect vulnerability](https://github.com/oauth2-proxy/oauth2-proxy/security/advisories/GHSA-5m6c-jp6f-2vcv) for details.
|
||||
|
||||
`oauth2_proxy` can be configured via [config file](#config-file), [command line options](#command-line-options) or [environment variables](#environment-variables).
|
||||
## Repository History
|
||||
|
||||
### Config File
|
||||
**2018-11-27:** This repository was forked from [bitly/OAuth2_Proxy](https://github.com/bitly/oauth2_proxy). Versions v3.0.0 and up are from this fork and will have diverged from any changes in the original fork. A list of changes can be seen in the [CHANGELOG](CHANGELOG.md).
|
||||
|
||||
An example [oauth2_proxy.cfg](contrib/oauth2_proxy.cfg.example) config file is in the contrib directory. It can be used by specifying `-config=/etc/oauth2_proxy.cfg`
|
||||
**2020-03-29:** This project was formerly hosted as `pusher/oauth2_proxy` but has been renamed to `oauth2-proxy/oauth2-proxy`. Going forward, all images shall be available at `quay.io/oauth2-proxy/oauth2-proxy` and binaries will be named `oauth2-proxy`.
|
||||
|
||||
### Command Line Options
|
||||
|
||||
```
|
||||
Usage of oauth2_proxy:
|
||||
-authenticated-emails-file="": authenticate against emails via file (one per line)
|
||||
-client-id="": the OAuth Client ID: ie: "123456.apps.googleusercontent.com"
|
||||
-client-secret="": the OAuth Client Secret
|
||||
-config="": path to config file
|
||||
-cookie-domain="": an optional cookie domain to force cookies to (ie: .yourcompany.com)*
|
||||
-cookie-expire=168h0m0s: expire timeframe for cookie
|
||||
-cookie-httponly=true: set HttpOnly cookie flag
|
||||
-cookie-key="_oauth2_proxy": the name of the cookie that the oauth_proxy creates
|
||||
-cookie-refresh=0: refresh the cookie when less than this much time remains before expiration; 0 to disable
|
||||
-cookie-secret="": the seed string for secure cookies
|
||||
-cookie-secure=true: set secure (HTTPS) cookie flag
|
||||
-custom-templates-dir="": path to custom html templates
|
||||
-display-htpasswd-form=true: display username / password login form if an htpasswd file is provided
|
||||
-email-domain=: authenticate emails with the specified domain (may be given multiple times). Use * to authenticate any email
|
||||
-github-org="": restrict logins to members of this organisation
|
||||
-github-team="": restrict logins to members of this team
|
||||
-htpasswd-file="": additionally authenticate against a htpasswd file. Entries must be created with "htpasswd -s" for SHA encryption
|
||||
-http-address="127.0.0.1:4180": [http://]<addr>:<port> or unix://<path> to listen on for HTTP clients
|
||||
-https-address=":443": <addr>:<port> to listen on for HTTPS clients
|
||||
-login-url="": Authentication endpoint
|
||||
-pass-access-token=false: pass OAuth access_token to upstream via X-Forwarded-Access-Token header
|
||||
-pass-basic-auth=true: pass HTTP Basic Auth, X-Forwarded-User and X-Forwarded-Email information to upstream
|
||||
-pass-host-header=true: pass the request Host Header to upstream
|
||||
-profile-url="": Profile access endpoint
|
||||
-provider="google": OAuth provider
|
||||
-proxy-prefix="/oauth2": the url root path that this proxy should be nested under (e.g. /<oauth2>/sign_in)
|
||||
-redeem-url="": Token redemption endpoint
|
||||
-redirect-url="": the OAuth Redirect URL. ie: "https://internalapp.yourcompany.com/oauth2/callback"
|
||||
-request-logging=true: Log requests to stdout
|
||||
-scope="": Oauth scope specification
|
||||
-skip-auth-regex=: bypass authentication for requests path's that match (may be given multiple times)
|
||||
-tls-cert="": path to certificate file
|
||||
-tls-key="": path to private key file
|
||||
-upstream=: the http url(s) of the upstream endpoint. If multiple, routing is based on path
|
||||
-validate-url="": Access token validation endpoint
|
||||
-version=false: print version string
|
||||
```
|
||||
|
||||
See below for provider specific options
|
||||
|
||||
### Environment variables
|
||||
|
||||
The environment variables `OAUTH2_PROXY_CLIENT_ID`, `OAUTH2_PROXY_CLIENT_SECRET`, `OAUTH2_PROXY_COOKIE_SECRET`, `OAUTH2_PROXY_COOKIE_DOMAIN` and `OAUTH2_PROXY_COOKIE_EXPIRE` can be used in place of the corresponding command-line arguments.
|
||||
|
||||
## SSL Configuration
|
||||
|
||||
There are two recommended configurations.
|
||||
|
||||
1) Configure SSL Terminiation with OAuth2 Proxy by providing a `--tls-cert=/path/to/cert.pem` and `--tls-key=/path/to/cert.key`.
|
||||
|
||||
The command line to run `oauth2_proxy` in this configuration would look like this:
|
||||
|
||||
```bash
|
||||
./oauth2_proxy \
|
||||
--email-domain="yourcompany.com" \
|
||||
--upstream=http://127.0.0.1:8080/ \
|
||||
--tls-cert=/path/to/cert.pem \
|
||||
--tls-key=/path/to/cert.key \
|
||||
--cookie-secret=... \
|
||||
--cookie-secure=true \
|
||||
--provider=... \
|
||||
--client-id=... \
|
||||
--client-secret=...
|
||||
```
|
||||
|
||||
|
||||
2) Configure SSL Termination with [Nginx](http://nginx.org/) (example config below) or Amazon ELB, or ....
|
||||
|
||||
Nginx will listen on port `443` and handle SSL connections while proxying to `oauth2_proxy` on port `4180`.
|
||||
`oauth2_proxy` which will then authenticate requests for an upstream application. The external
|
||||
endpoint for this example would be `https://internal.yourcompany.com/`.
|
||||
|
||||
An example Nginx config follows. Note the use of `Strict-Transport-Security` header to pin requests to SSL
|
||||
via [HSTS](http://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security):
|
||||
|
||||
```
|
||||
server {
|
||||
listen 443 default ssl;
|
||||
server_name internal.yourcompany.com;
|
||||
ssl_certificate /path/to/cert.pem;
|
||||
ssl_certificate_key /path/to/cert.key;
|
||||
add_header Strict-Transport-Security max-age=1209600;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:4180;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Scheme $scheme;
|
||||
proxy_connect_timeout 1;
|
||||
proxy_send_timeout 30;
|
||||
proxy_read_timeout 30;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The command line to run `oauth2_proxy` in this configuration would look like this:
|
||||
|
||||
```bash
|
||||
./oauth2_proxy \
|
||||
--email-domain="yourcompany.com" \
|
||||
--upstream=http://127.0.0.1:8080/ \
|
||||
--cookie-secret=... \
|
||||
--cookie-secure=true \
|
||||
--provider=... \
|
||||
--client-id=... \
|
||||
--client-secret=...
|
||||
```
|
||||
|
||||
|
||||
## Endpoint Documentation
|
||||
|
||||
OAuth2 Proxy responds directly to the following endpoints. All other endpoints will be proxied upstream when authenticated. The `/oauth2` prefix can be changed with the `--proxy-prefix` config variable.
|
||||
|
||||
* /robots.txt - returns a 200 OK response that disallows all User-agents from all paths; see [robotstxt.org](http://www.robotstxt.org/) for more info
|
||||
* /ping - returns an 200 OK response
|
||||
* /oauth2/sign_in - the login page, which also doubles as a sign out page (it clears cookies)
|
||||
* /oauth2/start - a URL that will redirect to start the OAuth cycle
|
||||
* /oauth2/callback - the URL used at the end of the OAuth cycle. The oauth app will be configured with this ass the callback url.
|
||||
|
||||
## Logging Format
|
||||
|
||||
OAuth2 Proxy logs requests to stdout in a format similar to Apache Combined Log.
|
||||
|
||||
```
|
||||
<REMOTE_ADDRESS> - <user@domain.com> [19/Mar/2015:17:20:19 -0400] <HOST_HEADER> GET <UPSTREAM_HOST> "/path/" HTTP/1.1 "<USER_AGENT>" <RESPONSE_CODE> <RESPONSE_BYTES> <REQUEST_DURATION>
|
||||
```
|
||||
|
||||
|
||||
## Adding a new Provider
|
||||
|
||||
Follow the examples in the [`providers` package](providers/) to define a new
|
||||
`Provider` instance. Add a new `case` to
|
||||
[`providers.New()`](providers/providers.go) to allow `oauth2_proxy` to use the
|
||||
new `Provider`.
|
||||
## License
|
||||
|
||||
OAuth2-Proxy is distributed under [The MIT License](LICENSE).
|
||||
|
49
RELEASE.md
Normal file
49
RELEASE.md
Normal file
@@ -0,0 +1,49 @@
|
||||
# Release
|
||||
|
||||
The is a legacy document to explain the manual process of creating and publishing a new release of oauth2-proxy. As of now the release process has been automated with GitHub Actions workflows. For more information have a look at the workflows `create-release.yml` and `publish-release.yml`.
|
||||
|
||||
Here's how OAuth2 Proxy releases are created.
|
||||
|
||||
## Schedule
|
||||
|
||||
Our aim is to release once a quarter, but bug fixes will be prioritised and might be released earlier.
|
||||
|
||||
## The Process
|
||||
|
||||
Note this uses `v4.1.0` as an example release number.
|
||||
|
||||
1. Create a draft Github release
|
||||
* Use format `v4.1.0` for both the tag and title
|
||||
2. Update [CHANGELOG.md](CHANGELOG.md)
|
||||
* Write the release highlights
|
||||
* Copy in headings ready for the next release
|
||||
3. Create release commit
|
||||
```
|
||||
git checkout -b release-v4.1.0
|
||||
```
|
||||
4. Create pull request getting other maintainers to review
|
||||
5. Copy the release notes in to the draft Github release, adding a link to [CHANGELOG.md](CHANGELOG.md)
|
||||
6. Update you local master branch
|
||||
```
|
||||
git checkout master
|
||||
git pull
|
||||
```
|
||||
7. Create & push the tag
|
||||
```
|
||||
git tag v4.1.0
|
||||
git push --tags
|
||||
```
|
||||
8. Make the release artefacts
|
||||
```
|
||||
make release
|
||||
```
|
||||
9. Upload all the files (not the folders) from the `/release` folder to Github release as binary artefacts. There should be both the tarballs (`tar.gz`) and the checksum files (`sha256sum.txt`).
|
||||
10. Publish release in Github
|
||||
11. Make and push docker images to Quay
|
||||
```
|
||||
make build-docker-all
|
||||
make push-docker-all
|
||||
```
|
||||
Note: Ensure the docker tags don't include `-dirty`. This means you have uncommitted changes.
|
||||
|
||||
12. Verify everything looks good at [quay](https://quay.io/repository/oauth2-proxy/oauth2-proxy?tag=latest&tab=tags) and [github](https://github.com/oauth2-proxy/oauth2-proxy/releases)
|
3
SECURITY.md
Normal file
3
SECURITY.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Security Disclosures
|
||||
|
||||
Please see [our community docs](https://oauth2-proxy.github.io/oauth2-proxy/community/security) for our security policy.
|
39
api/api.go
39
api/api.go
@@ -1,39 +0,0 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
|
||||
"github.com/bitly/go-simplejson"
|
||||
)
|
||||
|
||||
func Request(req *http.Request) (*simplejson.Json, error) {
|
||||
resp, err := http.DefaultClient.Do(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
resp.Body.Close()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if resp.StatusCode != 200 {
|
||||
return nil, fmt.Errorf("got %d %s", resp.StatusCode, body)
|
||||
}
|
||||
data, err := simplejson.NewJson(body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return data, nil
|
||||
}
|
||||
|
||||
func RequestUnparsedResponse(url string, header http.Header) (resp *http.Response, err error) {
|
||||
req, err := http.NewRequest("GET", url, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.Header = header
|
||||
|
||||
return http.DefaultClient.Do(req)
|
||||
}
|
127
api/api_test.go
127
api/api_test.go
@@ -1,127 +0,0 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"github.com/bitly/go-simplejson"
|
||||
"github.com/bmizerany/assert"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func testBackend(response_code int, payload string) *httptest.Server {
|
||||
return httptest.NewServer(http.HandlerFunc(
|
||||
func(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(response_code)
|
||||
w.Write([]byte(payload))
|
||||
}))
|
||||
}
|
||||
|
||||
func TestRequest(t *testing.T) {
|
||||
backend := testBackend(200, "{\"foo\": \"bar\"}")
|
||||
defer backend.Close()
|
||||
|
||||
req, _ := http.NewRequest("GET", backend.URL, nil)
|
||||
response, err := Request(req)
|
||||
assert.Equal(t, nil, err)
|
||||
result, err := response.Get("foo").String()
|
||||
assert.Equal(t, nil, err)
|
||||
assert.Equal(t, "bar", result)
|
||||
}
|
||||
|
||||
func TestRequestFailure(t *testing.T) {
|
||||
// Create a backend to generate a test URL, then close it to cause a
|
||||
// connection error.
|
||||
backend := testBackend(200, "{\"foo\": \"bar\"}")
|
||||
backend.Close()
|
||||
|
||||
req, err := http.NewRequest("GET", backend.URL, nil)
|
||||
assert.Equal(t, nil, err)
|
||||
resp, err := Request(req)
|
||||
assert.Equal(t, (*simplejson.Json)(nil), resp)
|
||||
assert.NotEqual(t, nil, err)
|
||||
if !strings.Contains(err.Error(), "refused") {
|
||||
t.Error("expected error when a connection fails: ", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestHttpErrorCode(t *testing.T) {
|
||||
backend := testBackend(404, "{\"foo\": \"bar\"}")
|
||||
defer backend.Close()
|
||||
|
||||
req, err := http.NewRequest("GET", backend.URL, nil)
|
||||
assert.Equal(t, nil, err)
|
||||
resp, err := Request(req)
|
||||
assert.Equal(t, (*simplejson.Json)(nil), resp)
|
||||
assert.NotEqual(t, nil, err)
|
||||
}
|
||||
|
||||
func TestJsonParsingError(t *testing.T) {
|
||||
backend := testBackend(200, "not well-formed JSON")
|
||||
defer backend.Close()
|
||||
|
||||
req, err := http.NewRequest("GET", backend.URL, nil)
|
||||
assert.Equal(t, nil, err)
|
||||
resp, err := Request(req)
|
||||
assert.Equal(t, (*simplejson.Json)(nil), resp)
|
||||
assert.NotEqual(t, nil, err)
|
||||
}
|
||||
|
||||
// Parsing a URL practically never fails, so we won't cover that test case.
|
||||
func TestRequestUnparsedResponseUsingAccessTokenParameter(t *testing.T) {
|
||||
backend := httptest.NewServer(http.HandlerFunc(
|
||||
func(w http.ResponseWriter, r *http.Request) {
|
||||
token := r.FormValue("access_token")
|
||||
if r.URL.Path == "/" && token == "my_token" {
|
||||
w.WriteHeader(200)
|
||||
w.Write([]byte("some payload"))
|
||||
} else {
|
||||
w.WriteHeader(403)
|
||||
}
|
||||
}))
|
||||
defer backend.Close()
|
||||
|
||||
response, err := RequestUnparsedResponse(
|
||||
backend.URL+"?access_token=my_token", nil)
|
||||
assert.Equal(t, nil, err)
|
||||
assert.Equal(t, 200, response.StatusCode)
|
||||
body, err := ioutil.ReadAll(response.Body)
|
||||
assert.Equal(t, nil, err)
|
||||
response.Body.Close()
|
||||
assert.Equal(t, "some payload", string(body))
|
||||
}
|
||||
|
||||
func TestRequestUnparsedResponseUsingAccessTokenParameterFailedResponse(t *testing.T) {
|
||||
backend := testBackend(200, "some payload")
|
||||
// Close the backend now to force a request failure.
|
||||
backend.Close()
|
||||
|
||||
response, err := RequestUnparsedResponse(
|
||||
backend.URL+"?access_token=my_token", nil)
|
||||
assert.NotEqual(t, nil, err)
|
||||
assert.Equal(t, (*http.Response)(nil), response)
|
||||
}
|
||||
|
||||
func TestRequestUnparsedResponseUsingHeaders(t *testing.T) {
|
||||
backend := httptest.NewServer(http.HandlerFunc(
|
||||
func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.URL.Path == "/" && r.Header["Auth"][0] == "my_token" {
|
||||
w.WriteHeader(200)
|
||||
w.Write([]byte("some payload"))
|
||||
} else {
|
||||
w.WriteHeader(403)
|
||||
}
|
||||
}))
|
||||
defer backend.Close()
|
||||
|
||||
headers := make(http.Header)
|
||||
headers.Set("Auth", "my_token")
|
||||
response, err := RequestUnparsedResponse(backend.URL, headers)
|
||||
assert.Equal(t, nil, err)
|
||||
assert.Equal(t, 200, response.StatusCode)
|
||||
body, err := ioutil.ReadAll(response.Body)
|
||||
assert.Equal(t, nil, err)
|
||||
response.Body.Close()
|
||||
assert.Equal(t, "some payload", string(body))
|
||||
}
|
56
contrib/local-environment/Makefile
Normal file
56
contrib/local-environment/Makefile
Normal file
@@ -0,0 +1,56 @@
|
||||
.PHONY: up
|
||||
up:
|
||||
docker compose up -d
|
||||
|
||||
.PHONY: %
|
||||
%:
|
||||
docker compose $*
|
||||
|
||||
.PHONY: alpha-config-up
|
||||
alpha-config-up:
|
||||
docker compose -f docker-compose.yaml -f docker-compose-alpha-config.yaml up -d
|
||||
|
||||
.PHONY: alpha-config-%
|
||||
alpha-config-%:
|
||||
docker compose -f docker-compose.yaml -f docker-compose-alpha-config.yaml $*
|
||||
|
||||
.PHONY: nginx-up
|
||||
nginx-up:
|
||||
docker compose -f docker-compose.yaml -f docker-compose-nginx.yaml up -d
|
||||
|
||||
.PHONY: nginx-%
|
||||
nginx-%:
|
||||
docker compose -f docker-compose.yaml -f docker-compose-nginx.yaml $*
|
||||
|
||||
.PHONY: keycloak-up
|
||||
keycloak-up:
|
||||
docker compose -f docker-compose-keycloak.yaml up -d
|
||||
|
||||
.PHONY: keycloak-%
|
||||
keycloak-%:
|
||||
docker compose -f docker-compose-keycloak.yaml $*
|
||||
|
||||
.PHONY: gitea-up
|
||||
gitea-up:
|
||||
docker compose -f docker-compose-gitea.yaml up -d
|
||||
|
||||
.PHONY: gitea-%
|
||||
gitea-%:
|
||||
docker compose -f docker-compose-gitea.yaml $*
|
||||
|
||||
.PHONY: kubernetes-up
|
||||
kubernetes-up:
|
||||
make -C kubernetes create-cluster
|
||||
make -C kubernetes deploy
|
||||
|
||||
.PHONY: kubernetes-down
|
||||
kubernetes-down:
|
||||
make -C kubernetes delete-cluster
|
||||
|
||||
.PHONY: traefik-up
|
||||
traefik-up:
|
||||
docker compose -f docker-compose.yaml -f docker-compose-traefik.yaml up -d
|
||||
|
||||
.PHONY: traefik-%
|
||||
traefik-%:
|
||||
docker compose -f docker-compose.yaml -f docker-compose-traefik.yaml $*
|
3
contrib/local-environment/README.md
Normal file
3
contrib/local-environment/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# oauth2-proxy: local-environment
|
||||
|
||||
Run `make up` to deploy local dex, etcd and oauth2-proxy instances in Docker containers. Review the [`Makefile`](Makefile) for additional deployment options.
|
32
contrib/local-environment/dex.yaml
Normal file
32
contrib/local-environment/dex.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
# This configuration is intended to be used with the docker-compose testing
|
||||
# environment.
|
||||
# This should configure Dex to run on port 5556 and provides a static login
|
||||
issuer: http://dex.localtest.me:5556/dex
|
||||
storage:
|
||||
type: etcd
|
||||
config:
|
||||
endpoints:
|
||||
- http://etcd:2379
|
||||
namespace: dex/
|
||||
web:
|
||||
http: 0.0.0.0:5556
|
||||
oauth2:
|
||||
skipApprovalScreen: true
|
||||
expiry:
|
||||
signingKeys: "4h"
|
||||
idTokens: "1h"
|
||||
staticClients:
|
||||
- id: oauth2-proxy
|
||||
redirectURIs:
|
||||
# These redirect URIs point to the `--redirect-url` for OAuth2 proxy.
|
||||
- 'http://oauth2-proxy.localtest.me:4180/oauth2/callback' # For basic proxy example.
|
||||
- 'http://oauth2-proxy.oauth2-proxy.localhost/oauth2/callback' # For nginx and traefik example.
|
||||
name: 'OAuth2 Proxy'
|
||||
secret: b2F1dGgyLXByb3h5LWNsaWVudC1zZWNyZXQK
|
||||
enablePasswordDB: true
|
||||
staticPasswords:
|
||||
- email: "admin@example.com"
|
||||
# bcrypt hash of the string "password"
|
||||
hash: "$2a$10$2b2cU8CPhOTaGrs1HRQuAueS7JTT5ZHsHSzYiFPm1leZck7Mc8T4W"
|
||||
username: "admin"
|
||||
userID: "08a8684b-db88-4b73-90a9-3cd1661f5466"
|
20
contrib/local-environment/docker-compose-alpha-config.yaml
Normal file
20
contrib/local-environment/docker-compose-alpha-config.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
# This docker-compose file can be used to bring up an example instance of oauth2-proxy
|
||||
# for manual testing and exploration of features.
|
||||
# Alongside OAuth2-Proxy, this file also starts Dex to act as the identity provider,
|
||||
# etcd for storage for Dex and HTTPBin as an example upstream.
|
||||
# This file also uses alpha configuration when configuring OAuth2 Proxy.
|
||||
#
|
||||
# This file is an extension of the main compose file and must be used with it
|
||||
# docker-compose -f docker-compose.yaml -f docker-compose-alpha-config.yaml <command>
|
||||
# Alternatively:
|
||||
# make alpha-config-<command> (eg make nginx-up, make nginx-down)
|
||||
#
|
||||
# Access http://localhost:4180 to initiate a login cycle
|
||||
version: '3.0'
|
||||
services:
|
||||
oauth2-proxy:
|
||||
image: quay.io/oauth2-proxy/oauth2-proxy:v7.11.0
|
||||
command: --config /oauth2-proxy.cfg --alpha-config /oauth2-proxy-alpha-config.yaml
|
||||
volumes:
|
||||
- "./oauth2-proxy-alpha-config.cfg:/oauth2-proxy.cfg"
|
||||
- "./oauth2-proxy-alpha-config.yaml:/oauth2-proxy-alpha-config.yaml"
|
62
contrib/local-environment/docker-compose-gitea.yaml
Normal file
62
contrib/local-environment/docker-compose-gitea.yaml
Normal file
@@ -0,0 +1,62 @@
|
||||
# This docker-compose file can be used to bring up an example instance of oauth2-proxy
|
||||
# for manual testing and exploration of features.
|
||||
# Alongside OAuth2-Proxy, this file also starts Gitea to act as the identity provider,
|
||||
# HTTPBin as an example upstream.
|
||||
#
|
||||
# This can either be created using docker-compose
|
||||
# docker-compose -f docker-compose-gitea.yaml <command>
|
||||
# Or:
|
||||
# make gitea-<command> (eg. make gitea-up, make gitea-down)
|
||||
#
|
||||
# Access http://oauth2-proxy.localtest.me:4180 to initiate a login cycle using user=admin@example.com, password=password
|
||||
# Access http://gitea.localtest.me:3000 with the same credentials to check out the settings
|
||||
version: '3.0'
|
||||
services:
|
||||
oauth2-proxy:
|
||||
container_name: oauth2-proxy
|
||||
image: quay.io/oauth2-proxy/oauth2-proxy:v7.11.0
|
||||
command: --config /oauth2-proxy.cfg
|
||||
hostname: oauth2-proxy
|
||||
volumes:
|
||||
- "./oauth2-proxy-gitea.cfg:/oauth2-proxy.cfg"
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
gitea: {}
|
||||
httpbin: {}
|
||||
oauth2-proxy: {}
|
||||
depends_on:
|
||||
- httpbin
|
||||
- gitea
|
||||
ports:
|
||||
- 4180:4180/tcp
|
||||
|
||||
httpbin:
|
||||
container_name: httpbin
|
||||
image: kennethreitz/httpbin:latest
|
||||
hostname: httpbin
|
||||
ports: []
|
||||
networks:
|
||||
httpbin: {}
|
||||
|
||||
gitea:
|
||||
image: gitea/gitea:1.24.3
|
||||
container_name: gitea
|
||||
environment:
|
||||
- USER_UID=1000
|
||||
- USER_GID=1000
|
||||
restart: always
|
||||
networks:
|
||||
gitea:
|
||||
aliases:
|
||||
- gitea.localtest.me
|
||||
volumes:
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "222:22"
|
||||
|
||||
networks:
|
||||
httpbin: {}
|
||||
gitea: {}
|
||||
oauth2-proxy: {}
|
65
contrib/local-environment/docker-compose-keycloak.yaml
Normal file
65
contrib/local-environment/docker-compose-keycloak.yaml
Normal file
@@ -0,0 +1,65 @@
|
||||
# This docker-compose file can be used to bring up an example instance of oauth2-proxy
|
||||
# for manual testing and exploration of features.
|
||||
# Alongside OAuth2-Proxy, this file also starts Keycloak to act as the identity provider,
|
||||
# HTTPBin as an example upstream.
|
||||
#
|
||||
# This can either be created using docker-compose
|
||||
# docker-compose -f docker-compose-keycloak.yaml <command>
|
||||
# Or:
|
||||
# make keycloak-<command> (eg. make keycloak-up, make keycloak-down)
|
||||
#
|
||||
# Access http://oauth2-proxy.localtest.me:4180 to initiate a login cycle using user=admin@example.com, password=password
|
||||
# Access http://keycloak.localtest.me:9080 with the same credentials to check out the settings
|
||||
version: '3.0'
|
||||
services:
|
||||
oauth2-proxy:
|
||||
container_name: oauth2-proxy
|
||||
image: quay.io/oauth2-proxy/oauth2-proxy:v7.11.0
|
||||
command: --config /oauth2-proxy.cfg
|
||||
hostname: oauth2-proxy
|
||||
volumes:
|
||||
- "./oauth2-proxy-keycloak.cfg:/oauth2-proxy.cfg"
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 4180:4180/tcp
|
||||
networks:
|
||||
keycloak: {}
|
||||
httpbin: {}
|
||||
oauth2-proxy: {}
|
||||
depends_on:
|
||||
- httpbin
|
||||
- keycloak
|
||||
|
||||
httpbin:
|
||||
container_name: httpbin
|
||||
image: kennethreitz/httpbin:latest
|
||||
hostname: httpbin
|
||||
ports: []
|
||||
networks:
|
||||
httpbin: {}
|
||||
|
||||
keycloak:
|
||||
container_name: keycloak
|
||||
image: keycloak/keycloak:25.0
|
||||
hostname: keycloak
|
||||
command:
|
||||
- 'start-dev'
|
||||
- '--http-port=9080'
|
||||
- '--import-realm'
|
||||
volumes:
|
||||
- ./keycloak:/opt/keycloak/data/import
|
||||
environment:
|
||||
KC_HTTP_PORT: 9080
|
||||
KEYCLOAK_ADMIN: admin@example.com
|
||||
KEYCLOAK_ADMIN_PASSWORD: password
|
||||
ports:
|
||||
- 9080:9080/tcp
|
||||
networks:
|
||||
keycloak:
|
||||
aliases:
|
||||
- keycloak.localtest.me
|
||||
|
||||
networks:
|
||||
httpbin: {}
|
||||
keycloak: {}
|
||||
oauth2-proxy: {}
|
92
contrib/local-environment/docker-compose-nginx.yaml
Normal file
92
contrib/local-environment/docker-compose-nginx.yaml
Normal file
@@ -0,0 +1,92 @@
|
||||
# This docker-compose file can be used to bring up an example instance of oauth2-proxy
|
||||
# for manual testing and exploration of features.
|
||||
# Alongside OAuth2-Proxy, this file also starts Dex to act as the identity provider,
|
||||
# etcd for storage for Dex, nginx as a reverse proxy and other http services for upstreams
|
||||
#
|
||||
# This file is an extension of the main compose file and must be used with it
|
||||
# docker-compose -f docker-compose.yaml -f docker-compose-nginx.yaml <command>
|
||||
# Alternatively:
|
||||
# make nginx-<command> (eg make nginx-up, make nginx-down)
|
||||
#
|
||||
# Access one of the following URLs to initiate a login flow:
|
||||
# - http://oauth2-proxy.localhost
|
||||
# - http://httpbin.oauth2-proxy.localhost
|
||||
#
|
||||
# The OAuth2 Proxy itself is hosted at http://oauth2-proxy.oauth2-proxy.localhost
|
||||
#
|
||||
# Note, the above URLs should work with Chrome, but you may need to add hosts
|
||||
# entries for other browsers
|
||||
# 127.0.0.1 oauth2-proxy.localhost
|
||||
# 127.0.0.1 httpbin.oauth2-proxy.localhost
|
||||
# 127.0.0.1 oauth2-proxy.oauth2-proxy.localhost
|
||||
version: '3.0'
|
||||
services:
|
||||
oauth2-proxy:
|
||||
image: quay.io/oauth2-proxy/oauth2-proxy:v7.11.0
|
||||
ports: []
|
||||
hostname: oauth2-proxy
|
||||
container_name: oauth2-proxy
|
||||
command: --config /oauth2-proxy.cfg
|
||||
volumes:
|
||||
- "./oauth2-proxy-nginx.cfg:/oauth2-proxy.cfg"
|
||||
networks:
|
||||
oauth2-proxy: {}
|
||||
dex: {}
|
||||
etcd: {}
|
||||
httpbin: {}
|
||||
depends_on:
|
||||
- dex
|
||||
- httpbin
|
||||
nginx:
|
||||
depends_on:
|
||||
- oauth2-proxy
|
||||
container_name: nginx
|
||||
image: nginx:1.29
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 80:80/tcp
|
||||
hostname: nginx
|
||||
volumes:
|
||||
- "./nginx.conf:/etc/nginx/conf.d/default.conf"
|
||||
networks:
|
||||
oauth2-proxy: {}
|
||||
dex: {}
|
||||
etcd: {}
|
||||
httpbin: {}
|
||||
dex:
|
||||
container_name: dex
|
||||
image: ghcr.io/dexidp/dex:v2.43.1
|
||||
command: dex serve /dex.yaml
|
||||
hostname: dex
|
||||
volumes:
|
||||
- "./dex.yaml:/dex.yaml"
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 5556:4181/tcp
|
||||
networks:
|
||||
dex:
|
||||
aliases:
|
||||
- dex.localtest.me
|
||||
etcd: {}
|
||||
depends_on:
|
||||
- etcd
|
||||
httpbin:
|
||||
container_name: httpbin
|
||||
image: kennethreitz/httpbin
|
||||
ports: []
|
||||
networks:
|
||||
httpbin: {}
|
||||
etcd:
|
||||
container_name: etcd
|
||||
image: gcr.io/etcd-development/etcd:v3.6.2
|
||||
entrypoint: /usr/local/bin/etcd
|
||||
command:
|
||||
- --listen-client-urls=http://0.0.0.0:2379
|
||||
- --advertise-client-urls=http://etcd:2379
|
||||
networks:
|
||||
etcd: {}
|
||||
networks:
|
||||
dex: {}
|
||||
etcd: {}
|
||||
httpbin: {}
|
||||
oauth2-proxy: {}
|
50
contrib/local-environment/docker-compose-traefik.yaml
Normal file
50
contrib/local-environment/docker-compose-traefik.yaml
Normal file
@@ -0,0 +1,50 @@
|
||||
# This docker-compose file can be used to bring up an example instance of oauth2-proxy
|
||||
# for manual testing and exploration of features.
|
||||
# Alongside OAuth2-Proxy, this file also starts Dex to act as the identity provider,
|
||||
# HTTPBin as an example upstream.
|
||||
#
|
||||
# This can either be created using docker-compose
|
||||
# docker-compose -f docker-compose-traefik.yaml <command>
|
||||
# Or:
|
||||
# make traefik-<command> (eg. make traefik-up, make traefik-down)
|
||||
#
|
||||
# Access one of the following URLs to initiate a login flow:
|
||||
# - http://oauth2-proxy.localhost
|
||||
# - http://httpbin.oauth2-proxy.localhost
|
||||
#
|
||||
# The OAuth2 Proxy itself is hosted at http://oauth2-proxy.oauth2-proxy.localhost
|
||||
#
|
||||
# Note, the above URLs should work with Chrome, but you may need to add hosts
|
||||
# entries for other browsers
|
||||
# 127.0.0.1 oauth2-proxy.localhost
|
||||
# 127.0.0.1 httpbin.oauth2-proxy.localhost
|
||||
# 127.0.0.1 oauth2-proxy.oauth2-proxy.localhost
|
||||
version: '3.0'
|
||||
services:
|
||||
|
||||
oauth2-proxy:
|
||||
image: quay.io/oauth2-proxy/oauth2-proxy:v7.11.0
|
||||
ports: []
|
||||
hostname: oauth2-proxy
|
||||
volumes:
|
||||
- "./oauth2-proxy-traefik.cfg:/oauth2-proxy.cfg"
|
||||
networks:
|
||||
oauth2-proxy:
|
||||
|
||||
# Reverse proxy
|
||||
gateway:
|
||||
container_name: traefik
|
||||
image: traefik:v2.11.27
|
||||
volumes:
|
||||
- "./traefik:/etc/traefik"
|
||||
ports:
|
||||
- "80:80"
|
||||
- "9090:8080"
|
||||
depends_on:
|
||||
- oauth2-proxy
|
||||
networks:
|
||||
oauth2-proxy:
|
||||
httpbin:
|
||||
|
||||
networks:
|
||||
oauth2-proxy:
|
65
contrib/local-environment/docker-compose.yaml
Normal file
65
contrib/local-environment/docker-compose.yaml
Normal file
@@ -0,0 +1,65 @@
|
||||
# This docker-compose file can be used to bring up an example instance of oauth2-proxy
|
||||
# for manual testing and exploration of features.
|
||||
# Alongside OAuth2-Proxy, this file also starts Dex to act as the identity provider,
|
||||
# etcd for storage for Dex and HTTPBin as an example upstream.
|
||||
#
|
||||
# This can either be created using docker-compose
|
||||
# docker-compose -f docker-compose.yaml <command>
|
||||
# Or:
|
||||
# make <command> (eg. make up, make down)
|
||||
#
|
||||
# Access http://oauth2-proxy.localtest.me:4180 to initiate a login cycle
|
||||
version: '3.0'
|
||||
services:
|
||||
oauth2-proxy:
|
||||
container_name: oauth2-proxy
|
||||
image: quay.io/oauth2-proxy/oauth2-proxy:v7.11.0
|
||||
command: --config /oauth2-proxy.cfg
|
||||
hostname: oauth2-proxy
|
||||
volumes:
|
||||
- "./oauth2-proxy.cfg:/oauth2-proxy.cfg"
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 4180:4180/tcp
|
||||
networks:
|
||||
dex: {}
|
||||
httpbin: {}
|
||||
depends_on:
|
||||
- dex
|
||||
- httpbin
|
||||
dex:
|
||||
container_name: dex
|
||||
image: ghcr.io/dexidp/dex:v2.43.1
|
||||
command: dex serve /dex.yaml
|
||||
hostname: dex
|
||||
volumes:
|
||||
- "./dex.yaml:/dex.yaml"
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 5556:5556/tcp
|
||||
networks:
|
||||
dex:
|
||||
aliases:
|
||||
- dex.localtest.me
|
||||
etcd: {}
|
||||
depends_on:
|
||||
- etcd
|
||||
httpbin:
|
||||
container_name: httpbin
|
||||
image: kennethreitz/httpbin
|
||||
ports: []
|
||||
networks:
|
||||
httpbin: {}
|
||||
etcd:
|
||||
container_name: etcd
|
||||
image: gcr.io/etcd-development/etcd:v3.6.2
|
||||
entrypoint: /usr/local/bin/etcd
|
||||
command:
|
||||
- --listen-client-urls=http://0.0.0.0:2379
|
||||
- --advertise-client-urls=http://etcd:2379
|
||||
networks:
|
||||
etcd: {}
|
||||
networks:
|
||||
dex: {}
|
||||
etcd: {}
|
||||
httpbin: {}
|
2071
contrib/local-environment/keycloak/oauth2-proxy-realm.json
Normal file
2071
contrib/local-environment/keycloak/oauth2-proxy-realm.json
Normal file
File diff suppressed because it is too large
Load Diff
38
contrib/local-environment/keycloak/oauth2-proxy-users-0.json
Normal file
38
contrib/local-environment/keycloak/oauth2-proxy-users-0.json
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"realm": "oauth2-proxy",
|
||||
"users": [
|
||||
{
|
||||
"id": "3356c0a0-d4d5-4436-9c5a-2299c71c08ec",
|
||||
"createdTimestamp": 1591297959169,
|
||||
"username": "admin@example.com",
|
||||
"email": "admin@example.com",
|
||||
"enabled": true,
|
||||
"totp": false,
|
||||
"emailVerified": true,
|
||||
"credentials": [
|
||||
{
|
||||
"id": "a1a06ecd-fdc0-4e67-92cd-2da22d724e32",
|
||||
"type": "password",
|
||||
"createdDate": 1591297959315,
|
||||
"secretData": "{\"value\":\"6rt5zuqHVHopvd0FTFE0CYadXTtzY0mDY2BrqnNQGS51/7DfMJeGgj0roNnGMGvDv30imErNmiSOYl+cL9jiIA==\",\"salt\":\"LI0kqr09JB7J9wvr2Hxzzg==\"}",
|
||||
"credentialData": "{\"hashIterations\":27500,\"algorithm\":\"pbkdf2-sha256\"}"
|
||||
}
|
||||
],
|
||||
"disableableCredentialTypes": [],
|
||||
"requiredActions": [],
|
||||
"realmRoles": [
|
||||
"offline_access",
|
||||
"admin",
|
||||
"uma_authorization"
|
||||
],
|
||||
"clientRoles": {
|
||||
"account": [
|
||||
"view-profile",
|
||||
"manage-account"
|
||||
]
|
||||
},
|
||||
"notBefore": 0,
|
||||
"groups": []
|
||||
}
|
||||
]
|
||||
}
|
1
contrib/local-environment/kubernetes/.gitignore
vendored
Normal file
1
contrib/local-environment/kubernetes/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
charts/
|
15
contrib/local-environment/kubernetes/Chart.lock
Normal file
15
contrib/local-environment/kubernetes/Chart.lock
Normal file
@@ -0,0 +1,15 @@
|
||||
dependencies:
|
||||
- name: dex
|
||||
repository: https://charts.dexidp.io
|
||||
version: 0.23.0
|
||||
- name: oauth2-proxy
|
||||
repository: https://oauth2-proxy.github.io/manifests
|
||||
version: 7.14.1
|
||||
- name: httpbin
|
||||
repository: https://conservis.github.io/helm-charts
|
||||
version: 1.1.0
|
||||
- name: hello-world
|
||||
repository: https://conservis.github.io/helm-charts
|
||||
version: 1.1.0
|
||||
digest: sha256:9b18e072db6863053c2967d023929ab4b9c03b6bd84f6529d90fe7a9ec5e315f
|
||||
generated: "2025-07-20T08:56:43.559585022Z"
|
18
contrib/local-environment/kubernetes/Chart.yaml
Normal file
18
contrib/local-environment/kubernetes/Chart.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
apiVersion: v2
|
||||
description: K8S example based on https://kind.sigs.k8s.io
|
||||
name: kubernetes
|
||||
dependencies:
|
||||
- name: dex
|
||||
version: 0.23.0
|
||||
repository: https://charts.dexidp.io
|
||||
- name: oauth2-proxy
|
||||
version: &chartVersion 7.14.1
|
||||
repository: https://oauth2-proxy.github.io/manifests
|
||||
# https://github.com/postmanlabs/httpbin/issues/549 is still in progress, for now using a non-official chart
|
||||
- name: httpbin
|
||||
version: 1.1.0
|
||||
repository: https://conservis.github.io/helm-charts
|
||||
- name: hello-world
|
||||
version: 1.1.0
|
||||
repository: https://conservis.github.io/helm-charts
|
||||
version: *chartVersion
|
59
contrib/local-environment/kubernetes/Makefile
Normal file
59
contrib/local-environment/kubernetes/Makefile
Normal file
@@ -0,0 +1,59 @@
|
||||
all:
|
||||
@echo "Usage:"
|
||||
@echo " make create-cluster"
|
||||
@echo " make deploy"
|
||||
|
||||
# create kind cluster with nginx-ingress as the most popular ingress controller for K8S
|
||||
.PHONY: deploy
|
||||
create-cluster:
|
||||
kind create cluster --name oauth2-proxy --config kind-cluster.yaml
|
||||
make setup-dns
|
||||
make setup-ingress
|
||||
|
||||
.PHONY: setup-ingress
|
||||
setup-ingress:
|
||||
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/kind/deploy.yaml
|
||||
kubectl --namespace ingress-nginx rollout status --timeout 5m deployment/ingress-nginx-controller
|
||||
|
||||
# default Pod CIDR is 10.244.0.0/16 https://github.com/kubernetes-sigs/kind/blob/a6e8108025bc7a9440beedb8ef7714aec84fe87e/pkg/apis/config/v1alpha4/default.go#L52
|
||||
# what makes cluster host IP equal to 10.244.0.1
|
||||
# thus we add dex.localtest.me and oauth2-proxy.localtest.me stub hosts pointing to this IP
|
||||
# NOT NEEDED IN REAL LIFE!
|
||||
.PHONY: setup-dns
|
||||
setup-dns:
|
||||
kubectl apply -f custom-dns.yaml
|
||||
kubectl -n kube-system rollout restart deployment/coredns
|
||||
kubectl -n kube-system rollout status --timeout 5m deployment/coredns
|
||||
|
||||
.PHONY: delete-cluster
|
||||
delete-cluster:
|
||||
kind delete cluster --name oauth2-proxy
|
||||
|
||||
.PHONY: deploy
|
||||
deploy: helm-deploy
|
||||
kubectl rollout status --timeout 5m deployment/oauth2-proxy-example-oauth2-proxy-sample
|
||||
kubectl rollout status --timeout 1m deployment/oauth2-proxy-example-httpbin
|
||||
kubectl rollout status --timeout 1m deployment/oauth2-proxy-example-hello-world
|
||||
|
||||
.PHONY: undeploy
|
||||
undeploy: helm-undeploy
|
||||
|
||||
######################
|
||||
###### HELM CMDs #####
|
||||
######################
|
||||
.PHONY: helm-init
|
||||
helm-init:
|
||||
helm dep update
|
||||
|
||||
# unpacking is useful to be able to explore underlying helm charts
|
||||
.PHONY: helm-unpack
|
||||
helm-unpack:
|
||||
cd charts; for f in *.tgz; do tar -zxf "$$f"; done
|
||||
|
||||
.PHONY: helm-deploy
|
||||
helm-deploy: helm-init
|
||||
helm upgrade --wait --debug --install --render-subchart-notes oauth2-proxy-example .
|
||||
|
||||
.PHONY: helm-undeploy
|
||||
helm-undeploy:
|
||||
helm del oauth2-proxy-example
|
23
contrib/local-environment/kubernetes/README.md
Normal file
23
contrib/local-environment/kubernetes/README.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Kubernetes example
|
||||
Based on [kind](https://kind.sigs.k8s.io) as a local Kubernetes cluster.
|
||||
|
||||
## Quick start
|
||||
|
||||
Before you start:
|
||||
|
||||
_Required_
|
||||
* install [kind](https://kind.sigs.k8s.io/docs/user/quick-start/#installation)
|
||||
* install [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/)
|
||||
* install [helm](https://helm.sh/docs/intro/quickstart/#install-helm).
|
||||
|
||||
Then:
|
||||
|
||||
* `make create-cluster`
|
||||
* `make deploy`
|
||||
|
||||
Visit http://httpbin.localtest.me or http://hello-world.localtest.me/
|
||||
Note: When accessing the service for the first time you will need to authenticate with Dex. It is configured using static credentials for testing. With username `admin@example.com` and password set to `password`.
|
||||
|
||||
## Uninstall
|
||||
|
||||
* `make delete-cluster`
|
30
contrib/local-environment/kubernetes/custom-dns.yaml
Normal file
30
contrib/local-environment/kubernetes/custom-dns.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: coredns
|
||||
namespace: kube-system
|
||||
data:
|
||||
Corefile: |
|
||||
.:53 {
|
||||
errors
|
||||
health {
|
||||
lameduck 5s
|
||||
}
|
||||
ready
|
||||
kubernetes cluster.local in-addr.arpa ip6.arpa {
|
||||
pods insecure
|
||||
fallthrough in-addr.arpa ip6.arpa
|
||||
ttl 30
|
||||
}
|
||||
prometheus :9153
|
||||
forward . /etc/resolv.conf
|
||||
cache 30
|
||||
loop
|
||||
reload
|
||||
loadbalance
|
||||
hosts {
|
||||
10.244.0.1 dex.localtest.me
|
||||
10.244.0.1 oauth2-proxy.localtest.me
|
||||
fallthrough
|
||||
}
|
||||
}
|
17
contrib/local-environment/kubernetes/kind-cluster.yaml
Normal file
17
contrib/local-environment/kubernetes/kind-cluster.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
apiVersion: kind.x-k8s.io/v1alpha4
|
||||
kind: Cluster
|
||||
nodes:
|
||||
- role: control-plane
|
||||
kubeadmConfigPatches:
|
||||
- |
|
||||
kind: InitConfiguration
|
||||
nodeRegistration:
|
||||
kubeletExtraArgs:
|
||||
node-labels: "ingress-ready=true"
|
||||
extraPortMappings:
|
||||
- containerPort: 80
|
||||
hostPort: 80
|
||||
protocol: TCP
|
||||
- containerPort: 443
|
||||
hostPort: 443
|
||||
protocol: TCP
|
97
contrib/local-environment/kubernetes/values.yaml
Normal file
97
contrib/local-environment/kubernetes/values.yaml
Normal file
@@ -0,0 +1,97 @@
|
||||
dex:
|
||||
ingress:
|
||||
enabled: true
|
||||
hosts:
|
||||
- host: dex.localtest.me
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
grpc:
|
||||
enabled: false
|
||||
certs:
|
||||
grpc:
|
||||
create: false
|
||||
web:
|
||||
create: false
|
||||
|
||||
config:
|
||||
issuer: http://dex.localtest.me
|
||||
storage:
|
||||
type: kubernetes
|
||||
config:
|
||||
inCluster: true
|
||||
enablePasswordDB: true
|
||||
expiry:
|
||||
signingKeys: "4h"
|
||||
idTokens: "1h"
|
||||
staticClients:
|
||||
- id: oauth2-proxy
|
||||
redirectURIs:
|
||||
# These redirect URI points to the `--redirect-url` for OAuth2 proxy.
|
||||
- 'http://oauth2-proxy.localtest.me/oauth2/callback'
|
||||
name: 'OAuth2 Proxy'
|
||||
secret: "b2F1dGgyLXByb3h5LWNsaWVudC1zZWNyZXQK"
|
||||
staticPasswords:
|
||||
- email: "admin@example.com"
|
||||
# bcrypt hash of the string "password"
|
||||
hash: "$2a$10$2b2cU8CPhOTaGrs1HRQuAueS7JTT5ZHsHSzYiFPm1leZck7Mc8T4W"
|
||||
username: "admin"
|
||||
userID: "08a8684b-db88-4b73-90a9-3cd1661f5466"
|
||||
|
||||
oauth2-proxy:
|
||||
nameOverride: oauth2-proxy-sample
|
||||
ingress:
|
||||
enabled: true
|
||||
hosts:
|
||||
- oauth2-proxy.localtest.me
|
||||
# pick up client_id and client_secret from configFile as opposed to helm .Values.config.clientID and .Values.config.clientSecret
|
||||
proxyVarsAsSecrets: false
|
||||
config:
|
||||
configFile: |-
|
||||
cookie_secret="OQINaROshtE9TcZkNAm-5Zs2Pv3xaWytBmc5W7sPX7w="
|
||||
cookie_domains=".localtest.me"
|
||||
whitelist_domains=[".localtest.me"]
|
||||
# only users with this domain will be let in
|
||||
email_domains=["example.com"]
|
||||
|
||||
client_id="oauth2-proxy"
|
||||
client_secret="b2F1dGgyLXByb3h5LWNsaWVudC1zZWNyZXQK"
|
||||
cookie_secure="false"
|
||||
|
||||
redirect_url="http://oauth2-proxy.localtest.me/oauth2/callback"
|
||||
|
||||
# we don't want to proxy anything so pick a non-existent directory
|
||||
upstreams = [ "file:///dev/null" ]
|
||||
|
||||
# return authenticated user to nginx
|
||||
set_xauthrequest = true
|
||||
# using http://dex.localtest.me/.well-known/openid-configuration oauth2-proxy will populate
|
||||
# login_url, redeem_url, and oidc_jwks_url
|
||||
provider="oidc"
|
||||
oidc_issuer_url="http://dex.localtest.me"
|
||||
|
||||
httpbin:
|
||||
ingress:
|
||||
enabled: true
|
||||
hosts:
|
||||
- httpbin.localtest.me
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/auth-signin: http://oauth2-proxy.localtest.me/oauth2/start
|
||||
# That's what will be used in REAL LIFE
|
||||
#nginx.ingress.kubernetes.io/auth-url: http://oauth2-proxy.localtest.me/oauth2/auth
|
||||
# but because of https://github.com/kubernetes/ingress-nginx/issues/3665
|
||||
nginx.ingress.kubernetes.io/auth-url: http://oauth2-proxy-example-oauth2-proxy-sample.default.svc.cluster.local/oauth2/auth
|
||||
nginx.ingress.kubernetes.io/auth-response-headers: X-Auth-Request-User,X-Auth-Request-Email
|
||||
|
||||
hello-world:
|
||||
ingress:
|
||||
enabled: true
|
||||
hosts:
|
||||
- hello-world.localtest.me
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/auth-signin: http://oauth2-proxy.localtest.me/oauth2/start
|
||||
# That's what will be used in REAL LIFE
|
||||
#nginx.ingress.kubernetes.io/auth-url: http://oauth2-proxy.localtest.me/oauth2/auth
|
||||
# but because of https://github.com/kubernetes/ingress-nginx/issues/3665
|
||||
nginx.ingress.kubernetes.io/auth-url: http://oauth2-proxy-example-oauth2-proxy-sample.default.svc.cluster.local/oauth2/auth
|
||||
nginx.ingress.kubernetes.io/auth-response-headers: X-Auth-Request-User,X-Auth-Request-Email
|
86
contrib/local-environment/nginx.conf
Normal file
86
contrib/local-environment/nginx.conf
Normal file
@@ -0,0 +1,86 @@
|
||||
# Reverse proxy to oauth2-proxy
|
||||
server {
|
||||
listen 80;
|
||||
server_name oauth2-proxy.oauth2-proxy.localhost;
|
||||
|
||||
location / {
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
||||
proxy_pass http://oauth2-proxy:4180/;
|
||||
}
|
||||
}
|
||||
|
||||
# Reverse proxy to httpbin
|
||||
server {
|
||||
listen 80;
|
||||
server_name httpbin.oauth2-proxy.localhost;
|
||||
|
||||
auth_request /internal-auth/oauth2/auth;
|
||||
|
||||
# If the auth_request denies the request (401), redirect to the sign_in page
|
||||
# and include the final rd URL back to the user's original request.
|
||||
error_page 401 =403 http://oauth2-proxy.oauth2-proxy.localhost/oauth2/sign_in?rd=$scheme://$host$request_uri;
|
||||
|
||||
# Alternatively send the request to `start` to skip the provider button
|
||||
# error_page 401 = http://oauth2-proxy.oauth2-proxy.localhost/oauth2/start?rd=$scheme://$host$request_uri;
|
||||
|
||||
location / {
|
||||
proxy_pass http://httpbin/;
|
||||
}
|
||||
|
||||
# auth_request must be a URI so this allows an internal path to then proxy to
|
||||
# the real auth_request path.
|
||||
# The trailing /'s are required so that nginx strips the prefix before proxying.
|
||||
location /internal-auth/ {
|
||||
internal; # Ensure external users can't access this path
|
||||
|
||||
# Make sure the OAuth2 Proxy knows where the original request came from.
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-Uri $request_uri;
|
||||
|
||||
proxy_pass http://oauth2-proxy:4180/;
|
||||
}
|
||||
}
|
||||
|
||||
# Statically serve the nginx welcome
|
||||
server {
|
||||
listen 80;
|
||||
server_name oauth2-proxy.localhost;
|
||||
|
||||
location / {
|
||||
auth_request /internal-auth/oauth2/auth;
|
||||
|
||||
# If the auth_request denies the request (401), redirect to the sign_in page
|
||||
# and include the final rd URL back to the user's original request.
|
||||
error_page 401 =403 http://oauth2-proxy.oauth2-proxy.localhost/oauth2/sign_in?rd=$scheme://$host$request_uri;
|
||||
|
||||
# Alternatively send the request to `start` to skip the provider button
|
||||
# error_page 401 = http://oauth2-proxy.oauth2-proxy.localhost/oauth2/start?rd=$scheme://$host$request_uri;
|
||||
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
|
||||
# auth_request must be a URI so this allows an internal path to then proxy to
|
||||
# the real auth_request path.
|
||||
# The trailing /'s are required so that nginx strips the prefix before proxying.
|
||||
location /internal-auth/ {
|
||||
internal; # Ensure external users can't access this path
|
||||
|
||||
# Make sure the OAuth2 Proxy knows where the original request came from.
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-Uri $request_uri;
|
||||
|
||||
proxy_pass http://oauth2-proxy:4180/;
|
||||
}
|
||||
}
|
5
contrib/local-environment/oauth2-proxy-alpha-config.cfg
Normal file
5
contrib/local-environment/oauth2-proxy-alpha-config.cfg
Normal file
@@ -0,0 +1,5 @@
|
||||
http_address="0.0.0.0:4180"
|
||||
cookie_secret="OQINaROshtE9TcZkNAm-5Zs2Pv3xaWytBmc5W7sPX7w="
|
||||
email_domains="example.com"
|
||||
cookie_secure="false"
|
||||
redirect_url="http://localhost:4180/oauth2/callback"
|
23
contrib/local-environment/oauth2-proxy-alpha-config.yaml
Normal file
23
contrib/local-environment/oauth2-proxy-alpha-config.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
upstreams:
|
||||
- id: httpbin
|
||||
path: /
|
||||
uri: http://httpbin
|
||||
injectRequestHeaders:
|
||||
- name: X-Forwarded-Groups
|
||||
values:
|
||||
- claim: groups
|
||||
- name: X-Forwarded-User
|
||||
values:
|
||||
- claim: user
|
||||
- name: X-Forwarded-Email
|
||||
values:
|
||||
- claim: email
|
||||
- name: X-Forwarded-Preferred-Username
|
||||
values:
|
||||
- claim: preferred_username
|
||||
providers:
|
||||
- provider: oidc
|
||||
clientSecret: b2F1dGgyLXByb3h5LWNsaWVudC1zZWNyZXQK
|
||||
clientID: oauth2-proxy
|
||||
oidcConfig:
|
||||
issuerURL: http://dex.localhost:5556/dex
|
19
contrib/local-environment/oauth2-proxy-gitea.cfg
Normal file
19
contrib/local-environment/oauth2-proxy-gitea.cfg
Normal file
@@ -0,0 +1,19 @@
|
||||
http_address="0.0.0.0:4180"
|
||||
cookie_secret="OQINaROshtE9TcZkNAm-5Zs2Pv3xaWytBmc5W7sPX7w="
|
||||
email_domains=["localhost"]
|
||||
cookie_secure="false"
|
||||
upstreams="http://httpbin"
|
||||
cookie_domains=[".localtest.me"] # Required so cookie can be read on all subdomains.
|
||||
whitelist_domains=[".localtest.me"] # Required to allow redirection back to original requested target.
|
||||
|
||||
client_id="ef0c2b91-2e38-4fa8-908d-067a35dbb71c"
|
||||
client_secret="gto_qdppomn2p26su5x46tyixj7bcny5m5er2s67xhrponq2qtp66f3a"
|
||||
redirect_url="http://oauth2-proxy.localtest.me:4180/oauth2/callback"
|
||||
|
||||
# gitea provider
|
||||
provider="github"
|
||||
provider_display_name="Gitea"
|
||||
login_url="http://gitea.localtest.me:3000/login/oauth/authorize"
|
||||
redeem_url="http://gitea.localtest.me:3000/login/oauth/access_token"
|
||||
validate_url="http://gitea.localtest.me:3000/api/v1/user/emails"
|
||||
|
18
contrib/local-environment/oauth2-proxy-keycloak.cfg
Normal file
18
contrib/local-environment/oauth2-proxy-keycloak.cfg
Normal file
@@ -0,0 +1,18 @@
|
||||
http_address="0.0.0.0:4180"
|
||||
cookie_secret="OQINaROshtE9TcZkNAm-5Zs2Pv3xaWytBmc5W7sPX7w="
|
||||
email_domains="example.com"
|
||||
cookie_secure="false"
|
||||
upstreams="http://httpbin"
|
||||
cookie_domains=["oauth2-proxy.localtest.me:4080", "keycloak.localtest.me:9080"] # Required so cookie can be read on all subdomains.
|
||||
whitelist_domains=[".localtest.me"] # Required to allow redirection back to original requested target.
|
||||
|
||||
# keycloak provider
|
||||
client_secret="72341b6d-7065-4518-a0e4-50ee15025608"
|
||||
client_id="oauth2-proxy"
|
||||
redirect_url="http://oauth2-proxy.localtest.me:4180/oauth2/callback"
|
||||
|
||||
# in this case oauth2-proxy is going to visit
|
||||
# http://keycloak.localtest.me:9080/realms/oauth2-proxy/.well-known/openid-configuration for configuration
|
||||
oidc_issuer_url="http://keycloak.localtest.me:9080/realms/oauth2-proxy"
|
||||
provider="oidc"
|
||||
provider_display_name="Keycloak"
|
14
contrib/local-environment/oauth2-proxy-nginx.cfg
Normal file
14
contrib/local-environment/oauth2-proxy-nginx.cfg
Normal file
@@ -0,0 +1,14 @@
|
||||
http_address="0.0.0.0:4180"
|
||||
cookie_secret="OQINaROshtE9TcZkNAm-5Zs2Pv3xaWytBmc5W7sPX7w="
|
||||
provider="oidc"
|
||||
email_domains="example.com"
|
||||
oidc_issuer_url="http://dex.localtest.me:5556/dex"
|
||||
client_secret="b2F1dGgyLXByb3h5LWNsaWVudC1zZWNyZXQK"
|
||||
client_id="oauth2-proxy"
|
||||
cookie_secure="false"
|
||||
|
||||
redirect_url="http://oauth2-proxy.oauth2-proxy.localhost/oauth2/callback"
|
||||
cookie_domains=".oauth2-proxy.localhost" # Required so cookie can be read on all subdomains.
|
||||
whitelist_domains=".oauth2-proxy.localhost" # Required to allow redirection back to original requested target.
|
||||
# Enables the use of `X-Forwarded-*` headers to determine request correctly
|
||||
reverse_proxy="true"
|
22
contrib/local-environment/oauth2-proxy-traefik.cfg
Normal file
22
contrib/local-environment/oauth2-proxy-traefik.cfg
Normal file
@@ -0,0 +1,22 @@
|
||||
http_address="0.0.0.0:4180"
|
||||
cookie_secret="OQINaROshtE9TcZkNAm-5Zs2Pv3xaWytBmc5W7sPX7w="
|
||||
provider="oidc"
|
||||
email_domains=["example.com"]
|
||||
oidc_issuer_url="http://dex.localhost:5556/dex"
|
||||
client_secret="b2F1dGgyLXByb3h5LWNsaWVudC1zZWNyZXQK"
|
||||
client_id="oauth2-proxy"
|
||||
cookie_secure="false"
|
||||
|
||||
redirect_url="http://oauth2-proxy.oauth2-proxy.localhost/oauth2/callback"
|
||||
cookie_domains=".oauth2-proxy.localhost" # Required so cookie can be read on all subdomains.
|
||||
whitelist_domains=".oauth2-proxy.localhost" # Required to allow redirection back to original requested target.
|
||||
|
||||
# Mandatory option when using oauth2-proxy with traefik
|
||||
reverse_proxy="true"
|
||||
# Required for traefik with ForwardAuth and static upstream configuration
|
||||
upstreams="static://202"
|
||||
# The following option skip the page requesting the user
|
||||
# to click on a button to be redirected to the identity provider
|
||||
# It can be activated only when traefik is not configure with
|
||||
# the error redirection middleware as this example.
|
||||
skip_provider_button="true"
|
16
contrib/local-environment/oauth2-proxy.cfg
Normal file
16
contrib/local-environment/oauth2-proxy.cfg
Normal file
@@ -0,0 +1,16 @@
|
||||
http_address="0.0.0.0:4180"
|
||||
cookie_secret="OQINaROshtE9TcZkNAm-5Zs2Pv3xaWytBmc5W7sPX7w="
|
||||
email_domains="example.com"
|
||||
cookie_secure="false"
|
||||
upstreams="http://httpbin"
|
||||
cookie_domains=[".localtest.me"] # Required so cookie can be read on all subdomains.
|
||||
whitelist_domains=[".localtest.me"] # Required to allow redirection back to original requested target.
|
||||
|
||||
# dex provider
|
||||
client_secret="b2F1dGgyLXByb3h5LWNsaWVudC1zZWNyZXQK"
|
||||
client_id="oauth2-proxy"
|
||||
redirect_url="http://oauth2-proxy.localtest.me:4180/oauth2/callback"
|
||||
|
||||
oidc_issuer_url="http://dex.localtest.me:5556/dex"
|
||||
provider="oidc"
|
||||
provider_display_name="Dex"
|
57
contrib/local-environment/traefik/dynamic.yaml
Normal file
57
contrib/local-environment/traefik/dynamic.yaml
Normal file
@@ -0,0 +1,57 @@
|
||||
http:
|
||||
routers:
|
||||
oauth2-proxy-route:
|
||||
rule: "Host(`oauth2-proxy.oauth2-proxy.localhost`)"
|
||||
middlewares:
|
||||
- auth-headers
|
||||
service: oauth-backend
|
||||
httpbin-route:
|
||||
rule: "Host(`httpbin.oauth2-proxy.localhost`)"
|
||||
service: httpbin-service
|
||||
middlewares:
|
||||
- oauth-auth-redirect # redirects all unauthenticated to oauth2 signin
|
||||
httpbin-route-2:
|
||||
rule: "Host(`httpbin.oauth2-proxy.localhost`) && PathPrefix(`/no-auto-redirect`)"
|
||||
service: httpbin-service
|
||||
middlewares:
|
||||
- oauth-auth-wo-redirect # unauthenticated session will return a 401
|
||||
services-oauth2-route:
|
||||
rule: "Host(`httpbin.oauth2-proxy.localhost`) && PathPrefix(`/oauth2/`)"
|
||||
middlewares:
|
||||
- auth-headers
|
||||
service: oauth-backend
|
||||
|
||||
services:
|
||||
httpbin-service:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: http://httpbin
|
||||
oauth-backend:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: http://oauth2-proxy:4180
|
||||
|
||||
middlewares:
|
||||
auth-headers:
|
||||
headers:
|
||||
stsSeconds: 315360000
|
||||
browserXssFilter: true
|
||||
contentTypeNosniff: true
|
||||
forceSTSHeader: true
|
||||
stsIncludeSubdomains: true
|
||||
stsPreload: true
|
||||
frameDeny: true
|
||||
oauth-auth-redirect:
|
||||
forwardAuth:
|
||||
address: http://oauth2-proxy:4180
|
||||
trustForwardHeader: true
|
||||
authResponseHeaders:
|
||||
- X-Auth-Request-Access-Token
|
||||
- Authorization
|
||||
oauth-auth-wo-redirect:
|
||||
forwardAuth:
|
||||
address: http://oauth2-proxy:4180/oauth2/auth
|
||||
trustForwardHeader: true
|
||||
authResponseHeaders:
|
||||
- X-Auth-Request-Access-Token
|
||||
- Authorization
|
7
contrib/local-environment/traefik/traefik.yaml
Normal file
7
contrib/local-environment/traefik/traefik.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
api:
|
||||
insecure: true
|
||||
log:
|
||||
level: INFO
|
||||
providers:
|
||||
file:
|
||||
filename: /etc/traefik/dynamic.yaml
|
108
contrib/oauth2-proxy.cfg.example
Normal file
108
contrib/oauth2-proxy.cfg.example
Normal file
@@ -0,0 +1,108 @@
|
||||
## OAuth2 Proxy Config File
|
||||
## https://github.com/oauth2-proxy/oauth2-proxy
|
||||
|
||||
## <addr>:<port> to listen on for HTTP/HTTPS clients
|
||||
# http_address = "127.0.0.1:4180"
|
||||
# https_address = ":443"
|
||||
|
||||
## Are we running behind a reverse proxy? Will not accept headers like X-Real-Ip unless this is set.
|
||||
# reverse_proxy = true
|
||||
|
||||
## TLS Settings
|
||||
# tls_cert_file = ""
|
||||
# tls_key_file = ""
|
||||
|
||||
## the OAuth Redirect URL.
|
||||
# defaults to the "https://" + requested host header + "/oauth2/callback"
|
||||
# redirect_url = "https://internalapp.yourcompany.com/oauth2/callback"
|
||||
|
||||
## the http url(s) of the upstream endpoint. If multiple, routing is based on path
|
||||
# upstreams = [
|
||||
# "http://127.0.0.1:8080/"
|
||||
# ]
|
||||
|
||||
## Logging configuration
|
||||
#logging_filename = ""
|
||||
#logging_max_size = 100
|
||||
#logging_max_age = 7
|
||||
#logging_local_time = true
|
||||
#logging_compress = false
|
||||
#standard_logging = true
|
||||
#standard_logging_format = "[{{.Timestamp}}] [{{.File}}] {{.Message}}"
|
||||
#request_logging = true
|
||||
#request_logging_format = "{{.Client}} - {{.Username}} [{{.Timestamp}}] {{.Host}} {{.RequestMethod}} {{.Upstream}} {{.RequestURI}} {{.Protocol}} {{.UserAgent}} {{.StatusCode}} {{.ResponseSize}} {{.RequestDuration}}"
|
||||
#auth_logging = true
|
||||
#auth_logging_format = "{{.Client}} - {{.Username}} [{{.Timestamp}}] [{{.Status}}] {{.Message}}"
|
||||
|
||||
## pass HTTP Basic Auth, X-Forwarded-User and X-Forwarded-Email information to upstream
|
||||
# pass_basic_auth = true
|
||||
# pass_user_headers = true
|
||||
## pass the request Host Header to upstream
|
||||
## when disabled the upstream Host is used as the Host Header
|
||||
# pass_host_header = true
|
||||
|
||||
## Email Domains to allow authentication for (this authorizes any email on this domain)
|
||||
## for more granular authorization use `authenticated_emails_file`
|
||||
## To authorize any email addresses use "*"
|
||||
# email_domains = [
|
||||
# "yourcompany.com"
|
||||
# ]
|
||||
|
||||
## The OAuth Client ID, Secret
|
||||
# client_id = "123456.apps.googleusercontent.com"
|
||||
# client_secret = ""
|
||||
|
||||
## Scopes Added to the request
|
||||
## It has the same behavior as the --scope flag
|
||||
# scope = "openid email profile"
|
||||
|
||||
## Pass OAuth Access token to upstream via "X-Forwarded-Access-Token"
|
||||
# pass_access_token = false
|
||||
|
||||
## Authenticated Email Addresses File (one email per line)
|
||||
# authenticated_emails_file = ""
|
||||
|
||||
## Htpasswd File (optional)
|
||||
## Additionally authenticate against a htpasswd file. Entries must be created with "htpasswd -B" for bcrypt encryption
|
||||
## enabling exposes a username/login signin form
|
||||
# htpasswd_file = ""
|
||||
|
||||
## bypass authentication for requests that match the method & path. Format: method=path_regex OR path_regex alone for all methods
|
||||
# skip_auth_routes = [
|
||||
# "GET=^/probe",
|
||||
# "^/metrics"
|
||||
# ]
|
||||
|
||||
## mark paths as API routes to get HTTP Status code 401 instead of redirect to login page
|
||||
# api_routes = [
|
||||
# "^/api"
|
||||
# ]
|
||||
|
||||
## Templates
|
||||
## optional directory with custom sign_in.html and error.html
|
||||
# custom_templates_dir = ""
|
||||
|
||||
## skip SSL checking for HTTPS requests
|
||||
# ssl_insecure_skip_verify = false
|
||||
|
||||
|
||||
## Cookie Settings
|
||||
## Name - the cookie name
|
||||
## Secret - the seed string for secure cookies; should be 16, 24, or 32 bytes
|
||||
## for use with an AES cipher when cookie_refresh or pass_access_token
|
||||
## is set
|
||||
## Domain - (optional) cookie domain to force cookies to (ie: .yourcompany.com)
|
||||
## Expire - (duration) expire timeframe for cookie
|
||||
## Refresh - (duration) refresh the cookie when duration has elapsed after cookie was initially set.
|
||||
## Should be less than cookie_expire; set to 0 to disable.
|
||||
## On refresh, OAuth token is re-validated.
|
||||
## (ie: 1h means tokens are refreshed on request 1hr+ after it was set)
|
||||
## Secure - secure cookies are only sent by the browser of a HTTPS connection (recommended)
|
||||
## HttpOnly - httponly cookies are not readable by javascript (recommended)
|
||||
# cookie_name = "_oauth2_proxy"
|
||||
# cookie_secret = ""
|
||||
# cookie_domains = ""
|
||||
# cookie_expire = "168h"
|
||||
# cookie_refresh = ""
|
||||
# cookie_secure = true
|
||||
# cookie_httponly = true
|
33
contrib/oauth2-proxy.service.example
Normal file
33
contrib/oauth2-proxy.service.example
Normal file
@@ -0,0 +1,33 @@
|
||||
[Unit]
|
||||
Description=oauth2-proxy daemon service
|
||||
After=network.target network-online.target nss-lookup.target basic.target
|
||||
Wants=network-online.target nss-lookup.target
|
||||
StartLimitIntervalSec=30
|
||||
StartLimitBurst=3
|
||||
|
||||
[Service]
|
||||
User=oauth2-proxy
|
||||
Group=oauth2-proxy
|
||||
Restart=on-failure
|
||||
RestartSec=30
|
||||
WorkingDirectory=/etc/oauth2-proxy
|
||||
ExecStart=/usr/bin/oauth2-proxy --config=/etc/oauth2-proxy/oauth2-proxy.cfg
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
LimitNOFILE=65535
|
||||
NoNewPrivileges=true
|
||||
ProtectHome=true
|
||||
ProtectSystem=full
|
||||
ProtectHostname=true
|
||||
ProtectControlGroups=true
|
||||
ProtectKernelModules=true
|
||||
ProtectKernelTunables=true
|
||||
LockPersonality=true
|
||||
RestrictRealtime=yes
|
||||
RestrictNamespaces=yes
|
||||
MemoryDenyWriteExecute=yes
|
||||
PrivateDevices=yes
|
||||
PrivateTmp=true
|
||||
CapabilityBoundingSet=
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
34
contrib/oauth2-proxy_autocomplete.sh
Normal file
34
contrib/oauth2-proxy_autocomplete.sh
Normal file
@@ -0,0 +1,34 @@
|
||||
#
|
||||
# Autocompletion for oauth2-proxy
|
||||
#
|
||||
# To install this, copy/move this file to /etc/bash.completion.d/
|
||||
# or add a line to your ~/.bashrc | ~/.bash_profile that says ". /path/to/oauth2-proxy/contrib/oauth2-proxy_autocomplete.sh"
|
||||
#
|
||||
|
||||
_oauth2_proxy() {
|
||||
_oauth2_proxy_commands=$(oauth2-proxy -h 2>&1 | sed -n '/^\s*--/s/ \+/ /gp' | awk '{print $1}' | tr '\n' ' ')
|
||||
local cur prev
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case "$prev" in
|
||||
--@(config|tls-cert-file|tls-key-file|authenticated-emails-file|htpasswd-file|custom-templates-dir|logging-filename|jwt-key-file))
|
||||
_filedir
|
||||
return 0
|
||||
;;
|
||||
--provider)
|
||||
COMPREPLY=( $(compgen -W "google azure facebook github keycloak gitlab linkedin login.gov digitalocean" -- ${cur}) )
|
||||
return 0
|
||||
;;
|
||||
--real-client-ip-header)
|
||||
COMPREPLY=( $(compgen -W 'X-Real-IP X-Forwarded-For X-ProxyUser-IP' -- ${cur}) )
|
||||
return 0
|
||||
;;
|
||||
--@(http-address|https-address|redirect-url|upstream|basic-auth-password|skip-auth-regex|flush-interval|extra-jwt-issuers|email-domain|whitelist-domain|trusted-ip|keycloak-group|azure-tenant|bitbucket-team|bitbucket-repository|github-org|github-team|github-repo|github-token|gitlab-group|github-user|google-group|google-admin-email|google-service-account-json|client-id|client_secret|banner|footer|proxy-prefix|ping-path|ready-path|cookie-name|cookie-secret|cookie-domain|cookie-path|cookie-expire|cookie-refresh|cookie-samesite|redist-sentinel-master-name|redist-sentinel-connection-urls|redist-cluster-connection-urls|logging-max-size|logging-max-age|logging-max-backups|standard-logging-format|request-logging-format|exclude-logging-paths|auth-logging-format|oidc-issuer-url|oidc-jwks-url|login-url|redeem-url|profile-url|resource|validate-url|scope|approval-prompt|signature-key|acr-values|jwt-key|pubjwk-url|force-json-errors))
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${_oauth2_proxy_commands}" -- ${cur}) )
|
||||
return 0;
|
||||
}
|
||||
complete -F _oauth2_proxy oauth2-proxy
|
@@ -1,74 +0,0 @@
|
||||
## OAuth2 Proxy Config File
|
||||
## https://github.com/bitly/oauth2_proxy
|
||||
|
||||
## <addr>:<port> to listen on for HTTP/HTTPS clients
|
||||
# http_address = "127.0.0.1:4180"
|
||||
# https_address = ":443"
|
||||
|
||||
## TLS Settings
|
||||
# tls_cert_file = ""
|
||||
# tls_key_file = ""
|
||||
|
||||
## the OAuth Redirect URL.
|
||||
# defaults to the "https://" + requested host header + "/oauth2/callback"
|
||||
# redirect_url = "https://internalapp.yourcompany.com/oauth2/callback"
|
||||
|
||||
## the http url(s) of the upstream endpoint. If multiple, routing is based on path
|
||||
# upstreams = [
|
||||
# "http://127.0.0.1:8080/"
|
||||
# ]
|
||||
|
||||
## Log requests to stdout
|
||||
# request_logging = true
|
||||
|
||||
## pass HTTP Basic Auth, X-Forwarded-User and X-Forwarded-Email information to upstream
|
||||
# pass_basic_auth = true
|
||||
## pass the request Host Header to upstream
|
||||
## when disabled the upstream Host is used as the Host Header
|
||||
# pass_host_header = true
|
||||
|
||||
## Email Domains to allow authentication for (this authorizes any email on this domain)
|
||||
## for more granular authorization use `authenticated_emails_file`
|
||||
## To authorize any email addresses use "*"
|
||||
# email_domains = [
|
||||
# "yourcompany.com"
|
||||
# ]
|
||||
|
||||
## The OAuth Client ID, Secret
|
||||
# client_id = "123456.apps.googleusercontent.com"
|
||||
# client_secret = ""
|
||||
|
||||
## Pass OAuth Access token to upstream via "X-Forwarded-Access-Token"
|
||||
# pass_access_token = false
|
||||
|
||||
## Authenticated Email Addresses File (one email per line)
|
||||
# authenticated_emails_file = ""
|
||||
|
||||
## Htpasswd File (optional)
|
||||
## Additionally authenticate against a htpasswd file. Entries must be created with "htpasswd -s" for SHA encryption
|
||||
## enabling exposes a username/login signin form
|
||||
# htpasswd_file = ""
|
||||
|
||||
## Templates
|
||||
## optional directory with custom sign_in.html and error.html
|
||||
# custom_templates_dir = ""
|
||||
|
||||
## Cookie Settings
|
||||
## Name - the cookie name
|
||||
## Secret - the seed string for secure cookies; should be 16, 24, or 32 bytes
|
||||
## for use with an AES cipher when cookie_refresh or pass_access_token
|
||||
## is set
|
||||
## Domain - (optional) cookie domain to force cookies to (ie: .yourcompany.com)
|
||||
## Expire - (duration) expire timeframe for cookie
|
||||
## Refresh - (duration) refresh the cookie when less than this much time remains before
|
||||
## expiration; should be less than cookie_expire; set to 0 to disable.
|
||||
## Refresh revalidated the OAuth token to ensure it is still valid. ie: 24h
|
||||
## Secure - secure cookies are only sent by the browser of a HTTPS connection (recommended)
|
||||
## HttpOnly - httponly cookies are not readable by javascript (recommended)
|
||||
# cookie_name = "_oauth2_proxy"
|
||||
# cookie_secret = ""
|
||||
# cookie_domain = ""
|
||||
# cookie_expire = "168h"
|
||||
# cookie_refresh = ""
|
||||
# cookie_secure = true
|
||||
# cookie_httponly = true
|
130
cookies.go
130
cookies.go
@@ -1,130 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"crypto/aes"
|
||||
"crypto/cipher"
|
||||
"crypto/hmac"
|
||||
"crypto/rand"
|
||||
"crypto/sha1"
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
func validateCookie(cookie *http.Cookie, seed string) (string, time.Time, bool) {
|
||||
// value, timestamp, sig
|
||||
parts := strings.Split(cookie.Value, "|")
|
||||
if len(parts) != 3 {
|
||||
return "", time.Unix(0, 0), false
|
||||
}
|
||||
sig := cookieSignature(seed, cookie.Name, parts[0], parts[1])
|
||||
if checkHmac(parts[2], sig) {
|
||||
ts, err := strconv.Atoi(parts[1])
|
||||
if err == nil && int64(ts) > time.Now().Add(time.Duration(24)*7*time.Hour*-1).Unix() {
|
||||
// it's a valid cookie. now get the contents
|
||||
rawValue, err := base64.URLEncoding.DecodeString(parts[0])
|
||||
if err == nil {
|
||||
return string(rawValue), time.Unix(int64(ts), 0), true
|
||||
}
|
||||
}
|
||||
}
|
||||
return "", time.Unix(0, 0), false
|
||||
}
|
||||
|
||||
func signedCookieValue(seed string, key string, value string) string {
|
||||
encodedValue := base64.URLEncoding.EncodeToString([]byte(value))
|
||||
timeStr := fmt.Sprintf("%d", time.Now().Unix())
|
||||
sig := cookieSignature(seed, key, encodedValue, timeStr)
|
||||
cookieVal := fmt.Sprintf("%s|%s|%s", encodedValue, timeStr, sig)
|
||||
return cookieVal
|
||||
}
|
||||
|
||||
func cookieSignature(args ...string) string {
|
||||
h := hmac.New(sha1.New, []byte(args[0]))
|
||||
for _, arg := range args[1:] {
|
||||
h.Write([]byte(arg))
|
||||
}
|
||||
var b []byte
|
||||
b = h.Sum(b)
|
||||
return base64.URLEncoding.EncodeToString(b)
|
||||
}
|
||||
|
||||
func checkHmac(input, expected string) bool {
|
||||
inputMAC, err1 := base64.URLEncoding.DecodeString(input)
|
||||
if err1 == nil {
|
||||
expectedMAC, err2 := base64.URLEncoding.DecodeString(expected)
|
||||
if err2 == nil {
|
||||
return hmac.Equal(inputMAC, expectedMAC)
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func encodeAccessToken(aes_cipher cipher.Block, access_token string) (string, error) {
|
||||
ciphertext := make([]byte, aes.BlockSize+len(access_token))
|
||||
iv := ciphertext[:aes.BlockSize]
|
||||
if _, err := io.ReadFull(rand.Reader, iv); err != nil {
|
||||
return "", fmt.Errorf("failed to create access code initialization vector")
|
||||
}
|
||||
|
||||
stream := cipher.NewCFBEncrypter(aes_cipher, iv)
|
||||
stream.XORKeyStream(ciphertext[aes.BlockSize:], []byte(access_token))
|
||||
return base64.StdEncoding.EncodeToString(ciphertext), nil
|
||||
}
|
||||
|
||||
func decodeAccessToken(aes_cipher cipher.Block, encoded_access_token string) (string, error) {
|
||||
encrypted_access_token, err := base64.StdEncoding.DecodeString(
|
||||
encoded_access_token)
|
||||
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("failed to decode access token")
|
||||
}
|
||||
|
||||
if len(encrypted_access_token) < aes.BlockSize {
|
||||
return "", fmt.Errorf("encrypted access token should be "+
|
||||
"at least %d bytes, but is only %d bytes",
|
||||
aes.BlockSize, len(encrypted_access_token))
|
||||
}
|
||||
|
||||
iv := encrypted_access_token[:aes.BlockSize]
|
||||
encrypted_access_token = encrypted_access_token[aes.BlockSize:]
|
||||
stream := cipher.NewCFBDecrypter(aes_cipher, iv)
|
||||
stream.XORKeyStream(encrypted_access_token, encrypted_access_token)
|
||||
|
||||
return string(encrypted_access_token), nil
|
||||
}
|
||||
|
||||
func buildCookieValue(email string, aes_cipher cipher.Block,
|
||||
access_token string) (string, error) {
|
||||
if aes_cipher == nil {
|
||||
return email, nil
|
||||
}
|
||||
|
||||
encoded_token, err := encodeAccessToken(aes_cipher, access_token)
|
||||
if err != nil {
|
||||
return email, fmt.Errorf(
|
||||
"error encoding access token for %s: %s", email, err)
|
||||
}
|
||||
return email + "|" + encoded_token, nil
|
||||
}
|
||||
|
||||
func parseCookieValue(value string, aes_cipher cipher.Block) (email, user,
|
||||
access_token string, err error) {
|
||||
components := strings.Split(value, "|")
|
||||
email = components[0]
|
||||
user = strings.Split(email, "@")[0]
|
||||
|
||||
if aes_cipher != nil && len(components) == 2 {
|
||||
access_token, err = decodeAccessToken(aes_cipher, components[1])
|
||||
if err != nil {
|
||||
err = fmt.Errorf(
|
||||
"error decoding access token for %s: %s",
|
||||
email, err)
|
||||
}
|
||||
}
|
||||
return email, user, access_token, err
|
||||
}
|
@@ -1,75 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"crypto/aes"
|
||||
"github.com/bmizerany/assert"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestEncodeAndDecodeAccessToken(t *testing.T) {
|
||||
const key = "0123456789abcdefghijklmnopqrstuv"
|
||||
const access_token = "my access token"
|
||||
c, err := aes.NewCipher([]byte(key))
|
||||
assert.Equal(t, nil, err)
|
||||
|
||||
encoded_token, err := encodeAccessToken(c, access_token)
|
||||
assert.Equal(t, nil, err)
|
||||
|
||||
decoded_token, err := decodeAccessToken(c, encoded_token)
|
||||
assert.Equal(t, nil, err)
|
||||
|
||||
assert.NotEqual(t, access_token, encoded_token)
|
||||
assert.Equal(t, access_token, decoded_token)
|
||||
}
|
||||
|
||||
func TestBuildCookieValueWithoutAccessToken(t *testing.T) {
|
||||
value, err := buildCookieValue("michael.bland@gsa.gov", nil, "")
|
||||
assert.Equal(t, nil, err)
|
||||
assert.Equal(t, "michael.bland@gsa.gov", value)
|
||||
}
|
||||
|
||||
func TestBuildCookieValueWithAccessTokenAndNilCipher(t *testing.T) {
|
||||
value, err := buildCookieValue("michael.bland@gsa.gov", nil,
|
||||
"access token")
|
||||
assert.Equal(t, nil, err)
|
||||
assert.Equal(t, "michael.bland@gsa.gov", value)
|
||||
}
|
||||
|
||||
func TestParseCookieValueWithoutAccessToken(t *testing.T) {
|
||||
email, user, access_token, err := parseCookieValue(
|
||||
"michael.bland@gsa.gov", nil)
|
||||
assert.Equal(t, nil, err)
|
||||
assert.Equal(t, "michael.bland@gsa.gov", email)
|
||||
assert.Equal(t, "michael.bland", user)
|
||||
assert.Equal(t, "", access_token)
|
||||
}
|
||||
|
||||
func TestParseCookieValueWithAccessTokenAndNilCipher(t *testing.T) {
|
||||
email, user, access_token, err := parseCookieValue(
|
||||
"michael.bland@gsa.gov|access_token", nil)
|
||||
assert.Equal(t, nil, err)
|
||||
assert.Equal(t, "michael.bland@gsa.gov", email)
|
||||
assert.Equal(t, "michael.bland", user)
|
||||
assert.Equal(t, "", access_token)
|
||||
}
|
||||
|
||||
func TestBuildAndParseCookieValueWithAccessToken(t *testing.T) {
|
||||
aes_cipher, err := aes.NewCipher([]byte("0123456789abcdef"))
|
||||
assert.Equal(t, nil, err)
|
||||
value, err := buildCookieValue("michael.bland@gsa.gov", aes_cipher,
|
||||
"access_token")
|
||||
assert.Equal(t, nil, err)
|
||||
|
||||
prefix := "michael.bland@gsa.gov|"
|
||||
if !strings.HasPrefix(value, prefix) {
|
||||
t.Fatal("cookie value does not start with \"%s\": %s",
|
||||
prefix, value)
|
||||
}
|
||||
|
||||
email, user, access_token, err := parseCookieValue(value, aes_cipher)
|
||||
assert.Equal(t, nil, err)
|
||||
assert.Equal(t, "michael.bland@gsa.gov", email)
|
||||
assert.Equal(t, "michael.bland", user)
|
||||
assert.Equal(t, "access_token", access_token)
|
||||
}
|
75
dist.sh
75
dist.sh
@@ -1,30 +1,57 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# build binary distributions for linux/amd64 and darwin/amd64
|
||||
set -e
|
||||
set -o errexit
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
echo "working dir $DIR"
|
||||
mkdir -p $DIR/dist
|
||||
mkdir -p $DIR/.godeps
|
||||
export GOPATH=$DIR/.godeps:$GOPATH
|
||||
gpm install
|
||||
if [[ -z ${BINARY} ]] || [[ -z ${VERSION} ]]; then
|
||||
echo "Missing required env var: BINARY=X VERSION=X $(basename $0)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
os=$(go env GOOS)
|
||||
arch=$(go env GOARCH)
|
||||
version=$(cat $DIR/version.go | grep "const VERSION" | awk '{print $NF}' | sed 's/"//g')
|
||||
goversion=$(go version | awk '{print $3}')
|
||||
ARCHS=(
|
||||
darwin-amd64
|
||||
darwin-arm64
|
||||
linux-amd64
|
||||
linux-arm64
|
||||
linux-armv5
|
||||
linux-armv6
|
||||
linux-armv7
|
||||
linux-ppc64le
|
||||
linux-s390x
|
||||
freebsd-amd64
|
||||
windows-amd64
|
||||
)
|
||||
|
||||
echo "... running tests"
|
||||
./test.sh || exit 1
|
||||
mkdir -p release
|
||||
|
||||
for os in windows linux darwin; do
|
||||
echo "... building v$version for $os/$arch"
|
||||
BUILD=$(mktemp -d -t oauth2_proxy)
|
||||
TARGET="oauth2_proxy-$version.$os-$arch.$goversion"
|
||||
GOOS=$os GOARCH=$arch CGO_ENABLED=0 go build -o $BUILD/$TARGET/oauth2_proxy || exit 1
|
||||
pushd $BUILD
|
||||
tar czvf $TARGET.tar.gz $TARGET
|
||||
mv $TARGET.tar.gz $DIR/dist
|
||||
popd
|
||||
# Create architecture specific release dirs
|
||||
for ARCH in "${ARCHS[@]}"; do
|
||||
mkdir -p release/${BINARY}-${VERSION}.${ARCH}
|
||||
|
||||
GO_OS=$(echo $ARCH | awk -F- '{print $1}')
|
||||
GO_ARCH=$(echo $ARCH | awk -F- '{print $2}')
|
||||
|
||||
# Create architecture specific binaries
|
||||
if [[ ${GO_ARCH} == armv* ]]; then
|
||||
GO_ARM=$(echo $GO_ARCH | awk -Fv '{print $2}')
|
||||
GO111MODULE=on GOOS=${GO_OS} GOARCH=arm GOARM=${GO_ARM} CGO_ENABLED=0 go build \
|
||||
-ldflags="-X github.com/oauth2-proxy/oauth2-proxy/v7/pkg/version.VERSION=${VERSION}" \
|
||||
-o release/${BINARY}-${VERSION}.${ARCH}/${BINARY} .
|
||||
else
|
||||
GO111MODULE=on GOOS=${GO_OS} GOARCH=${GO_ARCH} CGO_ENABLED=0 go build \
|
||||
-ldflags="-X github.com/oauth2-proxy/oauth2-proxy/v7/pkg/version.VERSION=${VERSION}" \
|
||||
-o release/${BINARY}-${VERSION}.${ARCH}/${BINARY} .
|
||||
fi
|
||||
|
||||
cd release
|
||||
|
||||
# Create tar file for architecture specific binary
|
||||
tar -czvf ${BINARY}-${VERSION}.${ARCH}.tar.gz ${BINARY}-${VERSION}.${ARCH}
|
||||
|
||||
# Create sha256sum for architecture-specific tar
|
||||
sha256sum ${BINARY}-${VERSION}.${ARCH}.tar.gz > ${BINARY}-${VERSION}.${ARCH}.tar.gz-sha256sum.txt
|
||||
|
||||
# Create sha256sum for architecture specific binary
|
||||
sha256sum ${BINARY}-${VERSION}.${ARCH}/${BINARY} > ${BINARY}-${VERSION}.${ARCH}-sha256sum.txt
|
||||
|
||||
cd ..
|
||||
done
|
||||
|
23
docs/.gitignore
vendored
Normal file
23
docs/.gitignore
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
# Dependencies
|
||||
/node_modules
|
||||
package-lock.json
|
||||
pnpm-lock.yaml
|
||||
yarn.lock
|
||||
|
||||
# Production
|
||||
/build
|
||||
|
||||
# Generated files
|
||||
.docusaurus
|
||||
.cache-loader
|
||||
|
||||
# Misc
|
||||
.DS_Store
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
33
docs/README.md
Normal file
33
docs/README.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# Website
|
||||
|
||||
This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator.
|
||||
|
||||
## Installation
|
||||
|
||||
```console
|
||||
npm install
|
||||
```
|
||||
|
||||
## Local Development
|
||||
|
||||
```console
|
||||
npm start
|
||||
```
|
||||
|
||||
This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
|
||||
|
||||
## Build
|
||||
|
||||
```console
|
||||
npm build
|
||||
```
|
||||
|
||||
This command generates static content into the `build` directory and can be served using any static contents hosting service.
|
||||
|
||||
## Deployment
|
||||
|
||||
```console
|
||||
GIT_USER=<Your GitHub username> USE_SSH=true npm deploy
|
||||
```
|
||||
|
||||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
|
3
docs/babel.config.js
Normal file
3
docs/babel.config.js
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
|
||||
};
|
11
docs/docs/behaviour.md
Normal file
11
docs/docs/behaviour.md
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
id: behaviour
|
||||
title: Behaviour
|
||||
---
|
||||
|
||||
1. Any request passing through the proxy (and not matched by `--skip-auth-regex`) is checked for the proxy's session cookie (`--cookie-name`) (or, if allowed, a JWT token - see `--skip-jwt-bearer-tokens`).
|
||||
2. If authentication is required but missing then the user is asked to log in and redirected to the authentication provider (unless it is an Ajax request, i.e. one with `Accept: application/json`, in which case 401 Unauthorized is returned)
|
||||
3. After returning from the authentication provider, the oauth tokens are stored in the configured session store (cookie, redis, ...) and a cookie is set
|
||||
4. The request is forwarded to the upstream server with added user info and authentication headers (depending on the configuration)
|
||||
|
||||
Notice that the proxy also provides a number of useful [endpoints](features/endpoints.md).
|
89
docs/docs/community/contribution.md
Normal file
89
docs/docs/community/contribution.md
Normal file
@@ -0,0 +1,89 @@
|
||||
---
|
||||
id: contribution
|
||||
title: Contribution Guide
|
||||
---
|
||||
|
||||
We track bugs and issues using Github.
|
||||
|
||||
If you find a bug, please open an Issue. When opening an Issue or Pull Request please follow the preconfigured template and take special note of the checkboxes.
|
||||
|
||||
If you want to fix a bug, add a new feature or extend existing functionality, please create a fork, create a feature branch and open a PR back to this repo.
|
||||
Please mention open bug issue number(s) within your PR if applicable.
|
||||
|
||||
We suggest using [Visual Studio Code](https://code.visualstudio.com/docs/languages/go) with the official [Go for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=golang.go) extension.
|
||||
|
||||
|
||||
# Go version
|
||||
|
||||
This project is currently still using go 1.22. You can follow the installation guide for go [here.](https://go.dev/doc/install) And you can find go version 1.22 in the archived section [here.](https://go.dev/dl/)
|
||||
|
||||
# Preparing your fork
|
||||
Clone your fork, create a feature branch and update the depedencies to get started.
|
||||
```bash
|
||||
git clone git@github.com:<YOUR_FORK>/oauth2-proxy
|
||||
cd oauth2-proxy
|
||||
git branch feature/<BRANCH_NAME>
|
||||
git push --set-upstream origin feature/<BRANCH_NAME>
|
||||
go mod download
|
||||
```
|
||||
|
||||
|
||||
# Testing / Debugging
|
||||
For starting oauth2-proxy locally open the debugging tab and create the `launch.json` and select `Go: Launch Package`.
|
||||
|
||||

|
||||
```json
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Launch OAuth2-Proxy with Dex",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${workspaceFolder}",
|
||||
"args": [
|
||||
"--config",
|
||||
// The following configuration contains settings for a locally deployed
|
||||
// upstream and dex as an idetity provider
|
||||
"contrib/local-environment/oauth2-proxy.cfg"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Launch OAuth2-Proxy with Keycloak",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${workspaceFolder}",
|
||||
"args": [
|
||||
"--config",
|
||||
// The following configuration contains settings for a locally deployed
|
||||
// upstream and keycloak as an idetity provider
|
||||
"contrib/local-environment/oauth2-proxy-keycloak.cfg"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Before you can start your local version of oauth2-proxy, you will have to use the provided docker compose files to start a local upstream service and identity provider. We suggest using [httpbin](https://hub.docker.com/r/kennethreitz/httpbin) as your upstream for testing as it allows for request and response introspection of all things HTTP.
|
||||
|
||||
Inside the `contrib/local-environment` directory you can use the `Makefile` for
|
||||
starting different example setups:
|
||||
|
||||
- Dex as your IdP: `make up` or `make down`
|
||||
- Dex as your IdP using the alpha-config: `make alpha-config-up`
|
||||
- Keycloak as your IdP: `make keycloak-up`
|
||||
- Dex as your IdP & nginx reverse proxy: `make nginx-up`
|
||||
- and many more...
|
||||
|
||||
Check out the `Makefile` to see what is available.
|
||||
|
||||
The username and password for all setups is usually `admin@example.com` and `password`.
|
||||
|
||||
The docker compose setups expose the services with a dynamic reverse DNS resolver: localtest.me
|
||||
|
||||
- OAuth2-Proxy: http://oauth2-proxy.localtest.me:4180
|
||||
- Upstream: http://httpbin.localtest.me:8080
|
||||
- Dex: http://dex.localtest.me:5556
|
||||
|
49
docs/docs/community/security.md
Normal file
49
docs/docs/community/security.md
Normal file
@@ -0,0 +1,49 @@
|
||||
---
|
||||
id: security
|
||||
title: Security
|
||||
---
|
||||
|
||||
:::note
|
||||
OAuth2 Proxy is a community project.
|
||||
Maintainers do not work on this project full time, and as such,
|
||||
while we endeavour to respond to disclosures as quickly as possible,
|
||||
this may take longer than in projects with corporate sponsorship.
|
||||
:::
|
||||
|
||||
## Security Disclosures
|
||||
|
||||
:::important
|
||||
If you believe you have found a vulnerability within OAuth2 Proxy or any of its
|
||||
dependencies, please do NOT open an issue or PR on GitHub, please do NOT post
|
||||
any details publicly.
|
||||
:::
|
||||
|
||||
Security disclosures MUST be done in private.
|
||||
If you have found an issue that you would like to bring to the attention of the
|
||||
maintenance team for OAuth2 Proxy, please compose an email and send it to the
|
||||
list of maintainers in our [MAINTAINERS](https://github.com/oauth2-proxy/oauth2-proxy/blob/master/MAINTAINERS) file.
|
||||
|
||||
Please include as much detail as possible.
|
||||
Ideally, your disclosure should include:
|
||||
- A reproducible case that can be used to demonstrate the exploit
|
||||
- How you discovered this vulnerability
|
||||
- A potential fix for the issue (if you have thought of one)
|
||||
- Versions affected (if not present in master)
|
||||
- Your GitHub ID
|
||||
|
||||
### How will we respond to disclosures?
|
||||
|
||||
We use [GitHub Security Advisories](https://docs.github.com/en/github/managing-security-vulnerabilities/about-github-security-advisories)
|
||||
to privately discuss fixes for disclosed vulnerabilities.
|
||||
If you include a GitHub ID with your disclosure we will add you as a collaborator
|
||||
for the advisory so that you can join the discussion and validate any fixes
|
||||
we may propose.
|
||||
|
||||
For minor issues and previously disclosed vulnerabilities (typically for
|
||||
dependencies), we may use regular PRs for fixes and forego the security advisory.
|
||||
|
||||
Once a fix has been agreed upon, we will merge the fix and create a new release.
|
||||
If we have multiple security issues in flight simultaneously, we may delay
|
||||
merging fixes until all patches are ready.
|
||||
We may also backport the fix to previous releases,
|
||||
but this will be at the discretion of the maintainers.
|
564
docs/docs/configuration/alpha_config.md
Normal file
564
docs/docs/configuration/alpha_config.md
Normal file
@@ -0,0 +1,564 @@
|
||||
---
|
||||
id: alpha-config
|
||||
title: Alpha Configuration
|
||||
---
|
||||
|
||||
:::warning
|
||||
This page contains documentation for alpha features.
|
||||
We reserve the right to make breaking changes to the features detailed within this page with no notice.
|
||||
|
||||
Options described in this page may be changed, removed, renamed or moved without prior warning.
|
||||
Please beware of this before you use alpha configuration options.
|
||||
:::
|
||||
|
||||
This page details a set of **alpha** configuration options in a new format.
|
||||
Going forward we are intending to add structured configuration in YAML format to
|
||||
replace the existing TOML based configuration file and flags.
|
||||
|
||||
Below is a reference for the structure of the configuration, with
|
||||
[AlphaOptions](#alphaoptions) as the root of the configuration.
|
||||
|
||||
When using alpha configuration, your config file will look something like below:
|
||||
|
||||
```yaml
|
||||
upstreams:
|
||||
- id: ...
|
||||
...: ...
|
||||
injectRequestHeaders:
|
||||
- name: ...
|
||||
...: ...
|
||||
injectResponseHeaders:
|
||||
- name: ...
|
||||
...: ...
|
||||
```
|
||||
|
||||
Please browse the [reference](#configuration-reference) below for the structure
|
||||
of the new configuration format.
|
||||
|
||||
## Using Alpha Configuration
|
||||
|
||||
To use the new **alpha** configuration, generate a YAML file based on the format
|
||||
described in the [reference](#configuration-reference) below.
|
||||
|
||||
Provide the path to this file using the `--alpha-config` flag.
|
||||
|
||||
:::note
|
||||
When using the `--alpha-config` flag, some options are no longer available.
|
||||
See [removed options](#removed-options) below for more information.
|
||||
:::
|
||||
|
||||
### Converting configuration to the new structure
|
||||
|
||||
Before adding the new `--alpha-config` option, start OAuth2 Proxy using the
|
||||
`convert-config-to-alpha` flag to convert existing configuration to the new format.
|
||||
|
||||
```bash
|
||||
oauth2-proxy --convert-config-to-alpha --config ./path/to/existing/config.cfg
|
||||
```
|
||||
|
||||
This will convert any options supported by the new format to YAML and print the
|
||||
new configuration to `STDOUT`.
|
||||
|
||||
Copy this to a new file, remove any options from your existing configuration
|
||||
noted in [removed options](#removed-options) and then start OAuth2 Proxy using
|
||||
the new config.
|
||||
|
||||
```bash
|
||||
oauth2-proxy --alpha-config ./path/to/new/config.yaml --config ./path/to/existing/config.cfg
|
||||
```
|
||||
|
||||
## Using ENV variables in the alpha configuration
|
||||
|
||||
The alpha package supports the use of environment variables in place of yaml keys, allowing sensitive values to be pulled from somewhere other than the yaml file.
|
||||
When using environment variables, your yaml will look like this:
|
||||
|
||||
```yaml
|
||||
providers:
|
||||
- provider: azure
|
||||
clientSecret: ${CLIENT_SECRET}
|
||||
...
|
||||
```
|
||||
Where CLIENT_SECRET is an environment variable.
|
||||
More information and available patterns can be found [here](https://github.com/a8m/envsubst#docs)
|
||||
|
||||
## Removed options
|
||||
|
||||
The following flags/options and their respective environment variables are no
|
||||
longer available when using alpha configuration:
|
||||
|
||||
<!-- Legacy Upstream FlagSet -->
|
||||
- `flush-interval`/`flush_interval`
|
||||
- `pass-host-header`/`pass_host_header`
|
||||
- `proxy-websockets`/`proxy_websockets`
|
||||
- `ssl-upstream-insecure-skip-verify`/`ssl_upstream_insecure_skip_verify`
|
||||
- `upstream`/`upstreams`
|
||||
|
||||
<!-- Legacy Headers FlagSet -->
|
||||
- `pass-basic-auth`/`pass_basic_auth`
|
||||
- `pass-access-token`/`pass_access_token`
|
||||
- `pass-user-headers`/`pass_user_headers`
|
||||
- `pass-authorization-header`/`pass_authorization_header`
|
||||
- `set-basic-auth`/`set_basic_auth`
|
||||
- `set-xauthrequest`/`set_xauthrequest`
|
||||
- `set-authorization-header`/`set_authorization_header`
|
||||
- `prefer-email-to-user`/`prefer_email_to_user`
|
||||
- `basic-auth-password`/`basic_auth_password`
|
||||
- `skip-auth-strip-headers`/`skip_auth_strip_headers`
|
||||
|
||||
<!-- Legacy provider FlagSet -->
|
||||
- `client-id`/`client_id`
|
||||
- `client-secret`/`client_secret`, and `client-secret-file`/`client_secret_file`
|
||||
- `provider`
|
||||
- `provider-display-name`/`provider_display_name`
|
||||
- `provider-ca-file`/`provider_ca_files`
|
||||
- `login-url`/`login_url`
|
||||
- `redeem-url`/`redeem_url`
|
||||
- `profile-url`/`profile_url`
|
||||
- `resource`
|
||||
- `validate-url`/`validate_url`
|
||||
- `scope`
|
||||
- `prompt`
|
||||
- `approval-prompt`/`approval_prompt`
|
||||
- `acr-values`/`acr_values`
|
||||
- `user-id-claim`/`user_id_claim`
|
||||
- `allowed-group`/`allowed_groups`
|
||||
- `allowed-role`/`allowed_roles`
|
||||
- `jwt-key`/`jwt_key`
|
||||
- `jwt-key-file`/`jwt_key_file`
|
||||
- `pubjwk-url`/`pubjwk_url`
|
||||
|
||||
and all provider-specific options, i.e. any option whose name includes `oidc`,
|
||||
`azure`, `bitbucket`, `github`, `gitlab`, `google` or `keycloak`. Attempting to
|
||||
use any of these options via flags or via config when `--alpha-config` is
|
||||
set will result in an error.
|
||||
|
||||
:::important
|
||||
You must remove these options before starting OAuth2 Proxy with `--alpha-config`
|
||||
:::
|
||||
|
||||
## Configuration Reference
|
||||
|
||||
<!--- THIS FILE IS AUTOGENERATED!!! DO NOT EDIT!!! -->
|
||||
|
||||
### ADFSOptions
|
||||
|
||||
(**Appears on:** [Provider](#provider))
|
||||
|
||||
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----- | ---- | ----------- |
|
||||
| `skipScope` | _bool_ | Skip adding the scope parameter in login request<br/>Default value is 'false' |
|
||||
|
||||
### AlphaOptions
|
||||
|
||||
AlphaOptions contains alpha structured configuration options.
|
||||
Usage of these options allows users to access alpha features that are not
|
||||
available as part of the primary configuration structure for OAuth2 Proxy.
|
||||
|
||||
:::warning
|
||||
The options within this structure are considered alpha.
|
||||
They may change between releases without notice.
|
||||
:::
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----- | ---- | ----------- |
|
||||
| `upstreamConfig` | _[UpstreamConfig](#upstreamconfig)_ | UpstreamConfig is used to configure upstream servers.<br/>Once a user is authenticated, requests to the server will be proxied to<br/>these upstream servers based on the path mappings defined in this list. |
|
||||
| `injectRequestHeaders` | _[[]Header](#header)_ | InjectRequestHeaders is used to configure headers that should be added<br/>to requests to upstream servers.<br/>Headers may source values from either the authenticated user's session<br/>or from a static secret value. |
|
||||
| `injectResponseHeaders` | _[[]Header](#header)_ | InjectResponseHeaders is used to configure headers that should be added<br/>to responses from the proxy.<br/>This is typically used when using the proxy as an external authentication<br/>provider in conjunction with another proxy such as NGINX and its<br/>auth_request module.<br/>Headers may source values from either the authenticated user's session<br/>or from a static secret value. |
|
||||
| `server` | _[Server](#server)_ | Server is used to configure the HTTP(S) server for the proxy application.<br/>You may choose to run both HTTP and HTTPS servers simultaneously.<br/>This can be done by setting the BindAddress and the SecureBindAddress simultaneously.<br/>To use the secure server you must configure a TLS certificate and key. |
|
||||
| `metricsServer` | _[Server](#server)_ | MetricsServer is used to configure the HTTP(S) server for metrics.<br/>You may choose to run both HTTP and HTTPS servers simultaneously.<br/>This can be done by setting the BindAddress and the SecureBindAddress simultaneously.<br/>To use the secure server you must configure a TLS certificate and key. |
|
||||
| `providers` | _[Providers](#providers)_ | Providers is used to configure your provider. **Multiple-providers is not<br/>yet working.** [This feature is tracked in<br/>#925](https://github.com/oauth2-proxy/oauth2-proxy/issues/926) |
|
||||
|
||||
### AzureOptions
|
||||
|
||||
(**Appears on:** [Provider](#provider))
|
||||
|
||||
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----- | ---- | ----------- |
|
||||
| `tenant` | _string_ | Tenant directs to a tenant-specific or common (tenant-independent) endpoint<br/>Default value is 'common' |
|
||||
| `graphGroupField` | _string_ | GraphGroupField configures the group field to be used when building the groups list from Microsoft Graph<br/>Default value is 'id' |
|
||||
|
||||
### BitbucketOptions
|
||||
|
||||
(**Appears on:** [Provider](#provider))
|
||||
|
||||
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----- | ---- | ----------- |
|
||||
| `team` | _string_ | Team sets restrict logins to members of this team |
|
||||
| `repository` | _string_ | Repository sets restrict logins to user with access to this repository |
|
||||
|
||||
### ClaimSource
|
||||
|
||||
(**Appears on:** [HeaderValue](#headervalue))
|
||||
|
||||
ClaimSource allows loading a header value from a claim within the session
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----- | ---- | ----------- |
|
||||
| `claim` | _string_ | Claim is the name of the claim in the session that the value should be<br/>loaded from. Available claims: `access_token` `id_token` `created_at`<br/>`expires_on` `refresh_token` `email` `user` `groups` `preferred_username`. |
|
||||
| `prefix` | _string_ | Prefix is an optional prefix that will be prepended to the value of the<br/>claim if it is non-empty. |
|
||||
| `basicAuthPassword` | _[SecretSource](#secretsource)_ | BasicAuthPassword converts this claim into a basic auth header.<br/>Note the value of claim will become the basic auth username and the<br/>basicAuthPassword will be used as the password value. |
|
||||
|
||||
### Duration
|
||||
#### (`string` alias)
|
||||
|
||||
(**Appears on:** [Upstream](#upstream))
|
||||
|
||||
Duration is as string representation of a period of time.
|
||||
A duration string is a is a possibly signed sequence of decimal numbers,
|
||||
each with optional fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m".
|
||||
Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
|
||||
|
||||
### GitHubOptions
|
||||
|
||||
(**Appears on:** [Provider](#provider))
|
||||
|
||||
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----- | ---- | ----------- |
|
||||
| `org` | _string_ | Org sets restrict logins to members of this organisation |
|
||||
| `team` | _string_ | Team sets restrict logins to members of this team |
|
||||
| `repo` | _string_ | Repo sets restrict logins to collaborators of this repository |
|
||||
| `token` | _string_ | Token is the token to use when verifying repository collaborators<br/>it must have push access to the repository |
|
||||
| `users` | _[]string_ | Users allows users with these usernames to login<br/>even if they do not belong to the specified org and team or collaborators |
|
||||
|
||||
### GitLabOptions
|
||||
|
||||
(**Appears on:** [Provider](#provider))
|
||||
|
||||
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----- | ---- | ----------- |
|
||||
| `group` | _[]string_ | Group sets restrict logins to members of this group |
|
||||
| `projects` | _[]string_ | Projects restricts logins to members of these projects |
|
||||
|
||||
### GoogleOptions
|
||||
|
||||
(**Appears on:** [Provider](#provider))
|
||||
|
||||
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----- | ---- | ----------- |
|
||||
| `group` | _[]string_ | Groups sets restrict logins to members of this Google group |
|
||||
| `adminEmail` | _string_ | AdminEmail is the Google admin to impersonate for api calls |
|
||||
| `serviceAccountJson` | _string_ | ServiceAccountJSON is the path to the service account json credentials |
|
||||
| `useApplicationDefaultCredentials` | _bool_ | UseApplicationDefaultCredentials is a boolean whether to use Application Default Credentials instead of a ServiceAccountJSON |
|
||||
| `targetPrincipal` | _string_ | TargetPrincipal is the Google Service Account used for Application Default Credentials |
|
||||
|
||||
### Header
|
||||
|
||||
(**Appears on:** [AlphaOptions](#alphaoptions))
|
||||
|
||||
Header represents an individual header that will be added to a request or
|
||||
response header.
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----- | ---- | ----------- |
|
||||
| `name` | _string_ | Name is the header name to be used for this set of values.<br/>Names should be unique within a list of Headers. |
|
||||
| `preserveRequestValue` | _bool_ | PreserveRequestValue determines whether any values for this header<br/>should be preserved for the request to the upstream server.<br/>This option only applies to injected request headers.<br/>Defaults to false (headers that match this header will be stripped). |
|
||||
| `values` | _[[]HeaderValue](#headervalue)_ | Values contains the desired values for this header |
|
||||
|
||||
### HeaderValue
|
||||
|
||||
(**Appears on:** [Header](#header))
|
||||
|
||||
HeaderValue represents a single header value and the sources that can
|
||||
make up the header value
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----- | ---- | ----------- |
|
||||
| `value` | _[]byte_ | Value expects a base64 encoded string value. |
|
||||
| `fromEnv` | _string_ | FromEnv expects the name of an environment variable. |
|
||||
| `fromFile` | _string_ | FromFile expects a path to a file containing the secret value. |
|
||||
| `claim` | _string_ | Claim is the name of the claim in the session that the value should be<br/>loaded from. Available claims: `access_token` `id_token` `created_at`<br/>`expires_on` `refresh_token` `email` `user` `groups` `preferred_username`. |
|
||||
| `prefix` | _string_ | Prefix is an optional prefix that will be prepended to the value of the<br/>claim if it is non-empty. |
|
||||
| `basicAuthPassword` | _[SecretSource](#secretsource)_ | BasicAuthPassword converts this claim into a basic auth header.<br/>Note the value of claim will become the basic auth username and the<br/>basicAuthPassword will be used as the password value. |
|
||||
|
||||
### KeycloakOptions
|
||||
|
||||
(**Appears on:** [Provider](#provider))
|
||||
|
||||
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----- | ---- | ----------- |
|
||||
| `groups` | _[]string_ | Group enables to restrict login to members of indicated group |
|
||||
| `roles` | _[]string_ | Role enables to restrict login to users with role (only available when using the keycloak-oidc provider) |
|
||||
|
||||
### LoginGovOptions
|
||||
|
||||
(**Appears on:** [Provider](#provider))
|
||||
|
||||
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----- | ---- | ----------- |
|
||||
| `jwtKey` | _string_ | JWTKey is a private key in PEM format used to sign JWT, |
|
||||
| `jwtKeyFile` | _string_ | JWTKeyFile is a path to the private key file in PEM format used to sign the JWT |
|
||||
| `pubjwkURL` | _string_ | PubJWKURL is the JWK pubkey access endpoint |
|
||||
|
||||
### LoginURLParameter
|
||||
|
||||
(**Appears on:** [Provider](#provider))
|
||||
|
||||
LoginURLParameter is the configuration for a single query parameter that
|
||||
can be passed through from the `/oauth2/start` endpoint to the IdP login
|
||||
URL. The "default" option specifies the default value or values (if any)
|
||||
that will be passed to the IdP for this parameter, and "allow" is a list
|
||||
of options for ways in which this parameter can be set or overridden via
|
||||
the query string to `/oauth2/start`.
|
||||
If _only_ a default is specified and no "allow" then the parameter is
|
||||
effectively fixed - the default value will always be used and anything
|
||||
passed to the start URL will be ignored. If _only_ "allow" is specified
|
||||
but no default then the parameter will only be passed on to the IdP if
|
||||
the caller provides it, and no value will be sent otherwise.
|
||||
|
||||
Examples:
|
||||
|
||||
# A parameter whose value is fixed
|
||||
|
||||
```
|
||||
name: organization
|
||||
default:
|
||||
- myorg
|
||||
```
|
||||
|
||||
A parameter that is not passed by default, but may be set to one of a
|
||||
fixed set of values
|
||||
|
||||
```
|
||||
name: prompt
|
||||
allow:
|
||||
- value: login
|
||||
- value: consent
|
||||
- value: select_account
|
||||
```
|
||||
|
||||
A parameter that is passed by default but may be overridden by one of
|
||||
a fixed set of values
|
||||
|
||||
```
|
||||
name: prompt
|
||||
default: ["login"]
|
||||
allow:
|
||||
- value: consent
|
||||
- value: select_account
|
||||
```
|
||||
|
||||
A parameter that may be overridden, but only by values that match a
|
||||
regular expression. For example to restrict `login_hint` to email
|
||||
addresses in your organization's domain:
|
||||
|
||||
```
|
||||
name: login_hint
|
||||
allow:
|
||||
- pattern: '^[^@]*@example\.com$'
|
||||
# this allows at most one "@" sign, and requires "example.com" domain.
|
||||
```
|
||||
|
||||
Note that the YAML rules around exactly which characters are allowed
|
||||
and/or require escaping in different types of string literals are
|
||||
convoluted. For regular expressions the single quoted form is simplest
|
||||
as backslash is not considered to be an escape character. Alternatively
|
||||
use the "chomped block" format `|-`:
|
||||
|
||||
```
|
||||
- pattern: |-
|
||||
^[^@]*@example\.com$
|
||||
|
||||
```
|
||||
|
||||
The hyphen is important, a `|` block would have a trailing newline
|
||||
character.
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----- | ---- | ----------- |
|
||||
| `name` | _string_ | Name specifies the name of the query parameter. |
|
||||
| `default` | _[]string_ | _(Optional)_ Default specifies a default value or values that will be<br/>passed to the IdP if not overridden. |
|
||||
| `allow` | _[[]URLParameterRule](#urlparameterrule)_ | _(Optional)_ Allow specifies rules about how the default (if any) may be<br/>overridden via the query string to `/oauth2/start`. Only<br/>values that match one or more of the allow rules will be<br/>forwarded to the IdP. |
|
||||
|
||||
### MicrosoftEntraIDOptions
|
||||
|
||||
(**Appears on:** [Provider](#provider))
|
||||
|
||||
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----- | ---- | ----------- |
|
||||
| `allowedTenants` | _[]string_ | AllowedTenants is a list of allowed tenants. In case of multi-tenant apps, incoming tokens are<br/>issued by different issuers and OIDC issuer verification needs to be disabled.<br/>When not specified, all tenants are allowed. Redundant for single-tenant apps<br/>(regular ID token validation matches the issuer). |
|
||||
| `federatedTokenAuth` | _bool_ | FederatedTokenAuth enable oAuth2 client authentication with federated token projected<br/>by Entra Workload Identity plugin, instead of client secret. |
|
||||
|
||||
### OIDCOptions
|
||||
|
||||
(**Appears on:** [Provider](#provider))
|
||||
|
||||
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----- | ---- | ----------- |
|
||||
| `issuerURL` | _string_ | IssuerURL is the OpenID Connect issuer URL<br/>eg: https://accounts.google.com |
|
||||
| `insecureAllowUnverifiedEmail` | _bool_ | InsecureAllowUnverifiedEmail prevents failures if an email address in an id_token is not verified<br/>default set to 'false' |
|
||||
| `insecureSkipIssuerVerification` | _bool_ | InsecureSkipIssuerVerification skips verification of ID token issuers. When false, ID Token Issuers must match the OIDC discovery URL<br/>default set to 'false' |
|
||||
| `insecureSkipNonce` | _bool_ | InsecureSkipNonce skips verifying the ID Token's nonce claim that must match<br/>the random nonce sent in the initial OAuth flow. Otherwise, the nonce is checked<br/>after the initial OAuth redeem & subsequent token refreshes.<br/>default set to 'true'<br/>Warning: In a future release, this will change to 'false' by default for enhanced security. |
|
||||
| `skipDiscovery` | _bool_ | SkipDiscovery allows to skip OIDC discovery and use manually supplied Endpoints<br/>default set to 'false' |
|
||||
| `jwksURL` | _string_ | JwksURL is the OpenID Connect JWKS URL<br/>eg: https://www.googleapis.com/oauth2/v3/certs |
|
||||
| `publicKeyFiles` | _[]string_ | PublicKeyFiles is a list of paths pointing to public key files in PEM format to use<br/>for verifying JWT tokens |
|
||||
| `emailClaim` | _string_ | EmailClaim indicates which claim contains the user email,<br/>default set to 'email' |
|
||||
| `groupsClaim` | _string_ | GroupsClaim indicates which claim contains the user groups<br/>default set to 'groups' |
|
||||
| `userIDClaim` | _string_ | UserIDClaim indicates which claim contains the user ID<br/>default set to 'email' |
|
||||
| `audienceClaims` | _[]string_ | AudienceClaim allows to define any claim that is verified against the client id<br/>By default `aud` claim is used for verification. |
|
||||
| `extraAudiences` | _[]string_ | ExtraAudiences is a list of additional audiences that are allowed<br/>to pass verification in addition to the client id. |
|
||||
|
||||
### Provider
|
||||
|
||||
(**Appears on:** [Providers](#providers))
|
||||
|
||||
Provider holds all configuration for a single provider
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----- | ---- | ----------- |
|
||||
| `clientID` | _string_ | ClientID is the OAuth Client ID that is defined in the provider<br/>This value is required for all providers. |
|
||||
| `clientSecret` | _string_ | ClientSecret is the OAuth Client Secret that is defined in the provider<br/>This value is required for all providers. |
|
||||
| `clientSecretFile` | _string_ | ClientSecretFile is the name of the file<br/>containing the OAuth Client Secret, it will be used if ClientSecret is not set. |
|
||||
| `keycloakConfig` | _[KeycloakOptions](#keycloakoptions)_ | KeycloakConfig holds all configurations for Keycloak provider. |
|
||||
| `azureConfig` | _[AzureOptions](#azureoptions)_ | AzureConfig holds all configurations for Azure provider. |
|
||||
| `microsoftEntraIDConfig` | _[MicrosoftEntraIDOptions](#microsoftentraidoptions)_ | MicrosoftEntraIDConfig holds all configurations for Entra ID provider. |
|
||||
| `ADFSConfig` | _[ADFSOptions](#adfsoptions)_ | ADFSConfig holds all configurations for ADFS provider. |
|
||||
| `bitbucketConfig` | _[BitbucketOptions](#bitbucketoptions)_ | BitbucketConfig holds all configurations for Bitbucket provider. |
|
||||
| `githubConfig` | _[GitHubOptions](#githuboptions)_ | GitHubConfig holds all configurations for GitHubC provider. |
|
||||
| `gitlabConfig` | _[GitLabOptions](#gitlaboptions)_ | GitLabConfig holds all configurations for GitLab provider. |
|
||||
| `googleConfig` | _[GoogleOptions](#googleoptions)_ | GoogleConfig holds all configurations for Google provider. |
|
||||
| `oidcConfig` | _[OIDCOptions](#oidcoptions)_ | OIDCConfig holds all configurations for OIDC provider<br/>or providers utilize OIDC configurations. |
|
||||
| `loginGovConfig` | _[LoginGovOptions](#logingovoptions)_ | LoginGovConfig holds all configurations for LoginGov provider. |
|
||||
| `id` | _string_ | ID should be a unique identifier for the provider.<br/>This value is required for all providers. |
|
||||
| `provider` | _[ProviderType](#providertype)_ | Type is the OAuth provider<br/>must be set from the supported providers group,<br/>otherwise 'Google' is set as default |
|
||||
| `name` | _string_ | Name is the providers display name<br/>if set, it will be shown to the users in the login page. |
|
||||
| `caFiles` | _[]string_ | CAFiles is a list of paths to CA certificates that should be used when connecting to the provider.<br/>If not specified, the default Go trust sources are used instead |
|
||||
| `useSystemTrustStore` | _bool_ | UseSystemTrustStore determines if your custom CA files and the system trust store are used<br/>If set to true, your custom CA files and the system trust store are used otherwise only your custom CA files. |
|
||||
| `loginURL` | _string_ | LoginURL is the authentication endpoint |
|
||||
| `loginURLParameters` | _[[]LoginURLParameter](#loginurlparameter)_ | LoginURLParameters defines the parameters that can be passed from the start URL to the IdP login URL |
|
||||
| `authRequestResponseMode` | _string_ | AuthRequestResponseMode defines the response mode to request during authorization request |
|
||||
| `redeemURL` | _string_ | RedeemURL is the token redemption endpoint |
|
||||
| `profileURL` | _string_ | ProfileURL is the profile access endpoint |
|
||||
| `skipClaimsFromProfileURL` | _bool_ | SkipClaimsFromProfileURL allows to skip request to Profile URL for resolving claims not present in id_token<br/>default set to 'false' |
|
||||
| `resource` | _string_ | ProtectedResource is the resource that is protected (Azure AD and ADFS only) |
|
||||
| `validateURL` | _string_ | ValidateURL is the access token validation endpoint |
|
||||
| `scope` | _string_ | Scope is the OAuth scope specification |
|
||||
| `allowedGroups` | _[]string_ | AllowedGroups is a list of restrict logins to members of this group |
|
||||
| `code_challenge_method` | _string_ | The code challenge method |
|
||||
| `backendLogoutURL` | _string_ | URL to call to perform backend logout, `{id_token}` would be replaced by the actual `id_token` if available in the session |
|
||||
|
||||
### ProviderType
|
||||
#### (`string` alias)
|
||||
|
||||
(**Appears on:** [Provider](#provider))
|
||||
|
||||
ProviderType is used to enumerate the different provider type options
|
||||
Valid options are: adfs, azure, bitbucket, digitalocean facebook, github,
|
||||
gitlab, google, keycloak, keycloak-oidc, linkedin, login.gov, nextcloud
|
||||
and oidc.
|
||||
|
||||
### Providers
|
||||
|
||||
#### ([[]Provider](#provider) alias)
|
||||
|
||||
(**Appears on:** [AlphaOptions](#alphaoptions))
|
||||
|
||||
The provider can be selected using the `provider` configuration value, or
|
||||
set in the [`providers` array using
|
||||
AlphaConfig](https://oauth2-proxy.github.io/oauth2-proxy/configuration/alpha-config#providers).
|
||||
However, [**the feature to implement multiple providers is not
|
||||
complete**](https://github.com/oauth2-proxy/oauth2-proxy/issues/926).
|
||||
|
||||
### SecretSource
|
||||
|
||||
(**Appears on:** [ClaimSource](#claimsource), [HeaderValue](#headervalue), [TLS](#tls))
|
||||
|
||||
SecretSource references an individual secret value.
|
||||
Only one source within the struct should be defined at any time.
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----- | ---- | ----------- |
|
||||
| `value` | _[]byte_ | Value expects a base64 encoded string value. |
|
||||
| `fromEnv` | _string_ | FromEnv expects the name of an environment variable. |
|
||||
| `fromFile` | _string_ | FromFile expects a path to a file containing the secret value. |
|
||||
|
||||
### Server
|
||||
|
||||
(**Appears on:** [AlphaOptions](#alphaoptions))
|
||||
|
||||
Server represents the configuration for an HTTP(S) server
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----- | ---- | ----------- |
|
||||
| `BindAddress` | _string_ | BindAddress is the address on which to serve traffic.<br/>Leave blank or set to "-" to disable. |
|
||||
| `SecureBindAddress` | _string_ | SecureBindAddress is the address on which to serve secure traffic.<br/>Leave blank or set to "-" to disable. |
|
||||
| `TLS` | _[TLS](#tls)_ | TLS contains the information for loading the certificate and key for the<br/>secure traffic and further configuration for the TLS server. |
|
||||
|
||||
### TLS
|
||||
|
||||
(**Appears on:** [Server](#server))
|
||||
|
||||
TLS contains the information for loading a TLS certificate and key
|
||||
as well as an optional minimal TLS version that is acceptable.
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----- | ---- | ----------- |
|
||||
| `Key` | _[SecretSource](#secretsource)_ | Key is the TLS key data to use.<br/>Typically this will come from a file. |
|
||||
| `Cert` | _[SecretSource](#secretsource)_ | Cert is the TLS certificate data to use.<br/>Typically this will come from a file. |
|
||||
| `MinVersion` | _string_ | MinVersion is the minimal TLS version that is acceptable.<br/>E.g. Set to "TLS1.3" to select TLS version 1.3 |
|
||||
| `CipherSuites` | _[]string_ | CipherSuites is a list of TLS cipher suites that are allowed.<br/>E.g.:<br/>- TLS_RSA_WITH_RC4_128_SHA<br/>- TLS_RSA_WITH_AES_256_GCM_SHA384<br/>If not specified, the default Go safe cipher list is used.<br/>List of valid cipher suites can be found in the [crypto/tls documentation](https://pkg.go.dev/crypto/tls#pkg-constants). |
|
||||
|
||||
### URLParameterRule
|
||||
|
||||
(**Appears on:** [LoginURLParameter](#loginurlparameter))
|
||||
|
||||
URLParameterRule represents a rule by which query parameters
|
||||
passed to the `/oauth2/start` endpoint are checked to determine whether
|
||||
they are valid overrides for the given parameter passed to the IdP's
|
||||
login URL. Either Value or Pattern should be supplied, not both.
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----- | ---- | ----------- |
|
||||
| `value` | _string_ | A Value rule matches just this specific value |
|
||||
| `pattern` | _string_ | A Pattern rule gives a regular expression that must be matched by<br/>some substring of the value. The expression is _not_ automatically<br/>anchored to the start and end of the value, if you _want_ to restrict<br/>the whole parameter value you must anchor it yourself with `^` and `$`. |
|
||||
|
||||
### Upstream
|
||||
|
||||
(**Appears on:** [UpstreamConfig](#upstreamconfig))
|
||||
|
||||
Upstream represents the configuration for an upstream server.
|
||||
Requests will be proxied to this upstream if the path matches the request path.
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----- | ---- | ----------- |
|
||||
| `id` | _string_ | ID should be a unique identifier for the upstream.<br/>This value is required for all upstreams. |
|
||||
| `path` | _string_ | Path is used to map requests to the upstream server.<br/>The closest match will take precedence and all Paths must be unique.<br/>Path can also take a pattern when used with RewriteTarget.<br/>Path segments can be captured and matched using regular experessions.<br/>Eg:<br/>- `^/foo$`: Match only the explicit path `/foo`<br/>- `^/bar/$`: Match any path prefixed with `/bar/`<br/>- `^/baz/(.*)$`: Match any path prefixed with `/baz` and capture the remaining path for use with RewriteTarget |
|
||||
| `rewriteTarget` | _string_ | RewriteTarget allows users to rewrite the request path before it is sent to<br/>the upstream server (for an HTTP/HTTPS upstream) or mapped to the filesystem<br/>(for a `file:` upstream).<br/>Use the Path to capture segments for reuse within the rewrite target.<br/>Eg: With a Path of `^/baz/(.*)`, a RewriteTarget of `/foo/$1` would rewrite<br/>the request `/baz/abc/123` to `/foo/abc/123` before proxying to the<br/>upstream server. Or if the upstream were `file:///app`, a request for<br/>`/baz/info.html` would return the contents of the file `/app/foo/info.html`. |
|
||||
| `uri` | _string_ | The URI of the upstream server. This may be an HTTP(S) server of a File<br/>based URL. It may include a path, in which case all requests will be served<br/>under that path.<br/>Eg:<br/>- http://localhost:8080<br/>- https://service.localhost<br/>- https://service.localhost/path<br/>- file://host/path<br/>If the URI's path is "/base" and the incoming request was for "/dir",<br/>the upstream request will be for "/base/dir". |
|
||||
| `insecureSkipTLSVerify` | _bool_ | InsecureSkipTLSVerify will skip TLS verification of upstream HTTPS hosts.<br/>This option is insecure and will allow potential Man-In-The-Middle attacks<br/>between OAuth2 Proxy and the upstream server.<br/>Defaults to false. |
|
||||
| `static` | _bool_ | Static will make all requests to this upstream have a static response.<br/>The response will have a body of "Authenticated" and a response code<br/>matching StaticCode.<br/>If StaticCode is not set, the response will return a 200 response. |
|
||||
| `staticCode` | _int_ | StaticCode determines the response code for the Static response.<br/>This option can only be used with Static enabled. |
|
||||
| `flushInterval` | _[Duration](#duration)_ | FlushInterval is the period between flushing the response buffer when<br/>streaming response from the upstream.<br/>Defaults to 1 second. |
|
||||
| `passHostHeader` | _bool_ | PassHostHeader determines whether the request host header should be proxied<br/>to the upstream server.<br/>Defaults to true. |
|
||||
| `proxyWebSockets` | _bool_ | ProxyWebSockets enables proxying of websockets to upstream servers<br/>Defaults to true. |
|
||||
| `timeout` | _[Duration](#duration)_ | Timeout is the maximum duration the server will wait for a response from the upstream server.<br/>Defaults to 30 seconds. |
|
||||
|
||||
### UpstreamConfig
|
||||
|
||||
(**Appears on:** [AlphaOptions](#alphaoptions))
|
||||
|
||||
UpstreamConfig is a collection of definitions for upstream servers.
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----- | ---- | ----------- |
|
||||
| `proxyRawPath` | _bool_ | ProxyRawPath will pass the raw url path to upstream allowing for urls<br/>like: "/%2F/" which would otherwise be redirected to "/" |
|
||||
| `upstreams` | _[[]Upstream](#upstream)_ | Upstreams represents the configuration for the upstream servers.<br/>Requests will be proxied to this upstream if the path matches the request path. |
|
139
docs/docs/configuration/alpha_config.md.tmpl
Normal file
139
docs/docs/configuration/alpha_config.md.tmpl
Normal file
@@ -0,0 +1,139 @@
|
||||
---
|
||||
id: alpha-config
|
||||
title: Alpha Configuration
|
||||
---
|
||||
|
||||
:::warning
|
||||
This page contains documentation for alpha features.
|
||||
We reserve the right to make breaking changes to the features detailed within this page with no notice.
|
||||
|
||||
Options described in this page may be changed, removed, renamed or moved without prior warning.
|
||||
Please beware of this before you use alpha configuration options.
|
||||
:::
|
||||
|
||||
This page details a set of **alpha** configuration options in a new format.
|
||||
Going forward we are intending to add structured configuration in YAML format to
|
||||
replace the existing TOML based configuration file and flags.
|
||||
|
||||
Below is a reference for the structure of the configuration, with
|
||||
[AlphaOptions](#alphaoptions) as the root of the configuration.
|
||||
|
||||
When using alpha configuration, your config file will look something like below:
|
||||
|
||||
```yaml
|
||||
upstreams:
|
||||
- id: ...
|
||||
...: ...
|
||||
injectRequestHeaders:
|
||||
- name: ...
|
||||
...: ...
|
||||
injectResponseHeaders:
|
||||
- name: ...
|
||||
...: ...
|
||||
```
|
||||
|
||||
Please browse the [reference](#configuration-reference) below for the structure
|
||||
of the new configuration format.
|
||||
|
||||
## Using Alpha Configuration
|
||||
|
||||
To use the new **alpha** configuration, generate a YAML file based on the format
|
||||
described in the [reference](#configuration-reference) below.
|
||||
|
||||
Provide the path to this file using the `--alpha-config` flag.
|
||||
|
||||
:::note
|
||||
When using the `--alpha-config` flag, some options are no longer available.
|
||||
See [removed options](#removed-options) below for more information.
|
||||
:::
|
||||
|
||||
### Converting configuration to the new structure
|
||||
|
||||
Before adding the new `--alpha-config` option, start OAuth2 Proxy using the
|
||||
`convert-config-to-alpha` flag to convert existing configuration to the new format.
|
||||
|
||||
```bash
|
||||
oauth2-proxy --convert-config-to-alpha --config ./path/to/existing/config.cfg
|
||||
```
|
||||
|
||||
This will convert any options supported by the new format to YAML and print the
|
||||
new configuration to `STDOUT`.
|
||||
|
||||
Copy this to a new file, remove any options from your existing configuration
|
||||
noted in [removed options](#removed-options) and then start OAuth2 Proxy using
|
||||
the new config.
|
||||
|
||||
```bash
|
||||
oauth2-proxy --alpha-config ./path/to/new/config.yaml --config ./path/to/existing/config.cfg
|
||||
```
|
||||
|
||||
## Using ENV variables in the alpha configuration
|
||||
|
||||
The alpha package supports the use of environment variables in place of yaml keys, allowing sensitive values to be pulled from somewhere other than the yaml file.
|
||||
When using environment variables, your yaml will look like this:
|
||||
|
||||
```yaml
|
||||
providers:
|
||||
- provider: azure
|
||||
clientSecret: ${CLIENT_SECRET}
|
||||
...
|
||||
```
|
||||
Where CLIENT_SECRET is an environment variable.
|
||||
More information and available patterns can be found [here](https://github.com/a8m/envsubst#docs)
|
||||
|
||||
## Removed options
|
||||
|
||||
The following flags/options and their respective environment variables are no
|
||||
longer available when using alpha configuration:
|
||||
|
||||
<!-- Legacy Upstream FlagSet -->
|
||||
- `flush-interval`/`flush_interval`
|
||||
- `pass-host-header`/`pass_host_header`
|
||||
- `proxy-websockets`/`proxy_websockets`
|
||||
- `ssl-upstream-insecure-skip-verify`/`ssl_upstream_insecure_skip_verify`
|
||||
- `upstream`/`upstreams`
|
||||
|
||||
<!-- Legacy Headers FlagSet -->
|
||||
- `pass-basic-auth`/`pass_basic_auth`
|
||||
- `pass-access-token`/`pass_access_token`
|
||||
- `pass-user-headers`/`pass_user_headers`
|
||||
- `pass-authorization-header`/`pass_authorization_header`
|
||||
- `set-basic-auth`/`set_basic_auth`
|
||||
- `set-xauthrequest`/`set_xauthrequest`
|
||||
- `set-authorization-header`/`set_authorization_header`
|
||||
- `prefer-email-to-user`/`prefer_email_to_user`
|
||||
- `basic-auth-password`/`basic_auth_password`
|
||||
- `skip-auth-strip-headers`/`skip_auth_strip_headers`
|
||||
|
||||
<!-- Legacy provider FlagSet -->
|
||||
- `client-id`/`client_id`
|
||||
- `client-secret`/`client_secret`, and `client-secret-file`/`client_secret_file`
|
||||
- `provider`
|
||||
- `provider-display-name`/`provider_display_name`
|
||||
- `provider-ca-file`/`provider_ca_files`
|
||||
- `login-url`/`login_url`
|
||||
- `redeem-url`/`redeem_url`
|
||||
- `profile-url`/`profile_url`
|
||||
- `resource`
|
||||
- `validate-url`/`validate_url`
|
||||
- `scope`
|
||||
- `prompt`
|
||||
- `approval-prompt`/`approval_prompt`
|
||||
- `acr-values`/`acr_values`
|
||||
- `user-id-claim`/`user_id_claim`
|
||||
- `allowed-group`/`allowed_groups`
|
||||
- `allowed-role`/`allowed_roles`
|
||||
- `jwt-key`/`jwt_key`
|
||||
- `jwt-key-file`/`jwt_key_file`
|
||||
- `pubjwk-url`/`pubjwk_url`
|
||||
|
||||
and all provider-specific options, i.e. any option whose name includes `oidc`,
|
||||
`azure`, `bitbucket`, `github`, `gitlab`, `google` or `keycloak`. Attempting to
|
||||
use any of these options via flags or via config when `--alpha-config` is
|
||||
set will result in an error.
|
||||
|
||||
:::important
|
||||
You must remove these options before starting OAuth2 Proxy with `--alpha-config`
|
||||
:::
|
||||
|
||||
## Configuration Reference
|
318
docs/docs/configuration/integration.md
Normal file
318
docs/docs/configuration/integration.md
Normal file
@@ -0,0 +1,318 @@
|
||||
---
|
||||
id: integration
|
||||
title: Integration
|
||||
---
|
||||
|
||||
## Configuring for use with the Nginx `auth_request` directive
|
||||
|
||||
**This option requires `--reverse-proxy` option to be set.**
|
||||
|
||||
The [Nginx `auth_request` directive](http://nginx.org/en/docs/http/ngx_http_auth_request_module.html) allows Nginx to authenticate requests via the oauth2-proxy's `/auth` endpoint, which only returns a 202 Accepted response or a 401 Unauthorized response without proxying the request through. For example:
|
||||
|
||||
```nginx
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name ...;
|
||||
include ssl/ssl.conf;
|
||||
|
||||
location /oauth2/ {
|
||||
proxy_pass http://127.0.0.1:4180;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Auth-Request-Redirect $request_uri;
|
||||
# or, if you are handling multiple domains:
|
||||
# proxy_set_header X-Auth-Request-Redirect $scheme://$host$request_uri;
|
||||
}
|
||||
location = /oauth2/auth {
|
||||
proxy_pass http://127.0.0.1:4180;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-Uri $request_uri;
|
||||
# nginx auth_request includes headers but not body
|
||||
proxy_set_header Content-Length "";
|
||||
proxy_pass_request_body off;
|
||||
}
|
||||
|
||||
location / {
|
||||
auth_request /oauth2/auth;
|
||||
error_page 401 =403 /oauth2/sign_in;
|
||||
|
||||
# pass information via X-User and X-Email headers to backend,
|
||||
# requires running with --set-xauthrequest flag
|
||||
auth_request_set $user $upstream_http_x_auth_request_user;
|
||||
auth_request_set $email $upstream_http_x_auth_request_email;
|
||||
proxy_set_header X-User $user;
|
||||
proxy_set_header X-Email $email;
|
||||
|
||||
# if you enabled --pass-access-token, this will pass the token to the backend
|
||||
auth_request_set $token $upstream_http_x_auth_request_access_token;
|
||||
proxy_set_header X-Access-Token $token;
|
||||
|
||||
# if you enabled --cookie-refresh, this is needed for it to work with auth_request
|
||||
auth_request_set $auth_cookie $upstream_http_set_cookie;
|
||||
add_header Set-Cookie $auth_cookie;
|
||||
|
||||
# When using the --set-authorization-header flag, some provider's cookies can exceed the 4kb
|
||||
# limit and so the OAuth2 Proxy splits these into multiple parts.
|
||||
# Nginx normally only copies the first `Set-Cookie` header from the auth_request to the response,
|
||||
# so if your cookies are larger than 4kb, you will need to extract additional cookies manually.
|
||||
auth_request_set $auth_cookie_name_upstream_1 $upstream_cookie_auth_cookie_name_1;
|
||||
|
||||
# Extract the Cookie attributes from the first Set-Cookie header and append them
|
||||
# to the second part ($upstream_cookie_* variables only contain the raw cookie content)
|
||||
if ($auth_cookie ~* "(; .*)") {
|
||||
set $auth_cookie_name_0 $auth_cookie;
|
||||
set $auth_cookie_name_1 "auth_cookie_name_1=$auth_cookie_name_upstream_1$1";
|
||||
}
|
||||
|
||||
# Send both Set-Cookie headers now if there was a second part
|
||||
if ($auth_cookie_name_upstream_1) {
|
||||
add_header Set-Cookie $auth_cookie_name_0;
|
||||
add_header Set-Cookie $auth_cookie_name_1;
|
||||
}
|
||||
|
||||
proxy_pass http://backend/;
|
||||
# or "root /path/to/site;" or "fastcgi_pass ..." etc
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
When you use ingress-nginx in Kubernetes, you MUST use `kubernetes/ingress-nginx` (which includes the Lua module) and the following configuration snippet for your `Ingress`.
|
||||
Variables set with `auth_request_set` are not `set`-able in plain nginx config when the location is processed via `proxy_pass` and then may only be processed by Lua.
|
||||
Note that `nginxinc/kubernetes-ingress` does not include the Lua module.
|
||||
|
||||
```yaml
|
||||
nginx.ingress.kubernetes.io/auth-response-headers: Authorization
|
||||
nginx.ingress.kubernetes.io/auth-signin: https://$host/oauth2/start?rd=$escaped_request_uri
|
||||
nginx.ingress.kubernetes.io/auth-url: https://$host/oauth2/auth
|
||||
nginx.ingress.kubernetes.io/configuration-snippet: |
|
||||
auth_request_set $name_upstream_1 $upstream_cookie_name_1;
|
||||
|
||||
access_by_lua_block {
|
||||
if ngx.var.name_upstream_1 ~= "" then
|
||||
ngx.header["Set-Cookie"] = "name_1=" .. ngx.var.name_upstream_1 .. ngx.var.auth_cookie:match("(; .*)")
|
||||
end
|
||||
}
|
||||
```
|
||||
It is recommended to use `--session-store-type=redis` when expecting large sessions/OIDC tokens (_e.g._ with MS Azure).
|
||||
|
||||
You have to substitute *name* with the actual cookie name you configured via --cookie-name parameter. If you don't set a custom cookie name the variable should be "$upstream_cookie__oauth2_proxy_1" instead of "$upstream_cookie_name_1" and the new cookie-name should be "_oauth2_proxy_1=" instead of "name_1=".
|
||||
|
||||
## Configuring for use with the Traefik (v2) `ForwardAuth` middleware
|
||||
|
||||
**This option requires `--reverse-proxy` option to be set.**
|
||||
|
||||
### ForwardAuth with 401 errors middleware
|
||||
|
||||
The [Traefik v2 `ForwardAuth` middleware](https://doc.traefik.io/traefik/middlewares/http/forwardauth/) allows Traefik to authenticate requests via the oauth2-proxy's `/oauth2/auth` endpoint on every request, which only returns a 202 Accepted response or a 401 Unauthorized response without proxying the whole request through. For example, on Dynamic File (YAML) Configuration:
|
||||
|
||||
```yaml
|
||||
http:
|
||||
routers:
|
||||
a-service:
|
||||
rule: "Host(`a-service.example.com`)"
|
||||
service: a-service-backend
|
||||
middlewares:
|
||||
- oauth-errors
|
||||
- oauth-auth
|
||||
tls:
|
||||
certResolver: default
|
||||
domains:
|
||||
- main: "example.com"
|
||||
sans:
|
||||
- "*.example.com"
|
||||
oauth:
|
||||
rule: "Host(`a-service.example.com`, `oauth.example.com`) && PathPrefix(`/oauth2/`)"
|
||||
middlewares:
|
||||
- auth-headers
|
||||
service: oauth-backend
|
||||
tls:
|
||||
certResolver: default
|
||||
domains:
|
||||
- main: "example.com"
|
||||
sans:
|
||||
- "*.example.com"
|
||||
|
||||
services:
|
||||
a-service-backend:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: http://172.16.0.2:7555
|
||||
oauth-backend:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: http://172.16.0.1:4180
|
||||
|
||||
middlewares:
|
||||
auth-headers:
|
||||
headers:
|
||||
sslRedirect: true
|
||||
stsSeconds: 315360000
|
||||
browserXssFilter: true
|
||||
contentTypeNosniff: true
|
||||
forceSTSHeader: true
|
||||
sslHost: example.com
|
||||
stsIncludeSubdomains: true
|
||||
stsPreload: true
|
||||
frameDeny: true
|
||||
oauth-auth:
|
||||
forwardAuth:
|
||||
address: https://oauth.example.com/oauth2/auth
|
||||
trustForwardHeader: true
|
||||
oauth-errors:
|
||||
errors:
|
||||
status:
|
||||
- "401-403"
|
||||
service: oauth-backend
|
||||
query: "/oauth2/sign_in?rd={url}"
|
||||
```
|
||||
|
||||
### ForwardAuth with static upstreams configuration
|
||||
|
||||
Redirect to sign_in functionality provided without the use of `errors` middleware with [Traefik v2 `ForwardAuth` middleware](https://doc.traefik.io/traefik/middlewares/http/forwardauth/) pointing to oauth2-proxy service's `/` endpoint
|
||||
|
||||
**Following options need to be set on `oauth2-proxy`:**
|
||||
- `--upstream=static://202`: Configures a static response for authenticated sessions
|
||||
- `--reverse-proxy=true`: Enables the use of `X-Forwarded-*` headers to determine redirects correctly
|
||||
|
||||
```yaml
|
||||
http:
|
||||
routers:
|
||||
a-service-route-1:
|
||||
rule: "Host(`a-service.example.com`, `b-service.example.com`) && PathPrefix(`/`)"
|
||||
service: a-service-backend
|
||||
middlewares:
|
||||
- oauth-auth-redirect # redirects all unauthenticated to oauth2 signin
|
||||
tls:
|
||||
certResolver: default
|
||||
domains:
|
||||
- main: "example.com"
|
||||
sans:
|
||||
- "*.example.com"
|
||||
a-service-route-2:
|
||||
rule: "Host(`a-service.example.com`) && PathPrefix(`/no-auto-redirect`)"
|
||||
service: a-service-backend
|
||||
middlewares:
|
||||
- oauth-auth-wo-redirect # unauthenticated session will return a 401
|
||||
tls:
|
||||
certResolver: default
|
||||
domains:
|
||||
- main: "example.com"
|
||||
sans:
|
||||
- "*.example.com"
|
||||
services-oauth2-route:
|
||||
rule: "Host(`a-service.example.com`, `b-service.example.com`) && PathPrefix(`/oauth2/`)"
|
||||
middlewares:
|
||||
- auth-headers
|
||||
service: oauth-backend
|
||||
tls:
|
||||
certResolver: default
|
||||
domains:
|
||||
- main: "example.com"
|
||||
sans:
|
||||
- "*.example.com"
|
||||
oauth2-proxy-route:
|
||||
rule: "Host(`oauth.example.com`) && PathPrefix(`/`)"
|
||||
middlewares:
|
||||
- auth-headers
|
||||
service: oauth-backend
|
||||
tls:
|
||||
certResolver: default
|
||||
domains:
|
||||
- main: "example.com"
|
||||
sans:
|
||||
- "*.example.com"
|
||||
|
||||
services:
|
||||
a-service-backend:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: http://172.16.0.2:7555
|
||||
b-service-backend:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: http://172.16.0.3:7555
|
||||
oauth-backend:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: http://172.16.0.1:4180
|
||||
|
||||
middlewares:
|
||||
auth-headers:
|
||||
headers:
|
||||
sslRedirect: true
|
||||
stsSeconds: 315360000
|
||||
browserXssFilter: true
|
||||
contentTypeNosniff: true
|
||||
forceSTSHeader: true
|
||||
sslHost: example.com
|
||||
stsIncludeSubdomains: true
|
||||
stsPreload: true
|
||||
frameDeny: true
|
||||
oauth-auth-redirect:
|
||||
forwardAuth:
|
||||
address: https://oauth.example.com/
|
||||
trustForwardHeader: true
|
||||
authResponseHeaders:
|
||||
- X-Auth-Request-Access-Token
|
||||
- Authorization
|
||||
oauth-auth-wo-redirect:
|
||||
forwardAuth:
|
||||
address: https://oauth.example.com/oauth2/auth
|
||||
trustForwardHeader: true
|
||||
authResponseHeaders:
|
||||
- X-Auth-Request-Access-Token
|
||||
- Authorization
|
||||
```
|
||||
|
||||
## Configuring for use with the Caddy (v2) `forward_auth` directive
|
||||
|
||||
The [Caddy `forward_auth` directive](https://caddyserver.com/docs/caddyfile/directives/forward_auth) allows Caddy to authenticate requests via the `oauth2-proxy`'s `/auth`.
|
||||
|
||||
This example is for a simple reverse proxy setup where the `/oauth2/` path is kept under the same domain and failed auth requests (401 status returned) will be caught and redirected to the `sign_in` endpoint.
|
||||
|
||||
**Following options need to be set on `oauth2-proxy`:**
|
||||
- `--reverse-proxy=true`: Enables the use of `X-Forwarded-*` headers to determine redirects correctly
|
||||
|
||||
```nginx title="Caddyfile"
|
||||
example.com {
|
||||
# Requests to /oauth2/* are proxied to oauth2-proxy without authentication.
|
||||
# You can't use `reverse_proxy /oauth2/* oauth2-proxy.internal:4180` here because the reverse_proxy directive has lower precedence than the handle directive.
|
||||
handle /oauth2/* {
|
||||
reverse_proxy oauth2-proxy.internal:4180 {
|
||||
# oauth2-proxy requires the X-Real-IP and X-Forwarded-{Proto,Host,Uri} headers.
|
||||
# The reverse_proxy directive automatically sets X-Forwarded-{For,Proto,Host} headers.
|
||||
header_up X-Real-IP {remote_host}
|
||||
header_up X-Forwarded-Uri {uri}
|
||||
}
|
||||
}
|
||||
|
||||
# Requests to other paths are first processed by oauth2-proxy for authentication.
|
||||
handle {
|
||||
forward_auth oauth2-proxy.internal:4180 {
|
||||
uri /oauth2/auth
|
||||
|
||||
# oauth2-proxy requires the X-Real-IP and X-Forwarded-{Proto,Host,Uri} headers.
|
||||
# The forward_auth directive automatically sets the X-Forwarded-{For,Proto,Host,Method,Uri} headers.
|
||||
header_up X-Real-IP {remote_host}
|
||||
|
||||
# If needed, you can copy headers from the oauth2-proxy response to the request sent to the upstream.
|
||||
# Make sure to configure the --set-xauthrequest flag to enable this feature.
|
||||
#copy_headers X-Auth-Request-User X-Auth-Request-Email
|
||||
|
||||
# If oauth2-proxy returns a 401 status, redirect the client to the sign-in page.
|
||||
@error status 401
|
||||
handle_response @error {
|
||||
redir * /oauth2/sign_in?rd={scheme}://{host}{uri}
|
||||
}
|
||||
}
|
||||
|
||||
# If oauth2-proxy returns a 2xx status, the request is then proxied to the upstream.
|
||||
reverse_proxy upstream.internal:3000
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
:::note
|
||||
If you set up your OAuth2 provider to rotate your client secret, you can use the `client-secret-file` option to reload the secret when it is updated.
|
||||
:::
|
405
docs/docs/configuration/overview.md
Normal file
405
docs/docs/configuration/overview.md
Normal file
@@ -0,0 +1,405 @@
|
||||
---
|
||||
id: overview
|
||||
title: Overview
|
||||
---
|
||||
|
||||
`oauth2-proxy` can be configured via [command line options](#command-line-options), [environment variables](#environment-variables) or [config file](#config-file) (in decreasing order of precedence, i.e. command line options will overwrite environment variables and environment variables will overwrite configuration file settings).
|
||||
|
||||
## Generating a Cookie Secret
|
||||
|
||||
To generate a strong cookie secret use one of the below commands:
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
<Tabs defaultValue="python">
|
||||
<TabItem value="python" label="Python">
|
||||
|
||||
```shell
|
||||
python -c 'import os,base64; print(base64.urlsafe_b64encode(os.urandom(32)).decode())'
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="bash" label="Bash">
|
||||
|
||||
```shell
|
||||
dd if=/dev/urandom bs=32 count=1 2>/dev/null | base64 | tr -d -- '\n' | tr -- '+/' '-_' ; echo
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="openssl" label="OpenSSL">
|
||||
|
||||
```shell
|
||||
openssl rand -base64 32 | tr -- '+/' '-_'
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="powershell" label="PowerShell">
|
||||
|
||||
```powershell
|
||||
# Add System.Web assembly to session, just in case
|
||||
Add-Type -AssemblyName System.Web
|
||||
[Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes([System.Web.Security.Membership]::GeneratePassword(32,4))).Replace("+","-").Replace("/","_")
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="terraform" label="Terraform">
|
||||
|
||||
```hcl
|
||||
# Valid 32 Byte Base64 URL encoding set that will decode to 24 []byte AES-192 secret
|
||||
resource "random_password" "cookie_secret" {
|
||||
length = 32
|
||||
override_special = "-_"
|
||||
}
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Config File
|
||||
|
||||
Every command line argument can be specified in a config file by replacing hyphens (-) with underscores (\_). If the argument can be specified multiple times, the config option should be plural (trailing s).
|
||||
|
||||
An example [oauth2-proxy.cfg](https://github.com/oauth2-proxy/oauth2-proxy/blob/master/contrib/oauth2-proxy.cfg.example) config file is in the contrib directory. It can be used by specifying `--config=/etc/oauth2-proxy.cfg`
|
||||
|
||||
## Config Options
|
||||
|
||||
### Command Line Options
|
||||
|
||||
| Flag | Description |
|
||||
| ----------- | -------------------- |
|
||||
| `--config` | path to config file |
|
||||
| `--version` | print version string |
|
||||
|
||||
|
||||
### General Provider Options
|
||||
|
||||
Provider specific options can be found on their respective subpages.
|
||||
|
||||
| Flag / Config Field | Type | Description | Default |
|
||||
| --------------------------------------------------------------------------------------------------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
|
||||
| flag: `--acr-values`<br/>toml: `acr_values` | string | optional, see [docs](https://openid.net/specs/openid-connect-eap-acr-values-1_0.html#acrValues) | `""` |
|
||||
| flag: `--allowed-group`<br/>toml: `allowed_groups` | string \| list | Restrict login to members of a group or list of groups. Furthermore, if you aren't setting the `scope` and use `allowed_groups` with the generic OIDC provider the scope `groups` gets added implicitly. | |
|
||||
| flag: `--approval-prompt`<br/>toml: `approval_prompt` | string | OAuth approval_prompt | `"force"` |
|
||||
| flag: `--backend-logout-url`<br/>toml: `backend_logout_url` | string | URL to perform backend logout, if you use `{id_token}` in the url it will be replaced by the actual `id_token` of the user session | |
|
||||
| flag: `--client-id`<br/>toml: `client_id` | string | the OAuth Client ID, e.g. `"123456.apps.googleusercontent.com"` | |
|
||||
| flag: `--client-secret-file`<br/>toml: `client_secret_file` | string | the file with OAuth Client Secret | |
|
||||
| flag: `--client-secret`<br/>toml: `client_secret` | string | the OAuth Client Secret | |
|
||||
| flag: `--code-challenge-method`<br/>toml: `code_challenge_method` | string | use PKCE code challenges with the specified method. Either 'plain' or 'S256' (recommended) | |
|
||||
| flag: `--insecure-oidc-allow-unverified-email`<br/>toml: `insecure_oidc_allow_unverified_email` | bool | don't fail if an email address in an id_token is not verified | false |
|
||||
| flag: `--insecure-oidc-skip-issuer-verification`<br/>toml: `insecure_oidc_skip_issuer_verification` | bool | allow the OIDC issuer URL to differ from the expected (currently required for Azure multi-tenant compatibility) | false |
|
||||
| flag: `--insecure-oidc-skip-nonce`<br/>toml: `insecure_oidc_skip_nonce` | bool | skip verifying the OIDC ID Token's nonce claim | true |
|
||||
| flag: `--jwt-key-file`<br/>toml: `jwt_key_file` | string | path to the private key file in PEM format used to sign the JWT so that you can say something like `--jwt-key-file=/etc/ssl/private/jwt_signing_key.pem`: required by login.gov | |
|
||||
| flag: `--jwt-key`<br/>toml: `jwt_key` | string | private key in PEM format used to sign JWT, so that you can say something like `--jwt-key="${OAUTH2_PROXY_JWT_KEY}"`: required by login.gov | |
|
||||
| flag: `--login-url`<br/>toml: `login_url` | string | Authentication endpoint | |
|
||||
| flag: `--auth-request-response-mode`<br/>toml: `auth-request-response-mode` | string | Response mode to ask for during authentication request | |
|
||||
| flag: `--oidc-audience-claim`<br/>toml: `oidc_audience_claims` | string | which OIDC claim contains the audience | `"aud"` |
|
||||
| flag: `--oidc-email-claim`<br/>toml: `oidc_email_claim` | string | which OIDC claim contains the user's email | `"email"` |
|
||||
| flag: `--oidc-extra-audience`<br/>toml: `oidc_extra_audiences` | string \| list | additional audiences which are allowed to pass verification | `"[]"` |
|
||||
| flag: `--oidc-groups-claim`<br/>toml: `oidc_groups_claim` | string | which OIDC claim contains the user groups | `"groups"` |
|
||||
| flag: `--oidc-issuer-url`<br/>toml: `oidc_issuer_url` | string | the OpenID Connect issuer URL, e.g. `"https://accounts.google.com"` | |
|
||||
| flag: `--oidc-jwks-url`<br/>toml: `oidc_jwks_url` | string | OIDC JWKS URI for token verification; required if OIDC discovery is disabled and public key files are not provided | |
|
||||
| flag: `--oidc-public-key-file`<br/>toml: `oidc_public_key_files` | string | Path to public key file in PEM format to use for verifying JWT tokens (may be given multiple times). Required if OIDC discovery is disabled na JWKS URL isn't provided | string \| list |
|
||||
| flag: `--profile-url`<br/>toml: `profile_url` | string | Profile access endpoint | |
|
||||
| flag: `--prompt`<br/>toml: `prompt` | string | [OIDC prompt](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest); if present, `approval-prompt` is ignored | `""` |
|
||||
| flag: `--provider-ca-file`<br/>toml: `provider_ca_files` | string \| list | Paths to CA certificates that should be used when connecting to the provider. If not specified, the default Go trust sources are used instead. |
|
||||
| flag: `--provider-display-name`<br/>toml: `provider_display_name` | string | Override the provider's name with the given string; used for the sign-in page | (depends on provider) |
|
||||
| flag: `--provider`<br/>toml: `provider` | string | OAuth provider | google |
|
||||
| flag: `--pubjwk-url`<br/>toml: `pubjwk_url` | string | JWK pubkey access endpoint: required by login.gov | |
|
||||
| flag: `--redeem-url`<br/>toml: `redeem_url` | string | Token redemption endpoint | |
|
||||
| flag: `--scope`<br/>toml:`scope` | string | OAuth scope specification. Every provider has a default list of scopes which will be used in case no scope is configured. | |
|
||||
| flag: `--skip-claims-from-profile-url`<br/>toml: `skip_claims_from_profile_url` | bool | skip request to Profile URL for resolving claims not present in id_token | false |
|
||||
| flag: `--skip-oidc-discovery`<br/>toml: `skip_oidc_discovery` | bool | bypass OIDC endpoint discovery. `--login-url`, `--redeem-url` and `--oidc-jwks-url` must be configured in this case | false |
|
||||
| flag: `--use-system-trust-store`<br/>toml: `use_system_trust_store` | bool | Determines if `provider-ca-file` files and the system trust store are used. If set to true, your custom CA files and the system trust store are used otherwise only your custom CA files. | false |
|
||||
| flag: `--validate-url`<br/>toml: `validate_url` | string | Access token validation endpoint | |
|
||||
|
||||
### Cookie Options
|
||||
|
||||
| Flag / Config Field | Type | Description | Default |
|
||||
| --------------------------------------------------------------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- |
|
||||
| flag: `--cookie-csrf-expire`<br/>toml: `cookie_csrf_expire` | duration | expire timeframe for CSRF cookie | 15m |
|
||||
| flag: `--cookie-csrf-per-request`<br/>toml:`cookie_csrf_per_request` | bool | Enable having different CSRF cookies per request, making it possible to have parallel requests. | false |
|
||||
| flag: `--cookie-csrf-per-request-limit`<br/>toml: `cookie_csrf_per_request_limit` | int | Sets a limit on the number of CSRF requests cookies that oauth2-proxy will create. The oldest cookie will be removed. Useful if users end up with 431 Request headers too large status codes. Only effective if --cookie-csrf-per-request is true | "infinite" |
|
||||
| flag: `--cookie-domain`<br/>toml: `cookie_domains` | string \| list | Optional cookie domains to force cookies to (e.g. `.yourcompany.com`). The longest domain matching the request's host will be used (or the shortest cookie domain if there is no match). | |
|
||||
| flag: `--cookie-expire`<br/>toml: `cookie_expire` | duration | expire timeframe for cookie. If set to 0, cookie becomes a session-cookie which will expire when the browser is closed. | 168h0m0s |
|
||||
| flag: `--cookie-httponly`<br/>toml: `cookie_httponly` | bool | set HttpOnly cookie flag | true |
|
||||
| flag: `--cookie-name`<br/>toml: `cookie_name` | string | the name of the cookie that the oauth_proxy creates. Should be changed to use a [cookie prefix](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#cookie_prefixes) (`__Host-` or `__Secure-`) if `--cookie-secure` is set. | `"_oauth2_proxy"` |
|
||||
| flag: `--cookie-path`<br/>toml: `cookie_path` | string | an optional cookie path to force cookies to (e.g. `/poc/`) | `"/"` |
|
||||
| flag: `--cookie-refresh`<br/>toml: `cookie_refresh` | duration | refresh the cookie after this duration; `0` to disable; not supported by all providers [^1] | |
|
||||
| flag: `--cookie-samesite`<br/>toml: `cookie_samesite` | string | set SameSite cookie attribute (`"lax"`, `"strict"`, `"none"`, or `""`). | `""` |
|
||||
| flag: `--cookie-secret`<br/>toml: `cookie_secret` | string | the seed string for secure cookies (optionally base64 encoded) | |
|
||||
| flag: `--cookie-secret-file`<br/>toml: `cookie_secret_file` | string | For defining a separate cookie secret file to read the encryption key from | |
|
||||
| flag: `--cookie-secure`<br/>toml: `cookie_secure` | bool | set [secure (HTTPS only) cookie flag](https://owasp.org/www-community/controls/SecureFlag) | true |
|
||||
|
||||
[^1]: The following providers support `--cookie-refresh`: ADFS, Azure, GitLab, Google, Keycloak and all other Identity Providers which support the full [OIDC specification](https://openid.net/specs/openid-connect-core-1_0.html#RefreshTokens)
|
||||
|
||||
### Header Options
|
||||
|
||||
| Flag / Config Field | Type | Description | Default |
|
||||
| ------------------------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
||||
| flag: `--basic-auth-password`<br/>toml: `basic_auth_password` | string | the password to set when passing the HTTP Basic Auth header | |
|
||||
| flag: `--set-xauthrequest`<br/>toml: `set_xauthrequest` | bool | set X-Auth-Request-User, X-Auth-Request-Groups, X-Auth-Request-Email and X-Auth-Request-Preferred-Username response headers (useful in Nginx auth_request mode). When used with `--pass-access-token`, X-Auth-Request-Access-Token is added to response headers. | false |
|
||||
| flag: `--set-authorization-header`<br/>toml: `set_authorization_header` | bool | set Authorization Bearer response header (useful in Nginx auth_request mode) | false |
|
||||
| flag: `--set-basic-auth`<br/>toml: `set_basic_auth` | bool | set HTTP Basic Auth information in response (useful in Nginx auth_request mode) | false |
|
||||
| flag: `--skip-auth-strip-headers`<br/>toml: `skip_auth_strip_headers` | bool | strips `X-Forwarded-*` style authentication headers & `Authorization` header if they would be set by oauth2-proxy | true |
|
||||
| flag: `--pass-access-token`<br/>toml: `pass_access_token` | bool | pass OAuth access_token to upstream via X-Forwarded-Access-Token header. When used with `--set-xauthrequest` this adds the X-Auth-Request-Access-Token header to the response | false |
|
||||
| flag: `--pass-authorization-header`<br/>toml: `pass_authorization_header` | bool | pass OIDC IDToken to upstream via Authorization Bearer header | false |
|
||||
| flag: `--pass-basic-auth`<br/>toml: `pass_basic_auth` | bool | pass HTTP Basic Auth, X-Forwarded-User, X-Forwarded-Email and X-Forwarded-Preferred-Username information to upstream | true |
|
||||
| flag: `--prefer-email-to-user`<br/>toml: `prefer_email_to_user` | bool | Prefer to use the Email address as the Username when passing information to upstream. Will only use Username if Email is unavailable, e.g. htaccess authentication. Used in conjunction with `--pass-basic-auth` and `--pass-user-headers` | false |
|
||||
| flag: `--pass-user-headers`<br/>toml: `pass_user_headers` | bool | pass X-Forwarded-User, X-Forwarded-Groups, X-Forwarded-Email and X-Forwarded-Preferred-Username information to upstream | true |
|
||||
|
||||
### Logging Options
|
||||
|
||||
| Flag / Config Field | Type | Description | Default |
|
||||
| --------------------------------------------------------------------- | ------ | ---------------------------------------------------------------------------- | --------------------------------------------------- |
|
||||
| flag: `--auth-logging-format`<br/>toml: `auth_logging_format` | string | Template for authentication log lines | see [Logging Configuration](#logging-configuration) |
|
||||
| flag: `--auth-logging`<br/>toml: `auth_logging` | bool | Log authentication attempts | true |
|
||||
| flag: `--errors-to-info-log`<br/>toml: `errors_to_info_log` | bool | redirects error-level logging to default log channel instead of stderr | false |
|
||||
| flag: `--exclude-logging-path`<br/>toml: `exclude_logging_paths` | string | comma separated list of paths to exclude from logging, e.g. `"/ping,/path2"` | `""` (no paths excluded) |
|
||||
| flag: `--logging-compress`<br/>toml: `logging_compress` | bool | Should rotated log files be compressed using gzip | false |
|
||||
| flag: `--logging-filename`<br/>toml: `logging_filename` | string | File to log requests to, empty for `stdout` | `""` (stdout) |
|
||||
| flag: `--logging-local-time`<br/>toml: `logging_local_time` | bool | Use local time in log files and backup filenames instead of UTC | true (local time) |
|
||||
| flag: `--logging-max-age`<br/>toml: `logging_max_age` | int | Maximum number of days to retain old log files | 7 |
|
||||
| flag: `--logging-max-backups`<br/>toml: `logging_max_backups` | int | Maximum number of old log files to retain; 0 to disable | 0 |
|
||||
| flag: `--logging-max-size`<br/>toml: `logging_max_size` | int | Maximum size in megabytes of the log file before rotation | 100 |
|
||||
| flag: `--request-id-header`<br/>toml: `request_id_header` | string | Request header to use as the request ID in logging | X-Request-Id |
|
||||
| flag: `--request-logging-format`<br/>toml: `request_logging_format` | string | Template for request log lines | see [Logging Configuration](#logging-configuration) |
|
||||
| flag: `--request-logging`<br/>toml: `request_logging` | bool | Log requests | true |
|
||||
| flag: `--silence-ping-logging`<br/>toml: `silence_ping_logging` | bool | disable logging of requests to ping & ready endpoints | false |
|
||||
| flag: `--standard-logging-format`<br/>toml: `standard_logging_format` | string | Template for standard log lines | see [Logging Configuration](#logging-configuration) |
|
||||
| flag: `--standard-logging`<br/>toml: `standard_logging` | bool | Log standard runtime information | true |
|
||||
|
||||
### Page Template Options
|
||||
|
||||
| Flag / Config Field | Type | Description | Default |
|
||||
| ----------------------------------------------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------- | ------- |
|
||||
| flag: `--banner`<br/>toml: `banner` | string | custom (html) banner string. Use `"-"` to disable default banner. | |
|
||||
| flag: `--custom-sign-in-logo`<br/>toml: `custom_sign_in_logo` | string | path or a URL to an custom image for the sign_in page logo. Use `"-"` to disable default logo. |
|
||||
| flag: `--custom-templates-dir`<br/>toml: `custom_templates_dir` | string | path to custom html templates | |
|
||||
| flag: `--display-htpasswd-form`<br/>toml: `display_htpasswd_form` | bool | display username / password login form if an htpasswd file is provided | true |
|
||||
| flag: `--footer`<br/>toml: `footer` | string | custom (html) footer string. Use `"-"` to disable default footer. (Can be used to obfuscate the version) | |
|
||||
| flag: `--show-debug-on-error`<br/>toml: `show_debug_on_error` | bool | show detailed error information on error pages (WARNING: this may contain sensitive information - do not use in production) | false |
|
||||
|
||||
### Probe Options
|
||||
|
||||
| Flag / Config Field | Type | Description | Default |
|
||||
| ------------------------------------------------------- | ------ | ---------------------------------------------------------- | ----------------------------- |
|
||||
| flag: `--ping-path`<br/>toml: `ping_path` | string | the ping endpoint that can be used for basic health checks | `"/ping"` |
|
||||
| flag: `--ping-user-agent`<br/>toml: `ping_user_agent` | string | a User-Agent that can be used for basic health checks | `""` (don't check user agent) |
|
||||
| flag: `--ready-path`<br/>toml: `ready_path` | string | the ready endpoint that can be used for deep health checks | `"/ready"` |
|
||||
| flag: `--gcp-healthchecks`<br/>toml: `gcp_healthchecks` | bool | Enable GCP/GKE healthcheck endpoints (deprecated) | false |
|
||||
|
||||
### Proxy Options
|
||||
|
||||
| Flag / Config Field | Type | Description | Default |
|
||||
| ----------------------------------------------------------------------------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
|
||||
| flag: `--allow-query-semicolons`<br/>toml: `allow_query_semicolons` | bool | allow the use of semicolons in query args ([required for some legacy applications](https://github.com/golang/go/issues/25192)) | `false` |
|
||||
| flag: `--api-route`<br/>toml: `api_routes` | string \| list | Requests to these paths must already be authenticated with a cookie, or a JWT if `--skip-jwt-bearer-tokens` is set. No redirect to login will be done. Return 401 if not. Format: path_regex | |
|
||||
| flag: `--authenticated-emails-file`<br/>toml: `authenticated_emails_file` | string | authenticate against emails via file (one per line) | |
|
||||
| flag: `--bearer-token-login-fallback`<br/>toml: `bearer_token_login_fallback` | bool | if `--skip-jwt-bearer-tokens` is set, if a request includes an invalid JWT (expired, malformed, missing required audiences, etc), fall back to normal login redirect as if the token were not sent at all. If false, respond 403 | true |
|
||||
| flag: `--email-domain`<br/>toml: `email_domains` | string \| list | authenticate emails with the specified domain (may be given multiple times). Use `*` to authenticate any email | |
|
||||
| flag: `--encode-state`<br/>toml: `encode_state` | bool | encode the state parameter as UrlEncodedBase64 | false |
|
||||
| flag: `--extra-jwt-issuers`<br/>toml: `extra_jwt_issuers` | string | if `--skip-jwt-bearer-tokens` is set, a list of extra JWT `issuer=audience` (see a token's `iss`, `aud` fields) pairs (where the issuer URL has a `.well-known/openid-configuration` or a `.well-known/jwks.json`) | |
|
||||
| flag: `--force-https`<br/>toml: `force_https` | bool | enforce https redirect | `false` |
|
||||
| flag: `--force-json-errors`<br/>toml: `force_json_errors` | bool | force JSON errors instead of HTTP error pages or redirects | `false` |
|
||||
| flag: `--htpasswd-file`<br/>toml: `htpasswd_file` | string | additionally authenticate against a htpasswd file. Entries must be created with `htpasswd -B` for bcrypt encryption | |
|
||||
| flag: `--htpasswd-user-group`<br/>toml: `htpasswd_user_groups` | string \| list | the groups to be set on sessions for htpasswd users | |
|
||||
| flag: `--proxy-prefix`<br/>toml: `proxy_prefix` | string | the url root path that this proxy should be nested under (e.g. /`<oauth2>/sign_in`) | `"/oauth2"` |
|
||||
| flag: `--real-client-ip-header`<br/>toml: `real_client_ip_header` | string | Header used to determine the real IP of the client, requires `--reverse-proxy` to be set (one of: X-Forwarded-For, X-Real-IP, X-ProxyUser-IP, X-Envoy-External-Address, or CF-Connecting-IP) | X-Real-IP |
|
||||
| flag: `--redirect-url`<br/>toml: `redirect_url` | string | the OAuth Redirect URL, e.g. `"https://internalapp.yourcompany.com/oauth2/callback"` | |
|
||||
| flag: `--relative-redirect-url`<br/>toml: `relative_redirect_url` | bool | allow relative OAuth Redirect URL.` | false |
|
||||
| flag: `--reverse-proxy`<br/>toml: `reverse_proxy` | bool | are we running behind a reverse proxy, controls whether headers like X-Real-IP are accepted and allows X-Forwarded-\{Proto,Host,Uri\} headers to be used on redirect selection | false |
|
||||
| flag: `--signature-key`<br/>toml: `signature_key` | string | GAP-Signature request signature key (algorithm:secretkey) | |
|
||||
| flag: `--skip-auth-preflight`<br/>toml: `skip_auth_preflight` | bool | will skip authentication for OPTIONS requests | false |
|
||||
| flag: `--skip-auth-regex`<br/>toml: `skip_auth_regex` | string \| list | (DEPRECATED for `--skip-auth-route`) bypass authentication for requests paths that match (may be given multiple times) | |
|
||||
| flag: `--skip-auth-route`<br/>toml: `skip_auth_routes` | string \| list | bypass authentication for requests that match the method & path. Format: method=path_regex OR method!=path_regex. For all methods: path_regex OR !=path_regex | |
|
||||
| flag: `--skip-jwt-bearer-tokens`<br/>toml: `skip_jwt_bearer_tokens` | bool | will skip requests that have verified JWT bearer tokens (the token must have [`aud`](https://en.wikipedia.org/wiki/JSON_Web_Token#Standard_fields) that matches this client id or one of the extras from `extra-jwt-issuers`) | false |
|
||||
| flag: `--skip-provider-button`<br/>toml: `skip_provider_button` | bool | will skip sign-in-page to directly reach the next step: oauth/start | false |
|
||||
| flag: `--ssl-insecure-skip-verify`<br/>toml: `ssl_insecure_skip_verify` | bool | skip validation of certificates presented when using HTTPS providers | false |
|
||||
| flag: `--trusted-ip`<br/>toml: `trusted_ips` | string \| list | list of IPs or CIDR ranges to allow to bypass authentication (may be given multiple times). When combined with `--reverse-proxy` and optionally `--real-client-ip-header` this will evaluate the trust of the IP stored in an HTTP header by a reverse proxy rather than the layer-3/4 remote address. WARNING: trusting IPs has inherent security flaws, especially when obtaining the IP address from an HTTP header (reverse-proxy mode). Use this option only if you understand the risks and how to manage them. | |
|
||||
| flag: `--whitelist-domain`<br/>toml: `whitelist_domains` | string \| list | allowed domains for redirection after authentication. Prefix domain with a `.` or a `*.` to allow subdomains (e.g. `.example.com`, `*.example.com`) [^2] | |
|
||||
|
||||
[^2]: When using the `whitelist-domain` option, any domain prefixed with a `.` or a `*.` will allow any subdomain of the specified domain as a valid redirect URL. By default, only empty ports are allowed. This translates to allowing the default port of the URL's protocol (80 for HTTP, 443 for HTTPS, etc.) since browsers omit them. To allow only a specific port, add it to the whitelisted domain: `example.com:8080`. To allow any port, use `*`: `example.com:*`.
|
||||
|
||||
### Server Options
|
||||
|
||||
| Flag / Config Field | Type | Description | Default |
|
||||
| ------------------------------------------------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
|
||||
| flag: `--http-address`<br/>toml: `http_address` | string | `[http://]<addr>:<port>` or `unix://<path>` or `fd:<int>` (case insensitive) to listen on for HTTP clients. Square brackets are required for ipv6 address, e.g. `http://[::1]:4180` | `"127.0.0.1:4180"` |
|
||||
| flag: `--https-address`<br/>toml: `https_address` | string | `[https://]<addr>:<port>` to listen on for HTTPS clients. Square brackets are required for ipv6 address, e.g. `https://[::1]:443` | `":443"` |
|
||||
| flag: `--metrics-address`<br/>toml: `metrics_address` | string | the address prometheus metrics will be scraped from | `""` |
|
||||
| flag: `--metrics-secure-address`<br/>toml: `metrics_secure_address` | string | the address prometheus metrics will be scraped from if using HTTPS | `""` |
|
||||
| flag: `--metrics-tls-cert-file`<br/>toml: `metrics_tls_cert_file` | string | path to certificate file for secure metrics server | `""` |
|
||||
| flag: `--metrics-tls-key-file`<br/>toml: `metrics_tls_key_file` | string | path to private key file for secure metrics server | `""` |
|
||||
| flag: `--tls-cert-file`<br/>toml: `tls_cert_file` | string | path to certificate file | |
|
||||
| flag: `--tls-key-file`<br/>toml: `tls_key_file` | string | path to private key file | |
|
||||
| flag: `--tls-cipher-suite`<br/>toml: `tls_cipher_suites` | string \| list | Restricts TLS cipher suites used by server to those listed (e.g. TLS_RSA_WITH_RC4_128_SHA) (may be given multiple times). If not specified, the default Go safe cipher list is used. List of valid cipher suites can be found in the [crypto/tls documentation](https://pkg.go.dev/crypto/tls#pkg-constants). | |
|
||||
| flag: `--tls-min-version`<br/>toml: `tls_min_version` | string | minimum TLS version that is acceptable, either `"TLS1.2"` or `"TLS1.3"` | `"TLS1.2"` |
|
||||
|
||||
### Session Options
|
||||
|
||||
| Flag / Config Field | Type | Description | Default |
|
||||
| ----------------------------------------------------------------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
||||
| flag: `--session-cookie-minimal`<br/>toml: `session_cookie_minimal` | bool | strip OAuth tokens from cookie session stores if they aren't needed (cookie session store only) | false |
|
||||
| flag: `--session-store-type`<br/>toml: `session_store_type` | string | [Session data storage backend](sessions.md); redis or cookie | cookie |
|
||||
| flag: `--redis-cluster-connection-urls`<br/>toml: `redis_cluster_connection_urls` | string \| list | List of Redis cluster connection URLs (e.g. `redis://HOST[:PORT]`). Used in conjunction with `--redis-use-cluster` | |
|
||||
| flag: `--redis-connection-url`<br/>toml: `redis_connection_url` | string | URL of redis server for redis session storage (e.g. `redis://HOST[:PORT]`) | |
|
||||
| flag: `--redis-insecure-skip-tls-verify`<br/>toml: `redis_insecure_skip_tls_verify` | bool | skip TLS verification when connecting to Redis | false |
|
||||
| flag: `--redis-password`<br/>toml: `redis_password` | string | Redis password. Applicable for all Redis configurations. Will override any password set in `--redis-connection-url` | |
|
||||
| flag: `--redis-sentinel-password`<br/>toml: `redis_sentinel_password` | string | Redis sentinel password. Used only for sentinel connection; any redis node passwords need to use `--redis-password` | |
|
||||
| flag: `--redis-sentinel-master-name`<br/>toml: `redis_sentinel_master_name` | string | Redis sentinel master name. Used in conjunction with `--redis-use-sentinel` | |
|
||||
| flag: `--redis-sentinel-connection-urls`<br/>toml: `redis_sentinel_connection_urls` | string \| list | List of Redis sentinel connection URLs (e.g. `redis://HOST[:PORT]`). Used in conjunction with `--redis-use-sentinel` | |
|
||||
| flag: `--redis-use-cluster`<br/>toml: `redis_use_cluster` | bool | Connect to redis cluster. Must set `--redis-cluster-connection-urls` to use this feature | false |
|
||||
| flag: `--redis-use-sentinel`<br/>toml: `redis_use_sentinel` | bool | Connect to redis via sentinels. Must set `--redis-sentinel-master-name` and `--redis-sentinel-connection-urls` to use this feature | false |
|
||||
| flag: `--redis-connection-idle-timeout`<br/>toml: `redis_connection_idle_timeout` | int | Redis connection idle timeout seconds. If Redis [timeout](https://redis.io/docs/reference/clients/#client-timeouts) option is set to non-zero, the `--redis-connection-idle-timeout` must be less than Redis timeout option. Example: if either redis.conf includes `timeout 15` or using `CONFIG SET timeout 15` the `--redis-connection-idle-timeout` must be at least `--redis-connection-idle-timeout=14` | 0 |
|
||||
|
||||
### Upstream Options
|
||||
|
||||
| Flag / Config Field | Type | Description | Default |
|
||||
| ----------------------------------------------------------------------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- |
|
||||
| flag: `--flush-interval`<br/>toml: `flush_interval` | duration | period between flushing response buffers when streaming responses | `"1s"` |
|
||||
| flag: `--pass-host-header`<br/>toml: `pass_host_header` | bool | pass the request Host Header to upstream | true |
|
||||
| flag: `--proxy-websockets`<br/>toml: `proxy_websockets` | bool | enables WebSocket proxying | true |
|
||||
| flag: `--ssl-upstream-insecure-skip-verify`<br/>toml: `ssl_upstream_insecure_skip_verify` | bool | skip validation of certificates presented when using HTTPS upstreams | false |
|
||||
| flag: `--upstream-timeout`<br/>toml: `upstream_timeout` | duration | maximum amount of time the server will wait for a response from the upstream | 30s |
|
||||
| flag: `--upstream`<br/>toml: `upstreams` | string \| list | the http url(s) of the upstream endpoint, file:// paths for static files or `static://<status_code>` for static response. Routing is based on the path | |
|
||||
|
||||
## Upstreams Configuration
|
||||
|
||||
`oauth2-proxy` supports having multiple upstreams, and has the option to pass requests on to HTTP(S) servers, unix socket or serve static files from the file system.
|
||||
|
||||
To configure **HTTP and HTTPS upstreams**, provide such a URL in `--upstream=URL`. The scheme+host portion and the path portion are extracted to configure proxying behavior. When processing incoming requests, the path portion becomes a lookup key for selecting the destination server of the proxied request.
|
||||
|
||||
* Upstream URLs *without a trailing slash,* like in `--upstream=http://service2.internal/foo`, will match an incoming request exactly to `/foo` in `https://this.o2p.example.com/foo`, and forward the request on to service2.internal, but not match a request to `https://this.o2p.example.com/foo/more` nor ...`.com/food`.
|
||||
* Upstream URLs *with a trailing slash,* like in `--upstream=http://service1.internal/foo/`, will match any incoming request to any incoming requests's path *starting with* `/foo/`, like `/foo/` and `/foo/more` and `/foo/lots/more?etc`.
|
||||
|
||||
If multiple `--upstream` URLs' paths match an incoming request, the one with the longest matching path (the most specific match) takes priority over shorter (less specific) ones.
|
||||
|
||||
**Unix socket upstreams** are configured as `unix:///path/to/unix.sock`.
|
||||
|
||||
**Static file paths** are configured as a file:// URL. `file:///var/www/static/` will serve the files from that directory at `http://[oauth2-proxy url]/var/www/static/`, which may not be what you want. You can provide the path to where the files should be available by adding a fragment to the configured URL. The value of the fragment will then be used to specify which path the files are available at, e.g. `file:///var/www/static/#/static/` will make `/var/www/static/` available at `http://[oauth2-proxy url]/static/`.
|
||||
|
||||
Multiple upstreams can either be configured by supplying a comma separated list to the `--upstream` parameter, supplying the parameter multiple times or providing a list in the [config file](#config-file). When multiple upstreams are used routing to them will be based on the path they are set up with.
|
||||
|
||||
## Environment variables
|
||||
|
||||
Every command line argument can be specified as an environment variable by
|
||||
prefixing it with `OAUTH2_PROXY_`, capitalising it, and replacing hyphens (`-`)
|
||||
with underscores (`_`). If the argument can be specified multiple times, the
|
||||
environment variable should be plural (trailing `S`).
|
||||
|
||||
This is particularly useful for storing secrets outside a configuration file
|
||||
or the command line.
|
||||
|
||||
For example, the `--cookie-secret` flag becomes `OAUTH2_PROXY_COOKIE_SECRET`.
|
||||
If a flag has the type `string | list` like the `--email-domain` flag it is
|
||||
available as an environment variable in plural form e.g. `OAUTH2_PROXY_EMAIL_DOMAINS`
|
||||
|
||||
Values for type `string | list` usually have a plural environment variable name
|
||||
and need to be seperated by `,` e.g.
|
||||
`OAUTH2_PROXY_SKIP_AUTH_ROUTES="GET=^/api/status,POST=^/api/saved_objects/_import"`
|
||||
|
||||
Please check the type for each [config option](#config-options) first.
|
||||
|
||||
## Logging Configuration
|
||||
|
||||
By default, OAuth2 Proxy logs all output to stdout. Logging can be configured to output to a rotating log file using the `--logging-filename` command.
|
||||
|
||||
If logging to a file you can also configure the maximum file size (`--logging-max-size`), age (`--logging-max-age`), max backup logs (`--logging-max-backups`), and if backup logs should be compressed (`--logging-compress`).
|
||||
|
||||
There are three different types of logging: standard, authentication, and HTTP requests. These can each be enabled or disabled with `--standard-logging`, `--auth-logging`, and `--request-logging`.
|
||||
|
||||
Each type of logging has its own configurable format and variables. By default, these formats are similar to the Apache Combined Log.
|
||||
|
||||
Logging of requests to the `/ping` endpoint (or using `--ping-user-agent`) and the `/ready` endpoint can be disabled with `--silence-ping-logging` reducing log volume.
|
||||
|
||||
## Auth Log Format
|
||||
|
||||
Authentication logs are logs which are guaranteed to contain a username or email address of a user attempting to authenticate. These logs are output by default in the below format:
|
||||
|
||||
```
|
||||
<REMOTE_ADDRESS> - <REQUEST ID> - <user@domain.com> [2015/03/19 17:20:19] [<STATUS>] <MESSAGE>
|
||||
```
|
||||
|
||||
The status block will contain one of the below strings:
|
||||
|
||||
- `AuthSuccess` If a user has authenticated successfully by any method
|
||||
- `AuthFailure` If the user failed to authenticate explicitly
|
||||
- `AuthError` If there was an unexpected error during authentication
|
||||
|
||||
If you require a different format than that, you can configure it with the `--auth-logging-format` flag.
|
||||
The default format is configured as follows:
|
||||
|
||||
```
|
||||
{{.Client}} - {{.RequestID}} - {{.Username}} [{{.Timestamp}}] [{{.Status}}] {{.Message}}
|
||||
```
|
||||
|
||||
Available variables for auth logging:
|
||||
|
||||
| Variable | Example | Description |
|
||||
| ------------- | ------------------------------------ | -------------------------------------------------------------------------------------------------------- |
|
||||
| Client | 74.125.224.72 | The client/remote IP address. Will use the X-Real-IP header it if exists & reverse-proxy is set to true. |
|
||||
| Host | domain.com | The value of the Host header. |
|
||||
| Message | Authenticated via OAuth2 | The details of the auth attempt. |
|
||||
| Protocol | HTTP/1.0 | The request protocol. |
|
||||
| RequestID | 00010203-0405-4607-8809-0a0b0c0d0e0f | The request ID pulled from the `--request-id-header`. Random UUID if empty |
|
||||
| RequestMethod | GET | The request method. |
|
||||
| Timestamp | 2015/03/19 17:20:19 | The date and time of the logging event. |
|
||||
| UserAgent | - | The full user agent as reported by the requesting client. |
|
||||
| Username | username@email.com | The email or username of the auth request. |
|
||||
| Status | AuthSuccess | The status of the auth request. See above for details. |
|
||||
|
||||
## Request Log Format
|
||||
|
||||
HTTP request logs will output by default in the below format:
|
||||
|
||||
```
|
||||
<REMOTE_ADDRESS> - <REQUEST ID> - <user@domain.com> [2015/03/19 17:20:19] <HOST_HEADER> GET <UPSTREAM_HOST> "/path/" HTTP/1.1 "<USER_AGENT>" <RESPONSE_CODE> <RESPONSE_BYTES> <REQUEST_DURATION>
|
||||
```
|
||||
|
||||
If you require a different format than that, you can configure it with the `--request-logging-format` flag.
|
||||
The default format is configured as follows:
|
||||
|
||||
```
|
||||
{{.Client}} - {{.RequestID}} - {{.Username}} [{{.Timestamp}}] {{.Host}} {{.RequestMethod}} {{.Upstream}} {{.RequestURI}} {{.Protocol}} {{.UserAgent}} {{.StatusCode}} {{.ResponseSize}} {{.RequestDuration}}
|
||||
```
|
||||
|
||||
Available variables for request logging:
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------------- | ------------------------------------ | -------------------------------------------------------------------------------------------------------- |
|
||||
| Client | 74.125.224.72 | The client/remote IP address. Will use the X-Real-IP header it if exists & reverse-proxy is set to true. |
|
||||
| Host | domain.com | The value of the Host header. |
|
||||
| Protocol | HTTP/1.0 | The request protocol. |
|
||||
| RequestDuration | 0.001 | The time in seconds that a request took to process. |
|
||||
| RequestID | 00010203-0405-4607-8809-0a0b0c0d0e0f | The request ID pulled from the `--request-id-header`. Random UUID if empty |
|
||||
| RequestMethod | GET | The request method. |
|
||||
| RequestURI | "/oauth2/auth" | The URI path of the request. |
|
||||
| ResponseSize | 12 | The size in bytes of the response. |
|
||||
| StatusCode | 200 | The HTTP status code of the response. |
|
||||
| Timestamp | 2015/03/19 17:20:19 | The date and time of the logging event. |
|
||||
| Upstream | - | The upstream data of the HTTP request. |
|
||||
| UserAgent | - | The full user agent as reported by the requesting client. |
|
||||
| Username | username@email.com | The email or username of the auth request. |
|
||||
|
||||
## Standard Log Format
|
||||
|
||||
All other logging that is not covered by the above two types of logging will be output in this standard logging format. This includes configuration information at startup and errors that occur outside of a session. The default format is below:
|
||||
|
||||
```
|
||||
[2015/03/19 17:20:19] [main.go:40] <MESSAGE>
|
||||
```
|
||||
|
||||
If you require a different format than that, you can configure it with the `--standard-logging-format` flag. The default format is configured as follows:
|
||||
|
||||
```
|
||||
[{{.Timestamp}}] [{{.File}}] {{.Message}}
|
||||
```
|
||||
|
||||
Available variables for standard logging:
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | --------------------------------- | -------------------------------------------------- |
|
||||
| Timestamp | 2015/03/19 17:20:19 | The date and time of the logging event. |
|
||||
| File | main.go:40 | The file and line number of the logging statement. |
|
||||
| Message | HTTP: listening on 127.0.0.1:4180 | The details of the log statement. |
|
19
docs/docs/configuration/providers/adfs.md
Normal file
19
docs/docs/configuration/providers/adfs.md
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
id: adfs
|
||||
title: ADFS
|
||||
---
|
||||
|
||||
1. Open the ADFS administration console on your Windows Server and add a new Application Group
|
||||
2. Provide a name for the integration, select Server Application from the Standalone applications section and click Next
|
||||
3. Follow the wizard to get the client-id, client-secret and configure the application credentials
|
||||
4. Configure the proxy with
|
||||
|
||||
```
|
||||
--provider=adfs
|
||||
--client-id=<application ID from step 3>
|
||||
--client-secret=<value from step 3>
|
||||
```
|
||||
|
||||
Note: When using the ADFS Auth provider with nginx and the cookie session store you may find the cookie is too large and
|
||||
doesn't get passed through correctly. Increasing the proxy_buffer_size in nginx or implementing the
|
||||
[redis session storage](../sessions.md#redis-storage) should resolve this.
|
25
docs/docs/configuration/providers/bitbucket.md
Normal file
25
docs/docs/configuration/providers/bitbucket.md
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
id: bitbucket
|
||||
title: BitBucket
|
||||
---
|
||||
|
||||
1. [Add a new OAuth consumer](https://confluence.atlassian.com/bitbucket/oauth-on-bitbucket-cloud-238027431.html)
|
||||
* In "Callback URL" use `https://<oauth2-proxy>/oauth2/callback`, substituting `<oauth2-proxy>` with the actual
|
||||
hostname that oauth2-proxy is running on.
|
||||
* In Permissions section select:
|
||||
* Account -> Email
|
||||
* Team membership -> Read
|
||||
* Repositories -> Read
|
||||
2. Note the Client ID and Client Secret.
|
||||
|
||||
To use the provider, pass the following options:
|
||||
|
||||
```
|
||||
--provider=bitbucket
|
||||
--client-id=<Client ID>
|
||||
--client-secret=<Client Secret>
|
||||
```
|
||||
|
||||
The default configuration allows everyone with Bitbucket account to authenticate. To restrict the access to the team
|
||||
members use additional configuration option: `--bitbucket-team=<Team name>`. To restrict the access to only these users
|
||||
who have access to one selected repository use `--bitbucket-repository=<Repository name>`.
|
21
docs/docs/configuration/providers/digitalocean.md
Normal file
21
docs/docs/configuration/providers/digitalocean.md
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
id: digitalocean
|
||||
title: DigitalOcean
|
||||
---
|
||||
|
||||
1. [Create a new OAuth application](https://cloud.digitalocean.com/account/api/applications)
|
||||
* You can fill in the name, homepage, and description however you wish.
|
||||
* In the "Application callback URL" field, enter: `https://oauth-proxy/oauth2/callback`, substituting `oauth2-proxy`
|
||||
with the actual hostname that oauth2-proxy is running on. The URL must match oauth2-proxy's configured redirect URL.
|
||||
2. Note the Client ID and Client Secret.
|
||||
|
||||
To use the provider, pass the following options:
|
||||
|
||||
```
|
||||
--provider=digitalocean
|
||||
--client-id=<Client ID>
|
||||
--client-secret=<Client Secret>
|
||||
```
|
||||
|
||||
Alternatively, set the equivalent options in the config file. The redirect URL defaults to
|
||||
`https://<requested host header>/oauth2/callback`. If you need to change it, you can use the `--redirect-url` command-line option.
|
7
docs/docs/configuration/providers/facebook.md
Normal file
7
docs/docs/configuration/providers/facebook.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
id: facebook
|
||||
title: Facebook
|
||||
---
|
||||
|
||||
1. Create a new FB App from https://developers.facebook.com/
|
||||
2. Under FB Login, set your Valid OAuth redirect URIs to `https://internal.yourcompany.com/oauth2/callback`
|
24
docs/docs/configuration/providers/gitea.md
Normal file
24
docs/docs/configuration/providers/gitea.md
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
id: gitea
|
||||
title: Gitea
|
||||
---
|
||||
|
||||
:::note
|
||||
This is not actually its own provider. For more details and options please refer to the [GitHub Provider Options](github.md)
|
||||
:::
|
||||
|
||||
1. Create a new application: `https://< your gitea host >/user/settings/applications`
|
||||
2. Under `Redirect URI` enter the correct URL i.e. `https://<proxied host>/oauth2/callback`
|
||||
3. Note the Client ID and Client Secret.
|
||||
4. Pass the following options to the proxy:
|
||||
|
||||
```
|
||||
--provider="github"
|
||||
--redirect-url="https://<proxied host>/oauth2/callback"
|
||||
--provider-display-name="Gitea"
|
||||
--client-id="< client_id as generated by Gitea >"
|
||||
--client-secret="< client_secret as generated by Gitea >"
|
||||
--login-url="https://< your gitea host >/login/oauth/authorize"
|
||||
--redeem-url="https://< your gitea host >/login/oauth/access_token"
|
||||
--validate-url="https://< your gitea host >/api/v1/user/emails"
|
||||
```
|
81
docs/docs/configuration/providers/github.md
Normal file
81
docs/docs/configuration/providers/github.md
Normal file
@@ -0,0 +1,81 @@
|
||||
---
|
||||
id: github
|
||||
title: GitHub
|
||||
---
|
||||
|
||||
## Config Options
|
||||
|
||||
| Flag | Toml Field | Type | Description | Default |
|
||||
| ---------------- | -------------- | -------------- | ------------------------------------------------------------------------------------------------------------- | ------- |
|
||||
| `--github-org` | `github_org` | string | restrict logins to members of this organisation | |
|
||||
| `--github-team` | `github_team` | string | restrict logins to members of any of these teams (slug) or (org:team), comma separated | |
|
||||
| `--github-repo` | `github_repo` | string | restrict logins to collaborators of this repository formatted as `orgname/repo` | |
|
||||
| `--github-token` | `github_token` | string | the token to use when verifying repository collaborators (must have push access to the repository) | |
|
||||
| `--github-user` | `github_users` | string \| list | To allow users to login by username even if they do not belong to the specified org and team or collaborators | |
|
||||
|
||||
## Usage
|
||||
|
||||
1. Create a new project: https://github.com/settings/developers
|
||||
2. Under `Authorization callback URL` enter the correct url ie `https://internal.yourcompany.com/oauth2/callback`
|
||||
|
||||
The GitHub auth provider supports two additional ways to restrict authentication to either organization and optional
|
||||
team level access, or to collaborators of a repository. Restricting by these options is normally accompanied with `--email-domain=*`. Additionally, all the organizations and teams a user belongs to are set as part of the `X-Forwarded-Groups` header. e.g. `org1:team1,org1:team2,org2:team1`
|
||||
|
||||
NOTE: When `--github-user` is set, the specified users are allowed to log in even if they do not belong to the specified
|
||||
org and team or collaborators.
|
||||
|
||||
To restrict access to your organization:
|
||||
|
||||
```shell
|
||||
# restrict logins to members of this organisation
|
||||
--github-org="your-org"
|
||||
```
|
||||
|
||||
To restrict access to specific teams within an organization:
|
||||
|
||||
```shell
|
||||
--github-org="your-org"
|
||||
# restrict logins to members of any of these teams (slug), comma separated
|
||||
--github-team="team1,team2,team3"
|
||||
```
|
||||
|
||||
To restrict to teams within different organizations, keep the organization flag empty and use `--github-team` like so:
|
||||
|
||||
```shell
|
||||
# keep empty
|
||||
--github-org=""
|
||||
# restrict logins to members to any of the following teams (format <org>:<slug>, like octo:team1), comma separated
|
||||
--github-team="org1:team1,org2:team1,org3:team42,octo:cat"
|
||||
```
|
||||
|
||||
If you would rather restrict access to collaborators of a repository, those users must either have push access to a
|
||||
public repository or any access to a private repository:
|
||||
|
||||
```shell
|
||||
# restrict logins to collaborators of this repository formatted as orgname/repo
|
||||
--github-repo=""
|
||||
```
|
||||
|
||||
If you'd like to allow access to users with **read only** access to a **public** repository you will need to provide a
|
||||
[token](https://github.com/settings/tokens) for a user that has write access to the repository. The token must be
|
||||
created with at least the `public_repo` scope:
|
||||
|
||||
```shell
|
||||
# the token to use when verifying repository collaborators
|
||||
--github-token=""
|
||||
```
|
||||
|
||||
To allow a user to log in with their username even if they do not belong to the specified org and team or collaborators:
|
||||
|
||||
```shell
|
||||
# allow logins by username, comma separated
|
||||
--github-user=""
|
||||
```
|
||||
|
||||
If you are using GitHub enterprise, make sure you set the following to the appropriate url:
|
||||
|
||||
```shell
|
||||
--login-url="http(s)://<enterprise github host>/login/oauth/authorize"
|
||||
--redeem-url="http(s)://<enterprise github host>/login/oauth/access_token"
|
||||
--validate-url="http(s)://<enterprise github host>/api/v3"
|
||||
```
|
49
docs/docs/configuration/providers/gitlab.md
Normal file
49
docs/docs/configuration/providers/gitlab.md
Normal file
@@ -0,0 +1,49 @@
|
||||
---
|
||||
id: gitlab
|
||||
title: GitLab
|
||||
---
|
||||
|
||||
## Config Options
|
||||
|
||||
| Flag | Toml Field | Type | Description | Default |
|
||||
| ------------------- | ----------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
||||
| `--gitlab-group` | `gitlab_groups` | string \| list | restrict logins to members of any of these groups (slug), separated by a comma | |
|
||||
| `--gitlab-projects` | `gitlab_projects` | string \| list | restrict logins to members of any of these projects (may be given multiple times) formatted as `orgname/repo=accesslevel`. Access level should be a value matching [Gitlab access levels](https://docs.gitlab.com/ee/api/members.html#valid-access-levels), defaulted to 20 if absent | |
|
||||
|
||||
## Usage
|
||||
|
||||
This auth provider has been tested against Gitlab version 12.X. Due to Gitlab API changes, it may not work for version
|
||||
prior to 12.X (see [994](https://github.com/oauth2-proxy/oauth2-proxy/issues/994)).
|
||||
|
||||
Whether you are using GitLab.com or self-hosting GitLab, follow
|
||||
[these steps to add an application](https://docs.gitlab.com/integration/oauth_provider/). Make sure to enable at
|
||||
least the `openid`, `profile` and `email` scopes, and set the redirect url to your application url e.g.
|
||||
https://myapp.com/oauth2/callback.
|
||||
|
||||
If you need projects filtering, add the extra `read_api` scope to your application.
|
||||
|
||||
The following config should be set to ensure that the oauth will work properly. To get a cookie secret follow
|
||||
[these steps](../overview.md#generating-a-cookie-secret)
|
||||
|
||||
```
|
||||
--provider="gitlab"
|
||||
--redirect-url="https://myapp.com/oauth2/callback" // Should be the same as the redirect url for the application in gitlab
|
||||
--client-id=GITLAB_CLIENT_ID
|
||||
--client-secret=GITLAB_CLIENT_SECRET
|
||||
--cookie-secret=COOKIE_SECRET
|
||||
```
|
||||
|
||||
Restricting by group membership is possible with the following option:
|
||||
|
||||
```shell
|
||||
--gitlab-group="mygroup,myothergroup" # restrict logins to members of any of these groups (slug), separated by a comma
|
||||
```
|
||||
|
||||
If you are using self-hosted GitLab, make sure you set the following to the appropriate URL:
|
||||
|
||||
```shell
|
||||
--oidc-issuer-url="<your gitlab url>"
|
||||
```
|
||||
|
||||
If your self-hosted GitLab is on a subdirectory (e.g. domain.tld/gitlab), as opposed to its own subdomain
|
||||
(e.g. gitlab.domain.tld), you may need to add a redirect from domain.tld/oauth pointing at e.g. domain.tld/gitlab/oauth.
|
75
docs/docs/configuration/providers/google.md
Normal file
75
docs/docs/configuration/providers/google.md
Normal file
@@ -0,0 +1,75 @@
|
||||
---
|
||||
id: google
|
||||
title: Google (default)
|
||||
---
|
||||
|
||||
## Config Options
|
||||
|
||||
| Flag | Toml Field | Type | Description | Default |
|
||||
| ---------------------------------------------- | -------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------ | -------------------------------------------------- |
|
||||
| `--google-admin-email` | `google_admin_email` | string | the google admin to impersonate for api calls | |
|
||||
| `--google-group` | `google_groups` | string | restrict logins to members of this google group (may be given multiple times). If not specified and service account or default credentials are configured, all user groups will be allowed. | |
|
||||
| `--google-service-account-json` | `google_service_account_json` | string | the path to the service account json credentials | |
|
||||
| `--google-use-application-default-credentials` | `google_use_application_default_credentials` | bool | use application default credentials instead of service account json (i.e. GKE Workload Identity) | |
|
||||
| `--google-target-principal` | `google_target_principal` | bool | the target principal to impersonate when using ADC | defaults to the service account configured for ADC |
|
||||
|
||||
## Usage
|
||||
|
||||
For Google, the registration steps are:
|
||||
|
||||
1. Create a new project: https://console.developers.google.com/project
|
||||
2. Choose the new project from the top right project dropdown (only if another project is selected)
|
||||
3. In the project Dashboard center pane, choose **"APIs & Services"**
|
||||
4. In the left Nav pane, choose **"Credentials"**
|
||||
5. In the center pane, choose **"OAuth consent screen"** tab. Fill in **"Product name shown to users"** and hit save.
|
||||
6. In the center pane, choose **"Credentials"** tab.
|
||||
- Open the **"New credentials"** drop down
|
||||
- Choose **"OAuth client ID"**
|
||||
- Choose **"Web application"**
|
||||
- Application name is freeform, choose something appropriate
|
||||
- Authorized JavaScript origins is your domain ex: `https://internal.yourcompany.com`
|
||||
- Authorized redirect URIs is the location of oauth2/callback ex: `https://internal.yourcompany.com/oauth2/callback`
|
||||
- Choose **"Create"**
|
||||
7. Take note of the **Client ID** and **Client Secret**
|
||||
|
||||
It's recommended to refresh sessions on a short interval (1h) with `cookie-refresh` setting which validates that the
|
||||
account is still authorized.
|
||||
|
||||
#### Restrict auth to specific Google groups on your domain. (optional)
|
||||
|
||||
1. Create a [service account](https://developers.google.com/identity/protocols/oauth2/service-account) and configure it
|
||||
to use [Application Default Credentials / Workload Identity / Workload Identity Federation (recommended)](#using-application-default-credentials-adc--workload-identity--workload-identity-federation-recommended) or,
|
||||
alternatively download the JSON.
|
||||
2. Make note of the Client ID for a future step.
|
||||
3. Under "APIs & Auth", choose APIs.
|
||||
4. Click on Admin SDK and then Enable API.
|
||||
5. Follow the steps on [Set up domain-wide delegation for a service account](https://developers.google.com/workspace/guides/create-credentials#optional_set_up_domain-wide_delegation_for_a_service_account)
|
||||
and give the client id from step 2 the following oauth scopes:
|
||||
|
||||
```
|
||||
https://www.googleapis.com/auth/admin.directory.group.member.readonly
|
||||
```
|
||||
|
||||
6. Follow the steps on https://support.google.com/a/answer/60757 to enable Admin API access.
|
||||
7. Create or choose an existing administrative email address on the Gmail domain to assign to the `google-admin-email`
|
||||
flag. This email will be impersonated by this client to make calls to the Admin SDK. See the note on the link from
|
||||
step 5 for the reason why.
|
||||
8. Create or choose an existing email group and set that email to the `google-group` flag. You can pass multiple instances
|
||||
of this flag with different groups and the user will be checked against all the provided groups.
|
||||
|
||||
(Only if using a JSON file (see step 1))
|
||||
|
||||
9. Lock down the permissions on the json file downloaded from step 1 so only oauth2-proxy is able to read the file and
|
||||
set the path to the file in the `google-service-account-json` flag.
|
||||
10. Restart oauth2-proxy.
|
||||
|
||||
Note: The user is checked against the group members list on initial authentication and every time the token is
|
||||
refreshed ( about once an hour ).
|
||||
|
||||
##### Using Application Default Credentials (ADC) / Workload Identity / Workload Identity Federation (recommended)
|
||||
oauth2-proxy can make use of [Application Default Credentials](https://cloud.google.com/docs/authentication/application-default-credentials).
|
||||
When deployed within GCP, this means that it can automatically use the service account attached to the resource. When deployed to GKE, ADC
|
||||
can be leveraged through a feature called Workload Identity. Follow Google's [guide](https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity)
|
||||
to set up Workload Identity.
|
||||
|
||||
When deployed outside of GCP, [Workload Identity Federation](https://cloud.google.com/docs/authentication/provide-credentials-adc#wlif) might be an option.
|
43
docs/docs/configuration/providers/index.md
Normal file
43
docs/docs/configuration/providers/index.md
Normal file
@@ -0,0 +1,43 @@
|
||||
---
|
||||
id: index
|
||||
title: OAuth Provider Configuration
|
||||
---
|
||||
|
||||
You will need to register an OAuth application with a Provider (Google, GitHub or another provider), and configure it
|
||||
with Redirect URI(s) for the domain you intend to run `oauth2-proxy` on.
|
||||
|
||||
Valid providers are :
|
||||
|
||||
- [ADFS](adfs.md)
|
||||
- [Bitbucket](bitbucket.md)
|
||||
- [DigitalOcean](digitalocean.md)
|
||||
- [Facebook](facebook.md)
|
||||
- [Gitea](gitea.md)
|
||||
- [GitHub](github.md)
|
||||
- [GitLab](gitlab.md)
|
||||
- [Google](google.md) _default_
|
||||
- [Keycloak](keycloak.md) (Deprecated)
|
||||
- [Keycloak OIDC](keycloak_oidc.md)
|
||||
- [LinkedIn](linkedin.md)
|
||||
- [login.gov](login_gov.md)
|
||||
- [Microsoft Azure](ms_azure_ad.md) (Deprecated)
|
||||
- [Microsoft Entra ID](ms_entra_id.md)
|
||||
- [Nextcloud](nextcloud.md)
|
||||
- [OpenID Connect](openid_connect.md)
|
||||
|
||||
The provider can be selected using the `provider` configuration value, or set in the [`providers` array using AlphaConfig](https://oauth2-proxy.github.io/oauth2-proxy/configuration/alpha-config#providers). However, [**the feature to implement multiple providers is not complete**](https://github.com/oauth2-proxy/oauth2-proxy/issues/926).
|
||||
|
||||
Please note that not all providers support all claims. The `preferred_username` claim is currently only supported by the
|
||||
OpenID Connect provider.
|
||||
|
||||
## Email Authentication
|
||||
|
||||
To authorize a specific email-domain use `--email-domain=yourcompany.com`. To authorize individual email addresses use
|
||||
`--authenticated-emails-file=/path/to/file` with one email per line. To authorize all email addresses use `--email-domain=*`.
|
||||
|
||||
## Adding a new Provider
|
||||
|
||||
Follow the examples in the [`providers` package](https://github.com/oauth2-proxy/oauth2-proxy/blob/master/providers/) to define a new
|
||||
`Provider` instance. Add a new `case` to
|
||||
[`providers.New()`](https://github.com/oauth2-proxy/oauth2-proxy/blob/master/providers/providers.go) to allow `oauth2-proxy` to use the
|
||||
new `Provider`.
|
36
docs/docs/configuration/providers/keycloak.md
Normal file
36
docs/docs/configuration/providers/keycloak.md
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
id: keycloak
|
||||
title: Keycloak (Deprecated)
|
||||
---
|
||||
|
||||
:::note
|
||||
This is the legacy and deprecated provider for Keycloak, use [Keycloak OIDC Auth Provider](keycloak_oidc.md) if possible.
|
||||
:::
|
||||
|
||||
1. Create new client in your Keycloak realm with **Access Type** 'confidential' and **Valid Redirect URIs** 'https://internal.yourcompany.com/oauth2/callback'
|
||||
2. Take note of the Secret in the credential tab of the client
|
||||
3. Create a mapper with **Mapper Type** 'Group Membership' and **Token Claim Name** 'groups'.
|
||||
|
||||
Make sure you set the following to the appropriate url:
|
||||
|
||||
```
|
||||
--provider=keycloak
|
||||
--client-id=<client you have created>
|
||||
--client-secret=<your client's secret>
|
||||
--login-url="http(s)://<keycloak host>/auth/realms/<your realm>/protocol/openid-connect/auth"
|
||||
--redeem-url="http(s)://<keycloak host>/auth/realms/<your realm>/protocol/openid-connect/token"
|
||||
--profile-url="http(s)://<keycloak host>/auth/realms/<your realm>/protocol/openid-connect/userinfo"
|
||||
--validate-url="http(s)://<keycloak host>/auth/realms/<your realm>/protocol/openid-connect/userinfo"
|
||||
--keycloak-group=<first_allowed_user_group>
|
||||
--keycloak-group=<second_allowed_user_group>
|
||||
```
|
||||
|
||||
For group based authorization, the optional `--keycloak-group` (legacy) or `--allowed-group` (global standard)
|
||||
flags can be used to specify which groups to limit access to.
|
||||
|
||||
If these are unset but a `groups` mapper is set up above in step (3), the provider will still
|
||||
populate the `X-Forwarded-Groups` header to your upstream server with the `groups` data in the
|
||||
Keycloak userinfo endpoint response.
|
||||
|
||||
The group management in keycloak is using a tree. If you create a group named admin in keycloak
|
||||
you should define the 'keycloak-group' value to /admin.
|
151
docs/docs/configuration/providers/keycloak_oidc.md
Normal file
151
docs/docs/configuration/providers/keycloak_oidc.md
Normal file
@@ -0,0 +1,151 @@
|
||||
---
|
||||
id: keycloak_oidc
|
||||
title: Keycloak OIDC
|
||||
---
|
||||
|
||||
## Config Options
|
||||
|
||||
| Flag | Toml Field | Type | Description | Default |
|
||||
| ---------------- | --------------- | -------------- | ------------------------------------------------------------------------------------------------------------------ | ------- |
|
||||
| `--allowed-role` | `allowed_roles` | string \| list | restrict logins to users with this role (may be given multiple times). Only works with the keycloak-oidc provider. | |
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
--provider=keycloak-oidc
|
||||
--client-id=<your client's id>
|
||||
--client-secret=<your client's secret>
|
||||
--redirect-url=https://internal.yourcompany.com/oauth2/callback
|
||||
--oidc-issuer-url=https://<keycloak host>/realms/<your realm> // For Keycloak versions <17: --oidc-issuer-url=https://<keycloak host>/auth/realms/<your realm>
|
||||
--email-domain=<yourcompany.com> // Validate email domain for users, see option documentation
|
||||
--allowed-role=<realm role name> // Optional, required realm role
|
||||
--allowed-role=<client id>:<client role name> // Optional, required client role
|
||||
--allowed-group=</group name> // Optional, requires group client scope
|
||||
--code-challenge-method=S256 // PKCE
|
||||
```
|
||||
|
||||
:::note
|
||||
Keycloak has updated its admin console and as of version 19.0.0, the new admin console is enabled by default. The
|
||||
legacy admin console has been announced for removal with the release of version 21.0.0.
|
||||
:::
|
||||
|
||||
**Keycloak legacy admin console**
|
||||
|
||||
1. Create new client in your Keycloak realm with **Access Type** 'confidential', **Client protocol** 'openid-connect'
|
||||
and **Valid Redirect URIs** 'https://internal.yourcompany.com/oauth2/callback'
|
||||
2. Take note of the Secret in the credential tab of the client
|
||||
3. Create a mapper with **Mapper Type** 'Group Membership' and **Token Claim Name** 'groups'.
|
||||
4. Create a mapper with **Mapper Type** 'Audience' and **Included Client Audience** and **Included Custom Audience** set
|
||||
to your client name.
|
||||
|
||||
**Keycloak new admin console (default as of v19.0.0)**
|
||||
|
||||
The following example shows how to create a simple OIDC client using the new Keycloak admin2 console. However, for best
|
||||
practices, it is recommended to consult the Keycloak documentation.
|
||||
|
||||
The OIDC client must be configured with an _audience mapper_ to include the client's name in the `aud` claim of the JWT token.
|
||||
The `aud` claim specifies the intended recipient of the token, and OAuth2 Proxy expects a match against the values of
|
||||
either `--client-id` or `--oidc-extra-audience`.
|
||||
|
||||
_In Keycloak, claims are added to JWT tokens through the use of mappers at either the realm level using "client scopes" or
|
||||
through "dedicated" client mappers._
|
||||
|
||||
**Creating the client**
|
||||
|
||||
1. Create a new OIDC client in your Keycloak realm by navigating to:
|
||||
**Clients** -> **Create client**
|
||||
* **Client Type** 'OpenID Connect'
|
||||
* **Client ID** `<your client's id>`, please complete the remaining fields as appropriate and click **Next**.
|
||||
* **Client authentication** 'On'
|
||||
* **Authentication flow**
|
||||
* **Standard flow** 'selected'
|
||||
* **Direct access grants** 'deselect'
|
||||
* _Save the configuration._
|
||||
* **Settings / Access settings**:
|
||||
* **Valid redirect URIs** `https://internal.yourcompany.com/oauth2/callback`
|
||||
* _Save the configuration._
|
||||
* Under the **Credentials** tab you will now be able to locate `<your client's secret>`.
|
||||
2. Configure a dedicated *audience mapper* for your client by navigating to **Clients** -> **\<your client's id\>** -> **Client scopes**.
|
||||
* Access the dedicated mappers pane by clicking **\<your client's id\>-dedicated**, located under *Assigned client scope*.
|
||||
_(It should have a description of "Dedicated scope and mappers for this client")_
|
||||
* Click **Configure a new mapper** and select **Audience**
|
||||
* **Name** 'aud-mapper-\<your client's id\>'
|
||||
* **Included Client Audience** select `<your client's id>` from the dropdown.
|
||||
* _OAuth2 proxy can be set up to pass both the access and ID JWT tokens to your upstream services.
|
||||
If you require additional audience entries, you can use the **Included Custom Audience** field in addition
|
||||
to the "Included Client Audience" dropdown. Note that the "aud" claim of a JWT token should be limited and
|
||||
only specify its intended recipients._
|
||||
* **Add to ID token** 'On'
|
||||
* **Add to access token** 'On' - [#1916](https://github.com/oauth2-proxy/oauth2-proxy/pull/1916)
|
||||
* _Save the configuration._
|
||||
* Any subsequent dedicated client mappers can be defined by clicking **Dedicated scopes** -> **Add mapper** ->
|
||||
**By configuration** -> *Select mapper*
|
||||
|
||||
You should now be able to create a test user in Keycloak and get access to the OAuth2 Proxy instance, make sure to set
|
||||
an email address matching `<yourcompany.com>` and select _Email verified_.
|
||||
|
||||
**Authorization**
|
||||
|
||||
_OAuth2 Proxy will perform authorization by requiring a valid user, this authorization can be extended to take into
|
||||
account a user's membership in Keycloak `groups`, `realm roles`, and `client roles` using the keycloak-oidc provider options
|
||||
`--allowed-role` or `--allowed-group`_
|
||||
|
||||
**Roles**
|
||||
|
||||
_A standard Keycloak installation comes with the required mappers for **realm roles** and **client roles** through the
|
||||
pre-defined client scope "roles". This ensures that any roles assigned to a user are included in the `JWT` tokens when
|
||||
using an OIDC client that has the "Full scope allowed" feature activated, the feature is enabled by default._
|
||||
|
||||
_Creating a realm role_
|
||||
* Navigate to **Realm roles** -> **Create role**
|
||||
* **Role name**, *`<realm role name>`* -> **save**
|
||||
|
||||
_Creating a client role_
|
||||
* Navigate to **Clients** -> `<your client's id>` -> **Roles** -> **Create role**
|
||||
* **Role name**, *`<client role name>`* -> **save**
|
||||
|
||||
|
||||
_Assign a role to a user_
|
||||
|
||||
**Users** -> _Username_ -> **Role mapping** -> **Assign role** -> _filter by roles or clients and select_ -> **Assign**.
|
||||
|
||||
Keycloak "realm roles" can be authorized using the `--allowed-role=<realm role name>` option, while "client roles" can be
|
||||
evaluated using `--allowed-role=<your client's id>:<client role name>`.
|
||||
|
||||
You may limit the _realm roles_ included in the JWT tokens for any given client by navigating to:
|
||||
**Clients** -> `<your client's id>` -> **Client scopes** -> _\<your client's id\>-dedicated_ -> **Scope**
|
||||
Disabling **Full scope allowed** activates the **Assign role** option, allowing you to select which roles, if assigned
|
||||
to a user, will be included in the user's JWT tokens. This can be useful when a user has many associated roles, and you
|
||||
want to reduce the size and impact of the JWT token.
|
||||
|
||||
|
||||
**Groups**
|
||||
|
||||
You may also do authorization on group memberships by using the OAuth2 Proxy option `--allowed-group`.
|
||||
We will only do a brief description of creating the required _client scope_ **groups** and refer you to read the Keycloak
|
||||
documentation.
|
||||
|
||||
To summarize, the steps required to authorize Keycloak group membership with OAuth2 Proxy are as follows:
|
||||
|
||||
* Create a new Client Scope with the name **groups** in Keycloak.
|
||||
* Include a mapper of type **Group Membership**.
|
||||
* Set the "Token Claim Name" to **groups** or customize by matching it to the `--oidc-groups-claim` option of OAuth2 Proxy.
|
||||
* If the "Full group path" option is selected, you need to include a "/" separator in the group names defined in the
|
||||
`--allowed-group` option of OAuth2 Proxy. Example: "/groupname" or "/groupname/child_group".
|
||||
|
||||
After creating the _Client Scope_ named _groups_ you will need to attach it to your client.
|
||||
**Clients** -> `<your client's id>` -> **Client scopes** -> **Add client scope** -> Select **groups** and choose Optional
|
||||
and you should now have a client that maps group memberships into the JWT tokens so that Oauth2 Proxy may evaluate them.
|
||||
|
||||
Create a group by navigating to **Groups** -> **Create group** and _add_ your test user as a member.
|
||||
|
||||
The OAuth2 Proxy option `--allowed-group=/groupname` will now allow you to filter on group membership
|
||||
|
||||
Keycloak also has the option of attaching roles to groups, please refer to the Keycloak documentation for more information.
|
||||
|
||||
**Tip**
|
||||
|
||||
To check if roles or groups are added to JWT tokens, you can preview a users token in the Keycloak console by following
|
||||
these steps: **Clients** -> `<your client's id>` -> **Client scopes** -> **Evaluate**.
|
||||
Select a _realm user_ and optional _scope parameters_ such as groups, and generate the JSON representation of an access
|
||||
or id token to examine its contents.
|
13
docs/docs/configuration/providers/linkedin.md
Normal file
13
docs/docs/configuration/providers/linkedin.md
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
id: linkedin
|
||||
title: LinkedIn
|
||||
---
|
||||
|
||||
For LinkedIn, the registration steps are:
|
||||
|
||||
1. Create a new project: https://www.linkedin.com/secure/developer
|
||||
2. In the OAuth User Agreement section:
|
||||
- In default scope, select r_basicprofile and r_emailaddress.
|
||||
- In "OAuth 2.0 Redirect URLs", enter `https://internal.yourcompany.com/oauth2/callback`
|
||||
3. Fill in the remaining required fields and Save.
|
||||
4. Take note of the **Consumer Key / API Key** and **Consumer Secret / Secret Key**
|
79
docs/docs/configuration/providers/login_gov.md
Normal file
79
docs/docs/configuration/providers/login_gov.md
Normal file
@@ -0,0 +1,79 @@
|
||||
---
|
||||
id: login_gov
|
||||
title: Login.gov
|
||||
---
|
||||
|
||||
login.gov is an OIDC provider for the US Government.
|
||||
If you are a US Government agency, you can contact the login.gov team through the contact information
|
||||
that you can find on https://login.gov/developers/ and work with them to understand how to get login.gov
|
||||
accounts for integration/test and production access.
|
||||
|
||||
A developer guide is available here: https://developers.login.gov/, though this proxy handles everything
|
||||
but the data you need to create to register your application in the login.gov dashboard.
|
||||
|
||||
As a demo, we will assume that you are running your application that you want to secure locally on
|
||||
http://localhost:3000/, that you will be starting your proxy up on http://localhost:4180/, and that
|
||||
you have an agency integration account for testing.
|
||||
|
||||
First, register your application in the dashboard. The important bits are:
|
||||
* Identity protocol: make this `Openid connect`
|
||||
* Issuer: do what they say for OpenID Connect. We will refer to this string as `${LOGINGOV_ISSUER}`.
|
||||
* Public key: This is a self-signed certificate in .pem format generated from a 2048-bit RSA private key.
|
||||
A quick way to do this is
|
||||
`openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 3650 -nodes -subj '/C=US/ST=Washington/L=DC/O=GSA/OU=18F/CN=localhost'`.
|
||||
The contents of the `key.pem` shall be referred to as `${OAUTH2_PROXY_JWT_KEY}`.
|
||||
* Return to App URL: Make this be `http://localhost:4180/`
|
||||
* Redirect URIs: Make this be `http://localhost:4180/oauth2/callback`.
|
||||
* Attribute Bundle: Make sure that email is selected.
|
||||
|
||||
Now start the proxy up with the following options:
|
||||
```
|
||||
./oauth2-proxy -provider login.gov \
|
||||
-client-id=${LOGINGOV_ISSUER} \
|
||||
-redirect-url=http://localhost:4180/oauth2/callback \
|
||||
-oidc-issuer-url=https://idp.int.identitysandbox.gov/ \
|
||||
-cookie-secure=false \
|
||||
-email-domain=gsa.gov \
|
||||
-upstream=http://localhost:3000/ \
|
||||
-cookie-secret=somerandomstring12341234567890AB \
|
||||
-cookie-domain=localhost \
|
||||
-skip-provider-button=true \
|
||||
-pubjwk-url=https://idp.int.identitysandbox.gov/api/openid_connect/certs \
|
||||
-profile-url=https://idp.int.identitysandbox.gov/api/openid_connect/userinfo \
|
||||
-jwt-key="${OAUTH2_PROXY_JWT_KEY}"
|
||||
```
|
||||
You can also set all these options with environment variables, for use in cloud/docker environments.
|
||||
One tricky thing that you may encounter is that some cloud environments will pass in environment
|
||||
variables in a docker env-file, which does not allow multiline variables like a PEM file.
|
||||
If you encounter this, then you can create a `jwt_signing_key.pem` file in the top level
|
||||
directory of the repo which contains the key in PEM format and then do your docker build.
|
||||
The docker build process will copy that file into your image which you can then access by
|
||||
setting the `OAUTH2_PROXY_JWT_KEY_FILE=/etc/ssl/private/jwt_signing_key.pem`
|
||||
environment variable, or by setting `--jwt-key-file=/etc/ssl/private/jwt_signing_key.pem` on the commandline.
|
||||
|
||||
Once it is running, you should be able to go to `http://localhost:4180/` in your browser,
|
||||
get authenticated by the login.gov integration server, and then get proxied on to your
|
||||
application running on `http://localhost:3000/`. In a real deployment, you would secure
|
||||
your application with a firewall or something so that it was only accessible from the
|
||||
proxy, and you would use real hostnames everywhere.
|
||||
|
||||
#### Skip OIDC discovery
|
||||
|
||||
Some providers do not support OIDC discovery via their issuer URL, so oauth2-proxy cannot simply grab the authorization,
|
||||
token and jwks URI endpoints from the provider's metadata.
|
||||
|
||||
In this case, you can set the `--skip-oidc-discovery` option, and supply those required endpoints manually:
|
||||
|
||||
```
|
||||
-provider oidc
|
||||
-client-id oauth2-proxy
|
||||
-client-secret proxy
|
||||
-redirect-url http://127.0.0.1:4180/oauth2/callback
|
||||
-oidc-issuer-url http://127.0.0.1:5556
|
||||
-skip-oidc-discovery
|
||||
-login-url http://127.0.0.1:5556/authorize
|
||||
-redeem-url http://127.0.0.1:5556/token
|
||||
-oidc-jwks-url http://127.0.0.1:5556/keys
|
||||
-cookie-secure=false
|
||||
-email-domain example.com
|
||||
```
|
59
docs/docs/configuration/providers/ms_azure_ad.md
Normal file
59
docs/docs/configuration/providers/ms_azure_ad.md
Normal file
@@ -0,0 +1,59 @@
|
||||
---
|
||||
id: azure
|
||||
title: Azure (Deprecated)
|
||||
---
|
||||
|
||||
:::note
|
||||
This is the legacy and deprecated provider for Azure, use [Microsoft Entra ID](ms_entra_id.md) if possible.
|
||||
:::
|
||||
|
||||
## Config Options
|
||||
|
||||
| Flag | Toml Field | Type | Description | Default |
|
||||
| ---------------- | -------------- | ------ | ---------------------------------------------------------------- | ---------- |
|
||||
| `--azure-tenant` | `azure_tenant` | string | go to a tenant-specific or common (tenant-independent) endpoint. | `"common"` |
|
||||
| `--resource` | `resource` | string | The resource that is protected (Azure AD only) | |
|
||||
|
||||
## Usage
|
||||
|
||||
1. Add an application: go to [https://portal.azure.com](https://portal.azure.com), choose **Azure Active Directory**, select
|
||||
**App registrations** and then click on **New registration**.
|
||||
2. Pick a name, check the supported account type(single-tenant, multi-tenant, etc). In the **Redirect URI** section create a new
|
||||
**Web** platform entry for each app that you want to protect by the oauth2 proxy(e.g.
|
||||
https://internal.yourcompanycom/oauth2/callback). Click **Register**.
|
||||
3. Next we need to add group read permissions for the app registration, on the **API Permissions** page of the app, click on
|
||||
**Add a permission**, select **Microsoft Graph**, then select **Application permissions**, then click on **Group** and select
|
||||
**Group.Read.All**. Hit **Add permissions** and then on **Grant admin consent** (you might need an admin to do this).
|
||||
<br/>**IMPORTANT**: Even if this permission is listed with **"Admin consent required=No"** the consent might actually
|
||||
be required, due to AAD policies you won't be able to see. If you get a **"Need admin approval"** during login,
|
||||
most likely this is what you're missing!
|
||||
4. Next, if you are planning to use v2.0 Azure Auth endpoint, go to the **Manifest** page and set `"accessTokenAcceptedVersion": 2`
|
||||
in the App registration manifest file.
|
||||
5. On the **Certificates & secrets** page of the app, add a new client secret and note down the value after hitting **Add**.
|
||||
6. Configure the proxy with:
|
||||
- for V1 Azure Auth endpoint (Azure Active Directory Endpoints - https://login.microsoftonline.com/common/oauth2/authorize)
|
||||
|
||||
```
|
||||
--provider=azure
|
||||
--client-id=<application ID from step 3>
|
||||
--client-secret=<value from step 5>
|
||||
--azure-tenant={tenant-id}
|
||||
--oidc-issuer-url=https://sts.windows.net/{tenant-id}/
|
||||
```
|
||||
|
||||
- for V2 Azure Auth endpoint (Microsoft Identity Platform Endpoints - https://login.microsoftonline.com/common/oauth2/v2.0/authorize)
|
||||
```
|
||||
--provider=azure
|
||||
--client-id=<application ID from step 3>
|
||||
--client-secret=<value from step 5>
|
||||
--azure-tenant={tenant-id}
|
||||
--oidc-issuer-url=https://login.microsoftonline.com/{tenant-id}/v2.0
|
||||
```
|
||||
|
||||
***Notes***:
|
||||
- When using v2.0 Azure Auth endpoint (`https://login.microsoftonline.com/{tenant-id}/v2.0`) as `--oidc_issuer_url`, in conjunction
|
||||
with `--resource` flag, be sure to append `/.default` at the end of the resource name. See
|
||||
https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-permissions-and-consent#the-default-scope for more details.
|
||||
- When using the Azure Auth provider with nginx and the cookie session store you may find the cookie is too large and doesn't
|
||||
get passed through correctly. Increasing the proxy_buffer_size in nginx or implementing the
|
||||
[redis session storage](../sessions.md#redis-storage) should resolve this.
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user