def _enumerate_saml_roles(self, assertion, saml_target_url): signin_page = self.get_signinpage(assertion, saml_target_url) """ using the assertion to fetch aws sign-in page, parse it and return aws sts creds """ role_pairs = [] root = ET.fromstring(base64.b64decode(assertion)) for saml2_attribute in root.iter('{urn:oasis:names:tc:SAML:2.0:assertion}Attribute'): if saml2_attribute.get('Name') == 'https://aws.amazon.com/SAML/Attributes/Role': for saml2_attribute_value in saml2_attribute.iter('{urn:oasis:names:tc:SAML:2.0:assertion}AttributeValue'): role_pairs.append(saml2_attribute_value.text) # build a temp hash table table = {} for role_pair in role_pairs: idp, role = None, None for field in role_pair.split(','): if 'saml-provider' in field: idp = field elif 'role' in field: role = field if not idp or not role: print('Parsing error on {}'.format(role_pair)) exit() else: table[role] = idp # init parser soup = BeautifulSoup(signin_page, 'html.parser') # find all roles roles = soup.find_all("div", attrs={"class": "saml-role"}) # Normalize pieces of string; result = [] # Return role if no Roles are present if not roles: role = next(iter(table)) idp = table[role] result.append(commondef.RoleSet(idp=idp, role=role, friendly_account_name='SingleAccountName', friendly_role_name='SingleRole')) return result for role_item in roles: idp, role, friendly_account_name, friendly_role_name = None, None, None, None role = role_item.label['for'] idp = table[role] friendly_account_name = role_item.parent.parent.find("div").find("div").get_text() friendly_role_name = role_item.label.get_text() result.append(commondef.RoleSet(idp=idp, role=role, friendly_account_name=friendly_account_name, friendly_role_name=friendly_role_name)) return result
def _enumerate_saml_roles(self, assertion, saml_target_url): """ using the assertion to fetch aws sign-in page, parse it and return aws sts creds """ role_pairs = [] root = ET.fromstring(base64.b64decode(assertion)) for saml2_attribute in root.iter( '{urn:oasis:names:tc:SAML:2.0:assertion}Attribute'): if saml2_attribute.get( 'Name') == 'https://aws.amazon.com/SAML/Attributes/Role': for saml2_attribute_value in saml2_attribute.iter( '{urn:oasis:names:tc:SAML:2.0:assertion}AttributeValue' ): role_pairs.append(saml2_attribute_value.text) # Normalize pieces of string; order may vary per AWS sample result = [] for role_pair in role_pairs: idp, role = None, None for field in role_pair.split(','): if 'saml-provider' in field: idp = field elif 'role' in field: role = field if not idp or not role: print('Parsing error on {}'.format(role_pair)) exit() else: result.append( commondef.RoleSet(idp=idp, role=role, friendly_account_name="", friendly_role_name="")) return result
def setUp(self): """Set up for the unit tests""" self.resolver = self.setUp_client(False) self.aws_signinpage = """ <!DOCTYPE HTML> <html> <head> <style type="text/css"> #loadingImage { margin: 10em auto; width: 234px; height: 238px; background-repeat: no-repeat; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOoAAADuBAMAAADFK4ZrAAAAMFBMVEUAAAAaGhoXFxfo6Og3NzdPT0/4+PgmJibFxcWhoaF8fHzY2NiysrJmZmaNjY1DQ0OLk+cnAAAAAXRSTlMAQObYZgAABlpJREFUeNrtnGnITFEYx5+a3Ox1TjRFPpxbGmSZsmfLliKy73RKZImaSVmy7xFJtmSLLFlHdrIklH3fhSyJLOEDQpak4865951znmfGUuf34f3w1u13/+c+d+a555w74HA4HA6Hw+FwOBwOh+P/Z8DBfec3be3WbdO2U3P2SPgTeA1WXmuT9n2fse9/Eq1vvUhCoYntWzfqu1DBfdZ+Yz0oKA0WpblgWYhE6+UFzBub+8ZnYfBE7z1QIIY9ZoJFICYuLUxZDbkhWBEkboVqPdrJNGwuWJGIz0nQiD3pPYMibcFy0j+jHTZN8LEZglTktvpfstOWFozxd4SkJvAOWdpj7DvVJE46uJNgRvh9ZVbU78RxQxzbwIzpo0Vl/AFG6l0Q5tbE2qyo3+mIsR7wmQWVJwWiYq3FOzEb+Jikioq2ekuYHfyOioq2NkkxS8qdVFGR1lJvmS18rFRRcVZVv+bEr6ioKOuQtwxB5STAAoa3LmEY+AcoIfDWEYKhqDVpAUNbvTUMSVuBsKqoaPDWh+zPW1VF6Pzsibmff6u3INI56su9Vz+4Pyqdb2vpFAuDi693Z9Ub9POJZ9+8rkzk1XokXFpuyyAJikHzbvh5tMbehg5u26laf3MiLfJmHSiYTuLuINDwDjQXOayUTwie2CghjP09clgptZTYLKNa1875sdYPk0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TRaUkwkqFd4e/YK0sCdar+Kh4a/WGb3HW8hJv5UfVy5lWxK8D3lodoDgq7IQkyqp64LopRNTFgLKqdj92Q1iX0jiJtKonm4Zp61LKANKqnmy8I7bWzYC2qoe4UhvsxvezJFirIt8yrjwJMFZ96+Ihi0tbbr29Us3A1wx0nebWm4CiVErfpRlbxTRytcyYd5lrQoDiZhVF+LWOZiJkQ+pgkw8LPn4GYIltEL5aolJpU7mlkwDPsCe9kiH/fc1zNDUqKQpPhp9MukhpgX50J3a+jR/pjN9MQmHwGl/1RcQTwSMJBSN2+n1Ku7yCj9ySgYJSe25X5ovgr0bd2imh0AxbueJ96tcvZI2aeO9FPfgjeI32nX2+qVu/TZuWHtw5CBwOh8PhcDgcDofD4XA4HP8i3wDmy/sFKv4WfAAAAABJRU5ErkJggg==); -webkit-animation:spin 4s linear infinite; -moz-animation:spin 4s linear infinite; animation:spin 4s linear infinite; } @-moz-keyframes spin { 100% { -moz-transform: rotate(360deg); } } @-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg); } } @keyframes spin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } } </style> </head> <body> <div id="loadingImage"></div> <script type="text/javascript"> var RegionFinder = (function() { function RegionFinder( location ) { this.location = location; } RegionFinder.prototype = { getURLWithRegion: function() { var isDynamicDefaultRegion = ifPathContains(this.location.pathname, "region/dynamic-default-region"); var queryArgs = removeURLParameter(this.location.search, "region"); var hashArgs = this.location.href.split("#")[1] || ""; if (hashArgs) { hashArgs = "#" + hashArgs; } var region = this._getCurrentRegion(); var newArgs = "region=" + region; if (_shouldAuth()) { newArgs = "needs_auth=true"; region = "nil"; } if (queryArgs && queryArgs != "?") { queryArgs += "&" + newArgs; } else { queryArgs = "?" + newArgs; } if (!region) { var contactUs = "https://portal.aws.amazon.com/gp/aws/html-forms-controller/contactus/aws-report-issue1"; alert("How embarrassing! There is something wrong with this URL, please contact AWS at " + contactUs); } var pathname = isDynamicDefaultRegion ? "/console/home" : this.location.pathname; return this.location.protocol + "//" + _getRedirectHostFromAttributes() + pathname + queryArgs + hashArgs; }, _getCurrentRegion: function() { return _getRegionFromHash( this.location ) || _getRegionFromAttributes(); } }; function ifPathContains(url, parameter) { return (url.indexOf(parameter) != -1); } function removeURLParameter(url, parameter) { var urlparts= url.split('?'); if (urlparts.length>=2) { var prefix= encodeURIComponent(parameter); var pars= urlparts[1].split(/[&;]/g); //reverse iteration as may be destructive for (var i= pars.length; i-- > 0;) { if (pars[i].lastIndexOf(prefix, 0) !== -1) { pars.splice(i, 1); } } url= urlparts[0]+'?'+pars.join('&'); return url; } else { return url; } } function _getRegionFromAttributes() { return "us-east-1"; }; function _shouldAuth() { return ""; }; function _getRedirectHostFromAttributes() { return "console.aws.amazon.com"; } function _getRegionFromHash( location ) { var hashArgs = "#" + (location.href.split("#")[1] || ""); var hashRegionArg = ""; var match = hashArgs.match("region=([a-zA-Z0-9-]+)"); if (match && match.length > 1 && match[1]) { hashRegionArg = match[1]; } return hashRegionArg; } return RegionFinder; })(); var regionFinder = new RegionFinder( window.location ); window.location.href = regionFinder.getURLWithRegion(); </script> </body> </html> """ self.saml = "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c2FtbDJwOlJlc3BvbnNlIHhtbG5zOnNhbWwycD0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOnByb3RvY29sIiB4bWxuczp4cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEiIERlc3RpbmF0aW9uPSJodHRwczovL3NpZ25pbi5hd3MuYW1hem9uLmNvbS9zYW1sIiBJRD0iaWQxNDI0NjkxOTY3Mzk3NTA5NDE1MjI0ODAxODciIElzc3VlSW5zdGFudD0iMjAyMC0xMS0yMFQxOTo1Nzo1Ny41MzlaIiBWZXJzaW9uPSIyLjAiPjxzYW1sMjpJc3N1ZXIgeG1sbnM6c2FtbDI9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDphc3N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L2F3cy5hbWF6b24uY29tL1NBTUwvQXR0cmlidXRlcy9Sb2xlU2Vzc2lvbk5hbWUiIE5hbWVGb3JtYXQ9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDphdHRybmFtZS1mb3JtYXQ6YmFzaWMiPjxzYW1sMjpBdHRyaWJ1dGVWYWx1ZSB4bWxuczp4cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEiIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhzaTp0eXBlPSJ4czpzdHJpbmciPmZpcnN0Lmxhc3RAbm93aGVyZS5jb208L3NhbWwyOkF0dHJpYnV0ZVZhbHVlPjwvc2FtbDI6QXR0cmlidXRlPjxzYW1sMjpBdHRyaWJ1dGUgTmFtZT0iaHR0cHM6Ly9hd3MuYW1hem9uLmNvbS9TQU1ML0F0dHJpYnV0ZXMvU2Vzc2lvbkR1cmF0aW9uIiBOYW1lRm9ybWF0PSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6YXR0cm5hbWUtZm9ybWF0OmJhc2ljIj48c2FtbDI6QXR0cmlidXRlVmFsdWUgeG1sbnM6eHM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hIiB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4c2k6dHlwZT0ieHM6c3RyaW5nIj40MzIwMDwvc2FtbDI6QXR0cmlidXRlVmFsdWU+PC9zYW1sMjpBdHRyaWJ1dGU+PC9zYW1sMjpBdHRyaWJ1dGVTdGF0ZW1lbnQ+PC9zYW1sMjpBc3NlcnRpb24+PC9zYW1sMnA6UmVzcG9uc2U+Cg==" self.roles = [] self.roles.append( commondef.RoleSet( idp='arn:aws:iam::012345678901:saml-provider/OKTA-IDP', role='arn:aws:iam::012345678901:role/testrole1', friendly_account_name='SingleAccountName', friendly_role_name='testrole1'))