Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
 
Answered
SAML SSO: using email address as subject principal - is it safe?

Dear Q2 Staff:

We are implementing an SSO flow using Q2 as identity provider (SAML 2.0).

We are using the user email address as subject principal in the SAML response. It is the email that drives the uniquess of the identity.

We noticed that a user can modify his/her email address freely in "Total Access" (bank website). Settings > Profile.
Is the behavior the same in PRD? or does Q2 verify the email before a user changes his/her email?

We are concerned that a user may use another user's email and sso as the another user.

If the email is not verified, can you please recommend an attribute that uniquely and safely identifies a user?
Would self.online_user.user_id work?

Thank you.

Sample paylod:

 <saml:Subject>
        <saml:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient">john.smith@bankofkennesaw.com</saml:NameID>
        <saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
            <saml:SubjectConfirmationData NotOnOrAfter="2022-02-01T23:30:50Z"
                                          Recipient="https://login-duo.dev.deluxe.com/sso/saml2/0oa20c66vvopLHxRF1d7"
                                          />
        </saml:SubjectConfirmation>
    </saml:Subject>
Votes Newest

Answers


Hey Vito,

Good question! The user can freely edit their email on the profile page without any verification. So, like you mentioned I would not use the email as a primary identifier. The user_id value would be safe to use if the system you are integrating with is not multi-tenant, or if the SAML response had another identifier to distinguish between differing financial institutions.

If you are wanting a globally unique indentifer then I would suggest creating a guid, and storing that value within the database.

Below is an example of returning a SSO response and returning a user level config object. What this will do is store the key/value pairs into a table called Q2_ThirdPartyData. Any data stored for this vendor and user will be passed back to you on subsequent SSO requests and could be used within the SAML response.

ul_config_list = [UserLevelConfig('saml_principal', guid)]
ul_config = sso_response.UserLevelConfigList(self.vendor_id, ul_config_list)
response = Q2SSOResponse(ResponseType.HTML, response=html, user_level_config_list=ul_config)

Hope this helps!
Jason

Posted 4 years ago
Jason Herbert
104 × 1 Administrator
0

Thank you for your answer.

In order to avaoid a trip to the db, we have decided to use "aba + user_id" (which will be unique)

— Vito De Gennaro   4 years ago