Coder Social home page Coder Social logo

Comments (10)

joernhees avatar joernhees commented on July 25, 2024

from gae-init.

mdxs avatar mdxs commented on July 25, 2024

Mark all handlers in app.yaml with secure: always to ensure that the users can only access the application over HTTPS. When developers turn that off... they are on their own. See https://cloud.google.com/appengine/docs/python/config/appconfig#Python_app_yaml_Secure_URLs

from gae-init.

mdxs avatar mdxs commented on July 25, 2024

Thatta way: no need for a https-only, HSTS or flask-sslify approach in my opinion (and experience); and we could enforce it in the default configuration, perhaps putting a warning in Docs for those developers that turn it off (though all web developers should know that HTTP based account/pw logins are evil ;-)

from gae-init.

joernhees avatar joernhees commented on July 25, 2024

the secure: always might be an option... in the section they even mention how to deal with versions... but it needs some considerations:

  • thinking about this option made me realize that in order to do it right even static stuff (especially js) should be https (otherwise it can be used to inject js that for example makes a post go to http first). But then as we use scheme based URIs it shouldn't matter as soon as all HTML is served via HTTPS, as everything else is loaded from it (so while in theory one could directly load the static js via http the clients will never do, so the attack vector should be gone)
  • external links to http://version.appname.appspot.com won't auto redirect to https://version-dot-appname.appspot.com it seems, so we would loose the ability to take care of that
  • the http_headers directive doesn't seem to allow setting the HSTS headers for traffic that goes to a script. Effectively this means that if we want HSTS we would need decorators / flask-sslify anyhow.

The more i think about this, the more i like the flask-sslify approach, maybe a bit tweaked for the version https links and dev-server http only... that way everything would be served as https by default, making the whole thing pretty secure by default and we wouldn't need to modify / prefix anything with ssl_required decorators or anything...

So question: do we want https for everything or not?

from gae-init.

lipis avatar lipis commented on July 25, 2024

While I understand all these issues the cleanest solution would be just update the app.yaml as @mdxs already mentioned when the app is ready and all the custom domains are SSL enabled.. so I'm not sure if I want to overcomplicate and add after all this logic for hybrid solutions..

P.S. Not discarded but dealing with other issues at the moment and don't want to rush with this one.. where were you when the email auth branch was still under dev :P I think the PhD is taking too much of your time :D

from gae-init.

joernhees avatar joernhees commented on July 25, 2024

well, two things that adding secure: always to all handlers in app.yaml can't do are:

still it's a rather small change and it would be pretty secure already...

from gae-init.

joernhees avatar joernhees commented on July 25, 2024

well, i invested quite some time in this already while there seems to be little agreement.

The current state is so damn insecure by default that it hurts.

So just add secure: always to all handlers in app.yaml and make it fast! Then it should be pretty secure by default.

HSTS would be nice, but can (and still should) be added later.

from gae-init.

lipis avatar lipis commented on July 25, 2024

2df0f83 :D 👯 💃

for the docs and other gae-init examples I will not use the https for now and most likely disable the custom login at least :) These custom versions are a bit outdated.. but will come back to them..!!

from gae-init.

joernhees avatar joernhees commented on July 25, 2024

👍 thanks

from gae-init.

lipis avatar lipis commented on July 25, 2024

🔒 👯 🔐

from gae-init.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.