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

v2: basicauth feature #2747

Closed
high3eam opened this issue Sep 13, 2019 · 3 comments
Closed

v2: basicauth feature #2747

high3eam opened this issue Sep 13, 2019 · 3 comments
Labels
feature ⚙️ New feature or request
Milestone

Comments

@high3eam
Copy link

1. What would you like to have changed?

I really liked Caddy v1 basicauth and would like to see this feature in Caddy v2, too.
For little private projects or testing purposes, quickly "securing" them via basicauth is convenient and I used it a lot in Caddyfile v1.
If possible keeping the simple syntax just like in Caddy v2 would be awesome.

2. Why is this feature a useful, necessary, and/or important addition to this project?

Restrict access to specific webfolders quickly and convenient just like in Caddy v1.

3. What alternatives are there, or what are you doing in the meantime to work around the lack of this feature?

In the meantime, I run a second instance of Caddy which binds to localhost on a different port to work on some projects in private, but having them online in one instance allows for specific people to access the files if necessary to test, etc.

4. Please link to any relevant issues, pull requests, or other discussions.

https://caddy.community/t/v2-basicauth-feature/

@high3eam high3eam added the feature ⚙️ New feature or request label Sep 13, 2019
@mholt
Copy link
Member

mholt commented Sep 14, 2019

I've actually got this mostly working locally, but I need to figure out how to design the more general authentication module before I'm ready to commit basic auth (which is just one form of authentication).

Hm, I can probably get this out next week, but the design may change in a breaking way before the final version. Just be aware of that.

@francislavoie
Copy link
Member

@mholt https://github.com/tarent/loginsrv/blob/master/caddy/README.md covers a lot of the typical needs, maybe something along those lines built into v2 could be nice

@mholt mholt added this to the 2.0 milestone Sep 18, 2019
@mholt mholt added the v2 label Sep 18, 2019
@mholt mholt modified the milestones: 2.0, v2.0.0-beta5 Oct 10, 2019
mholt added a commit that referenced this issue Oct 10, 2019
This implements HTTP basicauth into Caddy 2. The basic auth module will
not work with passwords that are not securely hashed, so a subcommand
hash-password was added to make it convenient to produce those hashes.

Also included is Caddyfile support.

Closes #2747.
@mholt
Copy link
Member

mholt commented Oct 10, 2019

Implemented in f8366c2. Updated the wiki with documentation.

@mholt mholt closed this as completed Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature ⚙️ New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants