-
Notifications
You must be signed in to change notification settings - Fork 719
Problems migrating from Identity Server 3 to Identity Server 4 (4.0.4) - Broken introspect endpoint? #4742
Comments
Not sure. I just tested it with our RO Console sample (I changed it to use reference tokens), and here's the result from introspection:
Notice it's So, I'd suggest try to repro with our samples and then match what's different in your solution. |
I found the issue and fixed it - I had to define a scope in the On another note, could you please help clear out the difference between an From what I've gathered, both serve the same purpose, i.e identity resources are scopes, in which you can define and group a lot of claims. What's the distinguishing aspect of an |
There also seems to be some weird behavior that doesn't make much sense. If I have defined an Why didn't it work as it did before, by simply supplying the Are we even using the name of an |
Here are our docs: https://identityserver4.readthedocs.io/en/latest/topics/resources.html |
Thanks! It seems that an identity resource is a thing tied specifically to identity tokens. Nowhere in the page you linked is that ever mentioned, hence the major confusion. What about the above-mentioned problems with wrapping a whole |
Yea, that's something we generally expect people to know from the protocols. |
No worries, we cleared that out of the equation. The elephant in the room right now is the weird wrapping. Perhaps @leastprivilege can answer that? |
I don't know/follow what you're trying to do with ApiResources. I'd suggest not using them at all unless you have a protocol reason to do so. |
Okay, let's define the following Configuration:
Previously this would've worked. When you require the identity provider to issue an access token for the specific resource, the client would just supply the name of the Now, it doesn't. You need to wrap all of the Scopes present in the For better clarity, here is a working variant in Identity Server 4.0.3:
|
In your first config above, https://leastprivilege.com/2020/06/18/resource-access-in-identityserver4-v4-and-going-forward/ |
I've read it, but I still don't understand the correct way of doing what we previously could do in identity server 3 (first config). It definitely can't be like in my second configuration. That'd be super great! EDIT: Basically the issue I'm experiencing is how to make it so that when a client requests access to an |
You want to reject requests for scopes unless all scopes that are configured for that |
Yes, I think I figured it out: EDIT: Seems that |
Seems I had some misunderstanding. There's no way to avoid this. Thank you for your help and time @brockallen! ❤️ |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Uh oh!
There was an error while loading. Please reload this page.
I couldn't find a documentation with all the breaking changes, nor any newly added features.
I understood that in the old version, when hitting the token endpoint (to get access/refresh tokens), you could supply the key "scope" with the list of scopes, or supply it as "scopes" and both worked, whereas in the new version only "scopes" now works.
Now I'm stuck at the introspect endpoint. When I hit it, it always returns "isActive": "false" as a response.
I've debugged and it correctly reads the token from the database, but why it returns that 24/7 of the time (if my data is correct) - I don't know. It should return data for the token,as it's not expired.
The token read from the database has all the fields correctly assigned, I even checked if its caused due to an expiration in the date we're saving, but it's not that. Its type is correctly set to "reference_token", the only fields that have no value/are null, are the newly added in
PersistedGrant
object properties -Description
,SessionId
,ConsumedTime
.I'm using the resource owner password grant.
My configuration features a simple
ApiResource
declared with a secret, as well as a list ofClient
objects configured to my liking.Example client configuration:
The endpoint is being tested by Postman (not API)
EDIT: Just for info - when using JWT instead of reference tokens, everything works correctly.
The text was updated successfully, but these errors were encountered: