So as a bit of background we are consolidating several user data stores behind one IdP. We are using a Tomcat CombinedRealm to do &quot;fall-through&quot; authentication and populating roles based on the the realm the user authenticates against. For JNDI (LDAP) realms we are using the commonRole attribute to hard code this value. Here is an example:<br>
<br>  &lt;Realm className=&quot;org.apache.catalina.realm.CombinedRealm&quot; &gt;<br><br>      &lt;!-- Check Directory A--&gt;<br>      &lt;Realm className=&quot;org.apache.catalina.realm.JNDIRealm&quot;<br>             connectionURL=&quot;ldaps://<a href="http://a.example.edu:636">a.example.edu:636</a>&quot;<br>
             userPattern=&quot;uid={0},ou=a,dc=example,dc=edu&quot;<br>             userRoleName=&quot;eduPersonAffiliation&quot;<br>             commonRole=&quot;directoryA&quot; /&gt;<br><br>      &lt;!-- Check Directory B--&gt;<br>
      &lt;Realm className=&quot;org.apache.catalina.realm.JNDIRealm&quot;<br>             connectionURL=&quot;ldaps://<a href="http://b.example.edu:636">b.example.edu:636</a>&quot;<br>             userPattern=&quot;uid={0},ou=b,dc=example,dc=edu&quot;<br>
             userRoleName=&quot;eduPersonAffiliation&quot;<br>             commonRole=&quot;directoryB&quot; /&gt;<br><br>        &lt;!-- Check Database C, users in this database will have a role of &#39;directoryC&#39;--&gt;<br>
        &lt;Realm className=&quot;org.apache.catalina.realm.JDBCRealm&quot;<br>            connectionName=&quot;username&quot;<br>            connectionPassword=&quot;password&quot;<br>            connectionURL=&quot;jdbc:mysql://localhost:3306/directoryc_users&quot;<br>
            driverName=&quot;com.mysql.jdbc.Driver&quot;<br>            userTable=&quot;users&quot; userNameCol=&quot;user_name&quot; userCredCol=&quot;user_pass&quot;<br>            userRoleTable=&quot;user_roles&quot; roleNameCol=&quot;role_name&quot;/&gt;<br>
<br>  &lt;/Realm&gt;<br><br>Unfortunately there is no guarantee the usernames will be unique across all of the data stores.  Would a better approach in this situation be to create unique usernames via an external auth handler? Basically I&#39;m thinking of concatenating the username with the realm identifier: user@directoryA?<br>
<br>Thanks for the feedback,<br><br>--Nathan<br><br><div class="gmail_quote">On Wed, Dec 5, 2012 at 10:12 AM, Cantor, Scott <span dir="ltr">&lt;<a href="mailto:cantor.2@osu.edu" target="_blank">cantor.2@osu.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 12/5/12 9:46 AM, &quot;Nathan Mische&quot; &lt;<a href="mailto:nmische@gmail.com">nmische@gmail.com</a>&gt; wrote:<br>

&gt;<br>
&gt;We currently have a Shibboleth 2.5 IdP instance running on Tomcat 6 using<br>
&gt;container based authentication and the remote user login handler. We<br>
&gt;would like to expose the Tomcat principal&#39;s roles as attributes, is this<br>
&gt;possible?<br>
<br>
</div>Probably, but I wouldn&#39;t do that. Whatever you&#39;re using to populate the<br>
roles you should simply expose directly from the data source to the<br>
resolver. Leave the authentication step to produce a clear and simple<br>
username and that&#39;s all.<br>
<span class="HOEnZb"><font color="#888888"><br>
-- Scott<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
--<br>
To unsubscribe from this list send an email to <a href="mailto:users-unsubscribe@shibboleth.net">users-unsubscribe@shibboleth.net</a><br>
</div></div></blockquote></div><br>