Mailu forward_auth handler
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- authentication, backend
Research direction
Start by locating the Mailu authorization plugin and the services configuration mentioned in the issue. Trace requests to auth/mailu/check and how the TOKEN cookie is validated, then verify the 202/403 behavior and the INTERNAL button URL at /sso/login/tvoy-ff.
Written by the indexing model from the issue text.
Description
Issue open by Roman Dyakov via telegram message.
Есть стандарт для прокси-аутентификации, его поддерживает caddy с помощью директивы forward_auth
forward_auth /sso/login http://com_profcomff_api_auth:80 {
uri /auth/mailu/check
copy_headers {
X-Auth-Request-Email>X-Auth-Email
}
}
При запросе на mail.profcomff.com/sso/login делай запрос на http://com_profcomff_api_auth/auth/mailu/check, если результат 202 – передай значение заголовка X-Auth-Request-Email как заголовок X-Auth-Email далее. Если 403 – ничего не делай
Токен передается из Твой ФФ в виде GET-параметра и можно проставить его в куки через кэдди файл
handle /sso/login/tvoy-ff {
header {
Set-Cookie "TOKEN={http.request.uri.query.token}; SameSite=None; Secure;"
}
redir https://mail.profcomff.com/webmail
}
Итого остается написать для Mailu ручку внутри плагина авторизации, которая будет возвращать 202 если в куки TOKEN находится валидный токен с правильным скопом, иначе 403
+создать INTERNAL кнопку в services на https://mail.profcomff.com/sso/login/tvoy-ff
- Dominant language
- Python
- Stars
- 15
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from profcomff/auth-api
-
Баг со скоупами Openbug :lady_beetle:
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
-
Проблемы с Email Open
-
bug :lady_beetle:
All issues in profcomff/auth-api
Similar issues
-
bug confirmed issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
open-webui/open-webui#30750 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
OpenwaterHealth/openmotion-bloodflow-app#604 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 90/100