---
title: "google-auth 2.56.2: Service Account Email Check | Since.dev"
description: "google-auth 2.56.2 only runs the Regional Access Boundary lookup for .gserviceaccount.com emails, and 2.63.0 turns it off by default. Tested on three versions."
canonical_url: https://since.dev/guides/google-auth-2-56-2-breaking-changes
last_updated: 2026-12-01
---

# google-auth 2.56.2 breaking change: the service account email check, tested

google-auth 2.56.2 (July 21, 2026) changed \_SERVICE_ACCOUNT_EMAIL_PATTERN so Compute Engine credentials only run the Regional Access Boundary lookup for emails ending in .gserviceaccount.com. Nothing raises an error: other emails now skip a lookup that used to fail. From 2.63.0 on, the lookup is off unless you opt in.

Updated December 1, 2026

## What changed in google-auth 2.56.2?

One regular expression got stricter. In `google/auth/compute_engine/_metadata.py`, the private `_SERVICE_ACCOUNT_EMAIL_PATTERN` used to accept anything shaped like an email. From 2.56.2 it only accepts an address that ends in `.gserviceaccount.com`, in any letter case. Here's the change, from [commit b60bb04 (PR #17748)](https://github.com/googleapis/google-cloud-python/commit/b60bb04a73eb35b15320c54bc3493132e6ba5706):

```
# 2.56.1 and earlier
r"^[^@]+@[^@]+\.[^@]+$"

# 2.56.2 and later, with re.IGNORECASE
r"^[^@]+@[^@]+\.gserviceaccount\.com$"
```

The pattern has one job. `_is_service_account_email()` uses it to decide whether Compute Engine credentials should ask Google which regions the service account may reach (the Regional Access Boundary lookup). In 2.56.2 and 2.63.1 that's its only use: I grepped both installed packages, and both call sites are in `compute_engine/credentials.py`.

