Skip to content

Commit

Permalink
- Specifications for specific intents
Browse files Browse the repository at this point in the history
  • Loading branch information
shivaccuknox committed Dec 21, 2023
1 parent 62ff799 commit 91f9e12
Show file tree
Hide file tree
Showing 6 changed files with 153 additions and 0 deletions.
28 changes: 28 additions & 0 deletions intents/core/1_protectAsset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2023 Authors of Nimbus

apiVersion: intent.security.nimbus.com/v1
kind: SecurityIntent
metadata:
name: [intent-name]
namespace: [intent-namespace]
spec:
selector:
match:
any:
- resources:
names: [target-name]
kinds: [target-kind]
namespaces: [target-namespace]
matchLabels:
[key: value]
cel:
- xxxx
intent:
group: core
ID: protectFile
params:
- path: /etc/shadow
- AllowBinary:
- /free5gc/webconsole
- /free5gc/webApp
28 changes: 28 additions & 0 deletions intents/core/2_protectPort.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2023 Authors of Nimbus

apiVersion: intent.security.nimbus.com/v1
kind: SecurityIntent
metadata:
name: [intent-name]
namespace: [intent-namespace]
spec:
selector:
match:
any:
- resources:
names: [target-name]
kinds: [target-kind]
namespaces: [target-namespace]
matchLabels:
[key: value]
cel:
- xxxx
intent:
group: core
ID: protectPort # will generate rules for all protocols
params:
- port: 5000
- AllowBinary
- /free5gc/webconsole
- /free5gc/webapp
25 changes: 25 additions & 0 deletions intents/core/3_ownnerOnly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2023 Authors of Nimbus

apiVersion: intent.security.nimbus.com/v1
kind: SecurityIntent
metadata:
name: [intent-name]
namespace: [intent-namespace]
spec:
selector:
match:
any:
- resources:
names: [target-name]
kinds: [target-kind]
namespaces: [target-namespace]
matchLabels:
[key: value]
cel:
- xxxx
intent:
group: core
ID: ownerOnly # The executable in the path can be invoked by ownerOnly
params:
- path: /home/5gc/myexec
25 changes: 25 additions & 0 deletions intents/core/4_blockAsset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2023 Authors of Nimbus

apiVersion: intent.security.nimbus.com/v1
kind: SecurityIntent
metadata:
name: [intent-name]
namespace: [intent-namespace]
spec:
selector:
match:
any:
- resources:
names: [target-name]
kinds: [target-kind]
namespaces: [target-namespace]
matchLabels:
[key: value]
cel:
- xxxx
intent:
group: core
ID: blockAsset # Nobody can access below paths
params:
- path: /home/5gc/
23 changes: 23 additions & 0 deletions intents/core/5_blockRawSocket.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2023 Authors of Nimbus

apiVersion: intent.security.nimbus.com/v1
kind: SecurityIntent
metadata:
name: [intent-name]
namespace: [intent-namespace]
spec:
selector:
match:
any:
- resources:
names: [target-name]
kinds: [target-kind]
namespaces: [target-namespace]
matchLabels:
[key: value]
cel:
- xxxx
intent:
group: core
ID: blockRawSocket # No raw sockets can be accessed
24 changes: 24 additions & 0 deletions intents/template-intent.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2023 Authors of Nimbus

apiVersion: intent.security.nimbus.com/v1
kind: SecurityIntent
metadata:
name: [intent-name]
namespace: [intent-namespace]
spec:
selector:
match:
any:
- resources:
names: [target-name]
kinds: [target-kind]
namespaces: [target-namespace]
matchLabels:
[key: value]
cel:
- xxxx
intent:
group: oran/core
ID: protectFile, protectPort, ownerOnly, blockAsset, blockRawsocket
params:

0 comments on commit 91f9e12

Please sign in to comment.