diff --git a/.travis.yml b/.travis.yml index 61a611250..a2dfb8024 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ addons: hosts: - admin.test.local - auth.test.local - - basicauth.test.local + - single_factor.test.local - dev.test.local - home.test.local - mx1.mail.test.local diff --git a/README.md b/README.md index c3f27d909..47f8a701d 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,7 @@ Add the following lines to your **/etc/hosts** to alias multiple subdomains so t 127.0.0.1 admin.test.local 127.0.0.1 mx1.mail.test.local 127.0.0.1 mx2.mail.test.local + 127.0.0.1 single_factor.test.local 127.0.0.1 auth.test.local ### Run it! diff --git a/config.template.yml b/config.template.yml index c9832ce93..f173907a9 100644 --- a/config.template.yml +++ b/config.template.yml @@ -74,7 +74,7 @@ ldap: authentication_methods: default_method: two_factor per_subdomain_methods: - basicauth.test.local: single_factor + single_factor.test.local: single_factor # Access Control # @@ -233,4 +233,4 @@ notifier: secure: false host: 'smtp' port: 1025 - sender: admin@example.com \ No newline at end of file + sender: admin@example.com diff --git a/example/nginx/html/home.test.local/index.html b/example/nginx/html/home.test.local/index.html index 32c907ee9..ffeb37d56 100644 --- a/example/nginx/html/home.test.local/index.html +++ b/example/nginx/html/home.test.local/index.html @@ -52,7 +52,7 @@ mx2.main.test.local / secret.html
  • - basicauth.test.local / secret.html + single_factor.test.local / secret.html
  • diff --git a/example/nginx/html/basicauth.test.local/secret.html b/example/nginx/html/single_factor.test.local/secret.html similarity index 100% rename from example/nginx/html/basicauth.test.local/secret.html rename to example/nginx/html/single_factor.test.local/secret.html diff --git a/example/nginx/nginx.conf b/example/nginx/nginx.conf index 0db8f9d52..d4e54f61f 100644 --- a/example/nginx/nginx.conf +++ b/example/nginx/nginx.conf @@ -244,9 +244,9 @@ http { server { listen 443 ssl; - root /usr/share/nginx/html/basicauth.test.local; + root /usr/share/nginx/html/single_factor.test.local; - server_name basicauth.test.local; + server_name single_factor.test.local; ssl on; ssl_certificate /etc/ssl/server.crt; diff --git a/test/features/access-control.feature b/test/features/access-control.feature index e540ac576..ea484ce99 100644 --- a/test/features/access-control.feature +++ b/test/features/access-control.feature @@ -17,7 +17,7 @@ Feature: User has access restricted access to domains | https://dev.test.local:8080/users/bob/secret.html | | https://admin.test.local:8080/secret.html | | https://mx1.mail.test.local:8080/secret.html | - | https://basicauth.test.local:8080/secret.html | + | https://single_factor.test.local:8080/secret.html | And I have no access to: | url | | https://mx2.mail.test.local:8080/secret.html | @@ -42,7 +42,7 @@ Feature: User has access restricted access to domains | https://admin.test.local:8080/secret.html | | https://dev.test.local:8080/users/john/secret.html | | https://dev.test.local:8080/users/harry/secret.html | - | https://basicauth.test.local:8080/secret.html | + | https://single_factor.test.local:8080/secret.html | @need-registered-user-harry Scenario: User harry has restricted access @@ -64,4 +64,4 @@ Feature: User has access restricted access to domains | https://dev.test.local:8080/users/john/secret.html | | https://mx1.mail.test.local:8080/secret.html | | https://mx2.mail.test.local:8080/secret.html | - | https://basicauth.test.local:8080/secret.html | + | https://single_factor.test.local:8080/secret.html | diff --git a/test/features/auth-portal-redirection.feature b/test/features/auth-portal-redirection.feature index 675a47b56..eb7eed132 100644 --- a/test/features/auth-portal-redirection.feature +++ b/test/features/auth-portal-redirection.feature @@ -2,10 +2,10 @@ Feature: User is redirected when factors are already validated @need-registered-user-john Scenario: User has validated first factor and tries to access service protected by second factor. He is then redirect to second factor step. - When I visit "https://basicauth.test.local:8080/secret.html" - And I'm redirected to "https://auth.test.local:8080/?redirect=https%3A%2F%2Fbasicauth.test.local%3A8080%2Fsecret.html" + When I visit "https://single_factor.test.local:8080/secret.html" + And I'm redirected to "https://auth.test.local:8080/?redirect=https%3A%2F%2Fsingle_factor.test.local%3A8080%2Fsecret.html" And I login with user "john" and password "password" - And I'm redirected to "https://basicauth.test.local:8080/secret.html" + And I'm redirected to "https://single_factor.test.local:8080/secret.html" And I visit "https://public.test.local:8080/secret.html" Then I'm redirected to "https://auth.test.local:8080/secondfactor?redirect=https%3A%2F%2Fpublic.test.local%3A8080%2Fsecret.html" @@ -31,4 +31,4 @@ Feature: User is redirected when factors are already validated And I click on "TOTP" And I'm redirected to "https://public.test.local:8080/secret.html" And I visit "https://auth.test.local:8080?redirect=https://public.test.local:8080/secret.html" - Then I'm redirected to "https://public.test.local:8080/secret.html" \ No newline at end of file + Then I'm redirected to "https://public.test.local:8080/secret.html" diff --git a/test/features/single-factor.feature b/test/features/single-factor.feature index aa50bb505..cb1c7e04f 100644 --- a/test/features/single-factor.feature +++ b/test/features/single-factor.feature @@ -2,9 +2,9 @@ Feature: User can access certain subdomains with single factor @need-registered-user-john Scenario: User is redirected to service after first factor if allowed - When I visit "https://auth.test.local:8080/?redirect=https%3A%2F%2Fbasicauth.test.local%3A8080%2Fsecret.html" + When I visit "https://auth.test.local:8080/?redirect=https%3A%2F%2Fsingle_factor.test.local%3A8080%2Fsecret.html" And I login with user "john" and password "password" - Then I'm redirected to "https://basicauth.test.local:8080/secret.html" + Then I'm redirected to "https://single_factor.test.local:8080/secret.html" @need-registered-user-john Scenario: Redirection after first factor fails if single_factor not allowed. It redirects user to first factor.