Provision Azure AD Users to wso2 identity server using SCIM - azure

In order to configure "Auto Provisioning" from Azure Active Directory to wso2 identity server/manager, Initial connection needed are as:- "Tenant Url" & "secret token".
Can you please let me know how to generate "Secret Token" in wso2 identity server and will it work with rest api for scim.
Ref: salesforce like application do provide secret token initially when account is setup.

You can use any authentication mechanism to authenticate with WSO2 Identity Server SCIM endpoints such as basic auth,oauth. Please refer [1] for basic auth.
[1] https://docs.wso2.com/display/IS570/SCIM+1.1+APIs

Related

Springboot+Oauth Client Credential Grant Flow with Azure AD

I am trying to protect my API (springboot+java) using Client Credential Grant flow with Azure AD as Authorization Server.
I have looked the internet but the examples I am finding is resource and authorization server in springboot.
Does anyone has any samples of how to secure API with Client Credential Grant Flow using Java Springboot and Azure AD?
Any help will be highly appreciated.
We use client credentials flow to get access token with the following steps. The access token is provided by Azure AD.
Try this sample with ClientCredentialsResourceDetails.

Azure API Management OAuth2 Configuration - Creating Authorization Service and ClientID/Secret

I'm enabling OAuth2 for my Azure API Management instance. I click Add to add OAuth2, and it's asking me to enter name, and description of authorization service, so my thinking is I am creating an authorization service here.
Why is it asking me to provide client id, client secret, resource owner user, and resource owner password. I understand the concepts of OAuth2 and how these are used, but I am setting up API Management to handle OAuth2 authorization, so the job of the Authorization server will be to validate authorization codes and client secrets. The clients will have their own Client IDs and Client Secrets. Resource Owner should be an Azure AD identity with it's own user name and password.
Why, when I am setting up the authorization server for API Management is it asking me to enter Client ID and Client Secret as well as Resource Owner credentials. It doesn't make sense to me. Can someone explain?
So....what gives? Am I in the wrong screen because API Management
APIM can't be used as OAuth server. The only reason at the moment to configure OAuth/OIDC server in APIM is to make sure it's included into exported specification of an API and that developer portal has a convenient UI to let users obtain tokens, nothing else. That's why it's expected to provide client id and secret, because APIM is effectively a client.
Step 1 : Choose an OAuth provider such as Auth0
Step 2 : Configure various OAuth scenarios as API's in your OAuth provider (API is the term Auth0 uses, other providers might refer to them with other terms)
Step 3 : Create APIM OAuth 2 records, filling in the fields in your question (client id, client secret). Create a record for each API you have configured in your OAuth provider (in Step 2).
Step 4 : In the APIM edit the details of the various API's choosing the appropriate OAuth record you setup in Step 3. Here you are choosing the OAuth scenario for each of your APIs. Many APIs may use the same scenario, but obviously an individual APIM API entry can only link to 1 OAuth scenario
Thus you have configured various APIs in the APIM against various OAuth scenarios. Usually the details behind the OAuth setup are invisible to the API and are so setup and exposed only by their ClientID, secret and urls for token and authorise.
Auth0 has a good tutorial for seting up Azure APIM: HERE
apim should have it's own identity. Have you created an app registration for the instance? The credentials from the app reg on aad used will identify apim and allow validation of the token.

Service Provider vs Identity Server in OAuth2 and Identity Server

Is there is any service provider in OAuth2 and OpenId Connect? Is Service Provider and Resource server are same or different? Whats the different? I heard Service Provider in SAML.
What is called Service Provider in SAML is called Relying Party in OpenID Connect, which is a comparable concept. OAuth 2.0 is not a federated SSO protocol like SAML is so comparing OAuth 2.0 terminology (i.e. Resource Server) with SAML doesn't work very well.

Azure ACS Service Identities with Certificate based Credentials

I am exposing a WCF Data Services hosted on IIS through Service Bus Relay using webHttpRelayBinding. While I could find out how to authenticate the service identity using username/password or shared secret. However, I could not find a sample how to use a certificate based credential for the service identity. I googled a lot, but in vain. All of them are based on shared secret primarily.
Could anyone please provide a sample on how to use the certificate based authentication of service identity for a REST OData service.
Currently, there are four options for authentication (according to the Service Bus docs):
•SharedSecret, a slightly more complex but easy-to-use form of
username/password authentication.
•Saml, which can be used to interact with SAML 2.0 authentication
systems.
•SimpleWebToken, which uses the OAuth Web Resource Authorization
Protocol (WRAP)and Simple Web Tokens (SWT).
•Unauthenticated, which enables interaction with the service endpoint
without any authentication behavior.
It does not look like you are able to authenticate using a certificate through Service Bus natively.

