matheusvasconcellos opened a new issue #10053:
URL: https://github.com/apache/airflow/issues/10053
<!--
Welcome to Apache Airflow! For a smooth issue process, try to answer the
following questions.
Don't worry if they're not all applicable; just try to include what you can
:-)
If you need to include code snippets or logs, please put them in fenced code
blocks. If they're super-long, please use the details tag like
<details><summary>super-long log</summary> lots of stuff </details>
Please delete these comment blocks before submitting the issue.
-->
<!--
IMPORTANT!!!
PLEASE CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE
NEXT TO "SUBMIT NEW ISSUE" BUTTON!!!
PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!!
Please complete the next sections or the issue will be closed.
This questions are the first thing we need to know to understand the context.
-->
**Apache Airflow version**: 1.10
**Kubernetes version (if you are using kubernetes)** (use `kubectl version`):
**Environment**:
- **Cloud provider or hardware configuration**: AWS
- **OS** (e.g. from /etc/os-release):
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
- **Kernel** (e.g. `uname -a`): 4.14.186-146.268.amzn2.x86_64 (Amazon Linux
2)
- **Install tools**: Pip
- **Others**:
**What happened**:
When setting the **force_log_out_after** variable to a number different from
the default 0, the error below is displayed when trying to login.
Other parameters that may be important:
**authenticate** = True
**auth_backend** = airflow.contrib.auth.backends.ldap_auth
```
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2446, in
wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1951, in
full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1820, in
handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.7/site-packages/flask/_compat.py", line 39,
in reraise
raise value
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1947, in
full_dispatch_request
rv = self.preprocess_request()
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2241, in
preprocess_request
rv = func()
File "/usr/local/lib/python3.7/site-packages/airflow/www/app.py", line
198, in before_request
flask.session.permanent = True
NameError: name 'flask' is not defined
```
<!-- (please include exact error messages if you can) -->
**What you expected to happen**:
The user session should be forced to log out after the set amount of time.
<!-- What do you think went wrong? -->
**How to reproduce it**:
Change the **force_log_out_after** from the default value.
**Anything else we need to know**:
<!--
How often does this problem occur? Once? Every time etc?
Any relevant logs to include? Put them here in side a detail tag:
<details><summary>x.log</summary> lots of stuff </details>
-->
----------------------------------------------------------------
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:
[email protected]