Alex Tuca
05/03/2023, 7:04 AMRob Crowe
05/03/2023, 7:21 AMAlex Tuca
05/03/2023, 8:12 AMRob Crowe
05/03/2023, 8:17 AMkid
(key id) that is in a claim in the JWT. Cerbos needs to use that ID to lookup the key, to check the signing signatureCharith (Cerbos)
05/03/2023, 8:22 AMincludeMeta
to the request to see details about which policy matched and so on. If you have policy tests, adding --verbose
to the test runner will give you a step-by-step evaluation record for the failed policies as well. Finally, you can load the policy into the Cerbos REPL and execute its rules with your inputs to see how they are evaluated. You can find more information about these tools in https://cerbos.dev/blog/how-to-use-cerbos-effectivelyAlex Tuca
05/03/2023, 8:29 AMCharith (Cerbos)
05/03/2023, 8:40 AMAlex Tuca
05/03/2023, 8:42 AMaudit:
accessLogsEnabled: true
backend: 'file'
decisionLogsEnabled: true
file:
path: stdout
auxData:
jwt:
keySets:
- id: ${KEY_KID} # kid claim from the JWT
local:
data: ${FUSION_SIGN_KEY}
pem: true
server:
httpListenAddr: ":3592"
storage:
driver: "disk"
disk:
directory: "/config/policies"
watchForChanges: true
logRequestPayloads: true
Charith (Cerbos)
05/03/2023, 8:46 AMauxData.keySetId
value sent in your request (number 16 in https://docs.cerbos.dev/cerbos/latest/api/index.html#check-resources)keySetId
in the request.Alex Tuca
05/03/2023, 8:57 AMCharith (Cerbos)
05/03/2023, 8:58 AMAlex Tuca
05/03/2023, 8:59 AM{"log.level":"error","@timestamp":"2023-05-03T08:59:17.969Z","log.logger":"cerbos.grpc","message":"Failed to extract auxData","grpc.start_time":"2023-05-03T08:59:17Z","system":"grpc","span.kind":"server","grpc.service":"cerbos.svc.v1.CerbosService","grpc.method":"CheckResources","peer.address":"192.168.112.1:58118","cerbos":{"call_id":"01GZGDCQJ91JC8WBGS52T48GWZ"},"error":"failed to parse JWT: key provider 0 failed: failed to find key with key ID \"a3RRnlKKn1hs9E9b_SzgBmgzS18\" in key set"}
Charith (Cerbos)
05/03/2023, 9:03 AMAlex Tuca
05/03/2023, 9:15 AMCharith (Cerbos)
05/03/2023, 9:21 AM/.well-known/jwks.json
on the server. (I am not a FusionAuth expert, so I could be wrong here.)Alex Tuca
05/03/2023, 9:35 AM