Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AWSApiModule] Fixed sts_client.assume_role arguments #36163

Merged
merged 15 commits into from
Sep 10, 2024

Conversation

michal-dagan
Copy link
Contributor

@michal-dagan michal-dagan commented Sep 6, 2024

Contributing to Cortex XSOAR Content

Make sure to register your contribution by filling the contribution registration form

The Pull Request will be reviewed only after the contribution registration form is filled.

Status

  • In Progress
  • Ready
  • In Hold - (Reason for hold)

Related Issues

fixes: link to the issue

Description

  • The region was missing from the AWS STS client configuration, causing authentication failures when assuming a role.
  • When using Gov AWS account the user needs to set the STS PrivateLink URL parameter according to the service endpoints: https://docs.aws.amazon.com/general/latest/gr/sts.html
  • Updated gsm - ticket

Must have

  • Tests
  • Documentation

Copy link

github-actions bot commented Sep 6, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
Packs/AWS-AccessAnalyzer/Integrations/AWS-AccessAnalyzer
   AWS-AccessAnalyzer.py142795%13, 27–28, 30, 54, 56, 157
Packs/AWS-Athena/Integrations/AWS-Athena
   AWS-Athena.py1022971%27, 52, 57, 60, 66, 69, 72, 83, 87, 106–108, 111, 137–138, 140–141, 144–145, 195, 201, 203, 218–219, 221–222, 224–226
