Buckets:
AnonymousSpottedToad/candidate_bucket / preliminary /mappings /java /session_based_access_control /glawson6_jaiclaw.json
| { | |
| "role_mappings": [ | |
| { | |
| "role": "Subject", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No in-repo client sends the handshake session token to a HandshakeTokenFilter-protected /mcp/** path. HandshakeHttpClient.post (extensions/jaiclaw-tools-security/.../HandshakeHttpClient.java:50) is only called for the /capabilities,/negotiate,/challenge,/verify,/establish handshake endpoints without a bearer; the example jaiclaw-examples/security-handshake-server uses its own McpToolController, not this filter." | |
| }, | |
| { | |
| "role": "Authentication enforcer", | |
| "status": "present", | |
| "symbol": "doFilterInternal", | |
| "file": "extensions/jaiclaw-tools-security/src/main/java/io/jaiclaw/tools/security/HandshakeTokenFilter.java", | |
| "lines": "67", | |
| "notes": "doFilterInternal in HandshakeTokenFilter (OncePerRequestFilter, registered as bean in HandshakeSecurityAutoConfiguration.java:57) extracts the Bearer session token on /mcp/** (except /mcp/security), calls sessionStore.findByToken at line 89 and returns 401 when empty, else sets a UsernamePasswordAuthenticationToken with the verified subject. Opt-in: only active with jaiclaw.security.handshake.server.enabled=true (the default security mode is a static API key, which is not this pattern)." | |
| }, | |
| { | |
| "role": "Verifier", | |
| "status": "present", | |
| "symbol": "findByToken", | |
| "file": "extensions/jaiclaw-tools-security/src/main/java/io/jaiclaw/tools/security/HandshakeSessionStore.java", | |
| "lines": "81", | |
| "notes": "Reached from doFilterInternal (HandshakeTokenFilter.java:89). findByToken returns the completed HandshakeSession whose stored sessionToken equals the presented token and whose tenant matches, or empty; the filter maps empty to 401. The token is an HS256 JWT minted by CryptoService.createSessionToken but it is never signature-verified, only resolved by equality against server-side state, so it acts as an opaque session id; JWT exp is not checked." | |
| }, | |
| { | |
| "role": "Session manager", | |
| "status": "present", | |
| "symbol": "sessions", | |
| "file": "extensions/jaiclaw-tools-security/src/main/java/io/jaiclaw/tools/security/HandshakeSessionStore.java", | |
| "lines": "16", | |
| "notes": "In-memory ConcurrentHashMap of HandshakeSession in HandshakeSessionStore (bean at HandshakeSecurityAutoConfiguration.java:34), streamed by findByToken (line 83) to resolve the principal (verifiedSubject). Cited as the field because the only lookup method, findByToken, is already the Verifier; create/put/remove (lines 31/46/72) maintain the map. No expiry/eviction of sessions." | |
| }, | |
| { | |
| "role": "Authorisation enforcer", | |
| "status": "present", | |
| "symbol": "apiKeyFilterChain", | |
| "file": "core/jaiclaw-security/src/main/java/io/jaiclaw/security/JaiClawSecurityAutoConfiguration.java", | |
| "lines": "133", | |
| "notes": "After the handshake filter (HIGHEST_PRECEDENCE+10) authenticates, the Spring Security chain built by apiKeyFilterChain (default mode, matchIfMissing) applies authorizeHttpRequests (line 141): /mcp/** must be authenticated, anything unlisted denyAll. Equivalent jwtFilterChain at line 201 in jwt mode. Caveat: the chain also requires the X-API-Key, and the ROLE_HANDSHAKE authority set by the filter is never checked." | |
| }, | |
| { | |
| "role": "Decider", | |
| "status": "external", | |
| "symbol": "check", | |
| "file": "core/jaiclaw-security/src/main/java/io/jaiclaw/security/JaiClawSecurityAutoConfiguration.java", | |
| "lines": "141", | |
| "notes": "Invoked by the framework AuthorizationFilter installed by authorizeHttpRequests in apiKeyFilterChain (line 141): Spring Security's RequestMatcherDelegatingAuthorizationManager / AuthenticatedAuthorizationManager.check decide grant or deny per URL rule. No in-repo decision method." | |
| }, | |
| { | |
| "role": "Policy provider", | |
| "status": "present", | |
| "symbol": "requestMatchers", | |
| "file": "core/jaiclaw-security/src/main/java/io/jaiclaw/security/JaiClawSecurityAutoConfiguration.java", | |
| "lines": "145", | |
| "notes": "The URL authorization rules declared in apiKeyFilterChain (lines 142-146; this line: /mcp/** authenticated, then anyRequest denyAll) are the policy consulted by the Decider. The policy is coarse (authenticated-only), with no role or per-tool privileges." | |
| }, | |
| { | |
| "role": "System", | |
| "status": "present", | |
| "symbol": "executeTool", | |
| "file": "core/jaiclaw-gateway/src/main/java/io/jaiclaw/gateway/mcp/McpController.java", | |
| "lines": "82", | |
| "notes": "McpController (bean at jaiclaw-spring-boot-starter/.../JaiClawGatewayAutoConfiguration.java:219) handles POST /mcp/{serverName}/tools/{toolName}, a /mcp/** path guarded by HandshakeTokenFilter and the apiKeyFilterChain rule; executeTool runs provider.execute (line 99)." | |
| } | |
| ] | |
| } | |
Xet Storage Details
- Size:
- 4.9 kB
- Xet hash:
- 8f7e12b4e9a4259bb7f04bc577691d7a665c02a4d71e9385b6d4c732dc8e3081
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.