Skip to content

Commit 429587c

Browse files
authored
Enable OPA decision logs in end-to-end-security demo (#86)
* Enable OPA decision logs in end-to-end-security demo * Add TODO
1 parent 1a6a46d commit 429587c

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

docs/modules/demos/pages/end-to-end-security.adoc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This demo will:
1313
** *Spark*: A multi-language engine for executing data engineering, data science, and machine learning. This demo uses it to create a (rather simple) report and write the results back into the persistence.
1414
** *HDFS*: A distributed file system that is designed to scale up from single servers to thousands of machines, each offering local computation and storage.
1515
** *Hive metastore*: A service that stores metadata related to Apache Hive and other services. This demo uses it as metadata storage for Trino and Spark.
16-
** *Open policy agent (OPA)*: An open-source, general-purpose policy engine unifies policy enforcement across the stack. This demo uses it as the authorizer for Trino, which decides which user can query which data.
16+
** *Open policy agent (OPA)*: An open-source, general-purpose policy engine unifies policy enforcement across the stack. This demo uses it as the authorizer for Trino and HDFS, which decides which user can query which data.
1717
** *Superset*: A modern data exploration and visualization platform. This demo utilizes Superset to retrieve data from Trino via SQL queries and build dashboards on top of that data.
1818
* Configure security to showcase the following features
1919
** Column- and row-level filtering
@@ -125,3 +125,8 @@ Access control at the row level has been implemented on the employee table, wher
125125
about themselves, as well as people who report to them.
126126

127127
image::e2e-sophia-employee.png[]
128+
129+
=== Decision logging (aka audit log)
130+
131+
The OPA server logs every single request it receives along with the decision it took to STDOUT.
132+
This gives you an audit log across the whole Data Platform.

stacks/end-to-end-security/opa.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ spec:
2121
adminRealm: demo
2222
userRealm: demo
2323
servers:
24+
config:
25+
logging:
26+
containers:
27+
opa:
28+
loggers:
29+
decision:
30+
level: INFO
2431
roleGroups:
2532
default:
2633
replicas: 1

stacks/end-to-end-security/trino-policies.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ data:
172172
"procedures": [],
173173
}
174174
175+
# TODO: Once 24.11 is out, switch to https://github.com/stackabletech/opa-operator/pull/580 instead of doing the
176+
# http call itself
175177
extra_groups := groups if {
176178
request := {
177179
"method": "POST",

0 commit comments

Comments
 (0)