Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions api/apparmorprofile/v1alpha1/apparmorprofile_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ type AppArmorAbstract struct {
Network *AppArmorNetworkRules `json:"network,omitempty"`
// Capability rules for Linux capabilities.
Capability *AppArmorCapabilityRules `json:"capability,omitempty"`
// Extra rules for other config.
Extra string `json:"extra,omitempty"`
}

// AppArmorProfileSpec defines the desired state of AppArmorProfile.
Expand Down
3 changes: 3 additions & 0 deletions deploy/base-crds/crds/apparmorprofile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ spec:
type: string
type: array
type: object
extra:
description: Extra rules for other config.
type: string
filesystem:
description: Filesystem rules for filesystem access.
properties:
Expand Down
89 changes: 0 additions & 89 deletions deploy/base/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -326,92 +326,3 @@ rules:
- securitycontextconstraints
verbs:
- use
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: spo-webhook
rules:
- apiGroups:
- ""
resources:
- events
verbs:
- create
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
- apiGroups:
- security-profiles-operator.x-k8s.io
resources:
- profilebindings
- profilerecordings
verbs:
- create
- get
- list
- patch
- update
- watch
- apiGroups:
- security-profiles-operator.x-k8s.io
resources:
- profilebindings/finalizers
- profilerecordings/finalizers
verbs:
- delete
- get
- patch
- update
- apiGroups:
- security-profiles-operator.x-k8s.io
resources:
- profilebindings/status
- profilerecordings/status
verbs:
- get
- patch
- update
- apiGroups:
- security-profiles-operator.x-k8s.io
resources:
- seccompprofiles
- selinuxprofiles
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: spo-webhook
namespace: security-profiles-operator
rules:
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- create
- apiGroups:
- coordination.k8s.io
resourceNames:
- security-profiles-operator-webhook-lock
resources:
- leases
verbs:
- get
- patch
- update
- apiGroups:
- security.openshift.io
resources:
- securitycontextconstraints
verbs:
- use
2 changes: 2 additions & 0 deletions deploy/helm/crds/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2311,6 +2311,8 @@ spec:
type: string
type: array
type: object
extra:
type: string
filesystem:
description: Filesystem rules for filesystem access.
properties:
Expand Down
2 changes: 2 additions & 0 deletions deploy/namespace-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2311,6 +2311,8 @@ spec:
type: string
type: array
type: object
extra:
type: string
filesystem:
description: Filesystem rules for filesystem access.
properties:
Expand Down
2 changes: 2 additions & 0 deletions deploy/openshift-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ spec:
type: string
type: array
type: object
extra:
type: string
filesystem:
description: Filesystem rules for filesystem access.
properties:
Expand Down
2 changes: 2 additions & 0 deletions deploy/openshift-downstream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2311,6 +2311,8 @@ spec:
type: string
type: array
type: object
extra:
type: string
filesystem:
description: Filesystem rules for filesystem access.
properties:
Expand Down
2 changes: 2 additions & 0 deletions deploy/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2311,6 +2311,8 @@ spec:
type: string
type: array
type: object
extra:
type: string
filesystem:
description: Filesystem rules for filesystem access.
properties:
Expand Down
2 changes: 2 additions & 0 deletions deploy/webhook-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ spec:
type: string
type: array
type: object
extra:
type: string
filesystem:
description: Filesystem rules for filesystem access.
properties:
Expand Down
1 change: 1 addition & 0 deletions internal/pkg/daemon/apparmorprofile/crd2armor/crd2armor.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ profile {{.Name}} flags=({{.ProfileMode}},attach_disconnected,mediate_deleted) {
{{end}}

# Raw rules placeholder
{{.Abstract.Extra}}

# Add default deny for known information leak/priv esc paths
deny @{PROC}/* w, # deny write for all files directly in /proc (not in a subdir)
Expand Down
Loading