Skip to content

feat: add Firebase App Check security policies#391

Merged
Ankitaanku208 merged 12 commits into
devfrom
gcp/service/firebase-app-check
May 15, 2026
Merged

feat: add Firebase App Check security policies#391
Ankitaanku208 merged 12 commits into
devfrom
gcp/service/firebase-app-check

Conversation

@Ankitaanku208
Copy link
Copy Markdown
Contributor

@Ankitaanku208 Ankitaanku208 commented May 11, 2026

Replaces #284

Implemented comprehensive security policies for Firebase App Check including SHA-256 certificate validation, token TTL enforcement, and App Check configuration controls. Added detailed security documentation covering threat scenarios, attack vectors, and compliance requirements (HIPAA, PCI-DSS, SOC 2, GDPR).

Why a new PR

PR #284 used branch feat/firebase-app-check-security-policies which does not match the required gcp/service/<service-name> convention, causing the automated policy checks to be bypassed.

Test plan

  • OPA policies evaluated using opa eval against compliant and non-compliant inputs
  • All resource JSON files contain security_impact and rationale for every attribute

…anges

- Change token_ttl policy_type from blacklist to range [1800, 86400] for
  google_firebase_app_check_app_attest_config and google_firebase_app_check_device_check_config
- Update plan.json test fixtures to use integer seconds for range evaluation
- Revert all changes to files outside Firebase App Check service
@github-actions
Copy link
Copy Markdown

🔍 File Validation Failed

Status: ❌ VALIDATION FAILED

⚠️ Your PR contains changes outside of allowed folders:

❌ Service PRs can only modify files in: inputs/gcp/, policies/gcp/, and docs/gcp/
Invalid changes found:

  • scripts/generate_policy_docs_structure.py
  • .gitignore
  • README.md
  • scripts/linters/linter.py

Service PRs can only modify files in:

  • inputs/ - Service input configurations
  • policies/ - OPA/Rego policy files
  • docs/ - Service documentation

@github-actions github-actions Bot added the CI-Review-Required PR requires review due to failed CI checks label May 11, 2026
@github-actions
Copy link
Copy Markdown

🔍 File Validation Failed

Status: ❌ VALIDATION FAILED

⚠️ Your PR contains changes outside of allowed folders:

❌ Service PRs can only modify files in: inputs/gcp/, policies/gcp/, and docs/gcp/
Invalid changes found:

  • scripts/generate_policy_docs_structure.py
  • .gitignore

Service PRs can only modify files in:

  • inputs/ - Service input configurations
  • policies/ - OPA/Rego policy files
  • docs/ - Service documentation

@github-actions
Copy link
Copy Markdown

🔍 File Validation Failed

Status: ❌ VALIDATION FAILED

⚠️ Your PR contains changes outside of allowed folders:

❌ Service PRs can only modify files in: inputs/gcp/, policies/gcp/, and docs/gcp/
Invalid changes found:

  • .gitignore
  • .pre-commit-config.yaml

Service PRs can only modify files in:

  • inputs/ - Service input configurations
  • policies/ - OPA/Rego policy files
  • docs/ - Service documentation

@github-actions
Copy link
Copy Markdown

🔍 Policy Check Results

Status: ❌ CHECKS FAILED

⚠️ Your PR will not be reviewed until you fix all policy check failures below:

Test Output

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_device_check_config.token_ttl.message
Total Firebase App Check DeviceCheck Config detected: 2 
['Situation 1: Firebase DeviceCheck token_ttl must be between 1800s (30 min) and 86400s (24 hours) to balance usability and security.', 'Non-Compliant Resources: None - All passed']
Unique resource names in plan (google_firebase_app_check_device_check_config): 2
Names mentioned in output: 0
 Missing mentions: c, nc
