Skip to content

Add phase‑1 authorization refactor baseline document with current-state mapping and standards#2744

Draft
Copilot wants to merge 8 commits into
masterfrom
copilot/scicat-auth-refactor-phase-1
Draft

Add phase‑1 authorization refactor baseline document with current-state mapping and standards#2744
Copilot wants to merge 8 commits into
masterfrom
copilot/scicat-auth-refactor-phase-1

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 19, 2026

  • Inspect codebase – CASL factory, action enum, JobConfig service patterns, test patterns
  • src/casl/auth-policy/auth-policy.interface.ts – TypeScript interfaces matching JSON schema
  • src/casl/auth-policy/auth-policy.schema.ts – Ajv JSON Schema for validation
  • src/casl/auth-policy/auth-policy-subjects.ts – subject string → class mapping (SUBJECTS constant)
  • src/casl/auth-policy/auth-policy.service.ts – load, parse and validate auth-policy.json
  • src/casl/auth-policy/auth-policy.translator.ts – JSON → CASL ability builder (endpoint + instance), placeholder resolution
  • src/casl/auth-policy/auth-policy.service.spec.ts – unit tests for service (8 tests)
  • src/casl/auth-policy/auth-policy.translator.spec.ts – unit tests for translator (22 tests)
  • Update src/casl/casl.module.ts – register new service and translator
  • Update src/config/configuration.ts – add authPolicyFile config key
  • Create auth-policy.example.json – example policy at project root
  • All 347 tests pass (74 test suites)
  • Parallel validation: Code Review (1 typo fixed) + CodeQL (0 alerts)

Copilot AI changed the title [WIP] Refactor authentication logic for SciCat - phase 1 Add phase‑1 authorization refactor baseline document with current-state mapping and standards May 19, 2026
Copilot AI requested a review from Junjiequan May 19, 2026 12:49
Copilot AI and others added 3 commits May 19, 2026 14:15
…ct map, example policy, and tests

Agent-Logs-Url: https://github.com/SciCatProject/backend/sessions/39e109d7-dc69-4e3c-889a-914fb54f756d

Co-authored-by: Junjiequan <78078898+Junjiequan@users.noreply.github.com>
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.

SciCat authentication refactor plan - phase 1

2 participants