GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Security flaw: Cloud Endpoint - API Key authentication works even with incorrect API keys · Issue #2342 · GoogleCloudPlatform/python-docs-samples

Security flaw: Cloud Endpoint - API Key authentication works even with incorrect API keys #2342

New issue
Copy link
New issue
Copy link
Closed
Closed
Security flaw: Cloud Endpoint - API Key authentication works even with incorrect API keys#2342
Copy link
Assignees
daniel-sanche

Description

@rafiqhasan
rafiqhasan
opened on Aug 15, 2019
Issue body actions

Example referred: https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/endpoints/getting-started

Did you change the file? If so, how? - No changes were done

While referring to the Cloud Endpoint tutorial at https://cloud.google.com/endpoints/docs/openapi/get-started-app-engine , the API was successfully enabled to accept API key in the URL but works even with incorrect API key.

Please see below different runs for the API after enabling Cloud Endpoint:

  1. https://example-project-12345.appspot.com/echo --> Gives missing key error as expected
  2. https://example-project-12345.appspot.com/echo?key=< correct key > Gives echo response as expected
  3. https://example-project-12345.appspot.com/echo?key=1 Gives echo response - Unexpected

After doing complete analysis I found that the issue was because two services were not enabled in the GCP project:

servicecontrol.googleapis.com | Service Control API
endpoints.googleapis.com | Google Cloud Endpoints

However then in this case the API should not be functional at all rather than working partially with even incorrect API keys.

Also none of the calls to the API were being logged in the Cloud Endpoint until the 2 required APIs were enabled, this is a security flaw in the Cloud endpoint system.

Activity

  1. rafiqhasan
    changed the title [-]Security issue - Cloud Endpoint: API Key authentication works with incorrect API keys[/-] [+]Security flaw: Cloud Endpoint - API Key authentication works even with incorrect API keys[/+] on Aug 15, 2019
  2. gguuss commented on Aug 20, 2019

    @gguuss
    gguuss
    on Aug 20, 2019
    Contributor
    More actions

    @jeffmendoza @dansanche /FYI

  3. andrewferlitsch
    assigned
    daniel-sanche
    on Oct 1, 2019
  4. daniel-sanche commented on Oct 1, 2019

    @daniel-sanche
    daniel-sanche
    on Oct 1, 2019
    Member
    More actions

    It seems like this is product feedback, not related to the code samples. I'll open an internal bug to make sure this is seen by the Endpoints team. Thanks for the report!

  5. daniel-sanche
    closed this as completedon Oct 1, 2019
  6. qiwzhang commented on Jul 20, 2020

    @qiwzhang
    qiwzhang
    on Jul 20, 2020
    Contributor
    More actions

    It was fixed by cloudendpoints/esp#779

    Reacted by Hasan Rafiq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @daniel-sanche
    daniel-sanche

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.