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

Add Basic Auth per Frontend #1147

Merged

Conversation

SantoDE
Copy link
Collaborator

@SantoDE SantoDE commented Feb 9, 2017

Fixes #751

Currently, only Basic Auth and the docker & rancher provider are supported.

@cemo
Copy link

cemo commented Feb 9, 2017

@SantoDE Kubernetes please :)

@SantoDE SantoDE force-pushed the feature-http-basic-auth-frontend branch from 45b648b to 2f4bfac Compare February 9, 2017 13:54
@SantoDE
Copy link
Collaborator Author

SantoDE commented Feb 9, 2017

Hey @cemo ,

Sadly I've personally never used Kubernetes so it's really hard for me to add it. However, if you're experienced in Kubernetes let's meet on Slack ;-)

@Starefossen
Copy link
Contributor

Yes, support for Kubernetes would be nice as well 👍

@joshuacox
Copy link

beautiful! I will test this out very soon

@athoune
Copy link

athoune commented Feb 13, 2017

@SantoDE, maybe you can blind code, just with unit tests ;-)

@seeder
Copy link

seeder commented Feb 22, 2017

Adding to consul_catalog backend would be great

@Russell-IO
Copy link
Contributor

Is there any scope to add support for an identify provider ? i.e. LDAP / OAUTH ?

@ViViDboarder
Copy link
Contributor

I haven't tested this branch yet, but does it support the functionality added in #889 where the authenticated user is added to the header?

@OlivierCuyp
Copy link

Seems to be a good first step to me :D

@kiview
Copy link

kiview commented Mar 15, 2017

Will this work with the file backend as well?

@scher200
Copy link

scher200 commented Mar 20, 2017

@SantoDE awesome men, I look forward to this merge

@zuc
Copy link

zuc commented Mar 23, 2017

@SantoDE Hey, just opened SantoDE#1 adding support for basic auth in kubernetes :)

@RXWatcher
Copy link

@SantoDE Does this allow use of a htpasswd file? Thank you!

Copy link

@scher200 scher200 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SantoDE Looks good man, I learned form this. What about the "This branch is out-of-date with the base branch" message?

Copy link

@scher200 scher200 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SantoDE well done

@emilevauge
Copy link
Member

@SantoDE We should move on this one, could you add support for traefik.<servicename>.* properties (#1257)?

@SantoDE
Copy link
Collaborator Author

SantoDE commented Apr 4, 2017

Yeah @emilevauge , will do tonight or tommorow :)

@tha80
Copy link

tha80 commented Apr 18, 2017

It's such a shame that this Feature / Pull Request is still not merged, because dynamic basic auth is such an important feature! :(

@SantoDE SantoDE force-pushed the feature-http-basic-auth-frontend branch from 33405d5 to 6a31799 Compare April 19, 2017 13:21
@SantoDE
Copy link
Collaborator Author

SantoDE commented Apr 19, 2017

docs updated @vdemeester 👼

@emilevauge
Copy link
Member

Oh man, @SantoDE is soooo fast !

@RXWatcher
Copy link

@SantoDE Are we able to use a htpasswd file with this? Thanks again!

Copy link
Contributor

@timoreimann timoreimann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found some late typos, otherwise 👍

docs/toml.md Outdated
@@ -844,6 +844,7 @@ Labels can be used on containers to override default behaviour:
- `traefik.frontend.passHostHeader=true`: forward client `Host` header to the backend.
- `traefik.frontend.priority=10`: override default frontend priority
- `traefik.frontend.entryPoints=http,https`: assign this frontend to entry points `http` and `https`. Overrides `defaultEntryPoints`.
- `traefik.frontend.auth.basic=test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/,test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0`: Set's a Basic Auth for that frontend with the users test:test and test2:test2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: Set's -> Sets.

docs/toml.md Outdated
@@ -852,11 +853,11 @@ If several ports need to be exposed from a container, the services labels can be
- `traefik.<service-name>.weight=10`: assign this service weight. Overrides `traefik.weight`.
- `traefik.<service-name>.frontend.backend=fooBackend`: assign this service frontend to `foobackend`. Default is to assign to the service backend.
- `traefik.<service-name>.frontend.entryPoints=http`: assign this service entrypoints. Overrides `traefik.frontend.entrypoints`.
- `traefik.<service-name>.frontend.auth.basic=test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/,test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0` Set's a Basic Auth for that frontend with the users test:test and test2:test2.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sets.

docs/toml.md Outdated
@@ -1601,6 +1602,7 @@ Labels can be used on task containers to override default behaviour:
- `traefik.frontend.passHostHeader=true`: forward client `Host` header to the backend.
- `traefik.frontend.priority=10`: override default frontend priority
- `traefik.frontend.entryPoints=http,https`: assign this frontend to entry points `http` and `https`. Overrides `defaultEntryPoints`.
- `traefik.frontend.auth.basic=test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/,test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0`: Set's a Basic Auth for that frontend with the users test:test and test2:test2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sets.

Copy link
Member

@emilevauge emilevauge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your work @SantoDE !
Could you open an issue to remember implementing this in other providers?
LGTM!

@SantoDE SantoDE force-pushed the feature-http-basic-auth-frontend branch from 6a31799 to 8a892b2 Compare April 19, 2017 19:05
@SantoDE
Copy link
Collaborator Author

SantoDE commented Apr 19, 2017

Typos fixed @timoreimann :) So feel free to merge! :D cc: @containous/traefik

Copy link
Contributor

@timoreimann timoreimann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@jri-sp
Copy link

jri-sp commented Apr 24, 2017

Hi,
I need this feature too, do you know how many time it usually takes between the merge and the next release ?

Best regards,

@Starefossen
Copy link
Contributor

@jri-sp if you look through the releases page it might give you an indication. Hint; look for the time between 2.1 and 2.2.

@timoreimann
Copy link
Contributor

@jri-sp @Starefossen previous release cycles are probably not a good indication anymore as we are currently trying to release more frequently. The goal is to ship every other month.

Code freeze is supposed to happen at the end of April. Depending on how much feedback we get during the release candidate phase, 1.3 should be out sooner or later. I'd think on the order of 2-3 weeks.

@jri-sp
Copy link

jri-sp commented Apr 24, 2017

@Starefossen @timoreimann
Alright! thanks both of you for your quick answer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.