A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://cloud.google.com/appengine/docs/legacy/standard/python/application-security below:

Overview of App Security | App Engine standard environment for Python 2

Overview of App Security

Stay organized with collections Save and categorize content based on your preferences.

Region ID

The REGION_ID is an abbreviated code that Google assigns based on the region you select when you create your app. The code does not correspond to a country or province, even though some region IDs may appear similar to commonly used country and province codes. For apps created after February 2020, REGION_ID.r is included in App Engine URLs. For existing apps created before this date, the region ID is optional in the URL.

Learn more about region IDs.

Security is a core feature of the Google Cloud, but there are still steps you should take to protect your App Engine app and identify vulnerabilities.

Use the following features to ensure that your App Engine app is secure. To learn more about the Google Security Model and the available steps that you can take to secure your Google Cloud projects, see Google Cloud Platform Security.

HTTPS requests

Use HTTPS requests to access to your App Engine app securely. Depending on how your app is configured, you have the following options:

appspot.com domains

For more information about HTTPS URLs and targeting resources, see How Requests are Routed.

Custom domains

To send HTTPS requests with your custom domain, you can use the managed SSL certificates that are provisioned by App Engine. For more information, see Securing Custom Domains with SSL.

Access control

In each Google Cloud project, set up access control to determine who can access the services within the project, including App Engine. You can assign different roles to different accounts to ensure each account has only the permissions it needs to support your app. For details see, Setting Up Access Control.

App Engine firewall

The App Engine firewall enables you to control access to your App Engine app through a set of rules that can either allow or deny requests from the specified ranges of IP addresses. You are not billed for traffic or bandwidth that is blocked by the firewall. Create a firewall to:

Allow only traffic from within a specific network
Ensure that only a certain range of IP addresses from specific networks can access your app. For example, create rules to allow only the range of IP addresses from within your company's private network during your app's testing phase. You can then create and modify your firewall rules to control the scope of access throughout your release process, allowing only certain organizations, either within your company or externally, to access your app as it makes its way to public availability.
Allow only traffic from a specific service
Ensure that all the traffic to your App Engine app is first proxied through a specific service. For example, if you use a third-party Web Application Firewall (WAF) to proxy requests directed at your app, you can create firewall rules to deny all requests except those that are forwarded from your WAF.
Block abusive IP addresses
While Google Cloud has many mechanisms in place to prevent attacks, you can use the App Engine firewall to block traffic to your app from IP addresses that present malicious intent or shield your app from denial of service attacks and similar forms of abuse. You can add IP addresses or subnetworks to a denylist, so that requests routed from those addresses and subnetworks are denied before they reach your App Engine app.

For details about creating rules and configuring your firewall, see Controlling App Access with Firewalls.

Ingress controls

This section describes how to use ingress settings to restrict network access to your App Engine app. At a network level, by default, any resource on the internet is able to reach your App Engine app on its appspot URL or at a custom domain set up in App Engine. For example, the appspot.com URL can have the following format: SERVICE_ID.PROJECT_ID.REGION_ID.r.appspot.com.

You can change this default setting by specifying a different setting for ingress. All ingress paths, including the default appspot.com URL, are subject to your ingress setting. Ingress is set at the service level.

Available ingress settings

The following settings are available:

Setting Description Internal Most restrictive. Allows requests from resources attached to the project's VPC networks, such as:
Requests from these sources stay within the Google network, even if they access your service at the appspot.com URL. Requests from other sources, including the internet, cannot reach your service at the appspot.com URL or custom domains. There is no support for multi-tenancy, that is, multiple trust domains within the same project. Internal and Cloud Load Balancing Allows requests from the following resources:
Use the Internal and Cloud Load Balancing setting to accept requests from an external Application Load Balancer but not directly from the internet. Requests to the appspot.com URL bypass the external Application Load Balancer, so this setting prevents external requests from reaching the appspot.com URL. All Least restrictive. Allows all requests, including requests directly from the internet to the appspot.com URL. Accessing internal services

The following considerations apply:

View ingress settings Console
  1. Go to the App Engine Services page.

    Go to the Services page

  2. Locate the Ingress column. For each service, the value in this column shows the ingress setting as one of All (default), Internal + Load Balancing, or Internal.

gcloud

To view the ingress setting for a service using the gcloud CLI:

gcloud app services describe SERVICE

Replace SERVICE with the name of your service.

For example, to view the ingress settings and other information for the default service run:

gcloud app services describe default
Edit ingress settings Console
  1. Go to the App Engine Services page.

    Go to the Services page

  2. Select the service you wish to edit.

  3. Click Edit ingress setting.

  4. Select the ingress setting that you want from the menu and click Save.

gcloud

To update the ingress setting for a service using the gcloud CLI:

gcloud app services update SERVICE --ingress=INGRESS

Replace:

For example:

Egress settings

If you use Serverless VPC Access, you can specify the egress setting for your App Engine service.

By default, only requests to internal IP addresses and internal DNS names are routed through a Serverless VPC Access connector. You can specify the egress setting for your service in your app.yaml file.

Egress settings are not compatible with the URL Fetch service. If you have not already done so, disable the URL Fetch default and discontinue any explicit use of the urlfetch library. Using the urlfetch library ignores egress settings, and requests will not route through a Serverless VPC Access connector.

To configure the egress behavior of your App Engine service:

  1. Add the egress_setting attribute to the vpc_access_connector field of your service's app.yaml file:

    vpc_access_connector:
      name: projects/PROJECT_ID/locations/REGION/connectors/CONNECTOR_NAME
      egress_setting: EGRESS_SETTING

    Replace:

  2. Deploy the service:

    gcloud app deploy
    
Security scanner

The Google Cloud Web Security Scanner discovers vulnerabilities by crawling your App Engine app, following all that links within the scope of your starting URLs, and attempting to exercise as many user inputs and event handlers as possible.

In order to use the security scanner, you must be an owner of the Google Cloud project. For more information on assigning roles, see Setting Up Access Control.

You can run security scans from the Google Cloud console to identify security vulnerabilities in your App Engine app. For details about running the Security Scanner, see the Using Web Security Scanner.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-07 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["The `REGION_ID` is a Google-assigned code based on the region selected during app creation, which is included in App Engine URLs for apps created after February 2020, and does not represent any countries or provinces."],["App Engine apps should use HTTPS requests for secure access, utilizing `appspot.com` domains or custom domains with managed SSL certificates."],["Access control can be configured within each Google Cloud project to specify which accounts have permissions to access the services, including App Engine."],["The App Engine firewall allows you to control access by creating rules to allow or deny requests from specific IP address ranges, as well as block malicious traffic."],["Ingress settings determine how your App Engine app can be accessed, from the most restrictive \"Internal\" setting to the least restrictive \"All\" setting, and can be configured via the console or gcloud CLI."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4