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

planemo's configuration of bioblend's api key prevents running commands without authentication that don't require it #1476

Open
hexylena opened this issue Sep 26, 2024 · 4 comments · May be fixed by #1477

Comments

@hexylena
Copy link
Member

e.g.

bioblend DEBUG 2024-09-26 12:36:21,127: GET - attempts left: 10; retry delay: 10.0
urllib3.connectionpool DEBUG 2024-09-26 12:36:21,129: Starting new HTTPS connection (1): usegalaxy.org:443
urllib3.connectionpool DEBUG 2024-09-26 12:36:21,774: https://usegalaxy.org:443 "GET /api/invocations/84e15596bd4fc608 HTTP/11" 401 62
bioblend WARNING 2024-09-26 12:36:21,774: GET: error 401: b'{"err_msg":"Provided API key is not valid.","err_code":401001}', 9 attempts left

that api invocation is public (thanks for the tip @mvdbeek) but planemo's invocation fails due to the API key.

The corresponding bioblend code without an API key however succeeds:

from bioblend.galaxy import GalaxyInstance
gi = GalaxyInstance('https://usegalaxy.org')
print(gi.invocations.show_invocation(invocation_id='84e15596bd4fc608'))

If key=None or key="" is passed to GalaxyInstance the call continues to succeed, so however planemo is setting the empty API causes an issue.

@mvdbeek
Copy link
Member

mvdbeek commented Sep 26, 2024

which command were you running ?

@mvdbeek
Copy link
Member

mvdbeek commented Sep 26, 2024

nevermind, I guess we're trying the default admin key. Can you check if the silly thing of --api_key "" works ?

@hexylena
Copy link
Member Author

Ahh the default admin key of course 🤦‍♀️ of course. Ok, that's probably a sensible default then, I'll close this.

@mvdbeek
Copy link
Member

mvdbeek commented Sep 26, 2024

I think anon calls should just work, that's a fair request ?

@mvdbeek mvdbeek reopened this Sep 26, 2024
mvdbeek added a commit to mvdbeek/planemo that referenced this issue Sep 26, 2024
Should fix galaxyproject#1476?
We might want to see which commands can (at least in principle) work
fine without auth.
@mvdbeek mvdbeek linked a pull request Sep 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants