TeslaGov / ngx-http-auth-jwt-module

Secure your NGINX locations with JWT
MIT License
309 stars 118 forks source link

Make `sub` claim optional (and perhaps others?) #66

Closed albertollamaso closed 2 years ago

albertollamaso commented 2 years ago

Hi guys, I am using your module and I'm wonder if we can made the sub claim optional?

This is the output in nginx error log when sending our JWT token:

2021/11/26 06:44:30 [error] 9#9: *14 the jwt does not contain a subject, client: 8.8.8.8, server: , request: "GET /secure-auth-header/ HTTP/1.1", host: "3.3.3.3:8000"
amarbs commented 2 years ago

@albertollamaso I would sugget to edit the summary of this issue to be more specific. Can we make it: "sub field in claim is mandatory. Require to make it optional for other use-cases."

JoshMcCullough commented 2 years ago

@albertollamaso sorry for the delay -- PR #70 adds a new option which you may specifically disabled to turn off this log message:

auth_jwt_extract_sub off