New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Linux Foundation CKS Exam - Topic 1 Question 18 Discussion

Actual exam question for Linux Foundation's CKS exam
Question #: 18
Topic #: 1
[All CKS Questions]

On the Cluster worker node, enforce the prepared AppArmor profile

#include

profile docker-nginx flags=(attach_disconnected,mediate_deleted) {

#include

network inet tcp,

network inet udp,

network inet icmp,

deny network raw,

deny network packet,

file,

umount,

deny /bin/** wl,

deny /boot/** wl,

deny /dev/** wl,

deny /etc/** wl,

deny /home/** wl,

deny /lib/** wl,

deny /lib64/** wl,

deny /media/** wl,

deny /mnt/** wl,

deny /opt/** wl,

deny /proc/** wl,

deny /root/** wl,

deny /sbin/** wl,

deny /srv/** wl,

deny /tmp/** wl,

deny /sys/** wl,

deny /usr/** wl,

audit /** w,

/var/run/nginx.pid w,

/usr/sbin/nginx ix,

deny /bin/dash mrwklx,

deny /bin/sh mrwklx,

deny /usr/bin/top mrwklx,

capability chown,

capability dac_override,

capability setuid,

capability setgid,

capability net_bind_service,

deny @{PROC}/* w, # deny write for all files directly in /proc (not in a subdir)

# deny write to files not in /proc//** or /proc/sys/**

deny @{PROC}/{[^1-9],[^1-9][^0-9],[^1-9s][^0-9y][^0-9s],[^1-9][^0-9][^0-9][^0-9]*}/** w,

deny @{PROC}/sys/[^k]** w, # deny /proc/sys except /proc/sys/k* (effectively /proc/sys/kernel)

deny @{PROC}/sys/kernel/{?,??,[^s][^h][^m]**} w, # deny everything except shm* in /proc/sys/kernel/

deny @{PROC}/sysrq-trigger rwklx,

deny @{PROC}/mem rwklx,

deny @{PROC}/kmem rwklx,

deny @{PROC}/kcore rwklx,

deny mount,

deny /sys/[^f]*/** wklx,

deny /sys/f[^s]*/** wklx,

deny /sys/fs/[^c]*/** wklx,

deny /sys/fs/c[^g]*/** wklx,

deny /sys/fs/cg[^r]*/** wklx,

deny /sys/firmware/** rwklx,

deny /sys/kernel/security/** rwklx,

}

Edit the prepared manifest file to include the AppArmor profile.

apiVersion: v1

kind: Pod

metadata:

name: apparmor-pod

spec:

containers:

- name: apparmor-pod

image: nginx

Finally, apply the manifests files and create the Pod specified on it.

Verify: Try to use commandping, top, sh

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

0/2000 characters
Odette
4 months ago
Just what I needed for my cluster setup!
upvoted 0 times
...
Ahmed
4 months ago
This is a bit overkill, don’t you think?
upvoted 0 times
...
Kara
5 months ago
Wait, denying /proc access? That seems risky.
upvoted 0 times
...
Joaquin
5 months ago
Totally agree, security first!
upvoted 0 times
...
Georgeanna
5 months ago
Looks like a solid AppArmor profile for nginx!
upvoted 0 times
...
Lauran
5 months ago
I think I remember that we need to verify the commands after applying the manifests, but I'm not confident about the expected outcomes for each command.
upvoted 0 times
...
Felicidad
5 months ago
This question seems similar to one we did on enforcing security profiles in containers. I think I need to focus on the deny rules.
upvoted 0 times
...
Graciela
5 months ago
I remember we practiced editing AppArmor profiles, but I'm not entirely sure about the specific flags to use in this context.
upvoted 0 times
...
Daron
5 months ago
I feel a bit lost on how to apply the manifest file correctly. I hope I can recall the syntax for including the AppArmor profile.
upvoted 0 times
...
Ronald
5 months ago
The personas that will use the phone are definitely important to consider. We need to understand their needs and pain points to ensure the phone is designed and tested with the right user experience in mind.
upvoted 0 times
...
Nikita
5 months ago
This looks like a straightforward storage solution question for a SAP HANA deployment. I think I can handle this one.
upvoted 0 times
...
Lemuel
5 months ago
I'm not totally sure, but I have a feeling Link Availability might be involved too. It covers a lot of network details.
upvoted 0 times
...

Save Cancel