0

I'm running a GAE Standard Env. node/express app.

How can I configure Basic HTTP Authentication?

Is it possible to configure it with app.yaml?

I've read the docs, and did a lot of searching and so far it seems like I'll have to use my Express server to handle it. That seems weird because it requires that I have a server.

What if I wanted to serve a static HTML page? Then the express solution falls apart.

In nginx I can do this:

server {
    ...
    auth_basic           "Administrator’s Area";
    auth_basic_user_file conf/htpasswd;
}

Is there an equivalent with app.yaml in GAE?

Thanks for your help =)

Mk-Etlinger
  • 174
  • 1
  • 13

1 Answers1

1

I think its not possible to do this type of authentication, but you have other options - google sign in - oauth - firebase * users api is available but not for node standard app engine

If you wanted to serve static html you might store it in Google Cloud Storage and Cloud storage has its own permissions options

Andres S
  • 1,168
  • 7
  • 11
  • Hey Andres, appreciate the response. I pretty much came to the same conclusion. It's kind of a pain, but I understand that Google's Authentication options are a bit more robust. I am currently using https://www.npmjs.com/package/express-basic-auth. As referenced in this answer: https://stackoverflow.com/questions/23616371/basic-http-authentication-with-node-and-express-4 – Mk-Etlinger Sep 26 '19 at 22:03
  • I accepted this as the answer for now. It's pretty annoying that you can't configure something so...basic ;) However, you CAN use Google IAP - https://cloud.google.com/iap/ – Mk-Etlinger Oct 17 '19 at 14:06
  • @Mk-Etlinger I'm pretty sure you'd be able to do it by just sending the correct headers and files yourself in your app. I.E., *don't* make the authentication-required files static, and instead have them redirect to your script that handles HTTP Authentication. Example for PHP: https://www.php.net/manual/en/features.http-auth.php – Will Chen Jul 05 '20 at 22:32