feat: Implement console session management with tenant and profile handling
- Add ConsoleSessionStore for managing console session state including tenants, profile, and token information. - Create OperatorContextService to manage operator context for orchestrator actions. - Implement OperatorMetadataInterceptor to enrich HTTP requests with operator context metadata. - Develop ConsoleProfileComponent to display user profile and session details, including tenant information and access tokens. - Add corresponding HTML and SCSS for ConsoleProfileComponent to enhance UI presentation. - Write unit tests for ConsoleProfileComponent to ensure correct rendering and functionality.
This commit is contained in:
		| @@ -18,12 +18,12 @@ This guide explains how a policy progresses through Stella Ops, which roles ar | ||||
| ```mermaid | ||||
| stateDiagram-v2 | ||||
|     [*] --> Draft | ||||
|     Draft --> Draft: edit/save (policy:write) | ||||
|     Draft --> Submitted: submit(reviewers) (policy:submit) | ||||
|     Submitted --> Draft: requestChanges (policy:write) | ||||
|     Draft --> Draft: edit/save (policy:author) | ||||
|     Draft --> Submitted: submit(reviewers) (policy:author) | ||||
|     Submitted --> Draft: requestChanges (policy:review) | ||||
|     Submitted --> Approved: approve (policy:approve) | ||||
|     Approved --> Active: activate/run (policy:run) | ||||
|     Active --> Archived: archive (policy:archive) | ||||
|     Approved --> Active: activate/run (policy:operate) | ||||
|     Active --> Archived: archive (policy:operate) | ||||
|     Approved --> Archived: superseded/explicit archive | ||||
|     Archived --> [*] | ||||
| ``` | ||||
| @@ -34,11 +34,11 @@ stateDiagram-v2 | ||||
|  | ||||
| | Role (suggested) | Required scopes | Responsibilities | | ||||
| |------------------|-----------------|------------------| | ||||
| | **Policy Author** | `policy:write`, `policy:submit`, `policy:simulate` | Draft DSL, run local/CI simulations, submit for review. | | ||||
| | **Policy Reviewer** | `policy:review`, `policy:simulate`, `policy:runs` | Comment on submissions, demand additional simulations, request changes. | | ||||
| | **Policy Approver** | `policy:approve`, `policy:runs`, `policy:audit` | Grant final approval, ensure sign-off evidence captured. | | ||||
| | **Policy Operator** | `policy:run`, `policy:activate`, `findings:read` | Trigger full/incremental runs, monitor results, roll back to previous version. | | ||||
| | **Policy Auditor** | `policy:audit`, `findings:read`, `policy:history` | Review past versions, verify attestations, respond to compliance requests. | | ||||
| | **Policy Author** | `policy:author`, `policy:simulate`, `findings:read` | Draft DSL, run local/CI simulations, submit for review. | | ||||
| | **Policy Reviewer** | `policy:review`, `policy:simulate`, `findings:read` | Comment on submissions, demand additional simulations, request changes. | | ||||
| | **Policy Approver** | `policy:approve`, `policy:audit`, `findings:read` | Grant final approval, ensure sign-off evidence captured. | | ||||
| | **Policy Operator** | `policy:operate`, `policy:run`, `policy:activate`, `findings:read` | Trigger full/incremental runs, monitor results, roll back to previous version. | | ||||
| | **Policy Auditor** | `policy:audit`, `findings:read` | Review past versions, verify attestations, respond to compliance requests. | | ||||
| | **Policy Engine Service** | `effective:write`, `findings:read` | Materialise effective findings during runs; no approval capabilities. | | ||||
|  | ||||
| > Scopes are issued by Authority (`AUTH-POLICY-20-001`). Tenants may map organisational roles (e.g., `secops.approver`) to these scopes via issuer policy. | ||||
| @@ -49,7 +49,7 @@ stateDiagram-v2 | ||||
|  | ||||
| ### 3.1 Draft | ||||
|  | ||||
| - **Who:** Authors (policy:write). | ||||
| - **Who:** Authors (`policy:author`). | ||||
| - **Tools:** Console editor, `stella policy edit`, policy DSL files. | ||||
| - **Actions:** | ||||
|   - Author DSL leveraging [stella-dsl@1](dsl.md). | ||||
| @@ -64,7 +64,7 @@ stateDiagram-v2 | ||||
|  | ||||
| ### 3.2 Submission | ||||
|  | ||||
| - **Who:** Authors with `policy:submit`. | ||||
| - **Who:** Authors (`policy:author`). | ||||
| - **Tools:** Console “Submit for review” button, `stella policy submit <policyId> --reviewers ...`. | ||||
| - **Actions:** | ||||
|   - Provide review notes and required simulations (CLI uploads attachments). | ||||
| @@ -108,7 +108,7 @@ stateDiagram-v2 | ||||
|  | ||||
| ### 3.5 Activation & Runs | ||||
|  | ||||
| - **Who:** Operators (`policy:run`, `policy:activate`). | ||||
| - **Who:** Operators (`policy:operate`, `policy:run`, `policy:activate`). | ||||
| - **Tools:** Console “Promote to active”, CLI `stella policy activate <id> --version n`, `stella policy run`. | ||||
| - **Actions:** | ||||
|   - Mark approved version as tenant’s active policy. | ||||
| @@ -236,4 +236,3 @@ Failure of any gate emits a `policy.lifecycle.violation` event and blocks transi | ||||
| --- | ||||
|  | ||||
| *Last updated: 2025-10-26 (Sprint 20).* | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user