You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/11/11 22:28:20 UTC

[GitHub] [airflow] vitaly-krugl opened a new issue #12291: Trigger Dag from Airflow Web GUI sets origin with wrong HTTP scheme

vitaly-krugl opened a new issue #12291:
URL: https://github.com/apache/airflow/issues/12291


   **Apache Airflow version**: 1.10.11
   
   **Environment**:
   
   - **OS** (e.g. from /etc/os-release):
   - **Kernel** (e.g. `uname -a`): Linux
   
   
   **What happened**: After manually triggering a DAG from Airflow Web GUI, Airflow attempted to open the /admin/ page using http:// instead of the the https:// scheme, and so failed to connect because my webserver only supports SSL connections.
   
   **What you expected to happen**:
   I expected Airflow to open the /admin/ page using the https:// scheme because my webserver only supports SSL connections.
   
   Furthermore, I have the `[webserver]` `base_url` option set up using https:// scheme.
   
   **How to reproduce it**:
   When I examine the HTML source of the `<title>Airflow - DAGs</title>` page, I see that the `<!-- Trigger Dag -->` blocks have "origin" url args configured with "http", as in this example:
   ```
                   <!-- Trigger Dag -->
                   <a href="/admin/airflow/trigger?dag_id=airflow_db_cleanup&origin=http://emp-wf-vkruglik.mydomain.com/admin/">
                       <span class="glyphicon glyphicon-play-circle" aria-hidden="true" data-original-title="Trigger Dag"></span>
                   </a>
   ```
   
    I have the `[webserver]` `base_url` option set up as 
   ```
   base_url = https://emp-wf-vkruglik.mydomain.com
   ```
   
   Note that in my network setup, there is an apache server that acts as SSL terminator. Apache server in turn forwards the requests to Airflow webserver as HTTP over port 80.  So, in the web browser (I am using Chrome), I access Airflow using this URL: https://emp-wf-vkruglik.mydomain.com/admin/  (note the https).
   
   However, when I got trough the "Trigger Dag" in Airflow UI and click on the Trigger button (or the "abort" button), Airflow GUI attempts to load `http://emp-wf-vkruglik.mydomain.com/admin/` instead of `https://emp-wf-vkruglik.mydomain.com/admin/`.
   
   From the source code of airflow/www/templates/airflow/trigger.html, I see that this incorrect HTTP scheme is picked up from the `{{ origin }}` arg:
   ```
   {% extends "airflow/master.html" %}
   
   {% block body %}
       {{ super() }}
       <h2>Trigger DAG: {{ dag_id }}</h2>
       <form method="POST">
         <input name="csrf_token" type="hidden" value="{{ csrf_token() }}"/>
         <input name="dag_id" type="hidden" value="{{ dag_id }}"/>
         <input name="origin" type="hidden" value="{{ origin }}"/>
         <div class="form-group">
           <label for="conf">Configuration JSON (Optional)</label>
           <textarea class="form-control" name="conf">{{ conf }}</textarea>
         </div>
         <p>
           To access configuration in your DAG use <code>{{ '{{' }} dag_run.conf {{ '}}' }}</code>.
         </p>
         <input class="btn btn-primary" type="submit" value="Trigger"/>
         <button class="btn" onclick="location.href = '{{ origin }}'; return false">bail.</button>
       </form>
   {% endblock %}
   ```
   
   
   **Anything else we need to know**: Occurs 100%
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on issue #12291: Trigger Dag from Airflow Web GUI sets origin with wrong HTTP scheme

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #12291:
URL: https://github.com/apache/airflow/issues/12291#issuecomment-955610931


   This issue has been closed because it has not received response from the issue author.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] closed issue #12291: Trigger Dag from Airflow Web GUI sets origin with wrong HTTP scheme

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #12291:
URL: https://github.com/apache/airflow/issues/12291


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on issue #12291: Trigger Dag from Airflow Web GUI sets origin with wrong HTTP scheme

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #12291:
URL: https://github.com/apache/airflow/issues/12291#issuecomment-950021558


   This issue has been automatically marked as stale because it has been open for 30 days with no response from the author. It will be closed in next 7 days if no further activity occurs from the issue author.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on issue #12291: Trigger Dag from Airflow Web GUI sets origin with wrong HTTP scheme

Posted by GitBox <gi...@apache.org>.
kaxil commented on issue #12291:
URL: https://github.com/apache/airflow/issues/12291#issuecomment-763173600


   The `/www` webserver is deprecated. Can you check and see if you can reproduce this with the RBAC UI:
   
   https://airflow.apache.org/blog/airflow-1.10.12/#use-airflow-rbac-ui


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ordonezf commented on issue #12291: Trigger Dag from Airflow Web GUI sets origin with wrong HTTP scheme

Posted by GitBox <gi...@apache.org>.
ordonezf commented on issue #12291:
URL: https://github.com/apache/airflow/issues/12291#issuecomment-750425121


   I'm having the same issue on 1.10.14, it only happens with chrome on macos.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org