Cloud SQL Instance With Contained Database Authentication On
- Query id: 6d34aff3-fdd2-460c-8190-756a3b4969e8
- Query name: Cloud SQL Instance With Contained Database Authentication On
- Platform: Ansible
- Severity: High
- Category: Insecure Configurations
- URL: Github
Description¶
SQL Instance should not have Contained Database Authentication On
Documentation
Code samples¶
Code samples with security vulnerabilities¶
Postitive test num. 1 - yaml file
- name: sql_instance
google.cloud.gcp_sql_instance:
auth_kind: serviceaccount
database_version: SQLSERVER_13_1
name: "{{ resource_name }}-2"
project: test_project
region: us-central1
service_account_file: /tmp/auth.pem
settings:
database_flags:
- name: contained database authentication
value: on
tier: db-n1-standard-1
state: present
Code samples without security vulnerabilities¶
Negative test num. 1 - yaml file
- name: sql_instance
google.cloud.gcp_sql_instance:
auth_kind: serviceaccount
database_version: SQLSERVER_13_1
name: '{{ resource_name }}-2'
project: test_project
region: us-central1
service_account_file: /tmp/auth.pem
settings:
database_flags:
- name: name1
value: value1
tier: db-n1-standard-1
state: present