feat: CIEM effective permissions engine (Phase 3)#3
Merged
Conversation
- Enhanced IAM collector: groups, inline/managed policies, trust policies, permission boundaries, policy statement decomposition into Neptune - Policy evaluator Lambda: policy parser, wildcard matcher, effect resolver with permission boundary/SCP support, 20+ condition operators - Escalation path detector: trust graph traversal (max 3 hops), admin/ privilege escalation/lateral movement classification - CloudTrail analyzer Lambda: Athena queries against CloudTrail S3 logs (90-day window), DynamoDB AccessAnalyzerCache table with TTL - Rightsizer: unused permissions computation, least-privilege policy recommendations with risk-level classification - API identity routes: effective permissions, escalation paths, unused permissions, rightsizing recommendations, trust graph - CDK: PolicyEvaluator + CloudTrailAnalyzer Lambdas, AccessAnalyzerCache DynamoDB table, Step Function policy-evaluator step, EventBridge schedules - 89 unit tests across 5 test suites (all passing)
…udtrail-analyzer workspaces
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CIEM / Effective Permissions Engine
Implements the full Cloud Infrastructure Entitlement Management (CIEM) system for computing effective IAM permissions, detecting escalation paths, identifying unused permissions, and generating rightsizing recommendations.
What's New
Enhanced IAM Collector (
lambdas/collector/index.ts)TRUSTSedgesIamPolicyStatementnodesHAS_PERMISSION_BOUNDARYedgesIamGroup,IamPolicyDocument,IamPolicyStatementMEMBER_OF,ATTACHED_TO,CONTAINS,GRANTS,TRUSTS,HAS_PERMISSION_BOUNDARYPolicy Evaluator Lambda (
lambdas/policy-evaluator/)*,?,s3:Get*), trust policy extractionCloudTrail Analyzer Lambda (
lambdas/cloudtrail-analyzer/)AccessAnalyzerCacheDynamoDB table (TTL: 90 days, GSI: ActionIndex)API Endpoints (
api-service/src/routes/identity.ts)GET /identity/effective-permissions/:principal— Computed net effective permissionsGET /identity/escalation-paths— Detected escalation paths with filters (riskLevel, escalationType, sourceAccount, targetRole)GET /identity/unused-permissions?principal=X&days=90— Unused actions grouped by serviceGET /identity/rightsizing/:principal?safetyMarginDays=7— Least-privilege policy recommendationGET /identity/trust-graph?account=X— Cross-account trust relationships as graphCDK Stack Updates (
cdk/lib/khalifa-stack.ts)NeptuneClient Additions (
api-service/src/services/neptune-client.ts)getEffectivePermissions()— Query EffectivePermission nodesgetEscalationPaths()— Query EscalationPath nodes with filtersgetTrustGraph()— Retrieve TRUSTS edges with connected nodesTests (89 passing, 5 suites)
Files Changed
Architecture Decisions