You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tooling.apache.org by "asf-tooling (via GitHub)" <gi...@apache.org> on 2026/03/31 01:34:37 UTC
[I] API JWT Creation Endpoint Missing Cache-Control Header (tooling-trusted-releases)
asf-tooling opened a new issue, #977:
URL: https://github.com/apache/tooling-trusted-releases/issues/977
**ASVS Level(s):** [L2-only]
**Description:**
### Summary
The API endpoint for JWT creation returns credentials without cache-control headers, while the equivalent web endpoint correctly implements Cache-Control: no-store. This inconsistency creates a caching vulnerability in the API path. JWT credentials valid for 30 minutes could be cached by server-side components. If a shared cache (e.g., CDN with aggressive caching, misconfigured Varnish) stores the response, subsequent requests matching the cache key could receive another user's JWT.
### Details
**Affected Files and Lines:**
- `atr/api/__init__.py:398-415` - JWT creation without cache headers
The API endpoint returns JWTs without anti-caching headers while the web endpoint correctly implements them, creating an inconsistency.
### Recommended Remediation
Covered by global fix in FINDING-046. If implementing per-endpoint:
```python
@app.route('/api/jwt/create', methods=['POST'])
async def jwt_create(...):
# ... JWT creation logic
response = quart.jsonify({'jwt': token})
response.headers['Cache-Control'] = 'no-store'
response.headers['Pragma'] = 'no-cache'
return response
```
### Acceptance Criteria
- [ ] Cache-Control header added to response
- [ ] Pragma header added for compatibility
- [ ] Consistency with web endpoint
- [ ] Integration test verifies headers
- [ ] Unit test verifying the fix
### References
- Source reports: L2:14.2.2.md, L2:14.3.2.md
- Related findings: FINDING-046, FINDING-011
- ASVS sections: 14.2.2, 14.3.2
### Priority
High
---
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@tooling.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tooling.apache.org
For additional commands, e-mail: dev-help@tooling.apache.org
Re: [I] API JWT Creation Endpoint Missing Cache-Control Header (tooling-trusted-releases)
Posted by "sbp (via GitHub)" <gi...@apache.org>.
sbp commented on issue #977:
URL: https://github.com/apache/tooling-trusted-releases/issues/977#issuecomment-4225358715
Yep. Resolved by e32be309af1a87bbf81fa859cc5f6bd7506cfb72 in #954.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@tooling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tooling.apache.org
For additional commands, e-mail: dev-help@tooling.apache.org
Re: [I] API JWT Creation Endpoint Missing Cache-Control Header (tooling-trusted-releases)
Posted by "sbp (via GitHub)" <gi...@apache.org>.
sbp closed issue #977: API JWT Creation Endpoint Missing Cache-Control Header
URL: https://github.com/apache/tooling-trusted-releases/issues/977
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@tooling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tooling.apache.org
For additional commands, e-mail: dev-help@tooling.apache.org
Re: [I] API JWT Creation Endpoint Missing Cache-Control Header (tooling-trusted-releases)
Posted by "dave2wave (via GitHub)" <gi...@apache.org>.
dave2wave commented on issue #977:
URL: https://github.com/apache/tooling-trusted-releases/issues/977#issuecomment-4200682667
@sbp Did you fix this by adding no-cache in an afterRequest?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@tooling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tooling.apache.org
For additional commands, e-mail: dev-help@tooling.apache.org