<div dir="ltr"><div><div><div>I ran into the same problem as we have 10 distinct AWS accounts that users have access to. I did this by creating multiple instances of the Role attribute with the different account numbers. <br><br></div>i.e. <br><resolver:AttributeDefinition id="awsRolesAcct1" xsi:type="ad:Mapped" sourceAttributeID="memberOf"><br> <resolver:Dependency ref="myLDAP"/><br> <resolver:AttributeEncoder<br> xsi:type="enc:SAML2String"<br> name="<a href="https://aws.amazon.com/SAML/Attributes/Role">https://aws.amazon.com/SAML/Attributes/Role</a>" friendlyName="Role" /><br> <ad:ValueMap><br> <ad:ReturnValue>arn:aws:iam::111111111111:saml-provider/Shibboleth,arn:aws:iam::111111111111:role/$1</ad:ReturnValue><br> <ad:SourceValue>CN=AWS-([^,]*),.*</ad:SourceValue><br> </ad:ValueMap><br></resolver:AttributeDefinition><br><br><resolver:AttributeDefinition id="awsRolesAcct2" xsi:type="ad:Mapped" sourceAttributeID="memberOf"><br> <resolver:Dependency ref="myLDAP"/><br> <resolver:AttributeEncoder<br> xsi:type="enc:SAML2String"<br> name="<a href="https://aws.amazon.com/SAML/Attributes/Role">https://aws.amazon.com/SAML/Attributes/Role</a>" friendlyName="Role" /><br> <ad:ValueMap><br> <ad:ReturnValue>arn:aws:iam::222222222222:saml-provider/Shibboleth,arn:aws:iam::222222222222:role/$1</ad:ReturnValue><br> <ad:SourceValue>CN=AWS-([^,]*),.*</ad:SourceValue><br> </ad:ValueMap><br></resolver:AttributeDefinition><br><br></div><div>I listed all the custom attributes in the attribute filter for AWS. I then have users do an IdP initiated sign on, and AWS presents the user with a list of roles / accounts they have access to. <br></div><br></div><div>HTH,<br></div>-Matt<br><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 4, 2017 at 11:57 AM, Cantor, Scott <span dir="ltr"><<a href="mailto:cantor.2@osu.edu" target="_blank">cantor.2@osu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 10/4/17, 11:52 AM, "users on behalf of Jason Rotunno" <<a href="mailto:users-bounces@shibboleth.net">users-bounces@shibboleth.net</a> on behalf of <a href="mailto:jrotunno@swarthmore.edu">jrotunno@swarthmore.edu</a>> wrote:<br>
<br>
> We have some other AWS accounts that I'd like to integrate with Shib as well, and I'm trying to figure out how to populate the<br>
> awsRoles attribute with different account numbers based on which AWS account is being accessed.<br>
<br>
</span>Amazon has one entityID for the entire platform and a standard request is not going to differentiate accounts. I suppose you could bake in something proprietary into the system to signal this but that's heavy work that would have involve webflow customization if not even deeper manipulation of the system.<br>
<br>
The Amazon design is that you send everything in all cases, all accounts, and all roles. It's their limitation. I haven't seen any compelling reason to waste my time on it. What exactly are you trying to avoid doing? Do you really expect a given user to be accessing hundreds of accounts?<br>
<span class="HOEnZb"><font color="#888888"><br>
-- Scott<br>
<br>
<br>
--<br>
To unsubscribe from this list send an email to <a href="mailto:users-unsubscribe@shibboleth.net">users-unsubscribe@shibboleth.<wbr>net</a><br>
</font></span></blockquote></div><br></div>