Comments (13)
Thanks for the report; it's good to know about the behavior, which we'll have to look into.
from python-sample-vscode-flask-tutorial.
I have gotten this working using Azure Web Apps (without containers), @HansKallekleiv initially it didn't appear to be working until I set the following setting:
I also needed to open the site in an InPrivate session to see the login screen, I think my main browser may have been logged into active directory already.
@anders-kiaer I will take a look at the web apps for containers flavor next.
from python-sample-vscode-flask-tutorial.
@JoshuaPartlow One for you to look into with the Flask tutorial.
from python-sample-vscode-flask-tutorial.
Is there any update on this issue? I'm getting the same results as @anders-kiaer, except for the last part.
In my case turning on authentication (using Azure AD) does not appear to do anything at all.
We want to host quite a few web apps on Azure, but the lack of AD authentication is preventing us from doing so.
from python-sample-vscode-flask-tutorial.
Thanks for looking into this @qubitron
I'm also using containers, and have tried adding that action without success.
Using anonymous session does not help.
These screenshots might be relevant:
There is a warning/information that
To enable Authentication / Authorization, please ensure all your custom domains have corresponding SSL bindings, your .NET version is configured to β4.5β or higher and manage pipeline mode is set to βIntegratedβ ,
but I'm not sure that is relevant? There are no custom domains atleast.
from python-sample-vscode-flask-tutorial.
I was able to reproduce the issue in containers, and our team has found a workaround,
There is known issue with easyauth (middleware) where in some cases, the request header length gets larger than 4096 and the request fails. The mitigation is to set this app setting WEBSITE_AUTH_DISABLE_IDENTITY_FLOW
to true
, can you try that and let us know if it works?
More information on this setting is here.
from python-sample-vscode-flask-tutorial.
@qubitron Thanks! π The provided workaround WEBSITE_AUTH_DISABLE_IDENTITY_FLOW = true
worked, tried it some weeks ago for the first time. Tried again now - and now it appears to work also without that application setting. Perhaps the underlying issue has been fixed? ππ·
A follow up question regarding Azure web app service + the π³ Docker flavor:
For Single Container (screenshot below) authentication now works out of the box. However, selecting the Docker Compose functionality and a minimal configuration setup (using the same image as when doing Single container), authentication suddenly is bypassed (i.e. you go directly to the app).
version: '3'
services:
web:
image: someregistry.azurecr.io/someimage:latest
ports:
- 80:5000
Tried both with and without the ports
setting. Are you able to reproduce? Is there something that should be changed/added in the π³ Docker compose configuration snippet above?
cc: @HansKallekleiv
from python-sample-vscode-flask-tutorial.
Hi all! Sorry @anders-kiaer, @qubitron please can you explain where you add WEBSITE_AUTH_DISABLE_IDENTITY_FLOW = true; in your code (in app.py or in Dockerfile or ...?)
Thank you for your answer.
from python-sample-vscode-flask-tutorial.
I added it the same place as WEBSITES_PORT=5000
, i.e. under Configuration in the Azure web app.
Having said that, I have recently created new web apps (using Docker containers), and today it is working without the workaround for my part, so to me it looks like the underlying bug is fixed.
from python-sample-vscode-flask-tutorial.
For Single Container (screenshot below) authentication now works out of the box. However, selecting the Docker Compose functionality and a minimal configuration setup (using the same image as when doing Single container), authentication suddenly is bypassed (i.e. you go directly to the app).
After I posted this comment, this has now been "fixed" by greying out the Authentication / Authorization tab when you use Docker compose, with a tooltip saying that "This feature is not supported with multi-container apps".
I.e. at least indicating that it is not working with Docker compose, even though technically it does not need to be a multi-container app. E.g. this will still not work:
version: '3'
services:
web:
image: some_acr.azurecr.io/pythonflasktutorial:latest
ports:
- 80:5000
from python-sample-vscode-flask-tutorial.
@anders-kiaer, thank you very much for your answer! I added here in the Configuration -> Application settings -> WEBSITE_AUTH_DISABLE_IDENTITY_FLOW = true; but it's fixed my problem. When I turn off Authentication/Authorization(Log in with Azure Active Directory), my flask app worked correct, but when I turn on this function, I have 500 error(without details), in the last step of my workflow in the app. Thank you!
from python-sample-vscode-flask-tutorial.
Sorry @anders-kiaer, why you add WEBSITES_PORT= 5000, I don't add this?
from python-sample-vscode-flask-tutorial.
Based on this line:
python-sample-vscode-flask-tutorial/Dockerfile
Lines 6 to 11 in 3b80224
from python-sample-vscode-flask-tutorial.
Related Issues (11)
- PEP8 and other issues HOT 5
- Breakpoints are not working HOT 2
- Specify Browser - Firefox & flask HOT 2
- bash exited with code 5 HOT 1
- pytest fails with exit code 5 HOT 3
- TypeError: required field "type_ignores" missing from Module when using werkzeug 0.15.3 HOT 2
- issue in __init__.py HOT 2
- Tutorial doesn't work out-of-the-box HOT 1
- This repo is missing important files HOT 2
- Tutorial doesn't work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-sample-vscode-flask-tutorial.