Kontrol listesi

Check-Image-01: Yapılandırma dosyalarının kullanıcı/grup sahipliği root/glance mi?

Configuration files contain critical parameters and information required for smooth functioning of the component. If an unprivileged user, either intentionally or accidentally, modifies or deletes any of the parameters or the file itself then it would cause severe availability issues resulting in a denial of service to the other end users. Therefore, user ownership of such critical configuration files must be set to root and group ownership must be set to glance. Additionally, the containing directory should have the same ownership to ensure that new files are owned correctly.

Aşağıdaki komutları çalıştırın:

$ stat -L -c "%U %G" /etc/glance/glance-api-paste.ini | egrep "root glance"
$ stat -L -c "%U %G" /etc/glance/glance-api.conf | egrep "root glance"
$ stat -L -c "%U %G" /etc/glance/glance-cache.conf | egrep "root glance"
$ stat -L -c "%U %G" /etc/glance/glance-manage.conf | egrep "root glance"
$ stat -L -c "%U %G" /etc/glance/glance-registry-paste.ini | egrep "root glance"
$ stat -L -c "%U %G" /etc/glance/glance-registry.conf | egrep "root glance"
$ stat -L -c "%U %G" /etc/glance/glance-scrubber.conf | egrep "root glance"
$ stat -L -c "%U %G" /etc/glance/glance-swift-store.conf | egrep "root glance"
$ stat -L -c "%U %G" /etc/glance/policy.json | egrep "root glance"
$ stat -L -c "%U %G" /etc/glance/schema-image.json | egrep "root glance"
$ stat -L -c "%U %G" /etc/glance/schema.json | egrep "root glance"
$ stat -L -c "%U %G" /etc/glance | egrep "root glance"

Başarılı: Tüm bu yapılandırma dosyalarının kullanıcı ve grup sahipliği root ve glance ise. Yukarıdaki komut root glance çıktısı verir.

Başarısız: Yukarıdaki komut herhangi bir çıktı döndürmez.

Check-Image-02: Yapılandırma dosyaları için sıkı izinler ayarlandı mı?

Önceki kontrole benzer şekilde, bu yapılandırma dosyaları için sıkı erişim izinlerini ayarlamanızı öneririz.

Aşağıdaki komutları çalıştırın:

$ stat -L -c "%a" /etc/glance/glance-api-paste.ini
$ stat -L -c "%a" /etc/glance/glance-api.conf
$ stat -L -c "%a" /etc/glance/glance-cache.conf
$ stat -L -c "%a" /etc/glance/glance-manage.conf
$ stat -L -c "%a" /etc/glance/glance-registry-paste.ini
$ stat -L -c "%a" /etc/glance/glance-registry.conf
$ stat -L -c "%a" /etc/glance/glance-scrubber.conf
$ stat -L -c "%a" /etc/glance/glance-swift-store.conf
$ stat -L -c "%a" /etc/glance/policy.json
$ stat -L -c "%a" /etc/glance/schema-image.json
$ stat -L -c "%a" /etc/glance/schema.json
$ stat -L -c "%a" /etc/glance

A broader restriction is also possible: if the containing directory is set to 750, the guarantee is made that newly created files inside this directory would have the desired permissions.

Pass: If permissions are set to 640 or stricter, or the containing directory is set to 750. The permissions of 640/750 translates into owner r/w, group r, and no rights to others. For example, u=rw,g=r,o=.

Not

Check-Image-01: Yapılandırma dosyalarının kullanıcı/grup sahipliği root/glance mi? ve izinler 640 olarak ayarlanırsa, root okuma/yazma erişimi sağlar ve glance’in bu yapılandırma dosyalarına okuma erişimi vardır. Erişim hakları aşağıdaki komut kullanılarak da doğrulanabilir. Bu komut yalnızca sisteminiz ACL’leri destekliyorsa kullanılabilir olacaktır.

$ getfacl --tabular -a /etc/glance/glance-api.conf
getfacl: Removing leading '/' from absolute path names
# file: /etc/glance/glance-api.conf
USER   root  rw-
GROUP  glance  r--
mask         r--
other        ---

Başarısız: Eğer yetkileri en az 640 değilse.

Check-Image-03: Kimlik doğrulama için keystone kullanıldı mı?

Not

This item only applies to OpenStack releases Rocky and before as auth_strategy was deprecated in Stein.

OpenStack, noauth ve keystone gibi çeşitli kimlik doğrulama stratejilerini desteklemektedir. noauth stratejisi kullanılıyorsa, kullanıcılar herhangi bir kimlik denetimi olmaksızın OpenStack servisleri ile etkileşimde bulunabilirler. Bu, bir saldırgan OpenStack bileşenlerine yetkisiz erişebileceğinden potansiyel bir risk oluşturabilir. Tüm servislerin servis hesaplarını kullanarak keystone ile doğrulanması önemle tavsiye edilir.

Başarılı: Eğer /etc/glance/glance-api.conf dosyasındaki [DEFAULT] sekmesindeki auth_strategy parametresinin değeri keystone ise ve /etc/glance /glance-registry.conf dosyasındaki [DEFAULT] sekmesindeki auth_strategy parametresinin değeri keystone ise.

Başarısız: Eğer /etc/glance/glance-api.conf dosyasındaki [DEFAULT] sekmesindeki auth_strategy parametresinin değeri noauth ise veya /etc/glance /glance-registry.conf dosyasındaki [DEFAULT] sekmesindeki auth_strategy parametresinin değeri noauth ise.

Check-Image-04: Kimlik doğrulama için TLS etkinleştirildi mi?

OpenStack bileşenleri çeşitli protokolleri kullanarak birbirleriyle iletişim kurar ve iletişim hassas veya gizli verileri içerebilir. Hassas bilgilerinize erişebilmek için bir saldırgan kanalda kulak misafiri olmayı deneyebilir. Tüm bileşenler, güvenli bir iletişim protokolü kullanarak birbirleriyle iletişim kurmalıdır.

Pass: If value of parameter www_authenticate_uri under [keystone_authtoken] section in /etc/glance/glance-api.conf is set to the Identity API endpoint starting with https://, and the value of the parameter insecure is under the same [keystone_authtoken] section in the same /etc/glance/glance-registry.conf is set to False.

Fail: If value of parameter www_authenticate_uri under [keystone_authtoken] section in /etc/glance/glance-api.conf is not set to Identity API endpoint starting with https://, or value of parameter insecure under the same [keystone_authtoken] section in the same /etc/glance/glance-api.conf is set to True.

Check-Image-05: Are masked port scans prevented?

The copy_from feature in Image Service API v1 supplied by Glance can allow an attacker to perform masked network port scans. If the v1 API is enabled, this policy should be set to a restricted value.

Pass: If value of parameter copy_from in /etc/glance/policy.json is set to a restricted value, for example role:admin.

Fail: If value of parameter copy_from in /etc/glance/policy.json is not set.