Google App Engine (PHP Flex) 中禁止管理员身份验证
Admin Authentication Forbidden in Google App Engine (PHP Flex)
我正在 'Flex' 环境中使用 PHP 5.6 创建一个 Google App Engine
应用程序。
我已成功将应用程序部署到 GAE,并且可以在禁用身份验证时看到页面。
当我尝试通过更新我的 app.yaml
文件中的处理程序来添加基本路由身份验证时,将 login: required
或 login: admin
包含到特定路由,而不是被重定向到登录不出所料,我收到了 403 Forbidden
回复。即使我尝试在 Chrome 以外的浏览器或使用隐身 window 访问同一页面,我仍然会收到 403
.
已采取的步骤
- 创建 GAE 项目
- 启用
Billing
- 在
Google Cloud Console
中启用 API Manager
中的 Google+ API
- 正在更新
app.yaml
文件以包含受登录保护的处理程序
- 确保我的 Google 帐户在
Google Cloud Console
的 IAM & Admin
部分具有 Owner
访问权限,根据 Enforcing sign in and admin access with app.yaml
- 确保在
Google Cloud Console
的 App Engine -> Settings
菜单中将 Google authentication
设置设为 Google Accounts API
- 使用
gcloud app deploy app.yaml
从我本地机器上项目的根目录将应用程序部署到 GAE
- 通过 运行
gcloud app browse
在我的浏览器中打开项目
- 验证我的
app.yaml
文件中的元素是否与 app.yaml Reference 匹配
app.yaml[剪断]
handlers:
- url: /.*
script: index.php
login: admin
我是否遗漏了任何明显或不那么明显的东西?我似乎找不到这个问题的原因或解决方案。提前感谢您可能提供的任何帮助!
遗憾的是,login: admin
保护不适用于 App Engine Flex:
https://cloud.google.com/appengine/docs/flexible/php/migrating#users
我正在 'Flex' 环境中使用 PHP 5.6 创建一个 Google App Engine
应用程序。
我已成功将应用程序部署到 GAE,并且可以在禁用身份验证时看到页面。
当我尝试通过更新我的 app.yaml
文件中的处理程序来添加基本路由身份验证时,将 login: required
或 login: admin
包含到特定路由,而不是被重定向到登录不出所料,我收到了 403 Forbidden
回复。即使我尝试在 Chrome 以外的浏览器或使用隐身 window 访问同一页面,我仍然会收到 403
.
已采取的步骤
- 创建 GAE 项目
- 启用
Billing
- 在
Google Cloud Console
中启用 - 正在更新
app.yaml
文件以包含受登录保护的处理程序 - 确保我的 Google 帐户在
Google Cloud Console
的IAM & Admin
部分具有Owner
访问权限,根据 Enforcing sign in and admin access with app.yaml - 确保在
Google Cloud Console
的 - 使用
gcloud app deploy app.yaml
从我本地机器上项目的根目录将应用程序部署到 GAE - 通过 运行
gcloud app browse
在我的浏览器中打开项目
- 验证我的
app.yaml
文件中的元素是否与 app.yaml Reference 匹配
API Manager
中的 Google+ API
App Engine -> Settings
菜单中将 Google authentication
设置设为 Google Accounts API
app.yaml[剪断]
handlers:
- url: /.*
script: index.php
login: admin
我是否遗漏了任何明显或不那么明显的东西?我似乎找不到这个问题的原因或解决方案。提前感谢您可能提供的任何帮助!
遗憾的是,login: admin
保护不适用于 App Engine Flex:
https://cloud.google.com/appengine/docs/flexible/php/migrating#users