replimap 0.4.1__tar.gz → 0.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {replimap-0.4.1 → replimap-0.4.2}/PKG-INFO +1 -1
- {replimap-0.4.1 → replimap-0.4.2}/replimap/__init__.py +1 -1
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/license.py +6 -1
- {replimap-0.4.1 → replimap-0.4.2}/replimap/licensing/crypto/keys.py +1 -1
- {replimap-0.4.1 → replimap-0.4.2}/replimap/licensing/manager.py +179 -43
- {replimap-0.4.1 → replimap-0.4.2}/replimap/licensing/secure_models.py +10 -1
- {replimap-0.4.1 → replimap-0.4.2}/replimap/licensing/verifier.py +20 -1
- {replimap-0.4.1 → replimap-0.4.2}/.gitignore +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/LICENSE +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/MANIFEST.in +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/README.md +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/docs/assets/demo.gif +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/docs/history/README.md +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/pyproject.toml +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/api.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/audit/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/audit/apra_cps234_mapping.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/audit/checkov_runner.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/audit/classifier.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/audit/engine.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/audit/exporters.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/audit/fix_suggestions.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/audit/hooks.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/audit/models.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/audit/nzism_mapping.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/audit/rbnz_bs11_mapping.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/audit/remediation/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/audit/remediation/generator.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/audit/remediation/models.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/audit/remediation/templates/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/audit/remediation/templates/ec2.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/audit/remediation/templates/kms.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/audit/remediation/templates/rds.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/audit/remediation/templates/s3.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/audit/renderer.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/audit/reporter.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/audit/soc2_mapping.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/audit/templates/audit_report.html.j2 +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/audit/terminal_reporter.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/audit/trust_center.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cache/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cache/snapshots.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/analyze.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/audit.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/cache.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/clone.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/codify.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/completion.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/cost.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/deps.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/doctor.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/dr.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/drift.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/explain.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/graph.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/iam.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/load.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/profiles.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/remediate.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/residency.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/scan.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/snapshot.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/transfer.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/trends.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/trust_center.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/unused.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/upgrade.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/commands/validate.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/common_options.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/completers.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/completion.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/config.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/context.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/error_catalog.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/error_renderer.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/errors.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/output.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/params/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/params/definitions.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/params/registry.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/params/schema.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/state.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/telemetry.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/utils/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/utils/aws_session.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/utils/cache_resolution.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/utils/console.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/utils/console_links.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/utils/deprecation.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/utils/error_handler.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/utils/helpers.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/utils/options.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cli/utils/tips.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/empty_pruner.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/generators/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/generators/backend.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/generators/hcl.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/generators/imports.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/generators/output.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/generators/readme.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/generators/variables.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/hcl_types.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/pipeline.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/schema_mapper.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/schema_rules.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/set_sorter.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/transformers/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/transformers/base.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/transformers/cleanup_transformer.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/transformers/data_source_filter.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/transformers/default_filter.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/transformers/global_filter.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/transformers/iam_normalizer.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/transformers/import_resolver.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/transformers/lifecycle_protector.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/transformers/managed_filter.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/transformers/naming_transformer.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/transformers/ref_transformer.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/transformers/schema_filter.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/transformers/secrets_transformer.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/transformers/sg_splitter.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/transforms.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/type_caster.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/utils/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/codify/utils/config_integrity_checker.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/compliance/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/compliance/audit/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/compliance/audit/renderer.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/compliance/codify_checker.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/compliance/compliance_tf_registry.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/compliance/data_residency.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/compliance/drift/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/compliance/drift/exemptions.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/compliance/drift/mapping.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/compliance/drift/report.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/compliance/drift/rules.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/analysis/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/analysis/centrality.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/async_aws.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/aws_config.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/bootstrap.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/browser.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/cache.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/cache_manager.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/circuit_breaker.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/concurrency.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/config.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/constants.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/context.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/enrichment/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/enrichment/enricher.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/enrichment/metadata_extractor.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/enrichment/network_analyzer.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/errors.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/filters.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/first_run.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/formatters/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/formatters/sarif.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/graph/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/graph/algorithms.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/graph_engine.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/graph_tracer.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/identity.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/identity_resolver.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/logging.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/models.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/naming.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/operations.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/pagination.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/pagination_config.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/rate_limiter.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/resilience/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/resilience/circuit_breaker.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/resilience/errors/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/resilience/errors/classifier.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/resilience/errors/loader.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/resilience/errors/rules.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/retry.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/sanitizer.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/scope.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/security/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/security/credential_checker.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/security/drift.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/security/global_sanitizer.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/security/iam_generator.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/security/patterns.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/security/redactor.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/security/scrubber.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/security/session_manager.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/security/storage.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/selection.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/signals.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/state.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/storage.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/topology_constraints.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/unified_storage/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/unified_storage/adapter.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/unified_storage/base.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/unified_storage/engine.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/unified_storage/migrate.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/core/unified_storage/sqlite_backend.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cost/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cost/constants.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cost/estimator.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cost/explorer.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cost/local_rightsizer.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cost/models.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cost/pricing.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cost/pricing_engine.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cost/reporter.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cost/ri_aware.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cost/rightsizer.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cost/transfer_analyzer.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cost/trends.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/cost/unused_detector.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/data/field_hints.yaml +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/data/schema_rules.yaml +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/decisions/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/decisions/cli.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/decisions/manager.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/decisions/models.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/dependencies/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/dependencies/graph_builder.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/dependencies/impact_calculator.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/dependencies/models.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/dependencies/reporter.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/dependencies/weights.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/deps/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/deps/analyzers/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/deps/analyzers/asg.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/deps/analyzers/ec2.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/deps/analyzers/elasticache.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/deps/analyzers/elb.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/deps/analyzers/graph_fallback.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/deps/analyzers/iam_role.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/deps/analyzers/lambda_func.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/deps/analyzers/rds.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/deps/analyzers/s3.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/deps/analyzers/security_group.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/deps/base_analyzer.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/deps/blast_radius.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/deps/implicit_resolver.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/deps/models.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/deps/reporter.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/dr/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/dr/readiness.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/drift/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/drift/comparator.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/drift/engine.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/drift/ignore.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/drift/models.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/drift/normalizer.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/drift/reporter.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/drift/state_parser.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/drift/templates/drift_report.html.j2 +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/extraction/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/extraction/hints.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/graph/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/graph/aggregation.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/graph/builder.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/graph/cost_overlay.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/graph/cross_region.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/graph/drift.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/graph/environment.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/graph/filters.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/graph/formatters/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/graph/formatters/d3.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/graph/formatters/json_format.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/graph/formatters/mermaid.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/graph/global_context.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/graph/grouper.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/graph/layout.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/graph/link_classification.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/graph/multi_region.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/graph/naming.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/graph/orphan_detection.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/graph/summary_links.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/graph/templates/graph.html.j2 +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/graph/tool_modes.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/graph/views.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/graph/visualizer.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/licensing/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/licensing/cache.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/licensing/ci_adapter.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/licensing/crypto/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/licensing/crypto/time_validator.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/licensing/fingerprint.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/licensing/gates.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/licensing/models.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/licensing/prompts.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/licensing/tracker.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/main.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/mcp_server.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/migrations/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/migrations/sanitize_cache.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/patterns/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/patterns/local_module.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/recovery/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/recovery/actions.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/recovery/engine.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/recovery/gray_zone.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/renderers/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/renderers/audit_annotator.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/renderers/backend.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/renderers/base.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/renderers/cloudformation.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/renderers/file_router.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/renderers/import_generator.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/renderers/name_generator.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/renderers/preloader.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/renderers/pulumi.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/renderers/refactoring.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/renderers/terraform.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/renderers/terraform_v2.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/renderers/variable_extractor.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/scanners/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/scanners/async_base.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/scanners/async_vpc_scanner.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/scanners/base.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/scanners/compute_scanner.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/scanners/ec2_scanner.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/scanners/elasticache_scanner.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/scanners/iam_scanner.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/scanners/implementations/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/scanners/implementations/s3_scanner.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/scanners/implementations/vpc_scanner.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/scanners/incremental.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/scanners/legacy_adapter.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/scanners/messaging_scanner.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/scanners/monitoring_scanner.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/scanners/networking_scanner.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/scanners/rds_scanner.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/scanners/s3_scanner.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/scanners/storage_scanner.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/scanners/unified_base.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/scanners/unified_scanners.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/scanners/vpc_scanner.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/snapshot/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/snapshot/differ.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/snapshot/models.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/snapshot/reporter.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/snapshot/store.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/templates/autoscaling_group.tf.j2 +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/templates/db_parameter_group.tf.j2 +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/templates/db_subnet_group.tf.j2 +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/templates/ebs_volume.tf.j2 +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/templates/ec2_instance.tf.j2 +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/templates/elasticache_cluster.tf.j2 +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/templates/elasticache_subnet_group.tf.j2 +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/templates/internet_gateway.tf.j2 +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/templates/launch_template.tf.j2 +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/templates/lb.tf.j2 +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/templates/lb_listener.tf.j2 +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/templates/lb_target_group.tf.j2 +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/templates/nat_gateway.tf.j2 +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/templates/network_acl.tf.j2 +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/templates/rds_instance.tf.j2 +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/templates/route_table.tf.j2 +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/templates/s3_bucket.tf.j2 +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/templates/s3_bucket_policy.tf.j2 +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/templates/security_group.tf.j2 +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/templates/sns_topic.tf.j2 +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/templates/sqs_queue.tf.j2 +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/templates/subnet.tf.j2 +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/templates/vpc.tf.j2 +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/templates/vpc_endpoint.tf.j2 +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/transformers/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/transformers/base.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/transformers/downsizer.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/transformers/network_remapper.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/transformers/renamer.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/transformers/sanitizer.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/ui/__init__.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/ui/console.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/ui/rich_output.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/ui/snapshot_panels.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/replimap/ui/snapshot_tables.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/scripts/check_stdout_hygiene.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/scripts/record_cassettes.py +0 -0
- {replimap-0.4.1 → replimap-0.4.2}/scripts/verify_compliance_tf_subdomains.py +0 -0
|
@@ -22,6 +22,7 @@ from replimap.cli.errors import (
|
|
|
22
22
|
from replimap.licensing import Feature, LicenseStatus, LicenseValidationError
|
|
23
23
|
from replimap.licensing.manager import get_license_manager
|
|
24
24
|
from replimap.licensing.tracker import get_usage_tracker
|
|
25
|
+
from replimap.licensing.verifier import LicenseVerificationError
|
|
25
26
|
|
|
26
27
|
if TYPE_CHECKING:
|
|
27
28
|
from replimap.cli.context import GlobalContext
|
|
@@ -82,7 +83,11 @@ def create_license_app() -> typer.Typer:
|
|
|
82
83
|
"expires": expires,
|
|
83
84
|
}
|
|
84
85
|
)
|
|
85
|
-
except LicenseValidationError as e:
|
|
86
|
+
except (LicenseValidationError, LicenseVerificationError) as e:
|
|
87
|
+
# LicenseVerificationError covers signature/format/time/machine
|
|
88
|
+
# rejections from the signed-blob verification path (contract
|
|
89
|
+
# §7) — a distinct hierarchy from LicenseValidationError, but
|
|
90
|
+
# the same user-facing treatment: clear message, no traceback.
|
|
86
91
|
output.panel(
|
|
87
92
|
f"[red]License activation failed:[/]\n{e}",
|
|
88
93
|
title="Activation Error",
|
|
@@ -46,7 +46,7 @@ class KeyRegistry:
|
|
|
46
46
|
PUBLIC_KEYS: dict[str, bytes] = {
|
|
47
47
|
# Current active key (2024)
|
|
48
48
|
"key-2024-01": b"""-----BEGIN PUBLIC KEY-----
|
|
49
|
-
|
|
49
|
+
MCowBQYDK2VwAyEAGVGarYV4idivq+YGZXZ12kZSqrr6yKV5mw2pWIoU9Mw=
|
|
50
50
|
-----END PUBLIC KEY-----""",
|
|
51
51
|
# Previous key (still accepted for old licenses)
|
|
52
52
|
# "key-2023-01": b"""-----BEGIN PUBLIC KEY-----
|
|
@@ -25,6 +25,11 @@ from replimap.licensing.models import (
|
|
|
25
25
|
get_machine_fingerprint,
|
|
26
26
|
get_plan_features,
|
|
27
27
|
)
|
|
28
|
+
from replimap.licensing.verifier import (
|
|
29
|
+
LicenseMachineMismatchError,
|
|
30
|
+
LicenseVerificationError,
|
|
31
|
+
LicenseVerifier,
|
|
32
|
+
)
|
|
28
33
|
|
|
29
34
|
if TYPE_CHECKING:
|
|
30
35
|
from replimap.licensing.models import PlanFeatures
|
|
@@ -32,10 +37,43 @@ if TYPE_CHECKING:
|
|
|
32
37
|
logger = logging.getLogger(__name__)
|
|
33
38
|
|
|
34
39
|
# API Configuration
|
|
35
|
-
|
|
36
|
-
|
|
40
|
+
#
|
|
41
|
+
# PROD is the runtime default (offline license #2, Phase 3): the previous
|
|
42
|
+
# constants pointed at two dead domains that were never the real service
|
|
43
|
+
# (a Cloudflare Workers preview subdomain as the "default", plus a sibling
|
|
44
|
+
# ".io" domain nothing serves) — see docs/security/outbound-network-surface.md,
|
|
45
|
+
# which declares exactly one endpoint constant in this file. Dev/enterprise
|
|
46
|
+
# routing goes through the REPLIMAP_LICENSE_API env override (the deploy
|
|
47
|
+
# runbook uses explicit URLs); no separate DEV constant exists on purpose.
|
|
48
|
+
API_BASE_URL_PROD = "https://api.replimap.com/v1"
|
|
37
49
|
API_TIMEOUT = 30 # seconds
|
|
38
50
|
|
|
51
|
+
|
|
52
|
+
class LicenseBlobMissingError(LicenseValidationError):
|
|
53
|
+
"""
|
|
54
|
+
Server responded valid=true but omitted the signed license_blob field.
|
|
55
|
+
|
|
56
|
+
Contract §7: a "protocol mismatch" case, not a LicenseVerifier
|
|
57
|
+
exception — the server spoke HTTP successfully but isn't blob-aware
|
|
58
|
+
yet (old API / rollback). The client must never fall back to trusting
|
|
59
|
+
the response's unsigned plan/expires_at/email fields.
|
|
60
|
+
"""
|
|
61
|
+
|
|
62
|
+
pass
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
# Exceptions that mean "a server response was received and definitively,
|
|
66
|
+
# cryptographically/logically rejected." activate() must never mask these
|
|
67
|
+
# with a stale cached license — that would defeat the point of verifying
|
|
68
|
+
# in the first place (contract §7: fail closed). The base class covers
|
|
69
|
+
# every verifier rejection (signature/format/expiry/nbf/time/machine —
|
|
70
|
+
# including any subclass added later), so new failure modes can never
|
|
71
|
+
# silently leak into the cached-license fallback branch.
|
|
72
|
+
_DEFINITIVE_REJECTION_ERRORS = (
|
|
73
|
+
LicenseVerificationError,
|
|
74
|
+
LicenseBlobMissingError,
|
|
75
|
+
)
|
|
76
|
+
|
|
39
77
|
# Default cache directory
|
|
40
78
|
DEFAULT_CACHE_DIR = Path.home() / ".replimap"
|
|
41
79
|
LICENSE_CACHE_FILE = "license.json"
|
|
@@ -91,9 +129,9 @@ class LicenseManager:
|
|
|
91
129
|
"""
|
|
92
130
|
self.cache_dir = cache_dir or DEFAULT_CACHE_DIR
|
|
93
131
|
self.cache_dir.mkdir(parents=True, exist_ok=True)
|
|
94
|
-
#
|
|
132
|
+
# Priority: explicit constructor arg > REPLIMAP_LICENSE_API env > PROD.
|
|
95
133
|
self.api_base_url = api_base_url or os.environ.get(
|
|
96
|
-
"REPLIMAP_LICENSE_API",
|
|
134
|
+
"REPLIMAP_LICENSE_API", API_BASE_URL_PROD
|
|
97
135
|
)
|
|
98
136
|
self._current_license: License | None = None
|
|
99
137
|
self._cached_at: datetime | None = None
|
|
@@ -157,9 +195,18 @@ class LicenseManager:
|
|
|
157
195
|
# Try online validation first
|
|
158
196
|
try:
|
|
159
197
|
license_data = self._validate_online(license_key)
|
|
198
|
+
except _DEFINITIVE_REJECTION_ERRORS:
|
|
199
|
+
# A server response was received and the signed blob was
|
|
200
|
+
# cryptographically/logically rejected (bad signature, expired,
|
|
201
|
+
# not-yet-valid, tampered format, bound to another machine, or
|
|
202
|
+
# a pre-blob server). Never mask this with a stale cached
|
|
203
|
+
# license — re-raise as-is so the caller sees the precise
|
|
204
|
+
# failure (contract §7).
|
|
205
|
+
raise
|
|
160
206
|
except Exception as e:
|
|
161
207
|
logger.warning(f"Online validation failed: {e}")
|
|
162
208
|
# Fall back to offline validation for existing cached licenses
|
|
209
|
+
# (genuine network/transport failures only).
|
|
163
210
|
if self._has_valid_cache():
|
|
164
211
|
cached = self._load_cached_license()
|
|
165
212
|
if cached and cached.license_key == license_key:
|
|
@@ -167,12 +214,6 @@ class LicenseManager:
|
|
|
167
214
|
return cached
|
|
168
215
|
raise LicenseValidationError(f"Could not validate license: {e}") from e
|
|
169
216
|
|
|
170
|
-
# Validate machine fingerprint
|
|
171
|
-
fingerprint = get_machine_fingerprint()
|
|
172
|
-
if not license_data.validate_machine(fingerprint):
|
|
173
|
-
# For new activations, bind to this machine
|
|
174
|
-
license_data.machine_fingerprint = fingerprint
|
|
175
|
-
|
|
176
217
|
# Cache the validated license
|
|
177
218
|
self._cache_license(license_data)
|
|
178
219
|
self._current_license = license_data
|
|
@@ -291,14 +332,24 @@ class LicenseManager:
|
|
|
291
332
|
Makes an HTTP request to the license server to validate the key
|
|
292
333
|
and retrieve license details.
|
|
293
334
|
|
|
335
|
+
Contract (docs/security/license-blob-format.md §5/§9.5): a
|
|
336
|
+
`valid: true` response MUST carry a signed `license_blob`. The
|
|
337
|
+
blob is verified locally (Ed25519 signature + time claims) and
|
|
338
|
+
machine-bound before it is trusted; the response's plain
|
|
339
|
+
`plan`/`expires_at`/`email` fields are never read directly — the
|
|
340
|
+
verified blob is the sole source of truth.
|
|
341
|
+
|
|
294
342
|
Args:
|
|
295
343
|
license_key: The license key to validate (format: RM-XXXX-XXXX-XXXX-XXXX)
|
|
296
344
|
|
|
297
345
|
Returns:
|
|
298
|
-
License object
|
|
346
|
+
License object built from the verified signed blob
|
|
299
347
|
|
|
300
348
|
Raises:
|
|
301
|
-
LicenseValidationError: If validation fails
|
|
349
|
+
LicenseValidationError: If validation fails (network/HTTP/protocol)
|
|
350
|
+
LicenseBlobMissingError: valid=true response has no license_blob
|
|
351
|
+
LicenseVerificationError: Signature/format/time verification failed
|
|
352
|
+
LicenseMachineMismatchError: Blob is bound to a different machine
|
|
302
353
|
"""
|
|
303
354
|
machine_id = get_machine_fingerprint()
|
|
304
355
|
|
|
@@ -316,29 +367,21 @@ class LicenseManager:
|
|
|
316
367
|
if response.status_code == 200:
|
|
317
368
|
data = response.json()
|
|
318
369
|
if data.get("valid"):
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
plan=Plan(data.get("plan", "community").lower()),
|
|
335
|
-
email=data.get("email", ""),
|
|
336
|
-
issued_at=datetime.now(UTC),
|
|
337
|
-
expires_at=expires_at,
|
|
338
|
-
machine_fingerprint=machine_id,
|
|
339
|
-
max_machines=data.get("max_machines", 1),
|
|
340
|
-
metadata=data.get("features", {}),
|
|
341
|
-
)
|
|
370
|
+
blob = data.get("license_blob")
|
|
371
|
+
if not blob:
|
|
372
|
+
raise LicenseBlobMissingError(
|
|
373
|
+
"server did not return a signed license — "
|
|
374
|
+
"upgrade the CLI or retry against a newer API"
|
|
375
|
+
)
|
|
376
|
+
|
|
377
|
+
verified = LicenseVerifier().verify(blob)
|
|
378
|
+
self._check_machine_binding(verified.machine_id)
|
|
379
|
+
|
|
380
|
+
license_obj = verified.to_legacy_license()
|
|
381
|
+
# Stashed for _cache_license() to lift into the
|
|
382
|
+
# top-level license_blob cache field (contract §6).
|
|
383
|
+
license_obj.metadata["license_blob"] = blob
|
|
384
|
+
return license_obj
|
|
342
385
|
else:
|
|
343
386
|
raise LicenseValidationError(
|
|
344
387
|
data.get("message", "License validation failed")
|
|
@@ -371,36 +414,129 @@ class LicenseManager:
|
|
|
371
414
|
"""Get a human-readable machine name for activation."""
|
|
372
415
|
return f"{platform.node()} ({platform.system()} {platform.machine()})"
|
|
373
416
|
|
|
417
|
+
def _check_machine_binding(self, payload_machine_id: str | None) -> None:
|
|
418
|
+
"""
|
|
419
|
+
Compare a verified blob's machine_id against this machine's
|
|
420
|
+
fingerprint.
|
|
421
|
+
|
|
422
|
+
Contract §11 adjudication C: this comparison lives in the manager
|
|
423
|
+
wrapper (activate/cache-load), never inside LicenseVerifier.verify().
|
|
424
|
+
A blob with no machine_id is treated as unbound (nothing to
|
|
425
|
+
compare) — the same graceful-degradation semantics as the legacy
|
|
426
|
+
License.validate_machine(), and consistent with §2's note that
|
|
427
|
+
machine_id may theoretically be absent on pre-contract issuances.
|
|
428
|
+
|
|
429
|
+
Raises:
|
|
430
|
+
LicenseMachineMismatchError: machine_id is present and doesn't
|
|
431
|
+
match this machine.
|
|
432
|
+
"""
|
|
433
|
+
if payload_machine_id is None:
|
|
434
|
+
return
|
|
435
|
+
local_fingerprint = get_machine_fingerprint()
|
|
436
|
+
if payload_machine_id != local_fingerprint:
|
|
437
|
+
raise LicenseMachineMismatchError("License is bound to another machine")
|
|
438
|
+
|
|
374
439
|
def _revalidate_online(self) -> None:
|
|
375
|
-
"""
|
|
440
|
+
"""
|
|
441
|
+
Re-verify the cached license blob locally (zero network).
|
|
442
|
+
|
|
443
|
+
This used to be a TODO stub for an online re-check. The offline
|
|
444
|
+
signed-blob model makes an HTTP call here both unnecessary and a
|
|
445
|
+
violation of the "routine commands never touch the network"
|
|
446
|
+
guarantee (docs/security/outbound-network-surface.md) —
|
|
447
|
+
`replimap license status` must stay a pure local operation. This
|
|
448
|
+
now re-parses/re-verifies the on-disk blob, so a cache file that
|
|
449
|
+
was tampered with or corrupted after the initial load in this
|
|
450
|
+
process is still caught.
|
|
451
|
+
|
|
452
|
+
Raises:
|
|
453
|
+
LicenseValidationError: Local re-verification failed.
|
|
454
|
+
"""
|
|
376
455
|
if self._current_license is None:
|
|
377
456
|
return
|
|
378
457
|
|
|
379
|
-
|
|
380
|
-
|
|
458
|
+
refreshed = self._load_cached_license()
|
|
459
|
+
if refreshed is None:
|
|
460
|
+
raise LicenseValidationError(
|
|
461
|
+
"Cached license failed local re-verification — re-activation required"
|
|
462
|
+
)
|
|
463
|
+
self._current_license = refreshed
|
|
381
464
|
self._cached_at = datetime.now(UTC)
|
|
382
465
|
|
|
383
466
|
def _cache_license(self, license_obj: License) -> None:
|
|
384
|
-
"""
|
|
467
|
+
"""
|
|
468
|
+
Cache the license to disk.
|
|
469
|
+
|
|
470
|
+
Contract §6: writes a top-level `license_blob` field alongside the
|
|
471
|
+
legacy `license` dict whenever one is available, so every future
|
|
472
|
+
load can re-verify it locally before trusting anything. The blob
|
|
473
|
+
travels here via `license_obj.metadata["license_blob"]` (stashed by
|
|
474
|
+
`_validate_online()`/`_load_cached_license()`) and is popped out of
|
|
475
|
+
the serialized `license.metadata` so it isn't duplicated.
|
|
476
|
+
"""
|
|
477
|
+
license_dict = license_obj.to_dict()
|
|
478
|
+
# GOTCHA: License.to_dict() returns the SAME metadata dict object the
|
|
479
|
+
# License holds (no copy) — popping it in place would strip the blob
|
|
480
|
+
# from the caller's license_obj too, leaving e.g. activate()'s
|
|
481
|
+
# self._current_license without the blob the cache-load path always
|
|
482
|
+
# carries. Shallow-copy before popping so the caller stays intact.
|
|
483
|
+
metadata = dict(license_dict.get("metadata", {}))
|
|
484
|
+
license_blob = metadata.pop("license_blob", None)
|
|
485
|
+
license_dict["metadata"] = metadata
|
|
486
|
+
|
|
385
487
|
cache_data = {
|
|
386
|
-
"license":
|
|
488
|
+
"license": license_dict,
|
|
387
489
|
"cached_at": datetime.now(UTC).isoformat(),
|
|
388
490
|
"fingerprint": get_machine_fingerprint(),
|
|
389
491
|
}
|
|
492
|
+
if license_blob:
|
|
493
|
+
cache_data["license_blob"] = license_blob
|
|
494
|
+
|
|
390
495
|
self.cache_path.write_text(json.dumps(cache_data, indent=2))
|
|
391
496
|
self._cached_at = datetime.now(UTC)
|
|
392
497
|
logger.debug(f"License cached to {self.cache_path}")
|
|
393
498
|
|
|
394
499
|
def _load_cached_license(self) -> License | None:
|
|
395
|
-
"""
|
|
500
|
+
"""
|
|
501
|
+
Load license from cache.
|
|
502
|
+
|
|
503
|
+
Contract §6/§7: the cache file is untrusted, unsigned storage — a
|
|
504
|
+
`license_blob` field must be present and re-verified locally
|
|
505
|
+
(signature + time claims + machine binding) before anything in
|
|
506
|
+
the cache is trusted. A cache with no blob is the pre-signing
|
|
507
|
+
legacy format and is treated as needing re-activation with no
|
|
508
|
+
grace period (§11 adjudication E — no external users yet). The
|
|
509
|
+
legacy `license` dict is never read directly — the freshly
|
|
510
|
+
re-verified blob is the sole source of truth on every load.
|
|
511
|
+
"""
|
|
396
512
|
if not self.cache_path.exists():
|
|
397
513
|
return None
|
|
398
514
|
|
|
399
515
|
try:
|
|
400
516
|
data = json.loads(self.cache_path.read_text())
|
|
517
|
+
|
|
518
|
+
blob = data.get("license_blob")
|
|
519
|
+
if not blob:
|
|
520
|
+
logger.info(
|
|
521
|
+
"Cached license has no signed blob (pre-signing cache "
|
|
522
|
+
"format) — re-activation is required."
|
|
523
|
+
)
|
|
524
|
+
return None
|
|
525
|
+
|
|
526
|
+
verified = LicenseVerifier().verify(blob)
|
|
527
|
+
self._check_machine_binding(verified.machine_id)
|
|
528
|
+
|
|
529
|
+
license_obj = verified.to_legacy_license()
|
|
530
|
+
license_obj.metadata["license_blob"] = blob
|
|
531
|
+
|
|
401
532
|
self._cached_at = datetime.fromisoformat(data["cached_at"])
|
|
402
|
-
return
|
|
403
|
-
except (
|
|
533
|
+
return license_obj
|
|
534
|
+
except (
|
|
535
|
+
json.JSONDecodeError,
|
|
536
|
+
KeyError,
|
|
537
|
+
ValueError,
|
|
538
|
+
LicenseVerificationError,
|
|
539
|
+
) as e:
|
|
404
540
|
logger.warning(f"Failed to load cached license: {e}")
|
|
405
541
|
return None
|
|
406
542
|
|
|
@@ -221,6 +221,7 @@ class SecureLicenseData:
|
|
|
221
221
|
limits: SecureLicenseLimits
|
|
222
222
|
nonce: str | None = None
|
|
223
223
|
kid: str | None = None # Key ID used for signing
|
|
224
|
+
machine_id: str | None = None # Contract §2: 32-hex machine fingerprint
|
|
224
225
|
|
|
225
226
|
def has_feature(self, feature: Feature) -> bool:
|
|
226
227
|
"""Check if license grants a feature."""
|
|
@@ -256,6 +257,7 @@ class SecureLicenseData:
|
|
|
256
257
|
"limits": self.limits.to_dict(),
|
|
257
258
|
"nonce": self.nonce,
|
|
258
259
|
"kid": self.kid,
|
|
260
|
+
"machine_id": self.machine_id,
|
|
259
261
|
}
|
|
260
262
|
|
|
261
263
|
@classmethod
|
|
@@ -307,6 +309,7 @@ class SecureLicenseData:
|
|
|
307
309
|
limits=limits,
|
|
308
310
|
nonce=payload.get("nonce"),
|
|
309
311
|
kid=payload.get("kid"),
|
|
312
|
+
machine_id=payload.get("machine_id"),
|
|
310
313
|
)
|
|
311
314
|
|
|
312
315
|
def to_legacy_license(self) -> License:
|
|
@@ -325,7 +328,13 @@ class SecureLicenseData:
|
|
|
325
328
|
organization=self.organization,
|
|
326
329
|
issued_at=self.issued_at,
|
|
327
330
|
expires_at=self.expires_at,
|
|
328
|
-
|
|
331
|
+
# Contract §6/§9.2(d): wire the payload's machine_id through
|
|
332
|
+
# instead of hardcoding None, so License.validate_machine()
|
|
333
|
+
# means something for blob-derived licenses. A blob with no
|
|
334
|
+
# machine_id (§2: theoretically pre-contract) leaves the
|
|
335
|
+
# legacy License unbound too (validate_machine() treats
|
|
336
|
+
# machine_fingerprint=None as "not bound").
|
|
337
|
+
machine_fingerprint=self.machine_id,
|
|
329
338
|
max_machines=1,
|
|
330
339
|
metadata={
|
|
331
340
|
"secure_license": True,
|
|
@@ -73,6 +73,21 @@ class LicenseTimeError(LicenseVerificationError):
|
|
|
73
73
|
pass
|
|
74
74
|
|
|
75
75
|
|
|
76
|
+
class LicenseMachineMismatchError(LicenseVerificationError):
|
|
77
|
+
"""
|
|
78
|
+
License blob's machine_id does not match this machine's fingerprint.
|
|
79
|
+
|
|
80
|
+
Contract note (docs/security/license-blob-format.md §11 adjudication C):
|
|
81
|
+
this exception exists here for the type hierarchy, but LicenseVerifier
|
|
82
|
+
.verify() never raises it — verify() stays pure (signature + time
|
|
83
|
+
claims only). The comparison against the local machine fingerprint is
|
|
84
|
+
performed by the caller (LicenseManager activate/cache-load wrapper),
|
|
85
|
+
which raises this exception on mismatch.
|
|
86
|
+
"""
|
|
87
|
+
|
|
88
|
+
pass
|
|
89
|
+
|
|
90
|
+
|
|
76
91
|
class LicenseVerifier:
|
|
77
92
|
"""
|
|
78
93
|
Verifies Ed25519-signed license blobs.
|
|
@@ -239,7 +254,11 @@ class LicenseVerifier:
|
|
|
239
254
|
raise LicenseFormatError("Payload must be a JSON object")
|
|
240
255
|
|
|
241
256
|
# Validate required fields
|
|
242
|
-
|
|
257
|
+
# "exp" is required per contract §2/§9.1: the offline model treats
|
|
258
|
+
# exp as end-of-subscription-period (+ grace), not an optional
|
|
259
|
+
# lease TTL — a blob with no exp must never verify as a
|
|
260
|
+
# permanent license.
|
|
261
|
+
required_fields = ["lic", "plan", "iat", "exp"]
|
|
243
262
|
missing = [f for f in required_fields if f not in payload]
|
|
244
263
|
if missing:
|
|
245
264
|
raise LicenseFormatError(f"Missing required fields: {missing}")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|