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

auth token does not exist? #19

Closed
dontommy opened this issue May 27, 2014 · 9 comments
Closed

auth token does not exist? #19

dontommy opened this issue May 27, 2014 · 9 comments

Comments

@dontommy
Copy link

Hey
Just found this script today.
Put it in my username and api key for rackspace in the config file.

But I keep getting an "Auth Token Does Not Exist" ?

What am I doing wrong?

Thanks

@linickx
Copy link
Owner

linickx commented May 27, 2014

Hello,

What country are you in?

i.e. by default the script tries the USA servers, there is a config entry to auth against the UK.

I hope that helps!
Kind regards,
Nick

On 27 May 2014, at 11:25, Tommy Maersk notifications@github.com wrote:

Hey
Just found this script today.
Put it in my username and api key for rackspace in the config file.

But I keep getting an "Auth Token Does Not Exist" ?

What am I doing wrong?

Thanks


Reply to this email directly or view it on GitHub.

@dontommy
Copy link
Author

Hey
Im in Denmark, but yes my cloud servers are in the uk with rackspace.

My config file looks like this:

RSUSER=myrackspaceusername
RSAPIKEY=myrackspaceapikey
RSPATH=/root/rsdns/
UKAUTH=1

So it is set to use the UK servers right?

And if I edit the RSUSER and RSAPIKEY - its says Authentication Failed.
So the username and api key must be correct

@linickx
Copy link
Owner

linickx commented Jul 7, 2014

Note to self - could be same as #18

@erh-git
Copy link

erh-git commented Aug 12, 2014

I think the problem is in "auth.sh". I ran the curl manually which fetches an authentication token:

curl -s -X GET -D - -H X-Auth-User:\ XXX-MY-USERNAME-XXX -H X-Auth-Key:\ 112233445566778899 https://auth.api.rackspacecloud.com/v1.0 \
 | tr -s '[:cntrl:]' "\n" \
 | awk '{ if ($1 == "HTTP/1.1") printf "%s,", $2 ; if ($1 == "X-Auth-Token:") printf "%s,", $2 ; if ($1 == "X-Server-Management-Url:") printf "%s,", $2 ;}'

The result was this:
204,42XXXXXXXXXXXXXXXXXXXXXXXXXXXXd6,

Note the comma at the end, with no value in the 'third' position of this string. It turns out this third position should have been the url for "X-Server-Management-Url", but it doesn't look like the Rackspace API returns this anymore... at least, according to this:
flexera-public/rightscale_cookbooks#156

@linickx
Copy link
Owner

linickx commented Aug 18, 2014

Thank you @erh-git do you want to submit a pull request?

I am a bit confused to why my two test devices haven't seen this issue... anyway... @dontommy are you able to test this?

@erh-git
Copy link

erh-git commented Aug 18, 2014

Not going to lie, I'm brand new to github, and have little idea of what you
are asking for ;). I'm actually pretty new to scripting in general, so if
you were hoping I could update the code or write a patch or anything like
that, I'm afraid I wouldn't quite consider myself up to the task :(.

On Mon, Aug 18, 2014 at 10:33 AM, Nick notifications@github.com wrote:

Thank you @erh-git https://github.com/erh-git do you want to submit a
pull request?

I am a bit confused to why my two test devices haven't seen this issue...
anyway... @dontommy https://github.com/dontommy are you able to test
this?


Reply to this email directly or view it on GitHub
#19 (comment).

@linickx
Copy link
Owner

linickx commented Aug 19, 2014

Hello @erh-git ,

A pull request is not as scary as it sounds, if you're looking to learn something new, this is a easy opportunity 😄

  • At the top of this page, click Fork (this will copy rsdns into your git hub)
  • From your copy of rsdns, click the Branch button, in the drop down type something like Auth-Fix-19 and click the create branch thing that appears in the drop down
  • Github, will automatically select the new branch for you, browse to the file, in the top right corner next to Raw/Blame/History is a little pencil, click that to open the editor and make the change you suggested in this issue.
  • when done complete the commit form at the bottom, the smaller-thin text box is the subject, like fix auth issue 19, the larger-fat text box is for longer descriptions.
  • click commit
  • back on your rsdns homepage you'll see a new button has appeared Compare and Pull Request (click it)
  • On the pull request form give it subject like fix auth issue 19 and click create pull request

I will then receive notification and the opportunity to import the branch from your copy of github and merge with my original code.

Honestly, all of this is cosmetic, I could just edit the file myself and put your name in the comment, however this way is better as there is a permanent record of your contribution.

If you're not interested in the above, that's fine with me 👍 and I'll do it at the weekend... although I'd prefer it if @dontommy or another user confirmed the fix first.

@erh-git
Copy link

erh-git commented Aug 20, 2014

Great write up. I think I would absolutely be able to follow it, but I'm
afraid all I did was point out what seems to be the problem... fixing it is
an entirely different issue (and quite possibly outside of my talent
level). I'm sorry I couldn't help any more :( If you're simply concerned
about credit, I'm completely ok not getting any, I just would love to be
able to use rsdns again ;).

On Tue, Aug 19, 2014 at 3:11 AM, Nick notifications@github.com wrote:

Hello @erh-git https://github.com/erh-git ,

A pull request is not as scary as it sounds, if you're looking to learn
something new, this is a easy opportunity [image: 😄]

  • At the top of this page, click Fork
    https://github.com/linickx/rsdns/fork (this will copy rsdns into
    your git hub
    )
  • From your copy of rsdns https://github.com/erh-git/rsdns, click
    the Branch button, in the drop down type something like Auth-Fix-19
    and click the create branch thing that appears in the drop down
  • Github, will automatically select the new branch for you, browse to
    the file, in the top right corner next to Raw/Blame/History is a little
    pencil, click that to open the editor and make the change you suggested in
    this issue.
  • when done complete the commit form at the bottom, the smaller-thin
    text box is the subject, like fix auth issue 19, the larger-fat text
    box is for longer descriptions.
  • click commit
  • On the pull request form give it subject like fix auth issue 19
    and click create pull request

I will then receive notification and the opportunity to import the branch
from your copy of github and merge with my original code.

Honestly, all of this is cosmetic, I could just edit the file myself and
put your name in the comment, however this way is better as there is a
permanent record of your contribution.

If you're not interested in the above, that's fine with me [image: 👍]
and I'll do it at the weekend... although I'd prefer it if @dontommy
https://github.com/dontommy or another user confirmed the fix first.


Reply to this email directly or view it on GitHub
#19 (comment).

@linickx
Copy link
Owner

linickx commented Aug 30, 2014

Hello,

I have started work on v2 compatibility, there's a new branch v2api you can download the latest code as a zip.

The change is in auth.sh, testing so far is just that rsdns list still works.... and it does for me. 😄

The first draft commit has introduced a new dependency jq which appears to be available in homebrew, epel & ubuntu so I think I'm fairly safe in terms of interoperability. I'm hoping that I can use this to improve some of the other code.

cheers,
Nick

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

No branches or pull requests

3 participants