The Security Department and its subteams are responsible for a number of applications and other resources that process various types of sensitive data in service of supporting GitLab.com.
The scope of the requirements and practices documented in this page are Security Department tools and resources that collect, process, and store RED data.
Future work: At this time, we don't have defined process for architecture and implementation review like we have for AppSec Reviews. Such a process will be the responsibility of a future Security team.
The following requirements are driven by 3 high level guidelines:
Examples of different data types:
The following practices are meant to provide more specific technical implementation examples to meet the above criteria.
The legacy metadata endpoints should be disabled on all projects.
Development and deployment should occur in a minimum of 2 environments, in addition to local development:
The environments should be configured as closely as possible as a best practice to reduce errors in deployment due to inconsistent configuration.
Security groups for ` gitLab.com organization resources should be named
gcp-:grouppurpose-sg@gitlab.com`.
When services are enabled, the default service account may be created with
project/editor
permissions.
Buckets which store data subject to retention requirements should use lifecycle management to automate deletion.
resource "google_storage_bucket" "system-logging-archive" {
name = "${var.project_id}-system-logging-archive"
project = var.project_id
location = "US"
force_destroy = true
lifecycle_rule {
condition {
age = "365"
}
action {
type = "Delete"
}
}
}
Shielded VMs should be used in all cases. This can be enforced with
organization or folder policy. Since this can't be enforced on the existing
gitlab.com
organization due to existing workloads, it should enforced at
the folder or project level for new folders and projects.
resource "google_folder_organization_policy" "shielded_vm_policy" {
folder = "myfolder"
constraint = "compute.requireShieldedVm"
boolean_policy {
enforced = true
}
}
# Enable shielded VMs for k8s node pools
resource "google_container_node_pool" "nodes" {
...
#enable_shielded_nodes = true
node_config {
...
shielded_instance_config {
enable_secure_boot = true
#enable_vtpm = true
enable_integrity_monitoring = true
}
metadata = {
disable-legacy-endpoints = "true"
}
}
lifecycle {
ignore_changes = [
node_config,
]
}
}
A default DENY rule for both egress and ingress should be added to all VPCs:
resource "google_compute_network" "vpc" {
...
}
resource "google_compute_firewall" "deny-all-egress" {
name = "${google_compute_network.vpc.name}-deny-all-egress"
project = var.project_id
network = google_compute_network.vpc.self_link
priority = 65533
direction = "EGRESS"
deny {
protocol = "all"
}
}
resource "google_compute_firewall" "deny-all-ingress" {
name = "${google_compute_network.vpc.name}-deny-all-ingress"
project = var.project_id
network = google_compute_network.vpc.self_link
priority = 65533
direction = "INGRESS"
deny {
protocol = "all"
}
}
GCP now has a permission recommender which will recommend least privilege based on actual usage. It can be used to determine minimum permissions in non-production environments. It should be reviewed periodically as part of scheduled reviews and maintenance.
Okta is our corporate identity and authentication provider. Configuration of applications using Okta as a SAML provider is the preferred solution. It meets operation needs for security monitoring of activity and can be provisioned by IT Ops using the standard Access Request process. Applications designed to work as SAML Service Provider should be able to work with other identity providers if that changes in the future.
For applications requiring shell access for daily work, Okta ASA should be implemented for ssh authentication.