ADFS 2.0 with SharePoint not recognized as trusted application and throwing

I am configuring a POC for SharePoint with authentication to third party account provider and running into several issues and following the documentation provided by microsoft at http://technet.microsoft.com/en-us/library/cc731443(v=ws.10).aspx. Most of the documentation which I have seen are for ADFS 2.0 RTW
The issue is when I am a trying to the access the SharePoint site, I get redirected to the account provider ADFS site with NTLM prompt pop up. Once when I enter my credentials I get the following error
The token request for application with URL "https://spadfsweb.spdev.com/_layouts/Authenticate.aspx?Source=/" cannot be fulfilled because the URL does not identify any known trusting application.
Here is my setup
ADFS account provider (ADFS Role and DC are in separate machines)
Windows 2008 R2
ADFS role added
Has the following parameters for the ADFS
token signing certificate "sts.adfsaccount.spaccount.com"
Federation Service URI
urn:federation:accountprovider
Federation service endpoint url
https://sts.adfsaccount.spaccount.com/adfs/ls/
Exported the token signing certificate and imported that in resource partner ADFS
ADFS Resource Partner (ADFS role and DC are in separate machines)
Windows 2008 R2
ADFS role added
Has the following parameters for the ADFS
Token signing certificate "sts.staging.spresource.com"
Federation Service URI
urn:federation:resourceprovider
Federation service endpoint url
https://sts.staging.spresource.com/adfs/ls/
Has the following trusted application which is sharepoint
https://spadfsweb.spdev.com/_trust/, I have all sort of the combination like below
https://spadfsweb.spdev.com
https://spadfsweb.spdev.com/_layouts
Exported the token signing certificate and imported that into account partner ADFS
And below is the steps how I have configured the SharePoint site
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("C:\Data\Certs\stsadfsaccount_exporttokensign.cer")
New-SPTrustedRootAuthority -Name "Account Token Signing Cert" -Certificate $cert
$map = New-SPClaimTypeMapping -IncomingClaimType "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" -IncomingClaimTypeDisplayName "EmailAddress" -SameAsIncoming
$map2 = New-SPClaimTypeMapping -IncomingClaimType "http://schemas.microsoft.com/ws/2008/06/identity/claims/role" -IncomingClaimTypeDisplayName "Role" –SameAsIncoming
$ap = New-SPTrustedIdentityTokenIssuer -Name "Staging Provider"-Description "User account domain from adfs to provide authenitcation" -Realm "urn:federation:resourceprovider" -ImportTrustCertificate $cert -ClaimsMappings $map,$map2 -SignInUrl "https://sts.adfsaccount.spaccount.com/adfs/ls/" -IdentifierClaim http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress
---SharePoint has the uri of resource provider, signing certificate of the account partner and adfs url of the account partner
Please let me know if I am doing something wrong.
Thanks
Deepak
You seem to suggest you're using ADFS 1.0. And indeed, if you followed http://technet.microsoft.com/en-us/library/cc731443%28v=ws.10%29.aspx as you say, then you've configured ADFS 1.0, as opposed to the successor AD FS 2.0. In my opinion any new deployment should be using AD FS 2.0.
Your error message is described on the ADFS 1.0 troubleshooting page; quoting:
Condition: server error
Error: The token request for application with URL https://... cannot be fulfilled because the URL does not identify any known trusting application
Solution: This error is returned by the resource Federation Service when the application URL does not identify any known application. Make sure that the application has been added to the trust policy for the Federation Service. For more information about how to do this, see Complete the Add Applications Wizard.
For a claims-aware application, verify that the return URL is typed correctly in the application’s web.config file and that it matches the application URL that is specified in the trust policy of the Federation Service.
For a Windows NT token-based application, verify that the return URL is typed correctly on the ADFS Web Agent tab of IIS and that it matches the application URL in the trust policy of the Federation Service.
Also, in case you don't know already, for ADFS 1.0 Microsoft created the ADFS Diagnostic Tool; see this blog post to download. This tool might prove useful in tracking down this specific problem.
Hope this helps...

Resources