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

Test Plan Links become "http://" not "https://" on the Kiwi Web UI. #450

Closed
iguchikoma opened this Issue Jul 29, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@iguchikoma
Copy link

iguchikoma commented Jul 29, 2018

Description of problem

I tried to use Kiwi only https (without http). But the Web UI href links to Test Plan become always http:// (not https://).

Version or commit hash (if applicable)

Version 5.0
Docker image: kiwitcms/kiwi:latest

How often reproducible

Always

Steps to Reproduce

  1. Create a new Test Plan.
  2. Go to the Top Page.
  3. See the source code of the top page's HTML. The Test Plan href link is "http://" not "https://".

Actual results

When I click Test Plan in the dashboard (Top page),

Expected results

Test Plan Link is "https://.."

Additional info

I fixed this problem by changing the code below for now.

###  __init__.py.org is original file. __init__.py is modified file.
# diff -u /venv/lib/python3.6/site-packages/tcms/core/utils/__init__.py /venv/lib/python3.6/site-packages/tcms/core/utils/__init__.py.org 
--- /venv/lib/python3.6/site-packages/tcms/core/utils/__init__.py       2018-07-29 12:27:51.824000000 +0000
+++ /venv/lib/python3.6/site-packages/tcms/core/utils/__init__.py.org   2018-07-29 12:29:37.532000000 +0000
@@ -44,7 +44,7 @@
 
 
 def request_host_link(request, domain_name=None):
-    protocol = 'https://'
+    protocol = 'http://'
 
     if request:
         if not domain_name:
[root@kiwi-web-bcdd67494-8dlkv utils]#
@okainov

This comment has been minimized.

Copy link
Contributor

okainov commented Jul 29, 2018

+1, I had the same problem and have exactly the same "fix" for me (which breaks local instance)

@atodorov

This comment has been minimized.

Copy link
Member

atodorov commented Jul 29, 2018

When I click Test Plan in the dashboard (Top page),

@iguchikoma I see on the demo instance that the link inside the HTML is "http://" however Apache inside of the docker image is configured to redirect all HTTP traffic to it's HTTPS equivalent, see:
https://github.com/kiwitcms/Kiwi/blob/master/etc/kiwi-httpd.conf#L7

What is the impact of this issue? Is the redirect not working for you ? (if so let me know how to reproduce on the demo).

@iguchikoma

This comment has been minimized.

Copy link
Author

iguchikoma commented Jul 29, 2018

@atodorov I deploy the Kiwi on the Kubernetes. And I use NodePort. If I click the Test Plans links, the URL is http://my-kubernetes-cluster-host:30001 and I failed to access to Test Plan page because the 30001 port is forwarded to the kiwi https 443 port. Here is my kubernetes service manifest of the Kiwi-web-pod(container).

ubuntu@k8s-t-m01:~/kiwi-k8s (master *)$ cat kiwi-web-service.yaml
apiVersion: v1
kind: Service
metadata:
  labels:
    app.kubernetes.io/name: kiwi-web
    app.kubernetes.io/instance: kiwi01
    app.kubernetes.io/version: "5.0"
    app.kubernetes.io/component: web
    app.kubernetes.io/managed-by: kubectl
    app.kubernetes.io/part-of: kiwi
  name: kiwi-web
  namespace: igu-kiwi
spec:
  ports:
  - nodePort: 30000
    port: 80
    targetPort: 80
    name: http
  - nodePort: 30001
    port: 443
    targetPort: 443
    name: https
  selector:
    app.kubernetes.io/name: kiwi-web
  type: NodePort
ubuntu@k8s-t-m01:~/kiwi-k8s (master *)$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.