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

add mesos basic auth #169

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

add mesos basic auth #169

wants to merge 2 commits into from

Conversation

andreaspeters
Copy link

This PR will add the basic auth method to authenticate against the mesos master. Then the nice DC/OS net is also useful for "normal" mesos installations without authentication token. The authentication string have to be in a env variable and should looks like MESOS_BASIC_AUTH="Basic <BASE64STRING>".

@mesosphere-ci
Copy link

Can one of the admins verify this patch?

@codecov
Copy link

codecov bot commented Aug 10, 2019

Codecov Report

Merging #169 into master will decrease coverage by 0.01%.
The diff coverage is 80%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #169      +/-   ##
==========================================
- Coverage   67.94%   67.92%   -0.02%     
==========================================
  Files          55       55              
  Lines        3584     3588       +4     
==========================================
+ Hits         2435     2437       +2     
- Misses       1149     1151       +2
Flag Coverage Δ
#ct 48.24% <80%> (ø) ⬆️
#ct2 48.24% <80%> (ø) ⬆️
#eunit 24.52% <80%> (+0.05%) ⬆️
Impacted Files Coverage Δ
apps/dcos_net/src/dcos_net_mesos.erl 74.07% <80%> (+0.04%) ⬆️
apps/dcos_l4lb/src/dcos_l4lb_mgr.erl 82.56% <0%> (-0.33%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fe204b5...4f59756. Read the comment docs.

@codecov
Copy link

codecov bot commented Aug 10, 2019

Codecov Report

Merging #169 (0db6fde) into master (7bd01ac) will increase coverage by 0.00%.
The diff coverage is 80.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #169   +/-   ##
=======================================
  Coverage   66.00%   66.01%           
=======================================
  Files          55       55           
  Lines        3759     3763    +4     
=======================================
+ Hits         2481     2484    +3     
- Misses       1278     1279    +1     
Flag Coverage Δ
ct 46.00% <80.00%> (+0.03%) ⬆️
ct2 46.00% <80.00%> (+0.03%) ⬆️
eunit 24.84% <80.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
apps/dcos_net/src/dcos_net_mesos.erl 74.07% <80.00%> (+0.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7bd01ac...0db6fde. Read the comment docs.

@ichernetsky
Copy link
Contributor

@andreaspeters, thanks a lot for your contribution!

It is preferred not to supply individual configuration values through environment variables. Please refer to https://github.com/dcos/dcos-net/blob/master/apps/dcos_net/src/dcos_net_app.erl#L45 to learn more about the way dcos-net gets configured.

By default, dcos-net looks for configuration files under /opt/mesosphere/etc/dcos-net.config.d, which can be overwritten, for instance, through its application environment variable: config_dir. Please note that configuration files should be written in the Erlang term format.

@andreaspeters
Copy link
Author

Hi @ichernetsky , thanks for your response.
Actually, I'm not a Erlang dev, I just copy 'n paste what I already found in your code. And you already use a lot of os:getenv(""). :-) Well, for me it would not be easy to change it like u prefer. But now, you know and I think you understand why I wish me to have basic auth in dcos-net. If someone can add this feature (with a better peace of code), I would be very happy about it. :-)

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

Successfully merging this pull request may close these issues.

3 participants