Skip to content

Commit d5d2428

Browse files
authored
Update the openldap tutorial (#795)
* Fix stackablectl stacklet list command * Simplify instruction * Simplify instruction * Update instructions * Update rego rule syntax
1 parent 879e76f commit d5d2428

File tree

2 files changed

+20
-11
lines changed

2 files changed

+20
-11
lines changed

modules/tutorials/examples/ldap-auth/trino-opa-bundle-snippet.yaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,26 @@ data:
22
trino.rego: |
33
package trino
44
5-
import future.keywords.in
6-
75
default allow = false
86
9-
allow {
7+
allow if {
108
is_alice
119
}
12-
extended[i] {
10+
11+
batch contains i if {
1312
some i
1413
input.action.filterResources[i]
1514
is_alice
1615
}
1716
18-
is_alice() {
17+
batch contains i if {
18+
some i
19+
input.action.operation == "FilterColumns"
20+
count(input.action.filterResources) == 1
21+
input.action.filterResources[0].table.columns[i]
22+
is_alice
23+
}
24+
25+
is_alice() if {
1926
input.context.identity.user == "alice"
2027
}

modules/tutorials/pages/authentication_with_openldap.adoc

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,12 @@ to learn more.
4242
Before starting to add configuration to your Stackable cluster, inspect what the command above has set up in your
4343
Kubernetes cluster.
4444

45-
Use `stackablectl stacklets list` to find the endpoints of Superset and Trino and open their web interfaces in the
45+
Use `stackablectl stacklet list` to find the endpoints of Superset and Trino and open their web interfaces in the
4646
browser.
4747

48-
You can log into Superset with user _admin_ and password _adminadmin_, and into Trino with user _admin_ and password
49-
_adminadmin_.
48+
You can log into both Superset and Trino with user `admin` and password `adminadmin`.
5049

51-
These are the current users defined in Superset's and Trino's internal user management. Later you will see that these users cannot be used for authentication anymore after LDAP authentication has been enabled.
50+
These _admin_ users are defined in Superset's and Trino's internal user management. Later you will see that these users cannot be used for authentication anymore after LDAP authentication has been enabled.
5251

5352
=== OpenLDAP Stack
5453

@@ -211,7 +210,10 @@ Now deploy the updated superset cluster:
211210
[source,bash]
212211
include::example$ldap-auth/40-modify-superset.sh[tag=apply-superset-cluster]
213212

214-
Connect to superset as before, and try logging in again with username _admin_ and password _adminadmin_, Superset will not accept these credentials anymore. You now have to use LDAP credentials to log in. The OpenLDAP you installed earlier comes with two users, _alice_ (password _alice_) and _bob_ (password _bob_). Log in with any of these users and Superset will accept.
213+
Connect to superset as before (logout if you still had a valid session from earlier), and try logging in again with username _admin_ and password _adminadmin_, Superset will not accept these credentials anymore.
214+
You now have to use LDAP credentials to log in.
215+
The OpenLDAP you installed earlier comes with two users, _alice_ (password _alice_) and _bob_ (password _bob_).
216+
Log in with any of these users and Superset will accept.
215217

216218
[#trino]
217219
=== Add LDAP configuration to Trino
@@ -315,7 +317,7 @@ Fetch the snippet as before:
315317
[source,bash]
316318
include::example$ldap-auth/70-modify-trino-opa-bundle.sh[tag=get-yaml]
317319

318-
Apply this patch:
320+
Update the ConfigMap to look like the below:
319321

320322
[source,yaml]
321323
----

0 commit comments

Comments
 (0)