Check failed: Unmentioned resources other than 'c' found: nc

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_device_check_config.private_key.message
Total Firebase App Check DeviceCheck Config detected: 4 
['Situation 1: Firebase DeviceCheck private_key must be stored in Secret Manager, not left empty or null.', 'Non-Compliant Resources: nc, nc2', "Potential Remedies: Store the private key in Secret Manager and reference it as 'projects/<project>/secrets/<secret>'."]
Unique resource names in plan (google_firebase_app_check_device_check_config): 4
Names mentioned in output: 2
 Missing mentions: c, c2
Check passed

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_service_config.enforcement_mode.message
Total Firebase App Check Service Config detected: 2 
['Situation 1: Firebase App Check enforcement mode is not set to ENFORCED.', 'Non-Compliant Resources: nc', "Potential Remedies: Set enforcement_mode to 'ENFORCED' to actively reject unverified requests."]
Unique resource names in plan (google_firebase_app_check_service_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_app_attest_config.token_ttl.message
Total Firebase App Check App Attest Config detected: 2 
['Situation 1: Firebase App Attest token_ttl must be between 1800s (30 min) and 86400s (24 hours) to balance usability and security.', 'Non-Compliant Resources: None - All passed']
Unique resource names in plan (google_firebase_app_check_app_attest_config): 2
Names mentioned in output: 0
 Missing mentions: c, nc
Check failed: Unmentioned resources other than 'c' found: nc

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_recaptcha_v3_config.site_secret.message
Total Firebase App Check reCAPTCHA v3 Config detected: 4 
['Situation 1: Firebase reCAPTCHA v3 site_secret must be stored in Secret Manager, not left empty or null.', 'Non-Compliant Resources: nc, nc2', "Potential Remedies: Store the site secret in Secret Manager and reference it as 'projects/<project>/secrets/<secret>'."]
Unique resource names in plan (google_firebase_app_check_recaptcha_v3_config): 4
Names mentioned in output: 2
 Missing mentions: c, c2
Check passed


Summary of policy checks:
Service: firebase_app_check
  Resource: google_firebase_app_check_app_attest_config
    Policy: token_ttl - ❌
  Resource: google_firebase_app_check_device_check_config
    Policy: token_ttl - ❌
    Policy: private_key - ✅
  Resource: google_firebase_app_check_recaptcha_v3_config
    Policy: site_secret - ✅
  Resource: google_firebase_app_check_service_config
    Policy: enforcement_mode - ✅


Failures:
Service: firebase_app_check | Resource: google_firebase_app_check_app_attest_config | Policy: token_ttl
Unmentioned resources other than 'c' found: nc

Service: firebase_app_check | Resource: google_firebase_app_check_device_check_config | Policy: token_ttl
Unmentioned resources other than 'c' found: nc


@github-actions
Copy link
Copy Markdown

🔍 Policy Check Results

Status: ✅ All checks passed

Test Output

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_device_check_config.token_ttl.message
Total Firebase App Check DeviceCheck Config detected: 2 
Situation 1: Firebase DeviceCheck token_ttl must be between 1800s (30 min) and 86400s (24 hours) to balance usability and security.
Non-Compliant Resources: nc
Potential Remedies: Set token_ttl to a value between 1800s (30 min) and 86400s (24 hours).
Unique resource names in plan (google_firebase_app_check_device_check_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_device_check_config.private_key.message
Total Firebase App Check DeviceCheck Config detected: 4 
['Situation 1: Firebase DeviceCheck private_key must be stored in Secret Manager, not left empty or null.', 'Non-Compliant Resources: nc, nc2', "Potential Remedies: Store the private key in Secret Manager and reference it as 'projects/<project>/secrets/<secret>'."]
Unique resource names in plan (google_firebase_app_check_device_check_config): 4
Names mentioned in output: 2
 Missing mentions: c, c2
Check passed

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_service_config.enforcement_mode.message
Total Firebase App Check Service Config detected: 2 
['Situation 1: Firebase App Check enforcement mode is not set to ENFORCED.', 'Non-Compliant Resources: nc', "Potential Remedies: Set enforcement_mode to 'ENFORCED' to actively reject unverified requests."]
Unique resource names in plan (google_firebase_app_check_service_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_app_attest_config.token_ttl.message
Total Firebase App Check App Attest Config detected: 2 
Situation 1: Firebase App Attest token_ttl must be between 1800s (30 min) and 86400s (24 hours) to balance usability and security.
Non-Compliant Resources: nc
Potential Remedies: Set token_ttl to a value between 1800s (30 min) and 86400s (24 hours).
Unique resource names in plan (google_firebase_app_check_app_attest_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_recaptcha_v3_config.site_secret.message
Total Firebase App Check reCAPTCHA v3 Config detected: 4 
['Situation 1: Firebase reCAPTCHA v3 site_secret must be stored in Secret Manager, not left empty or null.', 'Non-Compliant Resources: nc, nc2', "Potential Remedies: Store the site secret in Secret Manager and reference it as 'projects/<project>/secrets/<secret>'."]
Unique resource names in plan (google_firebase_app_check_recaptcha_v3_config): 4
Names mentioned in output: 2
 Missing mentions: c, c2
Check passed


Summary of policy checks:
Service: firebase_app_check
  Resource: google_firebase_app_check_app_attest_config
    Policy: token_ttl - ✅
  Resource: google_firebase_app_check_device_check_config
    Policy: token_ttl - ✅
    Policy: private_key - ✅
  Resource: google_firebase_app_check_recaptcha_v3_config
    Policy: site_secret - ✅
  Resource: google_firebase_app_check_service_config
    Policy: enforcement_mode - ✅


@github-actions github-actions Bot added CI-Approved PR approved by CI checks and removed CI-Review-Required PR requires review due to failed CI checks labels May 11, 2026
@Ankitaanku208 Ankitaanku208 requested review from Shani1116, jashan-lefty and paulJRCurtis and removed request for jashan-lefty and paulJRCurtis May 11, 2026 07:42
@Shani1116 Shani1116 self-assigned this May 12, 2026
@github-actions
Copy link
Copy Markdown

🔍 Policy Check Results

Status: ✅ All checks passed

Test Output

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_device_check_config.token_ttl.message
Total Firebase App Check DeviceCheck Config detected: 2 
Situation 1: Firebase DeviceCheck token_ttl must be between 1800s (30 min) and 86400s (24 hours) to balance usability and security.
Non-Compliant Resources: nc
Potential Remedies: Set token_ttl to a value between 1800s (30 min) and 86400s (24 hours).
Unique resource names in plan (google_firebase_app_check_device_check_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_device_check_config.private_key.message
Total Firebase App Check DeviceCheck Config detected: 4 
['Situation 1: Firebase DeviceCheck private_key must be stored in Secret Manager, not left empty or null.', 'Non-Compliant Resources: nc, nc2', "Potential Remedies: Store the private key in Secret Manager and reference it as 'projects/<project>/secrets/<secret>'."]
Unique resource names in plan (google_firebase_app_check_device_check_config): 4
Names mentioned in output: 2
 Missing mentions: c, c2
Check passed

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_service_config.enforcement_mode.message
Total Firebase App Check Service Config detected: 2 
['Situation 1: Firebase App Check enforcement mode is not set to ENFORCED.', 'Non-Compliant Resources: nc', "Potential Remedies: Set enforcement_mode to 'ENFORCED' to actively reject unverified requests."]
Unique resource names in plan (google_firebase_app_check_service_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_app_attest_config.token_ttl.message
Total Firebase App Check App Attest Config detected: 2 
Situation 1: Firebase App Attest token_ttl must be between 1800s (30 min) and 86400s (24 hours) to balance usability and security.
Non-Compliant Resources: nc
Potential Remedies: Set token_ttl to a value between 1800s (30 min) and 86400s (24 hours).
Unique resource names in plan (google_firebase_app_check_app_attest_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_recaptcha_v3_config.site_secret.message
Total Firebase App Check reCAPTCHA v3 Config detected: 4 
['Situation 1: Firebase reCAPTCHA v3 site_secret must be stored in Secret Manager, not left empty or null.', 'Non-Compliant Resources: nc, nc2', "Potential Remedies: Store the site secret in Secret Manager and reference it as 'projects/<project>/secrets/<secret>'."]
Unique resource names in plan (google_firebase_app_check_recaptcha_v3_config): 4
Names mentioned in output: 2
 Missing mentions: c, c2
Check passed


Summary of policy checks:
Service: firebase_app_check
  Resource: google_firebase_app_check_app_attest_config
    Policy: token_ttl - ✅
  Resource: google_firebase_app_check_device_check_config
    Policy: token_ttl - ✅
    Policy: private_key - ✅
  Resource: google_firebase_app_check_recaptcha_v3_config
    Policy: site_secret - ✅
  Resource: google_firebase_app_check_service_config
    Policy: enforcement_mode - ✅


Copy link
Copy Markdown
Contributor

@Shani1116 Shani1116 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see the feedback below -

  • 2 of your policies do not follow the PDE policy format.
  • Remove plan.json files
  • Complete security_impact and rationale for all attributes.

Revise and update accordingly.

… files, complete JSON attributes

- Rewrite app_attest and device_check token_ttl policies to use helpers whitelist format
- Remove plan.json files from inputs (not needed in PR)
- Fill in security_impact and rationale for app_id and project in app_attest_config JSON
@github-actions
Copy link
Copy Markdown

🔍 Policy Check Results

Status: ✅ All checks passed

Test Output

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_device_check_config.token_ttl.message
Total Firebase App Check DeviceCheck Config detected: 2 
['Situation 1: Firebase DeviceCheck token_ttl must be between 1800s (30 min) and 86400s (24 hours) to balance usability and security.', 'Non-Compliant Resources: nc', 'Potential Remedies: Set token_ttl to a value between 1800s and 86400s. Example: 3600s (1 hour).']
Unique resource names in plan (google_firebase_app_check_device_check_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_device_check_config.private_key.message
Total Firebase App Check DeviceCheck Config detected: 4 
['Situation 1: Firebase DeviceCheck private_key must be stored in Secret Manager, not left empty or null.', 'Non-Compliant Resources: nc, nc2', "Potential Remedies: Store the private key in Secret Manager and reference it as 'projects/<project>/secrets/<secret>'."]
Unique resource names in plan (google_firebase_app_check_device_check_config): 4
Names mentioned in output: 2
 Missing mentions: c, c2
Check passed

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_service_config.enforcement_mode.message
Total Firebase App Check Service Config detected: 2 
['Situation 1: Firebase App Check enforcement mode is not set to ENFORCED.', 'Non-Compliant Resources: nc', "Potential Remedies: Set enforcement_mode to 'ENFORCED' to actively reject unverified requests."]
Unique resource names in plan (google_firebase_app_check_service_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_app_attest_config.token_ttl.message
Total Firebase App Check App Attest Config detected: 2 
['Situation 1: Firebase App Attest token_ttl must be between 1800s (30 min) and 86400s (24 hours) to balance usability and security.', 'Non-Compliant Resources: nc', 'Potential Remedies: Set token_ttl to a value between 1800s and 86400s. Example: 3600s (1 hour).']
Unique resource names in plan (google_firebase_app_check_app_attest_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_recaptcha_v3_config.site_secret.message
Total Firebase App Check reCAPTCHA v3 Config detected: 4 
['Situation 1: Firebase reCAPTCHA v3 site_secret must be stored in Secret Manager, not left empty or null.', 'Non-Compliant Resources: nc, nc2', "Potential Remedies: Store the site secret in Secret Manager and reference it as 'projects/<project>/secrets/<secret>'."]
Unique resource names in plan (google_firebase_app_check_recaptcha_v3_config): 4
Names mentioned in output: 2
 Missing mentions: c, c2
Check passed


Summary of policy checks:
Service: firebase_app_check
  Resource: google_firebase_app_check_app_attest_config
    Policy: token_ttl - ✅
  Resource: google_firebase_app_check_device_check_config
    Policy: token_ttl - ✅
    Policy: private_key - ✅
  Resource: google_firebase_app_check_recaptcha_v3_config
    Policy: site_secret - ✅
  Resource: google_firebase_app_check_service_config
    Policy: enforcement_mode - ✅


@Ankitaanku208
Copy link
Copy Markdown
Contributor Author

Hi @Shani1116, all three review points have been addressed:

  1. Policy format — Rewrote both token_ttl policies (app_attest_config and device_check_config) to use the helpers.get_multi_summary framework with whitelist policy type, matching the established PDE pattern for duration fields.

  2. plan.json files removed — Deleted plan.json from all input directories (app_attest_config/token_ttl, device_check_config/token_ttl, device_check_config/private_key, recaptcha_v3_config/site_secret, service_config/enforcement_mode).

  3. JSON attributes completed — Filled in security_impact and rationale for app_id and project in firebase_app_check_app_attest_config.json (both were null previously).

All policy checks are now passing ✅. Please re-review when you get a chance.

…k JSON attributes

Fill in security_impact and rationale for device_check_config (key_id, app_id, project),
recaptcha_v3_config (app_id, token_ttl, project), and service_config (service_id, project).
@github-actions
Copy link
Copy Markdown

🔍 Policy Check Results

Status: ✅ All checks passed

Test Output

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_device_check_config.token_ttl.message
Total Firebase App Check DeviceCheck Config detected: 2 
['Situation 1: Firebase DeviceCheck token_ttl must be between 1800s (30 min) and 86400s (24 hours) to balance usability and security.', 'Non-Compliant Resources: nc', 'Potential Remedies: Set token_ttl to a value between 1800s and 86400s. Example: 3600s (1 hour).']
Unique resource names in plan (google_firebase_app_check_device_check_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_device_check_config.private_key.message
Total Firebase App Check DeviceCheck Config detected: 4 
['Situation 1: Firebase DeviceCheck private_key must be stored in Secret Manager, not left empty or null.', 'Non-Compliant Resources: nc, nc2', "Potential Remedies: Store the private key in Secret Manager and reference it as 'projects/<project>/secrets/<secret>'."]
Unique resource names in plan (google_firebase_app_check_device_check_config): 4
Names mentioned in output: 2
 Missing mentions: c, c2
Check passed

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_service_config.enforcement_mode.message
Total Firebase App Check Service Config detected: 2 
['Situation 1: Firebase App Check enforcement mode is not set to ENFORCED.', 'Non-Compliant Resources: nc', "Potential Remedies: Set enforcement_mode to 'ENFORCED' to actively reject unverified requests."]
Unique resource names in plan (google_firebase_app_check_service_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_app_attest_config.token_ttl.message
Total Firebase App Check App Attest Config detected: 2 
['Situation 1: Firebase App Attest token_ttl must be between 1800s (30 min) and 86400s (24 hours) to balance usability and security.', 'Non-Compliant Resources: nc', 'Potential Remedies: Set token_ttl to a value between 1800s and 86400s. Example: 3600s (1 hour).']
Unique resource names in plan (google_firebase_app_check_app_attest_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_recaptcha_v3_config.site_secret.message
Total Firebase App Check reCAPTCHA v3 Config detected: 4 
['Situation 1: Firebase reCAPTCHA v3 site_secret must be stored in Secret Manager, not left empty or null.', 'Non-Compliant Resources: nc, nc2', "Potential Remedies: Store the site secret in Secret Manager and reference it as 'projects/<project>/secrets/<secret>'."]
Unique resource names in plan (google_firebase_app_check_recaptcha_v3_config): 4
Names mentioned in output: 2
 Missing mentions: c, c2
Check passed


Summary of policy checks:
Service: firebase_app_check
  Resource: google_firebase_app_check_app_attest_config
    Policy: token_ttl - ✅
  Resource: google_firebase_app_check_device_check_config
    Policy: token_ttl - ✅
    Policy: private_key - ✅
  Resource: google_firebase_app_check_recaptcha_v3_config
    Policy: site_secret - ✅
  Resource: google_firebase_app_check_service_config
    Policy: enforcement_mode - ✅


token_ttl was updated to security_impact: true in the JSON but the .md
still showed false with no rationale or compliant/non-compliant values.
@github-actions
Copy link
Copy Markdown

🔍 Policy Check Results

Status: ✅ All checks passed

Test Output

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_device_check_config.token_ttl.message
Total Firebase App Check DeviceCheck Config detected: 2 
['Situation 1: Firebase DeviceCheck token_ttl must be between 1800s (30 min) and 86400s (24 hours) to balance usability and security.', 'Non-Compliant Resources: nc', 'Potential Remedies: Set token_ttl to a value between 1800s and 86400s. Example: 3600s (1 hour).']
Unique resource names in plan (google_firebase_app_check_device_check_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_device_check_config.private_key.message
Total Firebase App Check DeviceCheck Config detected: 4 
['Situation 1: Firebase DeviceCheck private_key must be stored in Secret Manager, not left empty or null.', 'Non-Compliant Resources: nc, nc2', "Potential Remedies: Store the private key in Secret Manager and reference it as 'projects/<project>/secrets/<secret>'."]
Unique resource names in plan (google_firebase_app_check_device_check_config): 4
Names mentioned in output: 2
 Missing mentions: c, c2
Check passed

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_service_config.enforcement_mode.message
Total Firebase App Check Service Config detected: 2 
['Situation 1: Firebase App Check enforcement mode is not set to ENFORCED.', 'Non-Compliant Resources: nc', "Potential Remedies: Set enforcement_mode to 'ENFORCED' to actively reject unverified requests."]
Unique resource names in plan (google_firebase_app_check_service_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_app_attest_config.token_ttl.message
Total Firebase App Check App Attest Config detected: 2 
['Situation 1: Firebase App Attest token_ttl must be between 1800s (30 min) and 86400s (24 hours) to balance usability and security.', 'Non-Compliant Resources: nc', 'Potential Remedies: Set token_ttl to a value between 1800s and 86400s. Example: 3600s (1 hour).']
Unique resource names in plan (google_firebase_app_check_app_attest_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.firebase_app_check.google_firebase_app_check_recaptcha_v3_config.site_secret.message
Total Firebase App Check reCAPTCHA v3 Config detected: 4 
['Situation 1: Firebase reCAPTCHA v3 site_secret must be stored in Secret Manager, not left empty or null.', 'Non-Compliant Resources: nc, nc2', "Potential Remedies: Store the site secret in Secret Manager and reference it as 'projects/<project>/secrets/<secret>'."]
Unique resource names in plan (google_firebase_app_check_recaptcha_v3_config): 4
Names mentioned in output: 2
 Missing mentions: c, c2
Check passed


Summary of policy checks:
Service: firebase_app_check
  Resource: google_firebase_app_check_app_attest_config
    Policy: token_ttl - ✅
  Resource: google_firebase_app_check_device_check_config
    Policy: token_ttl - ✅
    Policy: private_key - ✅
  Resource: google_firebase_app_check_recaptcha_v3_config
    Policy: site_secret - ✅
  Resource: google_firebase_app_check_service_config
    Policy: enforcement_mode - ✅


@Ankitaanku208 Ankitaanku208 requested a review from Shani1116 May 12, 2026 08:50
Copy link
Copy Markdown
Contributor

@Shani1116 Shani1116 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved all feedback. APC passes without errors.

Approved.

@Ankitaanku208 Ankitaanku208 merged commit 92a5f04 into dev May 15, 2026
1 check passed
@Ankitaanku208 Ankitaanku208 deleted the gcp/service/firebase-app-check branch May 15, 2026 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI-Approved PR approved by CI checks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants