Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Fehlerbehebung
Auf dieser Seite erfahren Sie, wie Sie häufige Probleme mit dem Certificate Authority Service beheben.
API-Anfrage gibt HTTP 403 Forbidden zurück
Wenn eine API-Anfrage den HTTP-Statuscode 403 Forbidden mit der Meldung Read access to project PROJECT_NAME was denied
zurückgibt, verwende die folgende Lösung.
Lösung
- Prüfen Sie die IAM-Berechtigungen des Antragstellers.
- Prüfen Sie den Standort der Anfrage. Bei nicht unterstützten Regionen kann der Fehler „Berechtigung verweigert“ zurückgegeben werden. Weitere Informationen zu unterstützten Standorten finden Sie unter Standorte.
Beim Löschen einer Zertifizierungsstelle wird der HTTP-Statuscode 412 zurückgegeben
Wenn beim Löschen einer Zertifizierungsstelle die folgenden Fehlermeldungen zu nicht erfüllten Voraussetzungen angezeigt werden, verwenden Sie die Lösung in diesem Abschnitt.
Cannot perform Certificate Authority deletion, Certificate Authority is in state ENABLED.
Lösung
Eine Zertifizierungsstelle muss sich im Status DISABLED
oder STAGED
befinden, damit sie gelöscht werden kann. Prüfen Sie den Status Ihrer Zertifizierungsstelle, bevor Sie sie zum Löschen planen. Weitere Informationen zu CA-Status finden Sie unter CA-Status.
Fehler bei der Zertifikatsausstellung
CA Service bietet mehrere Richtliniensteuerungen, mit denen Sie die Ausstellung von Zertifikaten verwalten können. Weitere Informationen zu den Richtlinienkontrollen finden Sie unter Übersicht über Zertifikatsvorlagen und Richtlinien zur Ausstellung.
Die Ausstellung von Zertifikaten kann aus verschiedenen Gründen fehlschlagen. Hier sind einige dieser Gründe:
Konflikt zwischen der Ausstellungsrichtlinie für Zertifikate des CA-Pools und der Zertifikatvorlage.
Angenommen, die Ausstellungsrichtlinie definiert die Erweiterung foo
und weist ihr den Wert bar
zu. Die Zertifikatvorlage definiert die Erweiterung foo
und weist ihr den Wert bat
zu. Wenn Sie derselben Erweiterung zwei unterschiedliche Werte zuweisen, kommt es zu einem Konflikt.
Lösung
Prüfen Sie die Ausstellungsrichtlinie des CA-Pools anhand der Zertifikatsvorlage und identifizieren und beheben Sie Konflikte.
Weitere Informationen zu Ausstellungsrichtlinien finden Sie unter CA-Pool eine Zertifikatsausstellungsrichtlinie hinzufügen.
Der Inhaber oder die alternativen Antragstellernamen (Subject Alternative Names, SANs) bestehen die Bewertung des CEL-Ausdrucks entweder in der Zertifikatsvorlage oder in der Zertifikatsausstellungsrichtlinie des CA-Pools nicht.
Lösung
Prüfen Sie die Ausstellungsrichtlinie für Zertifikate und die Zertifikatvorlage des CA-Pools und achten Sie darauf, dass der Inhaber und der SAN die Bedingungen erfüllen, die durch Common Expression Language (CEL)-Ausdrücke festgelegt sind. Weitere Informationen zu CEL-Ausdrücken finden Sie unter Common Expression Language verwenden.
Für einen Anwendungsfall wird eine falsche IAM-Rolle gewährt. Beispielsweise können Sie die Rolle roles/privateca.certificateRequester
für die reflektierte Identität oder die Rolle roles/privateca.workloadCertificateRequester
für den Standardidentitätsmodus zuweisen.
Lösung
Prüfen Sie, ob Sie die Rolle roles/privateca.certificateRequester
für den Standardidentitätsmodus und die Rolle roles/privateca.workloadCertificateRequester
für die reflektierte Identität zugewiesen haben. Weitere Informationen zur Verwendung der Identitätsreflexion finden Sie unter Identitätsreflexion für föderierte Arbeitslasten.
Versuch, den Modus für die reflektierte Identität in einem nicht unterstützten Szenario zu verwenden, z. B. ohne Hub-Arbeitslast-Identität. Bei einem nicht unterstützten Szenario für die Identitätsreflexion wird die folgende Fehlermeldung zurückgegeben:
Could not use the REFLECTED_SPIFFE subject mode because the caller does not have a SPIFFE identity. Please visit the CA Service documentation to ensure that this is a supported use-case.
Lösung
Legen Sie fest, welche Art von Identität Sie verwenden müssen: Standardidentität oder reflektierte Identität. Wenn Sie die reflektierte Identität verwenden müssen, achten Sie darauf, dass Sie sie in einem der unterstützten Szenarien verwenden. Weitere Informationen zur Identitätsreflexion finden Sie unter Identitätsreflexion für föderierte Arbeitslasten.
Aufgrund der Standardbeschränkung für die Schlüsselgröße werden RSA-Schlüssel mit einer Modulusgröße von weniger als 2.048 Bit abgelehnt.
Gemäß den Best Practices der Branche sollte ein RSA-Schlüssel mindestens 2.048 Bit lang sein.
Standardmäßig verhindert der CA-Dienst die Ausstellung von Zertifikaten mit einem RSA-Schlüssel, dessen Modulgröße unter 2.048 Bit liegt.
Lösung
Wenn Sie einen RSA-Schlüssel mit einer Modulusgröße von weniger als 2.048 Bit verwenden möchten, müssen Sie dies über die Richtlinie zur Zertifikatsausstellung ausdrücklich zulassen.
Verwenden Sie das folgende YAML-Beispiel, um solche RSA-Schlüssel zuzulassen:
allowedKeyTypes:
- rsa:
minModulusSize: 1024
Nächste Schritte
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-09-04 (UTC).
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-04 (UTC)."],[[["\u003cp\u003eThis page provides solutions for common issues encountered with Certificate Authority Service, including API errors, CA deletion problems, and certificate issuance failures.\u003c/p\u003e\n"],["\u003cp\u003eAn HTTP 403 Forbidden error on API requests can be resolved by checking the requester's IAM permissions and ensuring the request location is supported.\u003c/p\u003e\n"],["\u003cp\u003eTo delete a CA, it must be in the \u003ccode\u003eDISABLED\u003c/code\u003e or \u003ccode\u003eSTAGED\u003c/code\u003e state, otherwise you will get an HTTP 412 error, so you must ensure the CA's state before attempting deletion.\u003c/p\u003e\n"],["\u003cp\u003eCertificate issuance failures may arise from conflicts between CA pool policies and certificate templates, incorrect IAM role assignments, or unsupported identity reflection scenarios, which can all be resolved by reviewing and correcting those settings.\u003c/p\u003e\n"],["\u003cp\u003eCertificate issuance can be blocked if the RSA key's modulus size is less than 2048 bits, but you can explicitly allow smaller keys through the certificate issuance policy.\u003c/p\u003e\n"]]],[],null,["# Troubleshooting\n===============\n\nThis page shows you how to resolve common issues with Certificate Authority Service.\n\nAPI request returns HTTP 403 Forbidden\n--------------------------------------\n\nIf an API request returns HTTP 403 Forbidden with the message `Read access to project PROJECT_NAME was denied`, then use the following resolution.\n\n**Resolution**\n\n1. Check the IAM permissions of the requester.\n2. Check the location for the request. Unsupported regions can return a permission denied error. For more information about supported locations, see [Locations](/certificate-authority-service/docs/locations).\n\nDeleting a CA returns HTTP 412 Failed Precondition\n--------------------------------------------------\n\nIf you see the following failed precondition errors when deleting a CA, use the resolution in this section.\n\n- `Cannot perform Certificate Authority deletion, Certificate Authority is in state ENABLED.`\n\n**Resolution**\n\nA CA needs to be in `DISABLED` or `STAGED` state for it to be deleted. Ensure the state of your CA before scheduling it for deletion. For more information about CA states, see [CA states](/certificate-authority-service/docs/certificate-authority-states).\n\nCertificate issuance failure\n----------------------------\n\nCA Service provides several policy controls that you can use to manage certificate issuance. For more information about the policy controls, see [Overview of certificate templates and issuance policies](/certificate-authority-service/docs/policy-controls).\n\nCertificate issuance can fail because of several reasons. Some of these reasons are as follows.\n\n- Conflict between CA pool's certificate issuance policy and certificate template.\n\n For example, consider that the issuance policy defines an extension `foo` and assigns it the value `bar` and the certificate template defines extension `foo` and assigns it the value `bat`. Assigning two different values to the same extension creates a conflict.\n\n **Resolution**\n\n Review the CA pool's certificate issuance policy against the certificate template, and identify and resolve the conflicts.\n\n For more information about issuance policies, see [Add a certificate issuance policy to a CA pool](/certificate-authority-service/docs/use-issuance-policy).\n- Subject or Subject Alternate Names (SANs) fail the CEL expression evaluation in either the certificate template or the CA pool's certificate issuance policy.\n\n **Resolution**\n\n Review the CA pool's certificate issuance policy and certificate template, and ensure that the subject and SAN satisfy the conditions set by Common Expression Language (CEL) expressions. For more information about CEL expressions, see [Using Common Expression Language](/certificate-authority-service/docs/using-cel).\n- Incorrect IAM role being granted for a use case. For example, assigning the `roles/privateca.certificateRequester` role for reflected identity or assigning the `roles/privateca.workloadCertificateRequester` role for default identity mode.\n\n **Resolution**\n\n Confirm that you have assigned the `roles/privateca.certificateRequester` role for default identity mode and the `roles/privateca.workloadCertificateRequester` role for reflected identity. For more information about using identity reflection, see [Identity reflection for federated workloads](/certificate-authority-service/docs/using-identity-reflection).\n- Attempting to use the reflected identity mode in an unsupported scenario, such as without Hub workload identity. An unsupported scenario for identity reflection returns the following error message:\n\n ```\n Could not use the REFLECTED_SPIFFE subject mode because the caller does not have a SPIFFE identity. Please visit the CA Service documentation to ensure that this is a supported use-case.\n ```\n\n **Resolution**\n\n Determine which type of identity you need to use: default identity or reflected identity. If you need to use reflected identity, make sure that you are using it in one of the supported scenarios. For more information about identity reflection, see [Identity reflection for federated workloads](/certificate-authority-service/docs/using-identity-reflection).\n- The default key size restriction rejects RSA keys with modulus size less than\n 2048 bits.\n\n Industry best practices recommend using an RSA key of at least 2048 bits.\n By default, CA Service prevents issuing certificates using an\n RSA key whose modulus size is less than 2048 bits.\n\n **Resolution**\n\n If you want to use a RSA key with modulus size less than 2048 bits, you must\n explicitly allow it [using the certificate issuance policy](/certificate-authority-service/docs/use-issuance-policy#gcloud).\n Use the following YAML example to allow such RSA keys: \n\n allowedKeyTypes:\n - rsa:\n minModulusSize: 1024\n\nWhat's next\n-----------\n\n- Learn about the [best practices for using Certificate Authority Service](/certificate-authority-service/docs/best-practices).\n- [Frequently asked questions](/certificate-authority-service/docs/faqs)"]]