|
2 tahun lalu | |
---|---|---|
.. | ||
backup | 3 tahun lalu | |
docker | 3 tahun lalu | |
functions | 3 tahun lalu | |
images | 3 tahun lalu | |
papers | 3 tahun lalu | |
terraform | 2 tahun lalu | |
update-elk-scheme | 3 tahun lalu | |
workshop-guide | 3 tahun lalu | |
AUTHORS | 3 tahun lalu | |
CONFIGURE-HA.md | 2 tahun lalu | |
CONFIGURE-HA_RU.md | 2 tahun lalu | |
LICENSE | 3 tahun lalu | |
README.md | 2 tahun lalu | |
README_RU.md | 2 tahun lalu |
Version-2.1
cr.yandex/sol/s3-elk-importer:2.1
cr.yandex/sol/elk-updater:1.0.4
Version-2.0
cr.yandex/sol/s3-elk-importer:1.0.6
The solution lets you collect, monitor, and analyze audit logs in Yandex Managed Service for Elasticsearch (ELK) from the following sources:
The solution is constantly updated and maintained by the Yandex.Cloud Security team.
cr.yandex/crpjfmfou6gflobbfvfv/s3-elk-importer:latest
).Diagram of the solution to supply K8s logs
Security Content are ELK objects automatically loaded by the solution. All the content leverages the long-term expertise of the Yandex.Cloud Security team and our cloud customers.
The solution contains the following Security Content:
All relevant event fields have been converted to the Elastic Common Schema (ECS) format, the full mapping table is in the file with object description.
A detailed description is in the ECS-mapping.docx file
Subscription options on ELK site
We recommend subscribing to this repository to receive update notifications.
To get the latest content version, do the following:
For content updates, make sure that you are running the latest available image version: cr.yandex/crpjfmfou6gflobbfvfv/s3-elk-importer:latest
.
You can update the container as follows:
terraform apply
).audit-trail-worker-*
container, delete the s3-elk-importer
image, and restart COI Instance. After the launch, a new image will be downloaded and a new container will be created.You can update the Security content in Kibana (dashboards, detection rules, searches) by launching the elk-updater container:
docker run -it --rm -e ELASTIC_AUTH_USER='admin' -e ELASTIC_AUTH_PW='password' -e KIBANA_SERVER='https://xxx.rw.mdb.yandexcloud.net' --name elk-updater cr.yandex/crpjfmfou6gflobbfvfv/elk-updater:latest
See the example of configuring prerequisites and calling modules in /example/main.tf
The solution consists of two Terraform modules /terraform/modules/:
A password to the ELK admin account.
yc-elastic-trail:
Creates static keys for the SA (for working with JSON objects in a bucket and encrypting/decrypting secrets).
Creates a COI VM with a Docker Container specification using a script.
Creates an SSH key pair and saves the private part to the disk and the public part to the VM.
Creates a KMS key.
Assigns the kms.keys.encrypterDecrypter rights to the key for SA to encrypt secrets.
Encrypts secrets and passes them to Docker Container.
module "yc-managed-elk" {
source = "../modules/yc-managed-elk" # path to module yc-managed-elk
folder_id = var.folder_id
subnet_ids = yandex_vpc_subnet.elk-subnet[*].id # Subnets in three availability zones for ELK deployment
network_id = yandex_vpc_network.vpc-elk.id # The ID of the network where ELK will be deployed
elk_edition = "gold"
elk_datanode_preset = "s2.medium"
elk_datanode_disk_size = 1000
elk_public_ip = false # true if you need a public access to Elasticsearch
}
module "yc-elastic-trail" {
source = "../modules/yc-elastic-trail/" # path to module yc-elastic-trail
folder_id = var.folder_id
elk_credentials = module.yc-managed-elk.elk-pass
elk_address = module.yc-managed-elk.elk_fqdn
bucket_name = yandex_storage_bucket.trail-bucket.bucket
bucket_folder = "" # Specify the name of the prefix where trails writes logs to the bucket, for example prefix-trails (if it's root, then leave empty at default)
sa_id = yandex_iam_service_account.sa-bucket-editor.id
coi_subnet_id = yandex_vpc_subnet.elk-subnet[0].id
}
output "elk-pass" {
value = module.yc-managed-elk.elk-pass
sensitive = true
} // View the ELK password: terraform output elk-pass
output "elk_fqdn" {
value = module.yc-managed-elk.elk_fqdn
} // Outputs the ELK URL that can be accessed, for example, through the browser
output "elk-user" {
value = "admin"
}
Deployment of the K8s log delivery solution
Recommendations for setting up retention, rollover, and snapshots