Packs/AWS-EC2/Integrations/AWS-EC2
   AWS-EC2.py1991167615%24–25, 36–42, 44, 49, 55–58, 60, 64–66, 70–72, 76–81, 85–96, 98, 103, 155–156, 173–179, 181–183, 185, 190–191, 193–194, 197, 202–206, 208–210, 215, 225–233, 235, 237–238, 240–246, 257–259, 262–263, 265–266, 268–272, 282–293, 295, 297–298, 300–301, 307, 309–313, 323–326, 328–335, 337, 339–340, 342–343, 350–358, 361–367, 377, 379–381, 383–388, 390, 392–393, 395–396, 402–412, 415–416, 418, 428, 430–432, 434–441, 443, 445–452, 464–466, 470–476, 486, 488–490, 492–495, 497, 499–506, 514–516, 519–525, 535, 537–539, 541–546, 548, 550–557, 567–569, 573–579, 589, 591–593, 595–598, 600, 602–603, 609, 619, 621–623, 625–628, 630, 632–635, 645–647, 651–657, 667, 669–671, 673–676, 678, 680–683, 694–696, 700–706, 716, 718–720, 722–727, 729, 731–734, 743–745, 749–755, 765, 767, 769–770, 776, 785, 787–788, 790–797, 799–800, 806, 816–818, 820–823, 829, 831–834, 836, 848–850, 854–861, 870–874, 881–883, 888–891, 893, 895, 902, 911, 913–916, 921, 923–924, 926–931, 933–934, 936–939, 941, 955–957, 959, 972–973, 977–980, 985–989, 994–998, 1003–1007, 1012–1016, 1021–1025, 1030–1032, 1034–1049, 1055, 1057–1060, 1062, 1073–1079, 1083, 1092, 1094, 1099–1104, 1111–1112, 1114, 1127, 1129, 1131–1136, 1138–1143, 1150–1151, 1153, 1166–1170, 1175–1177, 1181–1210, 1212–1219, 1221–1222, 1226–1227, 1231–1232, 1236–1237, 1241–1242, 1245–1246, 1251–1252, 1256–1257, 1259–1266, 1278–1280, 1283–1289, 1299–1308, 1310–1312, 1317–1326, 1328–1330, 1335–1344, 1346–1348, 1353–1362, 1364–1366, 1371–1384, 1386–1388, 1393–1406, 1408–1410, 1415–1418, 1420–1429, 1432–1433, 1441–1445, 1449–1454, 1463–1464, 1469–1470, 1476, 1485–1490, 1492–1495, 1529, 1558–1562, 1564–1568, 1570–1574, 1583, 1591, 1603, 1609–1613, 1615, 1617–1621, 1623, 1628–1629, 1632–1634, 1636–1637, 1639–1640, 1642–1649, 1654–1656, 1661–1668, 1670–1671, 1676, 1686–1688, 1692–1697, 1699–1700, 1705, 1715–1725, 1727, 1729–1730, 1732–1738, 1749–1751, 1754–1755, 1757–1761, 1771–1773, 1775–1776, 1781, 1791–1793, 1795–1796, 1801, 1811–1815, 1820, 1822–1827, 1833, 1846–1851, 1856–1859, 1861–1864, 1869, 1871–1875, 1877–1884, 1886–1887, 1889–1892, 1897–1898, 1900–1901, 1903–1904, 1906, 1913–1916, 1929–1930, 1937–1950, 1952–1955, 1960–1961, 1963–1964, 1966–1967, 1969–1971, 1974–1975, 1978–1979, 1982–1985, 1988–1989, 1993–1994, 1996–1998, 2001–2002, 2005–2006, 2009–2010, 2014–2015, 2017–2018, 2020–2023, 2026–2027, 2030–2031, 2035–2036, 2038, 2040–2045, 2048–2053, 2057–2062, 2066–2071, 2075–2080, 2084–2089, 2093–2094, 2096–2097, 2099–2101, 2104–2105, 2108–2109, 2112–2113, 2116–2117, 2119–2120, 2122–2123, 2125–2126, 2128–2129, 2131–2132, 2134–2141, 2146–2149, 2152–2154, 2163–2173, 2175, 2177–2179, 2185, 2187–2189, 2195, 2197–2201, 2210–2222, 2224, 2226–2228, 2230, 2247–2249, 2252, 2254–2258, 2268–2280, 2282, 2284–2285, 2287–2289, 2296–2298, 2303–2307, 2317–2325, 2328–2329, 2332–2333, 2336–2337, 2340–2341, 2343, 2345, 2350, 2355–2357, 2359, 2361, 2363–2368, 2370–2373, 2375–2376, 2382–2394, 2396–2405, 2407–2442, 2446–2447, 2451–2452, 2456–2457, 2461–2462, 2466–2467, 2471–2476, 2478–2487, 2492–2498, 2502–2503, 2505–2511, 2514–2521, 2523–2525, 2529–2531, 2534–2535, 2538–2539, 2542–2543, 2546–2547, 2551–2552, 2554–2555, 2557–2558, 2560, 2562–2564, 2572–2579, 2588–2596, 2598–2600, 2608, 2610–2614, 2623–2625, 2627–2632, 2634–2638, 2640–2643, 2645–2646, 2648–2657, 2659–2662, 2667–2672, 2674–2677, 2682–2685, 2687–2690, 2695–2698, 2700–2703, 2708–2711, 2713–2716, 2721–2729, 2731, 2733–2736, 2740–2742, 2745–2747, 2751–2752, 2754–2758, 2768–2787, 2789–2796, 2800–2801, 2803–2806, 2820, 2829, 2831–2832, 2834–2844, 2846–2847, 2849, 2858–2863, 2868, 2870–2873, 2875, 2877–2878, 2885–2887, 2907, 2909, 2911, 2913, 2948, 2950, 2952, 2954, 2987, 2994, 2996, 3034, 3036, 3038, 3040, 3042, 3044, 3046, 3048, 3050, 3072, 3074–3075, 3077, 3079–3081, 3083–3085, 3087–3088, 3090–3091, 3093–3094, 3096–3097, 3099–3100, 3102–3103, 3105–3106, 3108–3109, 3111–3112, 3114–3115, 3117–3118, 3120–3121, 3123–3124, 3126–3127, 3129–3130, 3132–3133, 3135–3136, 3138–3139, 3141–3142, 3144–3145, 3147–3148, 3150–3151, 3153–3154, 3156–3157, 3159–3160, 3162–3163, 3165–3166, 3168–3169, 3171–3172, 3174–3175, 3177–3178, 3180–3181, 3183–3184, 3186–3187, 3189–3190, 3192–3193, 3195–3196, 3198–3199, 3201–3202, 3204–3205, 3207–3208, 3210–3211, 3213–3214, 3216–3217, 3219–3220, 3222–3223, 3225–3226, 3228–3229, 3231–3232, 3234–3235, 3237–3238, 3240–3241, 3243–3244, 3246–3247, 3249–3250, 3252–3253, 3255–3256, 3258–3259, 3261–3262, 3264–3265, 3267–3268, 3270–3271, 3273–3274, 3276–3277, 3279–3280, 3282–3283, 3285–3286, 3288–3289, 3291–3292, 3294–3295, 3297–3298, 3300–3301, 3303–3304, 3306–3307, 3309–3310, 3312–3314
