Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

How to assign header Authorization to the client? #19

Open
alexanderm2018 opened this issue Sep 20, 2018 · 5 comments
Open

How to assign header Authorization to the client? #19

alexanderm2018 opened this issue Sep 20, 2018 · 5 comments
Assignees

Comments

@alexanderm2018
Copy link

alexanderm2018 commented Sep 20, 2018

Trying to use your sdk. In my case before I created my own client with Authorization header user/pass
and was able to use your api Now using your sdk in NomadApiConfiguration it accepts token, where do I set Auth header? since I do not have token?

@cgbaker cgbaker self-assigned this Oct 17, 2018
@cgbaker
Copy link
Contributor

cgbaker commented Oct 17, 2018

@alexanderm2018 , which version of Nomad are you working with?

@cgbaker
Copy link
Contributor

cgbaker commented Nov 6, 2018

@alexanderm2018 , to my knowledge, Nomad has never taken Basic (user/pass) authorization. when using the SDK, you have the option (on the client or on a per-method basis) to pass a token, which will be passed using the X-Nomad-Token header (per https://www.nomadproject.io/guides/security/acl.html). Instructions on ACLs and how to get a token are available at that link as well.

@cgbaker cgbaker closed this as completed Nov 6, 2018
@collinzh
Copy link

collinzh commented Mar 1, 2019

I'm having similar issues. We have reverse proxy setup to protect nomad, and the reverse proxy uses basic auth for authentication. I'm using a custom HttpClient as a workaround, but it'd be nice if we could add custom HTTP headers.

@cgbaker cgbaker removed the question label Mar 1, 2019
@cgbaker
Copy link
Contributor

cgbaker commented Mar 1, 2019

Okay, I can understand that use case. I'll reopen this and try to get this feature in to an upcoming release.

@cgbaker cgbaker reopened this Mar 1, 2019
@collinzh
Copy link

collinzh commented Mar 1, 2019

Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants