Allow opting in to plain-HTTP OAuth requests per component #56
All Vouch review confidence checks passed
Residual risk 0.26 = Change Risk (0.62) × (1 − Review Confidence (0.58)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.62 · 257 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.332
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.062
Real PR Conversation Timeline
1 comments
"Review active on #56"
general
weight: 0.35
jeswr
Context
oauth4webapirefuseshttp:endpoints. This blocks local development against a Community Solid Server onhttp://localhost, for example the Solid test suite's end-to-end tests.This PR builds on #18 which started from loopback detection and then moved to a global
InsecureConfiguration.allow()switch after this review. This PR keeps the opt-in idea, the deprecation-on-purpose approach and the default-secure stance from #18. It replaces the global switch with options that each component takes in its constructor, and it covers discovery, registration and refresh, which #18 missed.Per-component
allowInsecureRequestsalso follows @jeswr's work.Related: #21 (custom fetch).
Change
Each component that calls oauth4webapi takes an optional
oauth.HttpRequestOptionsas its last constructor argument.allowInsecureRequests()creates the options for the application author, who then needs no knowledge of oauth4webapi's symbol:Components changed:
DiscoveryAuthorizationServerProvider: discovery.DynamicRegistrationClientProvider: registration.ClientCredentialsTokenProvider: discovery and client-credentials grant.DPoPTokenProvider: authorization-code grant and refresh grant.BearerTokenProvider: discovery, registration and authorization-code grant.Behaviour change
BearerTokenProvideris no longer insecure by default. It had a hard-coded constant that allowed plain HTTP for every consumer. Anyone who relied on this against a local server must now passallowInsecureRequests().