iet-auth-profiles
feature implementation official
Implements verified persona selection, independent of token and policy mechanisms.
CoreFeaturesIntegrationsStacksTooling
Used bynothing in the repository
iet-auth-profilesimplementationProfile selection mechanismDepends oniet-corecontractiet-authcontract
How to use it
iet-auth-profiles performs verified persona selection: given an authenticated Principal and a profile name, it confirms the subject owns that persona and returns a new Principal with the profile set. It depends only on the ProfileStore port, so the store implementation (for example a Timescale-backed one) stays independently selectable from tokens and policies.
// crates/features/iet-auth-profiles/tests/profiles.rs
use ProfileStore;
use Profiles;
use ;
;
let identity = Principal ;
// Selection verifies ownership and replaces (never merges) the profile.
let selected = Profiles.select.await?;
assert_eq!;
assert!;
- An empty subject fails with
auth.required; an unknown or disabled profile fails withprofile.denied. - Profile names are bounded to 1024 bytes and the subject is preserved unchanged.
- Profiles are identity-owned personas, not roles or tenants;
iet-auth-rbacandiet-auth-acldecide access.
How it works
select rejects an empty subject, asks the ProfileStore whether the subject owns the requested profile, and returns a new Principal that replaces the old profile rather than merging it.
sequenceDiagram
participant C as "Caller"
participant P as "Profiles"
participant S as "ProfileStore"
C->>P: "select identity profile"
alt "subject empty"
P-->>C: "auth.required"
else "subject present"
P->>S: "enabled subject profile"
S-->>P: "bool"
alt "enabled"
P-->>C: "Principal with profile"
else "disabled or invalid"
P-->>C: "profile.denied"
end
endWhat it implements
- Implements
iet_auth::ProfileStore-related selectionfromiet-auth.
What's inside
Modules
src/lib.rs
Public API
(root)
- struct
Profiles
Impl map
ProfileStore for Store
Depends on
Used by
- No other framework crate depends on it directly.
In this repository
- Not used by a checked-in example yet.
Source: crates/features/iet-auth-profiles