Packs/AWS-EKS/Integrations/AWSEKS
   AWSEKS.py1342184%52, 136, 170–172, 174, 234, 272–274, 276, 350, 400–406, 408–409
Packs/AWS-GuardDuty/Integrations/AWSGuardDuty
   AWSGuardDuty.py3791695%12–13, 37–38, 40, 260, 345, 378, 380, 382, 390, 394, 419, 441, 445, 715
Packs/AWS-GuardDuty/Integrations/AWSGuardDutyEventCollector
   AWSGuardDutyEventCollector.py75297%13, 35
Packs/AWS-IAM/Integrations/AWS-IAM
   AWS-IAM.py2364182%15–18, 20, 41, 400, 872, 879, 911, 918, 968–970, 972, 1001–1002, 1032–1033, 1063–1064, 1092–1093, 1106, 1109, 1112–1113, 1169–1170, 1198–1199, 1227–1228, 1246–1248, 1289–1290, 1295–1297
Packs/AWS-IAMIdentityCenter/Integrations/AWSIAMIdentityCenter
   AWSIAMIdentityCenter.py2571195%28–29, 38, 59, 117–118, 127, 210, 656, 662, 664
Packs/AWS-Lambda/Integrations/AWS_Lambda
   AWS_Lambda.py33521336%29, 92–98, 100, 104, 110–113, 115, 119–120, 124, 144–148, 155–156, 158–163, 165, 167–169, 171–174, 176–185, 187, 195–198, 200–202, 209–211, 213–215, 220–222, 224–227, 234, 236–238, 240–242, 247–251, 253–256, 261–268, 273–289, 294–301, 303–304, 314, 318–321, 323–325, 330–334, 347–352, 354–356, 374, 428, 474, 517, 644–647, 649, 735–737, 742–757, 759, 762–800, 802–803
Packs/AWS-Organizations/Integrations/AWSOrganizations
   AWSOrganizations.py2096170%10–11, 130, 175–176, 416–417, 682–684, 686, 688, 690–734, 736, 738–740
Packs/AWS-Route53/Integrations/AWSRoute53
   AWSRoute53.py1162875%21–24, 26, 38–39, 79–80, 115–116, 155–156, 174–175, 205–206, 228–229, 256–257, 263–266, 268, 271–272
Packs/AWS-S3/Integrations/AWS-S3
   AWS-S3.py1453973%21, 32–35, 37, 47, 49, 51, 53, 55, 57, 59, 117, 135, 138–139, 141, 151, 153, 167, 171–172, 176, 179, 181–183, 188, 191–193, 198–199, 227, 230–233
Packs/AWS-SNS/Integrations/AWSSNS
   AWSSNS.py1513676%33, 56–57, 166–172, 177–187, 189, 198–199, 201, 204–210, 216, 218, 220–221
Packs/AWS-SQS/Integrations/AWS-SQS
   AWS-SQS.py18113823%6, 17, 25–28, 30–31, 33–34, 36–37, 41–48, 50–51, 53–54, 58–59, 63–66, 68–69, 73–78, 80–81, 83–84, 88–112, 114–117, 119–120, 124–127, 129–130, 134–137, 139–140, 144–152, 187–189, 213–214, 218–224, 229–242, 244, 253–254, 256, 259–268, 274, 276, 278–279
