【问题标题】:List access scopes from inside GCE VM instance列出 GCE VM 实例内部的访问范围
【发布时间】:2016-10-02 09:42:33
【问题描述】:

如何从 Google Cloud Engine (GCE) VM 实例的命令行中找出该实例拥有的访问范围?

【问题讨论】:

    标签: authorization google-compute-engine


    【解决方案1】:

    您可以从 metadata server 中检索它,从 VM 实例中运行命令:

    curl "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/?recursive=true" -H "Metadata-Flavor: Google"
    

    范围位于instances 的 serviceAccounts 属性中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-06-23
      • 2011-08-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-11-10
      相关资源
      最近更新 更多