-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add service to service guide #3411
base: main
Are you sure you want to change the base?
Conversation
qa: Service to service
qa: Service to service
Edit: Service-To-Service OAuth
Sending this to @mark-robustelli for review. |
@sixhobbits does the documentation that @mooreds point to, help clear things up? If not, what do you need from us here? |
@mark-robustelli - no, the docs did not resolve this. we need confirmation on our understanding of how to use the introspect endpoint as we could not get that working as expected.
So we need either A) some help in using introspect correctly to verify the token without passing the client secret |
The reason that you can't look at JWT signatures for all OAuth servers is that not all access tokens are JWTs. JWT as a standard was published in 2015 (7519), whereas OAuth 2.0 was published in 2012 (6749). Introspect was published in 2015 as well (7662). The OAuth2 standard explicitly says that
Hopefully that sets the table a bit. Now let's talk about how FusionAuth implements introspect.
I'm not sure I understand this paragraph. I believe that 7662 is implemented correctly, but of course would love to hear about where I am wrong. When you are using introspect, you (some kind of resource server, typically) have received an access token. You don't know if it is valid. So you are are trying to validate it by communicating with the server that issued it. I'm not sure what you mean about the key, because there is no key in the introspect request. What am I missing? According to the spec:
This is why we require the client id and the client secret by default. However, there are application level settings (the Also, I would expect that most services would be running on a server, so would have the ability to properly and securely store a client secret, so I don't see why requiring it by default would be problematic. |
@sixhobbits , can you work of this or do you need anything else to move this forward? |
@mooreds - thanks for this and sorry for what seems to have come from a misunderstanding on our part. @mark-robustelli - this should be all we need, just need some time to figure it all out and do hopefully a small rework on that section. we'll shout if we need more help on this one. |
We had some questions while doing this one, as the introspect endpoint didn't work as we expected.
We posted this forum post and received some clarification on one point from @mooreds - but are still not clear if Fusionauth is implementing the introspect endpoint in a standard way, or we don't understand how to correctly use it.
The original draft of this article had the following paragraph which explains our understanding of what introspect should do and how it doesn't work that way in Fusionauth. We removed it as it's either a bug in Fusionauth or a misunderstanding on our part.
@mooreds maybe you have a quick insight here on the following as you responded on the forum before about the second point?
A Better Way To Verify A Token — Introspection
Verifying a token by manually looking at JWT signatures, as the code above does, is not standard in OAuth. Instead, all OAuth servers should allow anyone to verify a token by passing the token to the standard
introspect
endpoint. Example code to do this is given below.Unfortunately, FusionAuth does not implement this endpoint correctly. In the code above, you have to send the customer's secret key along with the token to be verified. But the server is the one that wants to verify the key, and the server doesn't have access to the customer's secrets. So the server can't verify any access tokens with this endpoint, as it should be able to. If you try passing the server's secret key to FusionAuth it doesn't work either.