Conversation
Implement issue #8 Phase 1-4: pkg/testkit/authztest with 46 documented authorization scenarios covering REST CRUD, patient compartment, search filtering, view/AI/sync/module paths, SMART token semantics, and scope-vs-policy conflicts. Harden patient scope: rename engine constraint helper, update docs to remove stub language, enforce patient scope on bundle entry resources. Add smart.ScopePolicyAuthChecker, DefaultConfiguration metadata helper, and examples/smart-authz demonstrating restricted vs unrestricted principals. Co-authored-by: Adegoke Adewoye <[email protected]>
Co-authored-by: Adegoke Adewoye <[email protected]>
- Run gofmt on four files flagged by CI / ci check - Merge origin/main to bring in conformance/package-lock.json and .github/workflows/conformance.yml (fixes Conformance job setup-node cache) Co-authored-by: Adegoke Adewoye <[email protected]>
…le HEAD The lock pinned 3c4aa77 from a pre-squash branch commit that is not in main history. CI shallow checkout cannot resolve it, so git cat-file -e fails. Set gitCommit to current HEAD (valid as HEAD^ after this commit). Co-authored-by: Adegoke Adewoye <[email protected]>
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.
Summary
Implements issue #8 Phases 1–4: a CI-enforced authorization semantics test kit, patient scope hardening, SMART HTTP integration helpers, and a runnable demo.
Closes #8
Changes
Phase 1 —
pkg/testkit/authztest/_includefiltering, views, AI tools, sync device push, module install, SMART token semantics (exp/nbf/iss/aud), and scope-vs-policy conflictsRestrictedClinician,TenantAdmin,BackendServicePrincipal, policies) andRunAllrunnerPhase 2 — SMART semantics
smart.ScopePolicyAuthChecker— wires SMART scope-derivedRequiredPermissionsinto HTTP auth decisionssmart.DefaultConfiguration—.well-known/smart-configurationmetadata shape for hostsPhase 3 — Patient scope hardening
CheckPatientScopedocumented as production compartment enforcement (no longer marked stub)resourcebodies_include/_revincludeleakage covered in scenario catalogPhase 4 — Documentation and demo
examples/smart-authz— demonstrates unrestricted vs patient-scoped vs policy-narrowed principals over real HTTP handlerpkg/authandpkg/testkitREADMEsAcceptance criteria
CheckPatientScopeno longer marked stubexamples/smart-authzdemoOut of scope (per issue)
Test plan
go test ./pkg/testkit/authztest/...go test ./pkg/auth/... ./pkg/smart/... ./pkg/http/...go run ./examples/smart-authz/