Skip to main content

Posts

Showing posts with the label IAM

Solving '404 Publisher Model Not Found' & Region Errors in Vertex AI

  Few things are more frustrating in cloud development than a code snippet that works perfectly in a local environment but fails immediately upon deployment with a cryptic   404 Not Found . In the context of Google Cloud's Vertex AI—specifically when working with generative models like Gemini 1.5 Pro or Imagen—this error rarely means the internet is down. It almost always points to a mismatch between  where your client thinks the model is  and  where the model actually resides . If you are seeing errors such as  404 Publisher Model Not Found ,  Resource not found , or  404 The specified endpoint is not found , you are likely falling into the "Regional Endpoint Trap" or dealing with a subtle IAM misconfiguration. This guide provides the root cause analysis and the production-ready code required to fix these connectivity issues permanently. The Root Cause: The Regional Endpoint Trap To understand the fix, you must understand how Google Cloud routes ...

Troubleshooting 'OIDC Token Validation Failed' in GitHub Actions

  Few things halt a deployment pipeline faster than an opaque IAM error. If you are migrating from long-lived Service Account JSON keys to Keyless Authentication (Workload Identity Federation) on Google Cloud, you have likely encountered the infamous   OpenID Connect token validation failed   or   Issuer URI mismatch   error. These errors are notoriously difficult to debug because they occur at the intersection of two massive systems: GitHub's OIDC Provider and Google Cloud's Security Token Service (STS). The error messages often obscure the actual root cause: a mismatch between the claims in the JWT (JSON Web Token) generated by GitHub and the attribute mappings configured in your cloud provider. This guide details the root cause of OIDC validation failures, provides a method to inspect the raw token on the fly, and offers the Terraform and CLI configurations to resolve the issue permanently. The Anatomy of a Federation Failure To fix the error, you must unders...