The reason is in [issue #17711](https://github.com/googleapis/google-cloud-python/issues/17711): in some environments the metadata server returns the signed-in user's email, such as a `user@google.com` address or a workforce identity, instead of a service account. That email passed the old check, so the library sent a lookup that the endpoint rejects, because it only supports service accounts. The issue says this ran on common commands such as `gcloud config set project`.

The [google-auth changelog](https://github.com/googleapis/google-cloud-python/blob/main/packages/google-auth/CHANGELOG.md) lists it as a bug fix, one line among four in 2.56.2.

## Does google-auth 2.56.2 break my code?

Almost certainly not. No public function, argument or return value changed, and no new exception is raised. Your credentials refresh and your API calls work the same way. The only visible difference is one HTTP request that no longer happens when the metadata server's email isn't a service account.

You'd notice it in three places:

- Tests that mock the metadata server with a made-up email such as `foo@bar.com` and assert the `allowedLocations` URL or the lookup call. On 2.56.2 that lookup is skipped, so the assertion fails. The library's own tests hit this: the PR changed their fake email from `foo@bar.com` to `foo@project.iam.gserviceaccount.com`.
- Code that calls the private `_metadata._is_service_account_email()` directly. `test@example.com` now returns `False`. It was never a public API, so don't build on it.
- Debug logs. 2.56.2 logs `Skipping Regional Access Boundary lookup` at debug level instead of a failed request, and the failure noise from a user email goes away.

A real service account email, such as `123-compute@developer.gserviceaccount.com` or `my-sa@my-project.iam.gserviceaccount.com`, behaves exactly as before. If you want to check a release like this yourself before you upgrade, the steps are in [how to find breaking changes between two versions](https://since.dev/guides/breaking-changes-between-versions.md).

## What is the Regional Access Boundary lookup?

It's a request google-auth makes after a token refresh to learn which locations a service account is allowed to use. It sends `GET` to `iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/<email>/allowedLocations` in a background thread, then adds the answer to later requests as an `x-allowed-locations` header. The code caches the answer for 6 hours by default (`DEFAULT_REGIONAL_ACCESS_BOUNDARY_TTL` in `_regional_access_boundary_utils.py`, 2.63.1).

It's best effort. When it fails, the credential keeps working with its access token. The trouble was the noise: [issue #17515](https://github.com/googleapis/google-cloud-python/issues/17515) (June 19, 2026, on 2.54.0) reports this warning on every refresh in an organization that hasn't turned the feature on:

```
Regional Access Boundary HTTP request failed
after retries: response_data={'error':
{'code': 400, 'message': 'Precondition check
failed.', 'status': 'FAILED_PRECONDITION'}},
retryable_error=False
```

That message is wrapped here to fit; it prints as one line. Here's how the lookup moved over five releases, with the dates from the changelog:

Regional Access Boundary lookup changes in google-auth, from the google-auth CHANGELOG.md and the linked PRs, checked December 1, 2026

| Version | Date              | What changed                                                                                                                                                                                    |
| ------- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 2.55.0  | June 15, 2026     | "Make RAB feature production ready" ([PR #17390](https://github.com/googleapis/google-cloud-python/pull/17390)): removes the GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED gate, so lookups run by default |
| 2.55.1  | June 25, 2026     | Lookup failures logged at debug instead of warning                                                                                                                                              |
| 2.56.1  | July 17, 2026     | Lookup skipped for domain-wide delegation ([issue #17703](https://github.com/googleapis/google-cloud-python/issues/17703), which reported a 403)                                                |
| 2.56.2  | July 21, 2026     | Compute Engine lookup needs a .gserviceaccount.com email                                                                                                                                        |
| 2.63.0  | November 20, 2026 | Lookup off unless an experimental environment variable is set ([PR #19132](https://github.com/googleapis/google-cloud-python/pull/19132))                                                       |

## What does each version actually do?

2.56.1 sends the lookup for any email, 2.56.2 sends it only for a service account email, and 2.63.1 sends none until you opt in. I ran all three against a fake metadata server on my machine, with every request that wasn't local blocked and printed, so nothing reached Google.

The fake server, `mds.py`, answers the two metadata paths Compute Engine credentials read and returns 404 for the rest:

```
import json, sys
from http.server import BaseHTTPRequestHandler as B
from http.server import HTTPServer

EMAIL = sys.argv[1]
TOKEN = {"access_token": "test", "expires_in": 3600}
INFO = {"email": EMAIL, "scopes": ["s"]}
JSON = "application/json"

class Fake(B):
    def do_GET(self):
        path = self.path.split("?")[0]
        if path.endswith("/token"):
            body = TOKEN
        elif path.endswith("/default/"):
            body = INFO
        else:
            self.send_error(404)
            return
        self.send_response(200)
        self.send_header("Metadata-Flavor", "Google")
        self.send_header("Content-Type", JSON)
        self.end_headers()
        self.wfile.write(json.dumps(body).encode())

    def log_message(self, *args):
        pass

HTTPServer(("127.0.0.1", 8099), Fake).serve_forever()
```

The check, `check.py`, refreshes the credentials the way a real API call would and prints the last part of any request the library tries to send to Google:

```
import time
import google.auth
from google.auth import exceptions, transport
from google.auth.compute_engine import Credentials
from google.auth.transport.requests import Request

class LocalOnly(transport.Request):
    """Sends metadata calls, blocks the rest."""
    def __init__(self):
        self.real = Request()

    def __call__(self, url, method="GET", **kw):
        if "127.0.0.1" in url:
            return self.real(url, method=method, **kw)
        print("BLOCKED", url.rsplit("/", 1)[1])
        raise exceptions.TransportError("blocked")

print("google-auth", google.auth.__version__)
creds = Credentials()
url = "https://storage.googleapis.com/b"
creds.before_request(LocalOnly(), "GET", url, {})
time.sleep(3)
print("email:", creds.service_account_email)
```

Then, for each version (shown for 2.56.1):

```
python3.12 -m venv old
old/bin/pip install -q google-auth==2.56.1 requests
export GCE_METADATA_HOST=127.0.0.1:8099
old/bin/python mds.py me@example.com &
old/bin/python check.py
```

Output on 2.56.1, with a user email:

```
google-auth 2.56.1
BLOCKED allowedLocations
email: me@example.com
```

Output on 2.56.2, same email:

```
google-auth 2.56.2
email: me@example.com
```

Every case I ran on December 1, 2026, on Python 3.12.15:

Whether google-auth sent the allowedLocations lookup, run against a local fake metadata server on December 1, 2026

| Version and setting                        | me@example.com | sa@p.iam.gserviceaccount.com |
| ------------------------------------------ | -------------- | ---------------------------- |
| 2.56.1                                     | Lookup sent    | Lookup sent                  |
| 2.56.2                                     | Skipped        | Lookup sent                  |
| 2.56.2, old variable set to false          | Skipped        | Lookup sent                  |
| 2.63.1                                     | Skipped        | Skipped                      |
| 2.63.1, opt-in variable set to true        | Skipped        | Lookup sent                  |
| 2.63.1, the PR's variable name set to true | Skipped        | Skipped                      |

Two things stand out. The old variable, `GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED`, does nothing on 2.56.2: the lookup still ran with it set to false. And the name in the 2.63.0 pull request's description, `GOOGLE_CLOUD_EXPERIMENTAL_REGIONAL_ACCESS_BOUNDARY_LOOKUP`, does nothing on 2.63.1. Only the name in the code, `GOOGLE_SDK_EXPERIMENTAL_PYTHON_REGIONAL_ACCESS_BOUNDARY_LOOKUP_ENABLED`, turns the lookup back on.

## How do I turn the lookup on or off?

On 2.63.0 and later it's off by default, and you turn it on with `GOOGLE_SDK_EXPERIMENTAL_PYTHON_REGIONAL_ACCESS_BOUNDARY_LOOKUP_ENABLED`. The code in 2.63.1 accepts `y`, `yes`, `t`, `true`, `on` or `1`, in any case, with spaces trimmed. Anything else leaves it off.

```
export GOOGLE_SDK_EXPERIMENTAL_PYTHON_\
REGIONAL_ACCESS_BOUNDARY_LOOKUP_ENABLED=true
```

That's one variable name split over two lines to fit here; write it on one line in your environment. With it off, PR #19132 says credentials also ignore pre-seeded boundaries, return None from the boundary properties and leave out the x-allowed-locations header.

On 2.55.0 up to, but not including, 2.63.0 you can't turn it off with a variable. Two ways out:

1. Upgrade to 2.63.0 or later, where off is the default. This is what I'd do.
2. Stay where you are and live with it. From 2.55.1 a failed lookup only logs at debug level, and from 2.56.2 a user email doesn't trigger one.

Don't use `GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED`. Its docstring in `environment_vars.py` says it "is deprecated and no longer has any effect", and my run above agrees. Some AI answers still tell you to set it to 0 to stop the warnings; that advice is out of date.

## How do I upgrade google-auth safely?

Go straight to the latest, 2.63.1 (PyPI, checked December 1, 2026), unless something pins you lower. It needs Python 3.10 or newer per its [PyPI metadata](https://pypi.org/project/google-auth/), so check your runtime against the [Python end-of-life calendar](https://since.dev/calendar/python.md) first.

1. Find the version you run: `python -m pip show google-auth`. It's usually pulled in by a Google Cloud client library, so it can move without you touching it.
2. Raise the floor where you declare it, such as `google-auth>=2.63.1` in `requirements.txt` or `pyproject.toml`, and lock again.
3. Search your tests for fake metadata emails that aren't service accounts (`@example.com`, `@bar.com`) next to assertions on `allowedLocations`. Change them to a `.gserviceaccount.com` address, or drop the assertion now that the lookup is off by default.
4. If your organization does use Regional Access Boundary policies, set the opt-in variable above in each environment, then confirm the `x-allowed-locations` header appears on outgoing requests.
5. Run your tests and watch the logs for the first refresh on a deployed instance.

The install I ran in a new venv on December 1, 2026 (pip's notices left out):

```
$ python -m pip install -q "google-auth>=2.63.1"
$ python -m pip show google-auth
Name: google-auth
Version: 2.63.1
```

pip show prints more lines than that; I left the rest out.

## What else changed between google-auth 2.56.2 and 2.63.1?

Three more changes can show up in your logs or your tokens. The rest of the [changelog](https://github.com/googleapis/google-cloud-python/blob/main/packages/google-auth/CHANGELOG.md) for this range is mTLS certificate fixes.

Other google-auth changes from 2.57.0 to 2.63.1 that can change what you see, from the google-auth CHANGELOG.md and the 2.63.1 source, checked December 1, 2026

| Version                    | Change                                                                                                                 | What you'll see                                                                                                                                                                                 |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 2.57.0 (August 21, 2026)   | Deprecation warning for grpcio older than 1.83.0                                                                       | A FutureWarning that says google-auth will require grpcio 1.83.0 or newer in April 2027, for [post-quantum cryptography](https://cloud.google.com/security/resources/post-quantum-cryptography) |
| 2.62.0 (October 12, 2026)  | Bound ID tokens on by default on Cloud Run ([PR #18635](https://github.com/googleapis/google-cloud-python/pull/18635)) | Metadata server ID tokens are certificate-bound when an Agent Identity certificate is present; pass bind_id_token=False to IDTokenCredentials to always get an unbound token                    |
| 2.62.2 (November 10, 2026) | verify_firebase_token checks issuer and subject                                                                        | A warning when you call it without an audience                                                                                                                                                  |

The grpcio warning text in 2.63.1 starts "grpcio `<` 1.83.0 does not support Post-Quantum Cryptography (PQC)." If you turn warnings into errors in CI, pin `grpcio>=1.83.0` or filter that one warning. Reading a release for changes in behavior as well as errors is covered in [how to check dependencies for breaking changes before upgrading](https://since.dev/guides/dependency-breaking-changes.md).

## Where Since.dev fits

Since.dev keeps a [google-auth breaking changes page](https://since.dev/packages/pypi/google-auth) that lists the releases that changed behavior, each with its source, so a one-line "bug fix" like 2.56.2 doesn't slip past you. For another Python upgrade tested the same way, see [boto3 1.44.0's new retry default](https://since.dev/guides/boto3-1-44-breaking-changes.md).

To see what a public repository is exposed to, run a free [scan](https://since.dev/scan.md), or give your coding agent the same answers through the [docs](https://since.dev/docs.md). When a change like this reaches a repository you connect, Since.dev reports where your code is affected and can open a pull request with the fix for you to review. It doesn't open routine version bumps. Nothing merges or deploys on its own.

## Questions

### Is google-auth 2.56.2 a breaking change?

Not for most code. It only narrows a private check so Compute Engine credentials skip the Regional Access Boundary lookup when the metadata server's email doesn't end in .gserviceaccount.com. Tests that mock the metadata server with a fake email and assert that lookup are the usual thing that fails.

### Why does google-auth call iamcredentials allowedLocations?

That's the Regional Access Boundary lookup: after a token refresh, google-auth asks which locations the service account may use and sends the answer as an x-allowed-locations header. It ran by default from 2.55.0, and since 2.63.0 it only runs when you set GOOGLE_SDK_EXPERIMENTAL_PYTHON_REGIONAL_ACCESS_BOUNDARY_LOOKUP_ENABLED to true.

### How do I stop the "Regional Access Boundary HTTP request failed after retries" warning?

Upgrade google-auth. 2.55.1 moved that message from warning to debug level, and 2.63.0 stops the lookup entirely unless you opt in. Setting GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED does nothing in current versions.

### Does GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED still work?

No. Its docstring says it is deprecated and has no effect, and on 2.56.2 the lookup still ran with it set to false in a test on December 1, 2026. On 2.63.0 and later the switch is GOOGLE_SDK_EXPERIMENTAL_PYTHON_REGIONAL_ACCESS_BOUNDARY_LOOKUP_ENABLED.

### What counts as a service account email in google-auth 2.56.2?

An address with one @ that ends in .gserviceaccount.com, in any letter case, such as my-sa@my-project.iam.gserviceaccount.com or 123-compute@developer.gserviceaccount.com. A user email such as me@example.com no longer counts, and the strings default and an empty value never did.

### What changed in google-auth 2.62.0 on Cloud Run?

2.62.0 turns on certificate-bound ID tokens by default on Cloud Run, as it already did on GKE, whenever an Agent Identity certificate is present. If you need an unbound token, pass bind_id_token=False to compute_engine.IDTokenCredentials.

## Related guides

### How-to

- [cryptography 50.0.0 and 51.0.0 breaking changes, tested](https://since.dev/guides/cryptography-50-51-breaking-changes.md)What breaks when you upgrade Python cryptography to 50.0.0 or 51.0.0: new FFDH and DSA warnings, stricter X.509, the pyOpenSSL pin. Tested on four versions.
- [golang.org/x/oauth2 v0.38.0: what changed and what breaks when you upgrade](https://since.dev/guides/golang-oauth2-v0-38-breaking-changes.md)What changed in golang.org/x/oauth2 v0.38.0 and v0.37.0: the Go 1.26 floor, the DeviceAccessToken panic fix and deprecated Google credential loaders. Tested.
- [boto3 1.44.0 breaking changes: the new retry default, tested](https://since.dev/guides/boto3-1-44-breaking-changes.md)boto3 1.44.0 makes standard retries the default: 3 attempts instead of 5, much shorter waits, and bearer tokens need HTTPS. Tested on both versions.
- [python-multipart 0.0.20 to 0.0.34: what breaks when you upgrade](https://since.dev/guides/python-multipart-breaking-changes.md)Upgrading python-multipart from 0.0.20 to 0.0.34? Semicolons stop splitting form fields, Python 3.11 is the floor, and two APIs are gone. Tested side by side.
- [How to find the breaking changes between two versions of a package](https://since.dev/guides/breaking-changes-between-versions.md)How to find breaking changes between two versions of a package: list the releases in between, read each changelog, diff the code. Commands for npm, PyPI, Go.
- [How to check your dependencies for breaking changes before you upgrade](https://since.dev/guides/dependency-breaking-changes.md)How to check dependencies for breaking changes before upgrading: the commands, a real failing upgrade, CI that fails on deprecations, and where notices appear.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
