Commit 71ed5e5
fix(security): auth for bounty claim, SSL verification, remove hardcoded admin key (#2800)
1. beacon_api.py: Add X-Admin-Key authentication to /api/bounties/<id>/claim
- Previously anyone could claim bounties without authentication
- Now requires RC_ADMIN_KEY via X-Admin-Key header (same as complete_bounty)
2. beacon_api.py: Enable SSL verification in sync_bounties
- Previously disabled SSL verification unconditionally
- Now verifies by default; opt-out via RC_DISABLE_SSL_VERIFY=1 env var
3. fleet_immune_system.py: Remove hardcoded admin key fallback
- Previously fell back to 'rustchain_admin_key_2025_secure64' when
RC_ADMIN_KEY env var was not set
- Now requires RC_ADMIN_KEY to be set; endpoints return 503 if missing
- Also uses hmac.compare_digest for timing-safe comparison
RTC: RTC4642c5ee8467f61ed91b5775b0eeba984dd776ba
Co-authored-by: haoyousun60-create <cdsun88@users.noreply.github.com>1 parent 69396d8 commit 71ed5e5
2 files changed
Lines changed: 28 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
536 | 537 | | |
537 | 538 | | |
538 | 539 | | |
539 | | - | |
| 540 | + | |
540 | 541 | | |
541 | | - | |
542 | | - | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
543 | 547 | | |
544 | 548 | | |
545 | 549 | | |
| |||
625 | 629 | | |
626 | 630 | | |
627 | 631 | | |
628 | | - | |
| 632 | + | |
629 | 633 | | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
630 | 642 | | |
631 | 643 | | |
632 | 644 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
991 | 991 | | |
992 | 992 | | |
993 | 993 | | |
994 | | - | |
995 | | - | |
996 | | - | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
997 | 1000 | | |
998 | 1001 | | |
999 | 1002 | | |
| |||
1007 | 1010 | | |
1008 | 1011 | | |
1009 | 1012 | | |
1010 | | - | |
1011 | | - | |
1012 | | - | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
1013 | 1019 | | |
1014 | 1020 | | |
1015 | 1021 | | |
| |||
0 commit comments