Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
A autorização binária é um controle de segurança do ambiente de implantação que garante que apenas imagens de contêiner confiáveis sejam implantadas nos recursos do Cloud Run. Com esse controle, é possível solicitar que as imagens sejam assinadas por autoridades confiáveis durante o processo de desenvolvimento e, então, aplicar a validação da assinatura na implantação. Assim, você tem um controle maior sobre o ambiente de contêiner ao garantir que somente imagens verificadas sejam integradas ao processo de criação e lançamento.
Para implantar funções no Cloud Run, o administrador da política de autorização binária
precisa configurar uma política de autorização binária para isentar todas
as imagens do repositório a seguir e seus subdiretórios:
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-03-10 UTC."],[],[],null,["# Use Binary Authorization\n\nBinary Authorization is a deploy-time security control that ensures only trusted\ncontainer images are deployed to your Cloud Run resources. With\nBinary Authorization, you can require images to be signed by trusted\nauthorities during the development process and then enforce signature validation\nwhen deploying. By enforcing validation, you can gain tighter control over your\ncontainer environment by ensuring only verified images are integrated into the\nbuild-and-release process.\n\nLearn how to [set up Binary Authorization for Cloud Run](/binary-authorization/docs/run/overview).\n\nExempt Cloud Run functions images from Binary Authorization policy\n------------------------------------------------------------------\n\nTo deploy functions in Cloud Run, the Binary Authorization policy\nadministrator must configure a Binary Authorization policy using [allowlist patterns](/binary-authorization/docs/key-concepts#allowlist_patterns) to exempt all\nimages from the specified repository and its subdirectories.\n\n### Functions using the Cloud Run Admin API\n\nIf you are deploying your function with the\n[`gcloud run deploy...`](/sdk/gcloud/reference/run/deploy#--binary-authorization)\ncommand, use this allowlist pattern:\n\n\n\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e`-docker.pkg.dev/`\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e`/cloud-run-source-deploy/**`\n\n\u003cbr /\u003e\n\nWith the allowlist enabled, deploy your function with [Binary Authorization enabled\nand set to `default`](/binary-authorization/docs/run/enabling-binauthz-cloud-run#enable-on-new-job): \n\n```sh\n gcloud run deploy YOUR_FUNCTION_NAME \\\n ...\n --binary-authorization default\n```\n\n### Functions using the Cloud Functions v2 API\n\nIf you are deploying your function with the\n[`gcloud functions deploy...`](/sdk/gcloud/reference/functions/deploy#--binary-authorization)\ncommand, use this allowlist pattern:\n\n\n\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e`-docker.pkg.dev/`\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e`/gcf-artifacts/**`\n\nWith the allowlist enabled, deploy your function with Binary Authorization enabled\nand set to `default`: \n\n```sh\n gcloud functions deploy YOUR_FUNCTION_NAME \\\n ...\n --binary-authorization default\n```\n\nWhat's next\n-----------\n\n- Learn how to [set up Binary Authorization for Cloud Run](/binary-authorization/docs/run/overview)."]]