getting a JWT access token using audience parameter
272 views
Skip to first unread message
Mark Nuttall-Smith
unread,
Nov 10, 2018, 9:19:06 AM11/10/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to dex-dev
Hi,
I'm investigating using Dex+LDAP/AD as a replacement for an existing Auth0 set up.
As per the Auth0 recommendations, we use access token to secure API's rather than ID Tokens. Including the audience URL parameter to the /authorize endpoint causes Auth0 to return a JWT access token valid for this API ("aud" field set)
My question is - does Dex work in the same way? I can't see any way to set the audience parameter in the example-app code.
Thanks, Mark
Eric Chiang
unread,
Nov 12, 2018, 11:00:58 AM11/12/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to marknutt...@gmail.com, dex...@googlegroups.com
The audience ("aud") claim of the ID token is always the client ID
that logged in the user (with a few exceptions[1]). If you're using a
public IdP like Google, you want to check "aud" to ensure a trusted
client logged in the user instead of some other client also registered
with Google.
Dex doesn't use access tokens because it doesn't have an API to
interact with. Is just returns a random string.
I think that warning is specific to Auth0 (what access tokens contain
isn't standardized). The core concern when using any kind of token
authentication is that the remote endpoint gets a copy of the token
and can use it to impersonate you. If you're using tokens to
authenticate, ensure that they're scoped to the endpoint your
accessing, and/or that you trust that endpoint.