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

Authentication via HTTP API #155

Closed
MadsRC opened this issue May 7, 2015 · 4 comments
Closed

Authentication via HTTP API #155

MadsRC opened this issue May 7, 2015 · 4 comments

Comments

@MadsRC
Copy link
Contributor

MadsRC commented May 7, 2015

The docs mention "Otherwise, a client token can be retrieved via authentication backends.

Each authentication backend will have one or more unauthenticated login endpoints. These endpoints can be reached without any authentication, and are used for authentication itself."

I can't seem to do that via the API. The docs also state "For example, the GitHub login endpoint is located at auth/github/login" but I keep getting an error:

Is authentication via HTTP API not supported yet? The docs aren't quiet clear. Ideally I'd like to generate a token using a username and password and have that token send back to me in a cookie (Actually, exactly what the docs mention).

@sethvargo
Copy link
Contributor

Hi @MadsRC

The GitHub auth backend requires you first configure and setup the backend. In order to do this, you will need to use a root token or a token obtained from another source. Once you configure the GitHub backend, you also need to configure it. This is a bit unclear in the docs, so I have pushed up #160 to explain the steps in more detail with copy-pastable commands.

Does that help? I was able to get GitHub authentication working successfully following those steps.

@MadsRC
Copy link
Contributor Author

MadsRC commented May 8, 2015

Hi @sethvargo

What I'm trying to do is authenticate a user using userpass over HTTPS. It's working fine using the terminal/vault. The docs just state that "Each authentication backend will have one or more unauthenticated login endpoints." but does not mention what said endpoint is or how the login details should be presented to the HTTP API.

EDIT: I found the following line in the docs:
"For example, the GitHub login endpoint is located at auth/github/login"
Logic would have it that the info I'm looking for should be at auth/userpass/login though it does not seem like said route exists?

[0] mrc@io 08-05-2015 11:16:35
% ~/vault help auth/github/login
Error reading help: Error making API request.

URL: GET https://vault.mydomain.com:8200/v1/auth/github/login?help=1
Code: 500. Errors:

* no handler for route 'auth/github/login'
[1] mrc@io 08-05-2015 11:18:02
% ~/vault help auth/userpass/login
Error reading help: Error making API request.

URL: GET https://vault.mydomain.com:8200/v1/auth/userpass/login?help=1
Code: 500. Errors:

* unsupported path

@MadsRC
Copy link
Contributor Author

MadsRC commented May 8, 2015

I figured out how to do it by remembering that the vault client uses the interface. Tailing the log while authenticating using the app allowed me to find the correct path and how the data should be represented.

@sethvargo
Copy link
Contributor

Fixed in #155

jimlambrt added a commit that referenced this issue Sep 12, 2023
This update brings in PR #155 from go-kms-wrapping which adds support for azure
workload identity authentication
VioletHynes pushed a commit that referenced this issue Sep 12, 2023
* chore: update azurevaultkey wrapper dependency

This update brings in PR #155 from go-kms-wrapping which adds support for azure
workload identity authentication

* chore: add changelog entry

* fixup! chore: add changelog entry
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

2 participants