Service Provider with issuer not registered - wso2-identity-server

I tried creating a service provider with issuer carbonServer in Identity server carbon console.
I tried enabling SAMLSSO Authenticator in authenticators.xml at /repository/conf/security/ directory
When I start the service and access the carbon console I get this error.
SAML 2.0 based Single Sign-On
Error when processing authentication request!
Please try login again!
In the logs I get this error
ERROR {org.wso2.carbon.identity.sso.saml.validators.SPInitSSOAuthnRequestValidator} - A SAML Service Provider with the Issuer 'IS_MGT_CONSOLE' is not registered. Service Provider should be registered in advance
The registered Service Provider name is IS_MGT_CONSOLE and issuer is carbonServer.
Any idea what could the reason for this error and the Issuer in the error getting listed as Service Provider?

Please check 'ServiceProviderID' in authenticators.xml -> SAML2SSOAuthenticator. By default it is 'carbonServer' and it should be same as Issuer value in (Inbound Authentication Configuration) --> (SAML SSO Configuration).
I suspect even though you registered SAML issuer as carbonSever, SAML auth request come as IS_MGT_CONSOLE. You should be able to correct it by modifying 'ServiceProviderID' to carbonSever

Related

Error while editing SP : Could not add Service Provider. You might be entering a duplicate Service Provider

We are getting following error when we try to edit service provider: Could not add Service Provider. You might be entering a duplicate Service Provider
Steps Followed
Created service provider
Trying to update Inbound Authentication Configuration --> SAML2 Web SSO Configuration --> Configure
Update
We are using version wso2is-5.1.0.
Depending on the version of WSO2 you are using, this was a bug that infrequently came up when the entry for the SAML provider persisted after the Service Provider that used it was deleted. There's a URL that is not documented in the interface where you can fix this. After logging into the interface, go to this URL:
https://yourhost:yourport/carbon/sso-saml/manage_service_providers.jsp
and you should be able to delete the offending SAML provider and configure the service provider.

How to TO provide access to the same service provider for different tenants users in WSO2 IS?

I have created 2 tenants in WSO2 identity server.
We need to deploy a sample application to which users belonging to both the tenants should have access to using SAML 2.0.
Please suggest how the sample application can be configured as service provider in WSO2 Identity Server to achieve this requirement.
Assuming that the above is done, we would also like to know how the application can identify which User belongs to which tenant once the login is successful? is this some information that would be passed in SAML response ?
You can create the service provider in SaaS mode. With this configuration, service provider will be visible to all the tenants in the Identity Server. You can find how to configure a SaaS application from the documentation at [1]
If you want to return the tenant domain with the subject identifier in the saml response, you can enable 'Use tenant domain in local subject identifier' in 'Local & Outbound Authentication Configuration' of the service provider. More information is available in [2].
[1] https://docs.wso2.com/display/IS510/Configuring+a+Service+Provider#ConfiguringaServiceProvider-Addingaserviceprovider
[2] https://docs.wso2.com/display/IS510/Configuring+Local+and+Outbound+Authentication+for+a+Service+Provider
is olso needed to put in the url the query param for select the right tenant, I modifyed the urls in the metadata.xml generated from the WS2 IS from someting like this:
https://your-domain:9443/samlsso
to
https://your-domain:9443/samlsso?tenantDomain=tenant-name
And use this metadata.xml in the SP
Otherwise when the SP send the saml message the IS will geneate the log "Service Provider with the issuer 'xxx' is not registered." if your SP is not registered in the super tenant
WSO2 IS 5.10

WSO2 Identity Server supports service provider initiated SSO in SAML?

I found docs about IDP intitiated SSO in WSO2 IS. But haven't found anything about service provider initiated SSO.
Consider the scenario in which a local IS is used as a service provider which is connected to several externally hosted SAML IDP for outbound authentication.
Am I able to trigger a SP initiated login to one specific external IDP with a static link? Ideally with a relay state attribute which is evaluated after successful SAML sign on process.
I am using WSO2 IS 5.0.0 - but hints for 5.1.0 would also be appreciated.
IDP initiated login.
https://localhost:9443/samlsso?spEntityID=(Your SP Issuer ID)&fidp=(Your Home Realm Identifier if you have multiple IDP's)
https://localhost:9443/samlsso?spEntityID=myspissueid&fidp=myidp
OR
If you only have one IDP or don't need to skip selection page.
https://localhost:9443/samlsso?spEntityID=myspissueid
I believe if you get the fidp parameter in the SAML authnrequest then that will do the trick for the SP initiated one.
considering IDP is running over localhost
IDP init SSO : https://localhost:9443/samlsso?spEntityID=yourSPEntityName
SP init SSO: https://localhost:9443/samlsso

WSO2 Identity Server 5.0 - Can't perform single logout

Whenever I perform logout in one of my service providers I always get the same error message:
Not a valid SAML 2.0 Request Message!
The message was not recognized by the SAML 2.0 SSO Provider. Please check the logs for more details.
Let's take salesforce for example... I have tried configuring it with https://myidpdomain:9443/samlsso and https://myidpdomain:9443/samlsso?wa=wsignout1.0 in the "Identity Provider Logout URL" setting.
The same with zendesk...
To both these service providers I have enabled the single logout checkbox in the SAML Inbound Authentication configuration.
The single sign on works fine.
Are you using SAML2 SSO Web browser or Passive STS ? In SAML2 SSO web browser profile, you can not send wa=wsignout1.0 for logout. It is not valid. Therefore above error has been generated. wa=wsignout1.0 is used in Passive STS profile not in SAML2 SSO. If you are using /samlsso end point in WSO2IS, It means that your are using SAML2 SSO. Therefore, you must send a proper logout request to the /samlsso end point. If you need to get more idea about SSO logout with SAML2 SSO, Please go through this.

how to modify service provider SAML2 Web SSO Configuration

WSO2 IS: 5.0.0 with service pack
documentation: https://docs.wso2.com/display/IS500/Configuring+Single+Sign-On+with+SAML+2.0
I added the travelocity.com service provider according the document.
run http://localhost:8080/travelocity.com and got authentication error. So I tried to check and modify inbound Authentication Configuration > SAML2 Web SSO Configuration, all I see is "Configure" link. Click the link, it shows "New Service Provider" page with "Register" and "Cancel" buttons. If I click Register button, I got duplicate service provider error. Does the UI support modifying SAML2 Web SSO Configuration?
I then deleted the Service Provider and add the travelocity.com service provider from scratch. However, I got duplicate service provider error too when I configure 'SAML2 Web SSO Configuration'
I am stuck. How can I get rid of duplicate service provider error?
Probably, you may have configured an another SAML2 SSO configuration with same issuer name. You can browse the registry and go to the /_system/config/repository/identity/SAMLSSO location and delete the SAML2 SSO configuration that can be found there. Then retry again.
If not, you can try with some other issuer name and see.. As in doc,then you need to provide a new issuer name in the travelocity.com application.
SAML.IssuerID=travelocitynew.com
Then in the SAML2 SSO configuration of the WSO2IS, you can create the configuration with new issuer name which is travelocitynew.com
If you try with fresh WSO2IS SP1, we can not see this issue.
The document missed one step: click 'Update' button to save whole configuration after clicking Register button new SAML2 Web SSO Configuration. Anyway, I believe it still a bug in the web console of WSO2IS.
What I did is to reinstall WSO2IS+service pack from scratch and configure it again.