Packs/AWS-SecurityHub/Integrations/AWSSecurityHubEventCollector
   AWSSecurityHubEventCollector.py771185%12–13, 79, 91, 139, 154–155, 158, 167–168, 193
Packs/AWS-SecurityHub/Integrations/AWS_SecurityHub
   AWS_SecurityHub.py2838569%485–486, 488, 554–555, 641, 645, 652–658, 662, 666–677, 681–689, 698–701, 715–716, 718, 740, 751–752, 754–759, 763, 792–799, 801–806, 829, 839–840, 843–845, 873, 886, 927–928, 995–997, 1004, 1009–1012
Packs/AWS-SecurityLake/Integrations/AWSSecurityLake
   AWSSecurityLake.py1462980%27, 54–55, 57, 78, 80, 98, 103, 106, 112, 115, 118, 130, 135, 154–156, 159, 184, 190, 192, 207–208, 210–215
Packs/AWS_SystemManager/Integrations/AWSSystemManager
   AWSSystemManager.py38510971%11–13, 188–189, 258, 279, 385–388, 523, 617–618, 684, 746–747, 823, 895, 955, 1044, 1081, 1085, 1089, 1093, 1156, 1160, 1165, 1198, 1209, 1256, 1332, 1334–1336, 1339, 1387, 1408–1409, 1412, 1415, 1425–1426, 1468, 1475, 1502–1503, 1507–1510, 1512–1518, 1521–1522, 1524, 1531, 1533, 1546, 1548–1549, 1551–1576, 1578–1594
Packs/AWS_WAF/Integrations/AWSWAF
   AWSWAF.py3108672%11–12, 184, 258, 280, 296, 381–382, 387, 396, 398, 445, 447–450, 452, 498, 500, 556, 574, 623, 625, 681, 699, 744, 820, 822, 838, 840, 842–843, 845, 851, 853, 859, 861, 863–864, 866, 872, 874, 880, 882, 884–885, 887, 893, 895, 901, 903–905, 907, 913, 915, 921–925, 927, 933, 935, 941, 943–946, 948, 954, 957, 963, 965, 967–968, 970, 976, 979, 985, 987, 989–990, 992, 998, 1000
Packs/ApiModules/Scripts/AWSApiModule
   AWSApiModule.py951881%57, 71, 74–76, 78–79, 99, 101, 104, 106, 111–112, 115–116, 173, 195–196
Packs/Aws-SecretsManager/Integrations/AwsSecretsManager
   AwsSecretsManager.py991881%25–28, 30, 37, 41, 43–44, 70, 72, 74, 76, 78, 117, 119, 127, 162
TOTAL5848267454% 

Tests Skipped Failures Errors Time
265 0 💤 0 ❌ 0 🔥 36.216s ⏱️

@michal-dagan michal-dagan changed the title fix [AWSApiModule] Fixed sts_client.assume_role arguments Sep 8, 2024
@michal-dagan michal-dagan marked this pull request as ready for review September 8, 2024 06:50
@michal-dagan michal-dagan added docs-approved ForceMerge Forcing the merge of the PR despite the build status and removed ForceMerge Forcing the merge of the PR despite the build status labels Sep 9, 2024
@michal-dagan michal-dagan merged commit a08ace8 into master Sep 10, 2024
13 checks passed
@michal-dagan michal-dagan deleted the fix-issue-region-name branch September 10, 2024 08:04
xsoar-bot pushed a commit to xsoar-contrib/content that referenced this pull request Sep 10, 2024
* fix

* update rn

* update docker

* trigger build - update secrets

* Update Packs/ApiModules/Scripts/AWSApiModule/AWSApiModule.yml

revert update docker

* Bump pack from version AWS-EC2 to 1.4.13.

* fix TPBs

* update docker

---------

Co-authored-by: Content Bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants