You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-94Lines changed: 10 additions & 94 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,34 +22,7 @@ It distinguishes between `initiator` and `target` of an action.
22
22
23
23
The Cloud Audit Data Federation (CADF) specification defines a model for events within the OpenStack platform.
24
24
This data model is used by the watcher middleware to classify requests.
25
-
More information is provided in the [documentation](./doc/cadf.md).
26
-
27
-
#### Classification
28
-
29
-
The following attributes are recorded and passed via the WSGI environment through the pipeline.
30
-
Moreover, this meta data is emitted as Prometheus metrics.
31
-
Note: The attributes in the environment are capitalized.
32
-
For example: `WATCHER.ACTION`, `WATCHER.INITIATOR_PROJECT_ID`, `WATCHER.TARGET_PROJECT_ID`, etc. .
33
-
34
-
-`action`: the CADF action
35
-
-`service`: the name of the service
36
-
37
-
**Initiator** attributes:
38
-
-`project_id`: the initiators project uid. `None` if domain scoped, `Unknown` if not authenticated.
39
-
-`domain_id`: the initiators domain uid. `None` if project scoped, `Unknown` if not authenticated.
40
-
-`user_id`: the initiators user id. `Unknown` if not authenticated.
41
-
-`host_address`: the initiators host address
42
-
43
-
44
-
**Target** attributes:
45
-
-`project_id`: the targets project uid. `Unknown` if it could not be determined.
46
-
-`type_uri`: characterizes the URI of the target resource
47
-
48
-
49
-
**Additional service specific attributes**:
50
-
51
-
- Swift (object-store):
52
-
-`target.container_id`: the name/id of the swift container. `None` if not relevant. `Unknown` if it could not be determined.
25
+
More information is provided in the [CADF documentation](./doc/cadf.md).
53
26
54
27
### Metrics
55
28
@@ -67,14 +40,16 @@ This middleware currently provides CADF-compliant support for the following Open
67
40
|-----------------------|-----------------------|
68
41
| Service name | Service type |
69
42
|-----------------------|-----------------------|
70
-
| Cinder | volume |
43
+
| Barbican | key-manager |
44
+
| Cinder | volume |
45
+
| Designate | dns |
71
46
| Glance | image |
47
+
| Ironic | baremetal |
48
+
| Keystone | identity |
49
+
| Manila | share |
72
50
| Neutron | network |
73
51
| Nova | compute |
74
52
| Swift | object-store |
75
-
| Designate | dns |
76
-
| Keystone | identity |
77
-
| Ironic | baremetal |
78
53
|-----------------------|-----------------------|
79
54
````
80
55
@@ -95,75 +70,16 @@ The watcher should be added after the keystone auth_token middleware to be able
95
70
pipeline = .. auth_token watcher ..
96
71
```
97
72
98
-
### WSGI configuration
73
+
### Configuration
99
74
100
-
Configuration options in the paste.ini as shown below
75
+
Mandatory configuration options in the paste.ini as shown below. See the [configuration section](./doc/configuration.md) for more options.
101
76
```yaml
102
77
[filter:watcher]
103
78
use = egg:watcher-middleware#watcher
104
79
# service_type as defined in service catalog. See supported services.
105
80
# example: object-store, compute, dns, etc.
106
81
service_type = <service_type>
107
-
```
108
-
Optional settings:
109
-
```yaml
82
+
110
83
# path to configuration file containing customized action definitions
111
84
config_file = /etc/watcher.yaml
112
-
113
-
# project id can be determined from either request path or service catalog if keystone.auth_token middleware is set to 'include_service_catalog = true'
114
-
# determine the project id from request path
115
-
project_id_from_path = true | false
116
-
# determine the project id from the service catalog
117
-
project_id_from_service_catalog = true | false
118
-
119
-
# per default the target.type_uri is prefixed by 'service/<service_type>/'
120
-
# if the cadf spec. requires a different prefix, it might be given here
121
-
# example: swift (object-store)
122
-
# service_type = object-store
123
-
# cadf_service_name = service/storage/object
124
-
cadf_service_name = <service_name>
125
-
126
-
# metrics are emitted via StatsD
127
-
statsd_host = 127.0.0.1
128
-
statsd_port = 9125
129
-
statsd_namespace = openstack_watcher
130
-
```
131
-
132
-
#### Configuration file
133
-
134
-
Additionally, the watcher might require a configuration file.
135
-
For existing services these can be found in the [examples](./etc).
136
-
More details are provided [here](./doc/cadf.md)
137
-
138
-
The following snippet provides an overview of configuration options for a service.
139
-
```yaml
140
-
# keywords in a request path are followed by the UUID or name of a resource.
141
-
# in the target type URI the UUID or name of a resource is replaced by the singular of the keyword.
142
-
# a custom value for the singular can also be provided by a mapping <plural>:<singular>
143
-
# moreover, if a path ends with a keyword the action will be 'read/list'
144
-
path_keywords:
145
-
- users
146
-
- tokens
147
-
- availability-zones: zone
148
-
..
149
-
150
-
# per default every word following a path keyword is replaced.
151
-
# however, exclusions can be configured by this list
152
-
path_exclusions:
153
-
- OS-PKI
154
-
- ..
155
-
156
-
# some request path' are quite hard to map to their target type URI as the replacements can't be derived from the previous part.
157
-
# thus, in some cases providing a mapping of <path_regex>: <target_type_URI> might be inevitable
158
-
# note: the complete path (including versions, etc. ) needs to be reflected in the regex
Copy file name to clipboardExpand all lines: doc/cadf.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,34 @@ The Cloud Audit Data Federation (CADF) specification defines a model for events
4
4
A comprehensive overview of OpenStack requests and their CADF representation can be found here: [Cloud Audit Data Federation - OpenStack Profile (CADF-OpenStack)](https://www.dmtf.org/sites/default/files/standards/documents/DSP2038_1.1.0.pdf).
5
5
The openstack-watcher-middleware follows DMTF specification DSP2038, version 1.1.0 as of 27 April 2015.
6
6
7
+
#### Classification
8
+
9
+
The following attributes are recorded and passed via the WSGI environment through the pipeline.
10
+
Moreover, this meta data is emitted as Prometheus metrics.
11
+
Note: The attributes in the environment are capitalized.
12
+
For example: `WATCHER.ACTION`, `WATCHER.INITIATOR_PROJECT_ID`, `WATCHER.TARGET_PROJECT_ID`, etc. .
13
+
14
+
-`action`: the CADF action
15
+
-`service`: the name of the service
16
+
17
+
**Initiator** attributes:
18
+
-`project_id`: the initiators project uid. `None` if domain scoped, `Unknown` if not authenticated.
19
+
-`domain_id`: the initiators domain uid. `None` if project scoped, `Unknown` if not authenticated.
20
+
-`user_id`: the initiators user id. `Unknown` if not authenticated.
21
+
-`host_address`: the initiators host address
22
+
23
+
24
+
**Target** attributes:
25
+
-`project_id`: the targets project uid. `Unknown` if it could not be determined.
26
+
-`type_uri`: characterizes the URI of the target resource
27
+
28
+
29
+
**Additional service specific attributes**:
30
+
31
+
- Swift (object-store):
32
+
-`target.container_id`: the name/id of the swift container. `None` if not relevant. `Unknown` if it could not be determined.
33
+
34
+
7
35
#### CADF actions
8
36
9
37
Actions characterize the operation performed by the initiator of a request against a target.
Configuration options in the paste.ini as shown below
4
+
```yaml
5
+
[filter:watcher]
6
+
use = egg:watcher-middleware#watcher
7
+
# service_type as defined in service catalog. See supported services.
8
+
# example: object-store, compute, dns, etc.
9
+
service_type = <service_type>
10
+
```
11
+
Optional settings:
12
+
```yaml
13
+
# path to configuration file containing customized action definitions
14
+
config_file = /etc/watcher.yaml
15
+
16
+
# project id can be determined from either request path or service catalog if keystone.auth_token middleware is set to 'include_service_catalog = true'
17
+
# determine the project id from request path
18
+
project_id_from_path = true | false
19
+
# determine the project id from the service catalog
20
+
project_id_from_service_catalog = true | false
21
+
22
+
# per default the target.type_uri is prefixed by 'service/<service_type>/'
23
+
# if the cadf spec. requires a different prefix, it might be given here
24
+
# example: swift (object-store)
25
+
# service_type = object-store
26
+
# cadf_service_name = service/storage/object
27
+
cadf_service_name = <service_name>
28
+
29
+
# metrics are emitted via StatsD
30
+
statsd_host = 127.0.0.1
31
+
statsd_port = 9125
32
+
statsd_namespace = openstack_watcher
33
+
```
34
+
35
+
#### Configuration file
36
+
37
+
Additionally, the watcher might require a configuration file.
38
+
For existing services these can be found in the [examples](./etc).
39
+
More details are provided [here](./doc/cadf.md)
40
+
41
+
The following snippet provides an overview of configuration options for a service.
42
+
```yaml
43
+
# keywords in a request path are followed by the UUID or name of a resource.
44
+
# in the target type URI the UUID or name of a resource is replaced by the singular of the keyword.
45
+
# a custom value for the singular can also be provided by a mapping <plural>:<singular>
46
+
# moreover, if a path ends with a keyword the action will be 'read/list'
47
+
path_keywords:
48
+
- users
49
+
- tokens
50
+
- availability-zones: zone
51
+
..
52
+
53
+
# per default every word following a path keyword is replaced.
54
+
# however, exclusions can be configured by this list
55
+
path_exclusions:
56
+
- OS-PKI
57
+
- ..
58
+
59
+
# some request path' are quite hard to map to their target type URI as the replacements can't be derived from the previous part.
60
+
# thus, in some cases providing a mapping of <path_regex>: <target_type_URI> might be inevitable
61
+
# note: the complete path (including versions, etc. ) needs to be reflected in the regex
0 commit comments