Package: jmpr
jmprWhat this is?Tooling to permit AWS account navigationHow does it work?But seriously, it does some cool stuff in really cool ways...How do I use it?To get started using jmpr install via pip:pip install jmpr.(You may need topip install boto3 pyyamlto preinstall the dependencies)To run jmpr usejmpr -y yourfile.ymlUse the following gitlab-ci.yml configuration to run in a GitLab CI/CD Pipeline:Deploy Test:stage:deploybefore_script:-pip install . --quietscript:-jmpr -y test.yamlAWS Organization ConfigurationTODO: EXPLAIN HOW TO SETUP THE AWS ORGS CONFIGAWS Account ConfigurationTODO: EXPLAIN HOW TO CONFIGURE AWS ACCOUNTS TO BE USED. BOTH ORG ACCOUNTS AND NON ORG ACCOUNTSYour jmpr Manifest Filejmpr accepts yaml files as input. These files define your entire authentication infrastructure. Including Accounts, Roles, Users, and Policies.Example Usersusers:-name:testuseradditional_path:"something"cloud:AWStarget_roles:-account:540253368830role_name:ROLE-ADMINregion:us-west-2-account:879397242692role_name:ROLE-DEV-account:611424868009role_name:ROLE-NEW-ROLE-account:333422963795role_name:ROLE-BILLING-account:355841365103role_name:ROLE-BILLINGExample Rolesroles:-name:ROLE-ADMINimport:-arn:aws:iam::aws:policy/AdministratorAccess-name:ROLE-ROimport:-arn:aws:iam::aws:policy/ReadOnlyAccess-arn:aws:iam::aws:policy/job-function/Billing-name:ROLE-BILLINGimport:-arn:aws:iam::aws:policy/job-function/Billing-name:ROLE-FOOimport:-arn:aws:iam::aws:policy/ReadOnlyAccess-arn:aws:iam::aws:policy/job-function/BillingExample Accountsaccounts:test_acct_1:account_number:616552976502test_acct_2:name:My Accountaccount_number:426276006285color:ffbd05default_region:us-east-1test_acct_3:name:Your Accountaccount_number:343074669674color:225f91default_region:us-east-2purge:falseallowed_roles:-admin-ro-billing'420355987158':name:No One's AccountFor more examples please seetest.yml.Developer Notes:To work on this project the following two commands will be your best friendspip install . --no-deps- Quickly install the local repo via pip without worring about dependenciesjmpr -y test.yaml- Runs jmpr on the test yaml file that is designed to exersize the yaml parserThe core library file iscloudassets.py.The jmpr cli configuration iscli.pyNote on paths:AWS IAM fetch and create are carried out only using the name of an entity (user, group, role) by a client associated with an account.  Path does not play into AWS IAM entity retrieval or creation.Paths are embedded in resulting entity ARN's, and ARNs are used to relate entities to each other, for instance in an 'assume role policy'.  In addition, paths can be used in policies to include or exclude.So:Entities (users, roles, etc.) with the same name and different paths will collideEntities specified with an ARN that does not include the correct path will not be properly referenced.Maintaining and managing YAML or JSON ARNs including path is likely to introduce frequent errors and failures.In consequence, the jmpr approach constructs entities in the way that they are fetched, by account and name, retaining any path information as decoration.When ARNs are needed for a call, the ARN is constructed dynamically in code from the attributes of the entity, which can include the path decoration.  This ensures consistent ARNs.Initially in early release entity paths are guaranteed consistent and all equal to the asset_path, but in later releases entity-specific paths may be introduced so long as they are not embedded in ARNs.For More InformationRoadmapTestsDeveloped ineGT LabsbyeGlobalTechaTetraTechCompanyLicensejmpr - Python tooling to enable and manage AWS account navigationCopyright (C) 2019eGlobalTechThis program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.You should have received a copy of the GNU General Public License
along with this program.  If not, seehttps://www.gnu.org/licenses/.