Repository navigation
feat: give ExApp containers an FRP token instead of the shared key - #126
Conversation
Signed-off-by: Oleksandr Piskun <[email protected]>
0fa0c8d to
ca34ee8
Compare
📝 Walkthrough
Priority: ➖ Normal Merge Risk: 🟡 Moderate · up to
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
38f6af31-4c6f-4096-afa2-fb269da8ef9d
📒 Files selected for processing: 4
README.mdhaproxy_agent.pytests/unit/payloads.pytests/unit/test_requests.py
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
ExApp containers that connect to HaRP through FRP get HaRP's shared key as
HP_SHARED_KEY, although they only need it to log in to the FRP server. The same key also authenticates HaRP's control API (/exapps/app_api/...).When HaRP creates an ExApp container, it now replaces that key with a token derived from it (
HMAC-SHA256(key, "harp-frp-exapp-v1")), and the FRP login accepts the key or the token. The control API still accepts only the key. Nothing changes for AppAPI, for ExApp images (they only passHP_SHARED_KEYto frpc or check that it is set), for HaRP's own FRP client, for remote Docker engines or for anfrps.tomlof your own.Visible changes for administrators:
On the dev stack, an existing ExApp that holds the key reconnected; a newly registered
test-deploygot the token, connected through FRP, kept working after disable and enable, and got 401 from the control API with it; after a rollback tomainit stayed at 503 until HaRP was upgraded again.