identity capa

identity-impersonation

User impersonation for staff support workflows

User impersonation for staff support workflows

Tieridentity
Roleunclassified (baselined)
Pathcrates/identity/impersonation
Edition2021
Targetsidentity_impersonation
Public items0 across 0 modules
Tests19

What it is for

User impersonation library crates for staff support workflows.

This crate provides a secure way for staff members to "view as" customers for support and debugging purposes, with full audit logging.

# Features

# Example

use identity_impersonation::{ImpersonationClaims, ImpersonationRequest, ImpersonationService};

// Staff initiates impersonation
let request = ImpersonationRequest {
staff_user_id: staff_id,
target_user_id: customer_id,
};

let result = service.start_impersonation(request).await?;
// result.token contains JWT with impersonator_id set
// result.audit_event can be persisted to audit log

Capabilities

No public items.

How to use it

No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.

Module structure

No public modules: the crate root is its whole surface.

Public surface

No public items.

Re-exports. Exported here, defined elsewhere.

ExportDefined in
ImpersonationErrorerror::ImpersonationError
{ClaimsExt,ImpersonationClaims,IMPERSONATION_AUDIENCE,IMPERSONATION_ISSUER}claims::{ClaimsExt,ImpersonationClaims,IMPERSONATION_AUDIENCE,IMPERSONATION_ISSUER}
{ImpersonationConfig,ImpersonationService}service::{ImpersonationConfig,ImpersonationService}
{ImpersonationEvent,ImpersonationEventType}event::{ImpersonationEvent,ImpersonationEventType}
{ImpersonationRequest,StopImpersonationRequest}request::{ImpersonationRequest,StopImpersonationRequest}

Boundary

Reaches into foundation.

Shares tier identity with 7 other crates: identity-auth, identity-identifiers, identity-parties, identity-party-places, identity-rbac, identity-tenant, identity-user-prefs.

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)identity
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/identity/impersonation
Vocabulary in force (lexicon)current

Tier flow. Which tiers this crate's own edges cross.

flowchart LR
  n_identity["identity"] --> n_foundation["foundation"]

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`foundation-audit-log`foundationnoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
chrono^0.4serdenoalways
jsonwebtoken^9.0noalways
serde^1.0derivenoalways
serde_json^1.0noalways
thiserror^1.0noalways
uuid^1.0v4, serdenoalways

Development, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
tokio^1.0rt-multi-thread, macrosnoalways

Build. None.

Depended on by. 1 workspace crate.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  n_application_impersonation["application-impersonation"] -->|uses| SELF
  SELF["identity-impersonation"]
  SELF -->|runtime| n_foundation_audit_log["foundation-audit-log"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.

Targets

KindNameSource
libidentity_impersonation`src/lib.rs`

Error model

No public error type was detected: no public item declares a type named *Error, and no public signature returns one.

Operational characteristics

PropertyEvidence
async public surfacenone detected
async runtimenone detected
database accessnone detected
network I/Onone detected
unsafe codenone detected
environment variablesnone detected

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.

1 workspace crate depends on this one: application-impersonation.

Verification

KindCount
Unit tests19
Integration tests0
Examples0
Doctests0

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc00
Public modules with a //! block00

Metrics

MetricValue
Rust source files6
Source lines1113
Code lines755
Public API items0
Public modules0
Tests19
Examples0
Cargo features0
Direct runtime dependencies7
Workspace reverse dependencies1
pie showData
    title Rust source composition
    "Code" : 755
    "Blank or comment" : 358

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

Todas las identity · Manual