-
Notifications
You must be signed in to change notification settings - Fork 148
Description
Description:
After a succesful login with SAML for a user stored in a seconday user store I am trying to query the attributes of the user from the IdP since there is a dynamic attribute that may change.
Although the validation of the query partially succeeds in SAMLSubjectQueryValidator.validateSubject()
the user store that is loaded is the primary userstore, so UserStoreManager.isExistingUser()
returns false since the user is unknown in the primary datastore of a tenant, causing the entire query to fail with Unknown subject.
Suggested Labels:
Suggested Assignees:
Affected Product Version: 5.9.0
OS, DB, other environment details and versions:
org.wso2.carbon.identity.inbound.auth.saml2
running version is 5.6.14
Steps to reproduce:
- Create a secondary user datastore with appropriate connections. In my example the secondary datastore is connecting to a MySQL instance.
- Create a Service Provider
- Login to the service provider using a user stored in a secondary datastore.
- Retrieve nameId from the assertion response and try to execute an AttributeQuery for that nameId
Related Issues:
The org.wso2.carbon.identity.query.saml bundle seems to be completely unaware of any secondary user datastores. The primary datastore is used for every operation. This applies to both tenants and super tenant.
The AttributeQuery is executed using SAMLAttributeQueryRequestClient
from saml-query-profile-client
from samples-is version 4.2.1.
Complete SAML response - request can be provided in case they are needed.