mirror of
https://github.com/anonaddy/anonaddy.git
synced 2026-04-25 14:15:53 +03:00
[PR #695] [MERGED] Proxy authentication support (eq. oauth2-proxy) #1174
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/anonaddy#1174
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/anonaddy/anonaddy/pull/695
Author: @nielscil
Created: 11/11/2024
Status: ✅ Merged
Merged: 1/9/2026
Merged by: @willbrowningme
Base:
master← Head:feature/ProxyAuthenticationSupport📝 Commits (10+)
7c2825cbegin using proxy authenticationdeed8c3cleanup code111346frename411ab4eAdded env to example file54a632fuse constant for session key4e365e8automatic verified email when using proxy authentication01f16f1removed parent from middlewarec6787c6moved redirect logic to helper and use it in ProxyAuthentication middleware + LogicController0a51509namingbf4982etests + login redirect in middleware📊 Changes
33 files changed (+1130 additions, -65 deletions)
View changed files
📝
.env.example(+8 -1)➕
app/Console/Commands/RemoveUsernameExternalId.php(+75 -0)➕
app/Console/Commands/SetUsernameExternalId.php(+84 -0)📝
app/Helpers/Helper.php(+73 -0)📝
app/Http/Controllers/Api/LoginableUsernameController.php(+4 -0)📝
app/Http/Controllers/Api/UsernameController.php(+1 -1)📝
app/Http/Controllers/Auth/ApiAuthenticationController.php(+4 -0)📝
app/Http/Controllers/Auth/LoginController.php(+1 -18)📝
app/Http/Controllers/Auth/PersonalAccessTokenController.php(+1 -1)📝
app/Http/Controllers/Auth/RegisterController.php(+2 -25)📝
app/Http/Controllers/DefaultUsernameController.php(+4 -0)📝
app/Http/Middleware/HandleInertiaRequests.php(+1 -0)➕
app/Http/Middleware/ProxyAuthentication.php(+204 -0)📝
app/Http/Middleware/VerifyTwoFactorAuthMethods.php(+2 -2)📝
app/Http/Requests/StorePersonalAccessTokenRequest.php(+9 -4)📝
app/Models/Username.php(+2 -0)📝
bootstrap/app.php(+1 -0)📝
config/anonaddy.php(+41 -0)➕
database/migrations/2024_11_18_104417_add_external_id_to_username.php(+32 -0)📝
resources/js/Layouts/AppLayout.vue(+1 -1)...and 13 more files
📄 Description
Introduction
When searching for SSO support in the issues, I came across https://github.com/anonaddy/anonaddy/issues/248#issuecomment-1407264756 where is being discussed to support proxy authentication like oauth2-proxy. @Queuecumber would make a PR for this, but I couldn't find it, so I made it myself.
Changes in this PR
LoginControllerto helper class.RegisterControllerto helper class.use_proxy_authenticationandANONADDY_USE_PROXY_AUTHENTICATION).proxy_authentication_external_user_id_headerandANONADDY_PROXY_AUTHENTICATION_USER_ID_HEADER).proxy_authentication_username_headerandANONADDY_PROXY_AUTHENTICATION_NAME_HEADER).proxy_authentication_email_headerandANONADDY_PROXY_AUTHENTICATION_EMAIL_HEADER).ProxyAuthentication.ProxyAuthenticationTestfor testing the middleware.CanLoginwhen using proxy authentication, other usernames can be added but not used for login.Proxy Authentication flow
notes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.