IdentityServer4 icon indicating copy to clipboard operation
IdentityServer4 copied to clipboard

Question: Introspection endpoint for multitenant requests

Open vdecristofaro opened this issue 7 years ago • 4 comments

I am trying to use the sample available here.

Issue / Steps to reproduce the problem

With respect to the original code I have only changed/added the following

tokenRequest.Parameters.Add( "acr_values", "tenant:mytenant" );
var response = await client.RequestPasswordTokenAsync( tokenRequest );

Relevant parts of the log file

As you can see the Tenant parameter on the log is null

[09:54:02 INF] User authentication failed: ["invalid_username_or_password"], request details: 
{
    "ClientId": "roclient.reference", 
    "ClientName": "Introspection Client Sample", 
    "GrantType": "password", 
    "Scopes": "api1 api2.read_only", 
    "AuthorizationCode": null, 
    "RefreshToken": null, 
    "UserName": "user", 
    "AuthenticationContextReferenceClasses": null, 
    "Tenant": null, 
    "IdP": null, 
    "Raw": {"acr_values": "tenant:mytenant", "grant_type": "password", "username": "user", "password": "***REDACTED***", "scope": "api1 api2.read_only", "client_id": "roclient.reference", "client_secret": "***REDACTED***"}, 
    "$type": "TokenRequestValidationLog"
}

Is this correct?

vdecristofaro avatar Feb 14 '19 09:02 vdecristofaro

I suspect we're using the same model for that log entry for both authorization endpoint and token endpoint. The acr_values is only an authorization endpoint param, so we're not parsing/mapping it to our properties for our special acr_values values (tenant and idp).

brockallen avatar Feb 14 '19 13:02 brockallen

Thanks for your answer @brockallen. Just to be sure I've got your point. Do you mean that it is not correct to add the tenant parsing to the default TokenRequestValidator? In that case, how do I handle a request like this one in a multitenant environment? If instead my comprehension is wrong, do you want me to make a pull request to add parsing for basic properties (e.g. tenant and idp)?

vdecristofaro avatar Feb 19 '19 18:02 vdecristofaro

In that case, how do I handle a request like this one in a multitenant environment?

Not sure. We don't have a supported multitenant feature in our OSS, and I don't know enough about your requirements and your situation, and so that would be more of a consulting question.

brockallen avatar Apr 11 '19 13:04 brockallen

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jan 11 '20 16:01 lock[bot]