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

Sample SSL configuration redirects to ip address #302

Open
mbukatov opened this issue Sep 25, 2017 · 6 comments
Open

Sample SSL configuration redirects to ip address #302

mbukatov opened this issue Sep 25, 2017 · 6 comments
Assignees
Labels

Comments

@mbukatov
Copy link
Contributor

Description

Suggested SSL configuration based on example /etc/httpd/conf.d/tendrl-ssl.conf.sample as described in #264 redirects http requests to https using ip address.

Based on @dahorak 's feedback: Tendrl/tendrl-ansible#46 (comment) and today's A daily meeting of Tendrl developers.

Version

Recent snapshot build from master branch:

tendrl-api-httpd-1.5.2-20170921T125939.61d8945.noarch

Steps to Reproduce

  1. Prepare machines with GlusterFS cluster, including gluster volume (I used nightly builds and volume_usmqe_alpha_distrep_4x2.create.conf)
  2. Install Tendrl via tendrl-ansible there, using snapshot builds and Tendrl/tendrl-ansible@57a4cfd from work in progress branch for work in progress: ssl configuration for Tendrl [blocked] tendrl-ansible#46
  3. Log into the Tendrl web interface as an admin user, using full hostname and plain http in url
  4. See the redirection

Actual Results

The user is redirected to ip address of the server: eg. from http://mbukatov-usm1-server.example.com/ it redirects to https://10.34.108.90/:

screenshot_20170925_140535

Expected Results

The redirection uses full hostname (fqdn).

@mbukatov
Copy link
Contributor Author

@r0h4n @brainfunked @dahorak so far this seems to me to be a minor configuration change (affecting the default config sample and tendrl-ansible), what do you think?

@mbukatov
Copy link
Contributor Author

I have tried to reconfigure the redirection using fqdn:

$ git diff roles/tendrl-server/tasks/httpd-ssl.yml                                                                                                           
diff --git a/roles/tendrl-server/tasks/httpd-ssl.yml b/roles/tendrl-server/tasks/httpd-ssl.yml                                                               
index 829f48a..a33730f 100644
--- a/roles/tendrl-server/tasks/httpd-ssl.yml
+++ b/roles/tendrl-server/tasks/httpd-ssl.yml
@@ -85,7 +85,7 @@
   lineinfile:
     path: /etc/httpd/conf.d/tendrl.conf
     regexp: ' *#? *Redirect permanent / https://.*/'
-    line: "  Redirect permanent / https://{{ httpd_ip_address }}/"
+    line: "  Redirect permanent / https://{{ ansible_fqdn }}/"
   notify:
     - restart httpd

and at first sight, it seems to work fine for me:

screenshot_20170925_141541

mbukatov added a commit to mbukatov/tendrl-ansible that referenced this issue Sep 25, 2017
@anivargi anivargi added the API label Sep 26, 2017
@brainfunked
Copy link
Contributor

@mbukatov your solution is good, please use it.

@mbukatov
Copy link
Contributor Author

@brainfunked ack

@mbukatov
Copy link
Contributor Author

mbukatov commented Oct 3, 2017

Fix is part of Tendrl/tendrl-ansible#46

@shirshendu
Copy link

@mbukatov Is this still relevant or can we close this?

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

No branches or pull requests

5 participants