Access should be earned by context, not just credentials.
TrustAccess is a policy-driven, context-aware multi-factor access verification framework that evaluates identity, device, location, time and contextual risk before making secure access decisions.
Session created. Context snapshot retained for re-evaluation.
Illustrative outcome: policy passed and risk is low.
Authentication proves identity. Context determines whether access should be trusted right now.
A fair comparison. Most production authentication systems already combine multiple factors. The distinction is not “identity versus context.” It is whether a valid credential is treated as a permanent decision, or as one input to a governed, repeatable verification decision.
Static trust vs. contextual verificationIdentity-only gate
- Physical location
- Device trust
- Presence and timing
Context-aware verification
A decision is created from the current context, then attached to a session that can be re-evaluated when the context changes.
Is the requesting user authenticated?
Authentication establishes who is making the request. It does not describe the conditions of that request.
Is the request inside an authorized zone?
A valid session can be used from anywhere. Polygon containment checks whether the request originates in the protected area.
Are device, QR and timing consistent?
Device recognition, a fresh presence code and an allowed time window reveal whether the request matches the access policy.
A small, auditable question asked every time.
Evidence, not assertion
Identity is one signal. Device state, location, QR freshness and timing describe the conditions of the request.
Policy before probability
Deterministic policy conditions are evaluated first. Risk can add scrutiny; it cannot erase a hard-deny rule.
Sessions, not sign-ins
Access creates a session with a context snapshot. The session remains subject to re-evaluation.
One framework, many policies
Attendance, events and laboratories change the policy configuration, not the verification architecture.
The framework is independent of any single application. A smart campus is where the policy model is configured and demonstrated.
Successful decisions open sessions. Heartbeats compare new context with the session baseline.
Risk is an input to the decision, never a replacement for policy. Hard-deny conditions bypass probabilistic assessment.
Trust, context and verification working as one.
Trust
Establishes who the user is, what they are permitted to do, and whether their device can be trusted. This pillar manages authentication, role-based access control, JWT-based sessions, and device registration.
- Authentication
- Identity Verification
- JWT Token Management
- Authorization
- Role-Based Access Control
- Device Trust
- Secure Session Management
Context
Collects and normalizes contextual evidence from the requesting environment — including GPS coordinates, geofence boundaries, dynamic QR codes, device state, and temporal information — into a structured verification context.
- GPS Collection
- Geolocation Processing
- Polygon Geofencing
- Dynamic QR Validation
- Time Context
- Device State Assessment
- Context Collection
- Context Normalization
Verification
Evaluates the normalized context against defined policies, assesses contextual risk, and produces a final access decision. This pillar also manages session lifecycle, periodic re-evaluation, and audit logging.
- Verification Engine
- Policy Engine
- Risk Engine
- Decision Engine
- Session Lifecycle
- Periodic Re-evaluation
- Audit Logging
A shared framework, not three isolated modules
Every request is evaluated by the same trust, context and verification responsibilities. Only the policy configuration changes.
Nine stages from request to auditable decision.
Stage inspector showing Identity Verification, stage 1 of 9
Identity Verification
Authenticate the requesting user and validate their credentials.
- User credentials
- JWT token
- Session identifier
- Authenticated user identity
- User role
- Authentication status
Validate identity through authentication service and verify active session.
- Execution
- Conceptual lifecycle, not a live run.
- Ownership
- Several stages may share one backend module.
- Record
- Decision + context snapshot → audit trail.
NoteThe pipeline is a conceptual lifecycle model. The guided trace is an educational walkthrough, not a live backend execution.
One verification spine, six clear layers.
User-facing applications that collect contextual evidence and present access decisions.
Client Layer
Backend Application Layer
Trust Layer
Context Layer
Verification Layer
Persistence & Support
Modular monolith
Spring Boot hosts the verification services in one deployable application.
Spatial persistence
PostgreSQL + PostGIS evaluates polygon containment.
Separate inference
FastAPI estimates contextual suspicion; it does not own policy.
The result is never just a score.
The context snapshot is written to the audit record with the final decision. Illustrative data only.
- 01IdentityAuthenticated identity and role
- 02DeviceSession device and familiarity
- 03LocationPostGIS polygon containment
- 04Dynamic QRSigned, fresh, unused code
- 05NormalizeAssemble one VerificationContext
- 06PolicyEvaluate deterministic constraints
- 07RiskEstimate contextual suspicion
- 08DecisionApply the decision contract
Awaiting evaluation
The final decision appears after policy and risk complete.
No accuracy, latency or real-world deployment result is claimed here. The simulation demonstrates the decision contract described in the research model.
Illustrative onlyAccess can outlive its context. The session should not.
- T0
Session admitted
An ALLOW decision creates the access session and stores its context snapshot.
- T1
Evidence received
A periodic context snapshot is added to the session record.
- T2
Re-evaluated
Policy and contextual risk are evaluated again.
- T3
Session maintained
The new evidence supports continued access.
A heartbeat is periodic contextual evidence, not continuous biometric authentication. The evidence interval, retry policy and expiry window are deployment-specific; the framework does not claim uninterrupted monitoring.
Revocation is propagated to protected APIs.
Session evidence is retained for audit.
One framework. Different context.
Attendance verification
A student requests attendance for a scheduled class. The framework combines an authenticated identity, a fresh classroom QR, a classroom polygon and the class time window. If every constraint passes and contextual risk is low, attendance is recorded without interrupting the class.
- 01Request
The student scans the classroom QR and submits an attendance request.
- 02Assemble
Identity, role, QR, GPS, device and time are normalized into one context.
- 03Evaluate
Policy checks the class window and classroom polygon; risk is estimated.
- 04Record
An ALLOW decision writes attendance with its context snapshot.
All explicit constraints pass and contextual risk is low.
- Authenticated student with an active course enrolment
- Signed QR within its freshness window
- GPS inside the classroom polygon
- Request inside the scheduled class window
These Smart Campus configurations demonstrate policy parameterization; they are not the core research contribution, a live deployment, or evidence of measured outcomes. The same verification framework can be configured for other domains.
Trace the shared pipelineA polygon is a policy, not proof of presence.
PostGIS evaluates the submitted point against a multi-vertex zone boundary. The result is one explicit input to policy — not a verdict on its own.
Constraint satisfied
The point is inside — or on the boundary of — the configured polygon. Other policy constraints and contextual risk still apply.
Rooms, labs and venue perimeters are rarely circular. A multi-vertex polygon can follow the actual authorized space instead of a generous radius that bleeds through walls.
-- ST_Covers includes the boundary;
-- use ST_Contains when the boundary is excluded.
SELECT ST_Covers(zone.geom, request.point)
FROM access_zones AS zone
WHERE zone.id = :zone_id;Geofencing constrains a request; it does not prove physical presence. GPS is client-reported evidence and can be spoofed. Higher-assurance deployments should combine independent signals and define explicit boundary semantics.
ML assists risk. Policy retains authority.
Research integrity note
The figures below describe a planned synthetic evaluation harness. No accuracy, precision, recall, latency or deployment result is claimed. Measured metrics will be reported only after a controlled held-out evaluation is complete.
10,000synthetic events
- Data origin
- Synthetic only
- Class balance
- 70 / 30
- Evaluation model
- Logistic Regression
The dataset is generated to exercise the verification pipeline. It is not a sample of real campus activity and does not establish external validity.
GPS Distance
Continuous · meters
Distance between the submitted coordinates and the authorized zone.
Time Deviation
Continuous · minutes
Difference between the request time and the expected access window.
Device Familiarity
Continuous · 0–1
How consistently this device has appeared in prior successful access.
QR Validation Result
Binary · 0 or 1
Whether the presence code passed signature, freshness and replay checks.
Recent Failures
Discrete · count
Failed access attempts by the same identity in a recent window.
Access Frequency
Continuous · 0–1
Normalized historical frequency of this identity accessing the resource.
QR validation is included in the research feature vector. In the runtime decision contract, a hard QR failure is resolved by policy before inference, so the model is not asked to override it.
Build and assess the model before it informs runtime decisions.
- 01
Synthetic generation
10,000 labelled events: 7,000 normal, 3,000 suspicious.
- 02
Validation
Check ranges, missing values and label consistency.
- 03
Preprocessing
Scale continuous features and encode the binary QR result.
- 04
Train / test split
Hold out a stratified test set before any fitting.
- 05
Train + baseline
Fit Logistic Regression and the rule-based baseline.
- 06
Held-out evaluation
Compare accuracy, precision, recall, F1, FPR and FNR. Pending.
Estimate risk only after deterministic policy has been evaluated.
- 01
Probability estimate
Infer P(suspicious | context features) from the fitted model.
- 02
Risk mapping
Map the model output to a bounded risk score.
- 03
Decision integration
Policy remains authoritative; ML can only raise verification.
The trained model will be compared with a deterministic rule-based baseline on a held-out synthetic split. The comparison is designed to test whether contextual risk estimation adds value over explicit rules.
Status: protocol defined, values not reported. No model-performance claim should be inferred from this page.
The model produces a probability, not a decision. The score is mapped into the policy contract; thresholds and tolerances are deployment configuration, not universal constants.
Trust Score = (1 − P(suspicious | x)) × 100A model cannot override a hard deny.
If a deterministic constraint fails, the request is denied before inference. A high model confidence cannot rescue it; a low score cannot soften it.
if policy = HARD_DENY → DENY · ML skipped
if policy = PASS ∧ risk low → ALLOW
if policy = PASS ∧ risk elevated → VERIFY
The stack follows the boundaries.
Client
Evidence producer, not the decision authority.
Flutter
Mobile demonstration client
Submits authentication state, QR payloads and client-reported context to the verification backend. It does not decide access locally.
V1 targetAdmin web console
Policy, zone and audit management
Separate administrative surface for policy and geofence configuration. It is not part of this public site.
PlannedBackend
One transactional verification path in a modular monolith.
Java 21 / Spring Boot
Verification backend
Hosts authentication, context normalization, policy, decision, session and audit modules within one deployable application.
V1 targetSpring Security
Authentication and endpoint authorization
Handles credential verification, stateless token handling and role-based endpoint protection.
V1 targetSpring Data JPA
Relational persistence and transactions
Manages entity persistence and transactional boundaries. Spatial predicates can be issued through native PostGIS queries.
V1 targetSpatial persistence
PostgreSQL is the system of record; PostGIS evaluates geometry.
PostgreSQL 16
Relational system of record
Stores identities, policies, zones, session state and audit events. Schema changes should be migration-managed.
V1 targetPostGIS
Polygon containment
Evaluates point-in-polygon predicates such as ST_Covers for boundary-inclusive zones. Boundary semantics must be explicit.
V1 targetMachine learning
Separate inference lifecycle, subordinate decision authority.
Python / FastAPI
Isolated inference service
Exposes a bounded inference endpoint to the backend. It is operationally separate from the policy and decision modules.
V1 targetscikit-learn
Logistic Regression experiment
Fits and evaluates the interpretable classifier against a rule-based baseline. No latency or accuracy claim is made here.
EvaluationDelivery
Reproducible environments; operational services remain optional.
Docker + Compose
Local and deployment topology
Packages the backend, database and inference service for reproducible development and deployment.
V1 targetFirebase Cloud Messaging
Step-up and revocation notifications
Optional delivery channel for verification prompts and session revocation notices. Not required for the core decision path.
PlannedNginx
TLS termination and routing
Optional reverse proxy for TLS, request limits and path routing in a deployed environment.
PlannedOne verification core
Authentication, context, policy, decision and audit share one transactional backend in V1. This avoids distributed coordination before load justifies it.
Bounded inference
The ML service estimates contextual risk over a narrow input contract. It cannot read policy authority or grant access by itself.
Evidence, not truth
Client-submitted GPS, QR and device data are treated as evidence. The design does not assume they are impossible to spoof.
Inspect the decision, not just the badge.
TrustAccess makes identity, context and policy visible in one verification path. Explore the architecture, test a deterministic scenario, or examine the research method — including its limits.
No account required · illustrative simulations
Research framework · illustrative Smart Campus configurations
Status reflects V1 intent, not a deployment claim