Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat: Make headers to add to request in openid-connect plugin configurable. #2903

Merged
merged 112 commits into from
Jan 5, 2021
Merged
Changes from 1 commit
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
4af92db
Make headers to add to request configurable.
jenskeiner Nov 30, 2020
fc57f35
Fix lines that were too long.
jenskeiner Nov 30, 2020
49e904f
Import global string module.
jenskeiner Nov 30, 2020
4c033d9
Fix an issue when trying to call a boolean value.
jenskeiner Dec 1, 2020
e997baa
Addressing several pull request comments.
jenskeiner Dec 1, 2020
fbca5d8
Remove old way of setting defaults for added configuration options.
jenskeiner Dec 1, 2020
b842247
Merge branch 'master' into 2764-oidc-configurable-headers
jenskeiner Dec 1, 2020
8eabdef
Fix lines that are too long.
jenskeiner Dec 1, 2020
6328c68
Remove trailing whitespace.
jenskeiner Dec 1, 2020
bfa4aa7
Add auxilliary method to insert/update request header while updating …
jenskeiner Dec 1, 2020
1aeec0b
Small fixes.
jenskeiner Dec 1, 2020
eb73cee
Merge branch 'master_upstream' into 2764-oidc-configurable-headers
jenskeiner Dec 16, 2020
f13fc9d
CHange backend from 127.0.0.1:1980 to 127.0.0.1:8888 to use mendhak/h…
jenskeiner Dec 16, 2020
f088a88
Fix port number.
jenskeiner Dec 16, 2020
a4d503d
Revert local port back to 1980.
jenskeiner Dec 16, 2020
76c6b8b
Add endpoint that reflects OIDC-relevant request headers back in resp…
jenskeiner Dec 16, 2020
ade0bec
Add test cases to check if request bearer token in Authoriztation hea…
jenskeiner Dec 16, 2020
19c62a7
Fix issue when not all desired headers were reflected.
jenskeiner Dec 16, 2020
84c8684
Fix header verification tests.
jenskeiner Dec 16, 2020
4ce30ac
Fix test cases.
jenskeiner Dec 16, 2020
1b9cf28
Temporarily run only openid-connect plugin tests.
jenskeiner Dec 17, 2020
de7600e
Use different endpoint to reflect headers back in response body.
jenskeiner Dec 17, 2020
2e19611
Use direct GET request.
jenskeiner Dec 17, 2020
989f6b9
Fix unit tests.
jenskeiner Dec 17, 2020
d865b5d
Fix test case.
jenskeiner Dec 17, 2020
032b0e8
Remove obsolete helper function.
jenskeiner Dec 17, 2020
0ead6da
Improve documentation. Start new test case that simulates the authori…
jenskeiner Dec 17, 2020
593853b
Further process response from authorization endpoint and print to res…
jenskeiner Dec 17, 2020
a5ece5d
Small fixes.
jenskeiner Dec 17, 2020
f916b7e
Print out cookies.
jenskeiner Dec 17, 2020
8194baa
Concatenate extracted cookies into request header format.
jenskeiner Dec 17, 2020
12cf142
Fix cookie header format.
jenskeiner Dec 17, 2020
a9f4248
Extract raw cookie values.
jenskeiner Dec 18, 2020
728c750
Log out response of initial call to /hello endpoint redirect to ID pr…
jenskeiner Dec 18, 2020
3de1aff
Fix missing content_by_lua_block.
jenskeiner Dec 18, 2020
866fcbd
Fix more errors.
jenskeiner Dec 18, 2020
a04ca52
More fixes.
jenskeiner Dec 18, 2020
86589f2
Reorganise test order.
jenskeiner Dec 18, 2020
0a1ee78
More fixes.
jenskeiner Dec 18, 2020
009c6bc
More fixes.
jenskeiner Dec 18, 2020
f872a58
Even more fixes.
jenskeiner Dec 18, 2020
797c44a
Extract nonce, state and session cookie.
jenskeiner Dec 18, 2020
4a9a5a3
Fixes.
jenskeiner Dec 18, 2020
3249f59
Fixes.
jenskeiner Dec 18, 2020
385de27
Add back in some code.
jenskeiner Dec 18, 2020
58b8e55
More debugging.
jenskeiner Dec 18, 2020
071da28
Debugging.
jenskeiner Dec 18, 2020
f39187a
Add back in nonce and state extraction.
jenskeiner Dec 18, 2020
8f669dc
Add back in call to authorization endpoint.
jenskeiner Dec 18, 2020
70e2407
Fix syntax error.
jenskeiner Dec 18, 2020
cd3cb32
Debugging.
jenskeiner Dec 18, 2020
ad1a527
Debugging.
jenskeiner Dec 18, 2020
3100ff7
Debugging.
jenskeiner Dec 18, 2020
3f3e447
Add back assembling of form submission request.
jenskeiner Dec 18, 2020
3d5596f
Send actual request to simulate form submission.
jenskeiner Dec 18, 2020
ec55584
Pass some parameters in URL, not request body.
jenskeiner Dec 18, 2020
7fac749
Set status first.
jenskeiner Dec 18, 2020
fe3493f
Minor fix.
jenskeiner Dec 18, 2020
930fd2d
Only print out Location header.
jenskeiner Dec 18, 2020
3572499
Add /authenticated endpoint to route.
jenskeiner Dec 18, 2020
636b518
Revert previous change.
jenskeiner Dec 18, 2020
3a93ce2
Use catch-all route.
jenskeiner Dec 18, 2020
c348143
Fix redirect URL.
jenskeiner Dec 18, 2020
bf948e8
Actually call redirect_uri.
jenskeiner Dec 18, 2020
5fe5fc2
Add other cookies.
jenskeiner Dec 18, 2020
926729b
Use redirect URI from Location header directly.
jenskeiner Dec 18, 2020
730ef07
Final redirect.
jenskeiner Dec 18, 2020
ce4d794
Debugging.
jenskeiner Dec 18, 2020
c17b359
Fix final URI. Update cookie.
jenskeiner Dec 18, 2020
431a0fe
Use /uri endpoint.
jenskeiner Dec 19, 2020
1e77d12
Start clean up.
jenskeiner Dec 21, 2020
78eddff
Continue clean up.
jenskeiner Dec 21, 2020
b98d609
Continue clean up.
jenskeiner Dec 21, 2020
76c613e
Continue clean up.
jenskeiner Dec 21, 2020
f0ce405
Continue clean up.
jenskeiner Dec 21, 2020
ec57b24
Fix stray end.
jenskeiner Dec 21, 2020
159672d
Make config parametrizable through NGINX variables.
jenskeiner Dec 21, 2020
ec8addd
Clean up test cases.
jenskeiner Dec 22, 2020
61cce4d
Fix test cases.
jenskeiner Dec 22, 2020
2afae7b
Fix test cases.
jenskeiner Dec 22, 2020
0f8a53d
Fix unit tests.
jenskeiner Dec 22, 2020
40bd353
Fix test cases.
jenskeiner Dec 22, 2020
8fb5bd3
Debugging.
jenskeiner Dec 22, 2020
d9bdcef
Take out another test for debugging.
jenskeiner Dec 22, 2020
eb36145
Add back case.
jenskeiner Dec 22, 2020
239f506
Fix test case.
jenskeiner Dec 22, 2020
8a43122
Add back another case.
jenskeiner Dec 22, 2020
0a8b046
Debugging.
jenskeiner Dec 22, 2020
61f6008
Debugging.
jenskeiner Dec 22, 2020
5e2ea0a
Debugging.
jenskeiner Dec 22, 2020
95cd514
Debuging.
jenskeiner Dec 22, 2020
3583c3a
Debugging.
jenskeiner Dec 22, 2020
1e7031f
Merge branch 'master_upstream' into 2764-oidc-configurable-headers
jenskeiner Dec 22, 2020
d12aa16
Add defaults check.
jenskeiner Dec 22, 2020
ba4260f
Re-enable all tests. Revert server.lua.
jenskeiner Dec 22, 2020
aed18dc
Clean up.
jenskeiner Dec 22, 2020
700d26c
Fix linting errors.
jenskeiner Dec 22, 2020
8bf1498
Clean up.
jenskeiner Dec 23, 2020
ae34c7f
Minor fixes.
jenskeiner Dec 26, 2020
d9ab5ba
Minor fix.
jenskeiner Dec 26, 2020
8ca9c8e
Fix test.
jenskeiner Dec 26, 2020
0e924d7
Remove duplicate test case.
jenskeiner Dec 28, 2020
18a188b
Check Authorization heade parse result.
jenskeiner Dec 28, 2020
5354eca
Fix stray return value.
jenskeiner Dec 28, 2020
207cfa1
Always try to extract access token from header if bearer_only flag is…
jenskeiner Dec 28, 2020
61ae9f3
Fix test cases.
jenskeiner Dec 28, 2020
d3b046b
Fix expected response header.
jenskeiner Dec 28, 2020
29a4904
Trivial change to re-start failed checks on GitHub.
jenskeiner Dec 28, 2020
307e07b
Move check into auxilliary function.
jenskeiner Dec 29, 2020
f51baf7
Update plugin documentation.
jenskeiner Jan 4, 2021
4ec11c6
Fix stray quotation mark.
jenskeiner Jan 4, 2021
6f93a1e
Merge branch 'master_upstream' into 2764-oidc-configurable-headers
jenskeiner Jan 4, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Debugging.
jenskeiner committed Dec 18, 2020

Verified

This commit was signed with the committer’s verified signature.
scottopell Scott Opell
commit ce4d79446fc3ae62c61a7e5ace3e855c80fd13e3
24 changes: 12 additions & 12 deletions t/plugin/openid-connect.t
Original file line number Diff line number Diff line change
@@ -395,18 +395,18 @@ passed
ngx.say(res.headers['Location'])

-- Get the final URI out of the Location response header.
redirect_uri = res.headers['Location']
res, err = httpc:request_uri(redirect_uri, {
method = "GET",
headers = {
["Cookie"] = cookie_str
}
})
ngx.status = res.status
ngx.say(res.body)
for k, v in pairs(res.headers) do
ngx.say(k)
end
--redirect_uri = res.headers['Location']
--res, err = httpc:request_uri(redirect_uri, {
-- method = "GET",
-- headers = {
-- ["Cookie"] = cookie_str
-- }
-- })
--ngx.status = res.status
--ngx.say(res.body)
--for k, v in pairs(res.headers) do
-- ngx.say(k)
--end
else
-- Response from Keycloak not ok.
ngx.say(false)