Skip to content
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

Validating User Api Access from Database #3102

Open
cdeveloper10 opened this issue Sep 8, 2024 · 4 comments
Open

Validating User Api Access from Database #3102

cdeveloper10 opened this issue Sep 8, 2024 · 4 comments

Comments

@cdeveloper10
Copy link

Description

I recently integrate Wso2 APIM With Identity Server 4 and Want To Access To Backend API with Identity server 4 as Token manager
the full configuration is done but when wso2 wants to check user's API access runs this Query in Database :

exec sp_executesql N'SELECT AM_APPLICATION.UUID, AM_APPLICATION_KEY_MAPPING.APPLICATION_ID,AM_APPLICATION_KEY_MAPPING.CONSUMER_KEY,AM_APPLICATION_KEY_MAPPING.KEY_TYPE,AM_KEY_MANAGER.NAME AS KEY_MANAGER,AM_APPLICATION_KEY_MAPPING.STATE FROM AM_APPLICATION_KEY_MAPPING,AM_KEY_MANAGER,AM_APPLICATION WHERE AM_KEY_MANAGER.UUID = AM_APPLICATION_KEY_MAPPING.KEY_MANAGER AND AM_APPLICATION_KEY_MAPPING.APPLICATION_ID = AM_APPLICATION.APPLICATION_ID AND AM_APPLICATION_KEY_MAPPING.CONSUMER_KEY = @p0 AND AM_KEY_MANAGER.NAME = @p1 AND AM_KEY_MANAGER.ORGANIZATION IN ( @p2 , @p3 )',N'@p0 varchar(8000),@p1 varchar(8000),@p2 varchar(8000),@p3 varchar(8000)','null','IS4_2','carbon.super','WSO2/System'

as you can see there is 'null' value as parameter @p0 assigned to AM_APPLICATION_KEY_MAPPING.CONSUMER_KEY

i want to know why this parameter has 'null' value because the Client_id in the claim exists and there is also the Client_id in the Identity server Introspect service

Steps to Reproduce

1 - Generate Client in the Dev portal for Identity server 4
2 - Generate Access token with first step Credential
3- Call Wso2 APIM Services that users Subscribed to

Affected Component

APIM

Version

4.3

Environment Details (with versions)

No response

Relevant Log Output

No response

Related Issues

No response

Suggested Labels

No response

@AnuGayan
Copy link

Could you please verify the API Manager and IS product versions that you are trying out?

@cdeveloper10
Copy link
Author

Wso2 apim 4.3.0

@AnuGayan
Copy link

You have mentioned that you use an Identity Server as well, What would be the version of that. I believe it's a WSO2 Identity Product.

@cdeveloper10
Copy link
Author

Thank for your Response
The Problem Is Solved
I Noticed That Each Key Manager Type That Define in Wso2 Admin Console Has Its Own Subscription Validation Model.

At First I Used KeyClock as Key Manager Type And Then I Tried Wso2 Identity Server 7 To Link With Identity Server 4 And Now Everything Works Just Fine with Wso2 Identity Server 7 as Key Manager Type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants