Metadata-Version: 2.4
Name: oci-policy-analysis
Version: 6.3.1
Summary: OCI Policy Analysis
Author: Andrew Gregory
License: UPL-1.0
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: Universal Permissive License (UPL)
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE.txt
License-File: NOTICE.txt
Requires-Dist: oci==2.168.0
Requires-Dist: deepdiff==8.5.0
Requires-Dist: antlr4-python3-runtime==4.13.2
Provides-Extra: core
Provides-Extra: ui
Provides-Extra: web
Requires-Dist: fastapi>=0.110; extra == "web"
Requires-Dist: uvicorn>=0.29; extra == "web"
Requires-Dist: itsdangerous>=2.2; extra == "web"
Provides-Extra: mcp
Requires-Dist: fastmcp==2.12.5; extra == "mcp"
Provides-Extra: all
Requires-Dist: fastapi>=0.110; extra == "all"
Requires-Dist: uvicorn>=0.29; extra == "all"
Requires-Dist: itsdangerous>=2.2; extra == "all"
Requires-Dist: fastmcp==2.12.5; extra == "all"
Provides-Extra: docs
Requires-Dist: sphinx>=7; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=3; extra == "docs"
Requires-Dist: myst-parser>=2; extra == "docs"
Requires-Dist: sphinxcontrib-mermaid>=2; extra == "docs"
Provides-Extra: commit
Requires-Dist: pipdeptree>=2.30.0; extra == "commit"
Requires-Dist: pre_commit>=4.5.0; extra == "commit"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Dynamic: license-file

# OCI Policy Analysis

Analyze OCI IAM policies, compartments, identity domains, groups, users, and dynamic groups from a desktop app, web app, CLI, or MCP server. The tool is read-only: it analyzes data but does not change your tenancy.

## Quick start

Choose the path that fits you:

- **Desktop:** local, single-user visual analysis.
- **Web:** browser-based access, locally or for a team.
- **CLI:** scripting, exports, and automation.
- **MCP:** use OCI policy data with an MCP client.

### Easiest: download an application

Download the latest macOS or Windows application from the [Releases page](https://github.com/agregory999/oci-policy-analysis/releases). If your operating system asks for approval, allow the downloaded application to run.

### Install with pip

You need Python 3.12 or later. Create and activate a virtual environment:

```bash
python -m venv .venv

# macOS/Linux
source .venv/bin/activate

# Windows PowerShell
.venv\Scripts\Activate.ps1
```

Install only the mode you intend to use:

```bash
# Desktop application (requires a working Tkinter installation)
python -m pip install oci-policy-analysis

# Browser-based web server
python -m pip install "oci-policy-analysis[web]"

# Command-line interface
python -m pip install oci-policy-analysis

# MCP server
python -m pip install "oci-policy-analysis[mcp]"
```

Start the selected mode:

```bash
oci-policy-analysis-ui                 # Desktop
oci-policy-analysis-web                # Web: open http://127.0.0.1:8000
oci-policy-analysis-cli --help         # CLI
oci-policy-analysis-mcp --help         # MCP
```

For the desktop app, confirm Tkinter works before starting if needed - one time test:

```bash
python -m tkinter
```

## Choose your data source

You do **not** have to connect this tool to a live tenancy.

- **Live OCI load:** requires an OCI user/API-key profile, session token, instance principal, or resource principal **and** IAM permissions granted to that principal. Before loading a tenancy, complete [Authentication and principals](docs/source/setup.md#authentication-and-principals) and [Permissions required](docs/source/setup.md#permissions-required).
- **Offline CIS compliance import:** import the directory of OCI CIS Compliance output files instead. This lets you analyze the supplied data without the tool connecting to your tenancy. In the desktop or web app, choose **Load Compliance Data**; from the CLI, use:

  ```bash
  oci-policy-analysis-cli --load-from-compliance /path/to/compliance_csv_output
  ```

  See the [CLI guide](docs/source/cli.md) for expected files and options.

## More help

The [full documentation](https://agregory999.github.io/oci-policy-analysis) covers mode-specific setup, OCI authentication and permissions, CIS compliance imports, web hosting, CLI and MCP usage, troubleshooting, architecture, and API reference.

## License and support

Licensed under UPL-1.0.

This is not an Oracle-supported application. It uses supported OCI Python SDK calls and is designed to request the minimum access needed to read and analyze the selected data.
