I tried using a ConfigMap as labelstore. For testing purposes, it looked like this:
apiVersion: v1
kind: ConfigMap
metadata:
name: gp-multena-labels
data:
labels.yaml: |
/DevOps:
'#cluster-wide': true
During load, this was lowercased (see spf13/viper#260):
{"level":"debug","labels":{"/devops":{"#cluster-wide":true}},"time":1746542620}
But my Keycloak group is mixed case, as I put into the configmap, so I wasn't authenticated:
{"level":"trace","group":"/DevOps","time":1746542641,"message":"Group"}
{"level":"debug","user":"user@example.org","labels":[],"time":1746542641}
{"level":"trace","error":"no tenant labels found","time":1746542641,"message":"no tenant labels found"}
I see two fixes: Lowercase the groups from the token, too (effectively making groups case-insensitive, which might not be wanted) or use something else for parsing the labels.yaml
I tried using a ConfigMap as labelstore. For testing purposes, it looked like this:
During load, this was lowercased (see spf13/viper#260):
{"level":"debug","labels":{"/devops":{"#cluster-wide":true}},"time":1746542620}But my Keycloak group is mixed case, as I put into the configmap, so I wasn't authenticated:
{"level":"trace","group":"/DevOps","time":1746542641,"message":"Group"} {"level":"debug","user":"user@example.org","labels":[],"time":1746542641} {"level":"trace","error":"no tenant labels found","time":1746542641,"message":"no tenant labels found"}I see two fixes: Lowercase the groups from the token, too (effectively making groups case-insensitive, which might not be wanted) or use something else for parsing the labels.yaml