You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an owned programmable demo resource server for local demo and e2e scenarios.
The current local stack relies on httpbin as the upstream resource server. That is useful for generic header echoing, but it does not provide resource-server application spans, stable introspection owned by this repo, or programmable RS-side authorization behavior.
The new RS should act as a standards-shaped e2e harness: it should echo what reached the resource server, emit OpenTelemetry application spans, and optionally enforce bearer/JWT authorization checks against configured route scenarios.
Goals
Show the resource server application span in Jaeger without requiring mesh tracing.
Replace httpbin response parsing with a stable introspection protocol owned by this repo.
Remove the current workaround where OPTIONS with bearer has to be verified through plugin/fake issuer logs because httpbin does not echo useful request headers in the response body.
RS auth failures map to safe bearer-style errors and never expose bearer tokens, exchanged tokens, client secrets, or raw issuer internals.
Route config supports at least action: echo, action: deny, and action: fail.
Route auth config supports issuer/audience/scope/resource checks and at least one denylist mechanism.
The e2e chart deploys the resource server and exposes values/schema for image, env, resources, and route config.
DevSpace local-test builds/deploys the resource-server image.
The tracing tutorial is updated so Jaeger screenshots can show plugin, issuer, and RS application spans.
Existing fake issuer and Keycloak e2e tests continue to pass after migration.
Documentation explains that this RS is a demo/e2e conformance harness, not a production resource server implementation.
Test Plan
Unit tests for route matching:
path prefix selection
method matching
* method support
no matching route behavior
Unit tests for actions:
echo
deny
fail
Unit tests for introspection:
stable JSON shape
header normalization
bearer summary
JWT claim extraction
trace context reporting
Unit tests for auth:
missing bearer
malformed bearer
unsigned demo JWT accepted only when configured
unsigned token rejected by oidc-jwt
Keycloak/OIDC JWT accepted with trusted issuer and valid JWKS signature
unknown issuer rejected
expired token rejected
invalid audience rejected
missing scope rejected
resource mismatch rejected
denylisted token/subject/scenario rejected
E2E tests:
fake issuer color scenarios still pass
unmatched pass-through preserves original bearer and is visible in RS introspection
non-preflight OPTIONS with bearer shows exchanged token in RS introspection
true CORS preflight bypasses token exchange
Keycloak exchanged token is accepted by the RS
at least one valid Keycloak token is rejected by the RS for RS-side authorization policy, such as audience/scope/resource mismatch
Notes
This builds on #9. The RS should use the Keycloak/OIDC/JWKS assumptions already introduced there rather than inventing a parallel issuer model.
If reusable token verification code is needed, extract it into a shared internal package that can be used by both the dashboard token verifier and the new resource server.
Summary
Add an owned programmable demo resource server for local demo and e2e scenarios.
The current local stack relies on
httpbinas the upstream resource server. That is useful for generic header echoing, but it does not provide resource-server application spans, stable introspection owned by this repo, or programmable RS-side authorization behavior.The new RS should act as a standards-shaped e2e harness: it should echo what reached the resource server, emit OpenTelemetry application spans, and optionally enforce bearer/JWT authorization checks against configured route scenarios.
Goals
httpbinresponse parsing with a stable introspection protocol owned by this repo.OPTIONSwith bearer has to be verified through plugin/fake issuer logs becausehttpbindoes not echo useful request headers in the response body.Proposed Behavior
Add a new demo/e2e resource server with route-driven behavior.
Routes should use
action, notmode.Initial actions:
echo: validate according to route auth config, then return introspection JSON.deny: return configured status/error without forwarding to any backend.fail: synthesize configured upstream failure behavior.The RS should expose:
/healthzAuthorizationToken Validation
Support two explicit validation profiles:
unsigned-demo-jwt: compatibility with the existing fake issuer’s unsigned demo JWTs.oidc-jwt: production-like validation for Keycloak-issued access tokens using OIDC discovery and JWKS.For
oidc-jwt, the RS should validate:RS256expnbfwhen presentBearer-token failures should use RFC 6750-shaped responses where practical:
invalid_requestinvalid_tokeninsufficient_scopeor 403 as appropriateScenario Config Sketch
Acceptance Criteria
fake-resource-serveror equivalent.Authorizationthrough RS introspection instead ofhttpbinresponse shape.OPTIONSwith bearer can verify the exchanged token from RS introspection, without scraping plugin or issuer logs.action: echo,action: deny, andaction: fail.Test Plan
Unit tests for route matching:
*method supportUnit tests for actions:
echodenyfailUnit tests for introspection:
Unit tests for auth:
oidc-jwtE2E tests:
OPTIONSwith bearer shows exchanged token in RS introspectionNotes
This builds on #9. The RS should use the Keycloak/OIDC/JWKS assumptions already introduced there rather than inventing a parallel issuer model.
If reusable token verification code is needed, extract it into a shared internal package that can be used by both the dashboard token verifier and the new resource server.