Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upsupport marathon basic auth (Bearer) #4074
Comments
This comment has been minimized.
This comment has been minimized.
|
FYI, I've already got a local change support both auth types. I'll PR that when it's ready. cc @plaflamme |
This comment has been minimized.
This comment has been minimized.
|
This was added in #4009. |
brian-brazil
closed this
Apr 10, 2018
This comment has been minimized.
This comment has been minimized.
|
@adamdecaf Can you describe what doesn't work exactly? The changes in #4009 should have added support for all authentication types:
|
This comment has been minimized.
This comment has been minimized.
|
In specific the code here didn't seem to work for me. I need an auth header like
Is there a pre-release docker image / release with #4009? I can test that out. |
This comment has been minimized.
This comment has been minimized.
|
What I'm seeing is that the auth plugin we use needs public static AuthKey authKeyFromHeaders(HttpRequest request) throws Exception {
Option<String> header = request.header("Authorization").headOption();
if (header.isDefined() && header.get().startsWith("Basic ")) {
String encoded = header.get().replaceFirst("Basic ", "");
String decoded = new String(Base64.getDecoder().decode(encoded), "UTF-8");
String[] userPass = decoded.split(":", 2);
return AuthKey.with(userPass[0], userPass[1]);
}
return null;
} |
This comment has been minimized.
This comment has been minimized.
|
Ah, ok. That's because you need your config to use a |
This comment has been minimized.
This comment has been minimized.
|
Oh ok. The commits made it seem like basic/bearer auth were removed. Are they going to be around for a while? We're not going to use DC/OS. Thanks. I'll try building a docker image from master locally with |
This comment has been minimized.
This comment has been minimized.
|
@adamdecaf basic auth was not supported before #4009. Supporting it is what motivated the change. All authentication methods should be supported in the long run. I suspect the |
This comment has been minimized.
This comment has been minimized.
|
Perfect, thanks! |
This comment has been minimized.
This comment has been minimized.
|
@brian-brazil @plaflamme Would y'all accept a |
This comment has been minimized.
This comment has been minimized.
|
I wouldn't accept a file that contains basic auth details as that'd make debugging harder by making the username not available in the UI, if we were to accept it it would have to contain no more than the raw password. |
adamdecaf
added a commit
to adamdecaf/common
that referenced
this issue
Apr 10, 2018
adamdecaf
added a commit
to adamdecaf/common
that referenced
this issue
Apr 10, 2018
adamdecaf
added a commit
to adamdecaf/common
that referenced
this issue
Apr 10, 2018
adamdecaf
referenced this issue
Apr 10, 2018
Closed
add basic_auth_password_file to HTTP client config #4076
adamdecaf
added a commit
to adamdecaf/common
that referenced
this issue
Apr 11, 2018
adamdecaf
added a commit
to adamdecaf/common
that referenced
this issue
Apr 11, 2018
adamdecaf
added a commit
to adamdecaf/common
that referenced
this issue
Apr 12, 2018
adamdecaf
added a commit
to adamdecaf/common
that referenced
this issue
Apr 12, 2018
adamdecaf
added a commit
to adamdecaf/common
that referenced
this issue
Apr 13, 2018
adamdecaf
added a commit
to adamdecaf/common
that referenced
this issue
Apr 16, 2018
adamdecaf
added a commit
to adamdecaf/common
that referenced
this issue
Apr 17, 2018
adamdecaf
added a commit
to adamdecaf/common
that referenced
this issue
Apr 17, 2018
adamdecaf
added a commit
to adamdecaf/common
that referenced
this issue
Apr 17, 2018
adamdecaf
added a commit
to adamdecaf/common
that referenced
this issue
Apr 18, 2018
brian-brazil
added a commit
to prometheus/common
that referenced
this issue
Apr 23, 2018
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 22, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
adamdecaf commentedApr 10, 2018
Following from #3090 there's no support for
Authorization: Basic ...with marathon, which is what non DC/OS installs use.Part of the
auth_tokenchanges mention this: 2aba238Even before the
auth_token[_file]changes this wouldn't have worked.https://github.com/prometheus/prometheus/blob/v2.2.1/discovery/marathon/marathon.go#L300-L305