简体   繁体   中英

Why my SSO is not working whenIntegrating Azure AD with WSO2 API Manager

let me try to explain the context:

I'm trying to integrate Azure AD as the key manager for WSO2 Api Manager by following an existing tutorial written by athiththan11 .

I run the Wso2 Apim (wso2/wso2am:4.1.0) on my local machine with a container of an image (containing the AzureAD Key Manager Jar) via Docker.

After creating a test application on the Devportal and suscribed it to a test Api created on the Publisher, I generate the keys: Azure AD Key generation on Devportal

But then, the problem I get is that I don't get the consumer key and secret generated for the selected application on the PRODUCTION environment as you can see here:

No consumer key and secret generated

Here are the logs:

Logs

Thank you in advance for any help or hint

The Azure AD KM extension is under development, however, it can be used up to an extent to work with the API Manager. The source code in the main branch has the POM.xml pointed to the versions of the API Manager 3.2.0.

Hence, update this pom.xml#L164 with the following version to comply with API Manager 4.1.0 and build the extension as instructed.

<carbon.apimgt.version>9.20.74</carbon.apimgt.version>

Regarding the Consumer Key and Secrets, once you have subscribed to the API with an Application, under the Applications section, open the Application and navigate to the Azure AD KM tab. Click on Generate Keys if you haven't already generated any Keys for that Application to generate the Consumer Key and Secrets.

Furthermore, under the Try-out page, the API Manager will not show any Consumer Key or Secret. And it is required to generate the Access Token using the generated Consumer credentials to try out the API from the Try-out view in the API Manager. When generating the Access Token against the Azure AD, you have to pass the default scope: https://graph.microsoft.com/.default . The Token request to generate an Access Token with Azure AD will be as follows

curl -k -X POST https://login.microsoftonline.com/<azure-tenant-id>/oauth2/v2.0/token -d "grant_type=client_credentials&scope=https://graph.microsoft.com/.default" -H"Authorization: Basic <consumer-credentials>"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM