Skip to main content

A CLI tool to visualize AWS IAM relationships and answer permission queries

Project description

iam-explorer

codecov CI PyPI

iam-explorer is a Python CLI tool that builds and visualizes AWS IAM relationships between users, roles, policies, and more. It also allows you to query “which user or role can perform a specific action?” while considering role chaining, permission boundaries, and (eventually) Service Control Policies.

Features

  • Fetch IAM data (users, groups, roles, policies) via AWS APIs.
  • Build a graph representation of IAM resources and trust relationships.
  • Query effectively who can perform a specific action, considering role chaining.
  • Visualize the relationships using Graphviz-style diagrams.

Installation

To install from PyPI, simply run:

pip install iam-explorer

(Requires Python 3.10–3.13.)

Usage

Below are common commands you can run after installing:

# 1. Fetch IAM Data
iam-explorer fetch --profile my-aws-profile --region us-east-1

# 2. Build the Graph from fetched data
iam-explorer build-graph --input iam_data.json --output graph.pkl

# 3. Query who can do a specific action
iam-explorer query who-can-do s3:PutObject

# 4. Visualize the graph in DOT format
iam-explorer visualize --input graph.pkl --output iam_graph.dot

From there, you can convert the DOT file to PNG or other formats using:

dot -Tpng iam_graph.dot -o iam_graph.png

Contributing

We welcome contributions! Please see CONTRIBUTING.md for details on our development workflow, how to run tests, and how to submit pull requests.

License

This project is licensed under the terms of the Apache License.

Acknowledgments

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iam_explorer-0.1.0.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iam_explorer-0.1.0-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file iam_explorer-0.1.0.tar.gz.

File metadata

  • Download URL: iam_explorer-0.1.0.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for iam_explorer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 26e77f4e9896878bc6611efdc07d165083c1270e17e6ce48840963b483870f78
MD5 a4957bcdd2a2ae7a68240c46ba5c9c4b
BLAKE2b-256 31c9dd2af142580338c6728df157b28657604344264d0fa352fda00aeb39a489

See more details on using hashes here.

Provenance

The following attestation bundles were made for iam_explorer-0.1.0.tar.gz:

Publisher: ci.yaml on Saff-Buraq-Dev/iam-explorer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file iam_explorer-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: iam_explorer-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for iam_explorer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 adad893398d0dcc29e23e30b0154216f298cb656797522b6f6dc9802b469817f
MD5 ff0cc4dac10e6140ee74591563eed864
BLAKE2b-256 312ee53ab3a304d62c02ff1b50159604af6dba3d39859ef17966bc03d739cd48

See more details on using hashes here.

Provenance

The following attestation bundles were made for iam_explorer-0.1.0-py3-none-any.whl:

Publisher: ci.yaml on Saff-Buraq-Dev/iam-explorer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page