Skip to content

Fix spec typo, wire Cognito groups to OPA, clean up stale files#7

Merged
cjb00 merged 1 commit into
mainfrom
claude/upbeat-kare
Feb 21, 2026
Merged

Fix spec typo, wire Cognito groups to OPA, clean up stale files#7
cjb00 merged 1 commit into
mainfrom
claude/upbeat-kare

Conversation

@cjb00

@cjb00 cjb00 commented Feb 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • spec: fix reference implementation filename typo (ztxp-v0.2.pyztxpv0.2.py) and repo URL (cliffbellcjb00)
  • cognito: add writer and admin Cognito user pool groups that map directly to OPA policy groups; parameterise callback_urls / logout_urls so they no longer hardcode example.com; rename the typo'd cariables.tfvariables.tf
  • pep: extract cognito:groups from JWT claims and include them in the TAM subject.groups field — this was the missing link that prevented OPA write/admin rules from ever firing
  • tests: 4 new PEP unit tests covering group extraction, empty-group fallback, and JWT decode edge cases (39 total, all passing)
  • cleanup: delete stale authz.rego.txt backup file

Test plan

  • All 39 Python unit tests pass (pytest ztxb-aws-lab/tests/)
  • OPA policy tests pass (opa test ztxb-aws-lab/app/pdp/policy/)
  • Terraform validate passes
  • Deploy to AWS and verify Cognito group assignment flows end-to-end

Generated with Claude Code

- spec: fix reference impl filename (ztxp-v0.2.py to ztxpv0.2.py) and repo URL (cliffbell to cjb00)
- cognito: add writer/admin user pool groups; parameterise callback and logout URLs; move variables from typo'd cariables.tf into proper variables.tf
- pep: extract cognito:groups from JWT claims and include in TAM subject block so OPA can evaluate group-based write/admin rules
- tests: add 4 new PEP tests covering group extraction and JWT decode edge cases
- cleanup: delete stale authz.rego.txt backup file

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@cjb00 cjb00 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

@cjb00 cjb00 merged commit 79691fe into main Feb 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant