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

V1.0.11-1 not compatible with API v19 #95

Closed
hoofdcoach opened this Issue May 3, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@hoofdcoach

hoofdcoach commented May 3, 2017

Hi,

So the return values in API V19 have changed and the rundeck-cli is not working well with it.

When I configure to use the API v18 (export RD_URL==http://192.168.42.16:4440/api/18), it somehow still doesn't work.

$ rd tokens create -u admin
Credentials for URL: http://192.168.42.16:4440/api/18
Enter username (blank for token auth): admin
Enter password:
# API Token created:
null

I tried debugging and I got these lines:

INFO: <-- 403 Forbidden http://192.168.42.16:4440/api/18/tokens/admin(10ms)
Odd: if I remove my username from the url I see 5 tokens, when I add it it returns 0...

INFO: {"error":true,"apiversion":19,"errorCode":"unauthorized","message":"(unauthenticated) is not authorized for: /api/18/tokens/admin"}

Why is it saying apiversion:19 ?

INFO: {"user":"admin","token":"aokIyvDUvjkZNdOjarrhACo7iARQK4MJ"}
May 03, 2017 9:44:22 AM okhttp3.internal.platform.Platform log
INFO: <-- END HTTP (59-byte body)

This is the end of the debug, API code is created but on my terminal I still see: null.

@gschueler gschueler added the bug label May 3, 2017

@gschueler

This comment has been minimized.

Show comment
Hide comment
@gschueler

gschueler May 3, 2017

Member

thanks for the report. It looks like there was a bug introduced in Rundeck 2.8.0 which incorrectly uses the API v19 response for API v18 requests for token creation. v18 is supposed to include a id field (the token value), where v19 changed to call it token. The response is including token in both cases, which rd is not expecting.

I can update rd to handle the (invalid) response, but I also filed an issue for Rundeck here: rundeck/rundeck#2479

Member

gschueler commented May 3, 2017

thanks for the report. It looks like there was a bug introduced in Rundeck 2.8.0 which incorrectly uses the API v19 response for API v18 requests for token creation. v18 is supposed to include a id field (the token value), where v19 changed to call it token. The response is including token in both cases, which rd is not expecting.

I can update rd to handle the (invalid) response, but I also filed an issue for Rundeck here: rundeck/rundeck#2479

@gschueler gschueler closed this in cb5159b May 4, 2017

gschueler added a commit that referenced this issue May 4, 2017

Merge pull request #96 from rundeck/issue/95
Handle buggy create token response fix #95
@hoofdcoach

This comment has been minimized.

Show comment
Hide comment
@hoofdcoach

hoofdcoach May 4, 2017

Wauw, a big thank you for fixing this so quick!

hoofdcoach commented May 4, 2017

Wauw, a big thank you for fixing this so quick!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment