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

question: Lock authentication to specific IP addresses #360

Open
Gunni opened this issue Oct 5, 2024 · 4 comments
Open

question: Lock authentication to specific IP addresses #360

Gunni opened this issue Oct 5, 2024 · 4 comments
Assignees
Labels
need triage question Further information is requested

Comments

@Gunni
Copy link

Gunni commented Oct 5, 2024

I am using SAML auth with Entra ID/Azure AD, but I want to prevent anyone not on a specific IP (or multiple IPs/CIDRs) from trying to authenticate or access the webserver.

How can I do that?

Defense in depth.

I used to have something like

@blocked not remote_ip <ip1> <ip2> <ip3>
respond @blocked "Nope" 403

But then I added caddy-security and it stopped working. I can get exact config on Monday.

@Gunni Gunni added need triage question Further information is requested labels Oct 5, 2024
@greenpau
Copy link
Owner

greenpau commented Oct 5, 2024

@Gunni , not sure whether I understand the use case and how it is related to this plugin.

@Gunni
Copy link
Author

Gunni commented Oct 5, 2024

Basically:

  1. check if user in in access list
  2. check saml/redirect user
  3. forward request to reverse proxy

In that order. Again if i need to post config, i can do it on Monday.

@greenpau
Copy link
Owner

greenpau commented Oct 6, 2024

In that order. Again if i need to post config, i can do it on Monday.

@Gunni , let's see your config.

@Gunni
Copy link
Author

Gunni commented Oct 8, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need triage question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants