-
-
Notifications
You must be signed in to change notification settings - Fork 645
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
Authelia and Gotify #692
Comments
I will have to look into authelia more carefully but can you just configure Authelia to allow unauthorized requests while still passing creds through? |
Hi! The only way I know how to achieve what you suggested in Authelia is by using the resources section. This custom regex allows specific API calls to bypass authentication, while everything else still requires authorization:
I checked the Gotify API documentation, and it seems to use different endpoints than I initially expected. It looks like I’ll need to allow Are there any other essential API calls I should account for if I want full functionality? |
I think you can just allow all unauthorized requests to go through and let gotify do the final determination? if i recall the only endpoint that we call with userpass is /client, everything else is through tokens |
Thanks for the tips! My understanding of Authelia has improved and I managed to solve this via two different methods by referring to the Gotify api docs here. https://gotify.net/api-docs#/. The methods section via the access control page in the Authelia documention was also helpful. https://www.authelia.com/configuration/security/access-control/#methods Authelia users rejoice! I'm wondering if Method 1 is more secure as it's protecting the API endpoints or if it's better to leave it all open via Method 2. Is it possible to fake HTTP request methods? Method 1: Add the api names, however this will need adjusting if the devs add more.
Method 2: Allow all unauthorized requests to go through as per @eternal-flame-AD's suggestion.
|
The regex expressions in Method 1 will also work for those using Authentik although I prefer Authelia. You will need to place these under the "Unauthenticated Paths" section when using Authentik.
This allows a protected reverse proxy whilst allowing named endpoints to go through unauthorized. |
@waz1500 , Thanks for the solution |
@tomergam Also, I forgot to mention earlier that any Authelia bypass rules should generally be placed near the top of the rules list. |
Thanks @waz1500 I Not getting Icon. custom or default. |
Idgi. I have added all those but still get errors in gotify. Im using authentik and traefik.
In the unauthenticated paths in authentik.
While trying to login |
Have you read the documentation?
You are setting up gotify in
Describe your problem
I am using Gotify with Authelia and Traefik, and I'd like to be able to receive messages via the reverse proxy, but this is currently being blocked by Authelia. My Gotify and Authelia users are the same, so with gotify’s basic auth, I can log in without needing to reauthenticate on Gotify’s side.
In Authelia, I can usually add exceptions for certain requests, such as API calls, but I’m unsure of what exactly to configure for Gotify. Here’s an example rule I typically use:
When I test using the following example:
curl "https://gotify.websitename.com/message?token=AxhtWcK0y5oIVUY" -F "title=my title" -F "message=my message" -F "priority=5"
I see the following error in the Authelia logs:
The remote IP is a cloudflare IP, however I have setup my reverse proxy to trust cloudflare ips and pass my real IP across to my apps.
Additionally, I cannot use the Gotify app because it tries to check /version, but those endpoints are blocked by Authelia. I'm also unsure how to pass credentials in the curl test command.
My question is: Can Gotify work behind Authelia, allowing Gotify requests to pass through while still protecting Gotify? I’m aware Gotify has a "trusted IPs" section in the config, but I’d prefer to handle everything through Authelia.
Please let me know if more details would help. I couldn’t find many related issues regarding Authelia and Gotify on the GitHub issues page.
The text was updated successfully, but these errors were encountered: