Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rest api: Fix to Disable API authentication #6067

Merged
merged 3 commits into from
Jul 15, 2024

Conversation

algorandskiy
Copy link
Contributor

Summary

Fix to #5625 where incorrect test with a client always using an adminToken lead to incorrect actual implementation.

Test Plan

Fixed an existing e2e test

Copy link

codecov bot commented Jul 12, 2024

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 56.17%. Comparing base (1493410) to head (c7ec69d).

Files Patch % Lines
daemon/algod/api/server/router.go 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6067      +/-   ##
==========================================
+ Coverage   55.77%   56.17%   +0.39%     
==========================================
  Files         488      488              
  Lines       69434    69437       +3     
==========================================
+ Hits        38730    39008     +278     
+ Misses      28017    27791     -226     
+ Partials     2687     2638      -49     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@gmalouf gmalouf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks right to me. The auth middleware gets disabled on public AI endpoints if no token is passed at startup (noting that admin auth still gets enabled int he proper places). Small comments to look at before approving.

test/e2e-go/restAPI/other/misc_test.go Outdated Show resolved Hide resolved
daemon/algod/api/server/router.go Outdated Show resolved Hide resolved
daemon/algod/api/server/router.go Show resolved Hide resolved
@gmalouf
Copy link
Contributor

gmalouf commented Jul 15, 2024

closes #5747

Co-authored-by: Gary Malouf <982483+gmalouf@users.noreply.github.com>
gmalouf
gmalouf previously approved these changes Jul 15, 2024
@gmalouf gmalouf merged commit 8a44d87 into algorand:master Jul 15, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New DisableAPIAuth option should ignore all passed API tokens
3 participants