Skip to content

Commit

Permalink
WIP: graft verify_none to ssl options in chef-server
Browse files Browse the repository at this point in the history
Signed-off-by: Lincoln Baker <[email protected]>
  • Loading branch information
lbakerchef committed Dec 9, 2024
1 parent 16a408a commit 1b5716c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/bookshelf/src/bksw_conf.erl
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ ssl() ->
envy:get(bookshelf, ssl, false, boolean).

ssl_opts() ->
envy:get(bookshelf, ssl_opts, [], list).
lists:uniq([{verify, verify_none} | envy:get(bookshelf, ssl_opts, [], list)]).

keys() ->
{ok, AWSAccessKey} = chef_secrets:get(<<"bookshelf">>, <<"access_key_id">>),
Expand Down
2 changes: 1 addition & 1 deletion src/oc_bifrost/apps/bifrost/src/bifrost_sup.erl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ init([]) ->
Ip = envy:get(bifrost, ip, string),
Port = envy:get(bifrost, port, integer),
Ssl = envy:get(bifrost, ssl, false, boolean),
SslOpts = envy:get(bifrost, ssl_opts, [], list),
SslOpts = lists:uniq([{verify, verify_none} | envy:get(bifrost, ssl_opts, [], list)]),
{ok, Dispatch} = file:consult(filename:join([code:priv_dir(bifrost),
"dispatch.conf"])),

Expand Down
2 changes: 1 addition & 1 deletion src/oc_erchef/apps/chef_objects/src/chef_s3.erl
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ get_external_config(VHostUrl) ->
aws_config(S3Url) ->
{ok, S3AccessKeyId} = chef_secrets:get(<<"bookshelf">>, <<"access_key_id">>),
{ok, S3SecretKeyId} = chef_secrets:get(<<"bookshelf">>, <<"secret_access_key">>),
SslOpts = envy:get(chef_objects, s3_ssl_opts, [], list),
SslOpts = lists:uniq([{verify, verify_none} | envy:get(chef_objects, s3_ssl_opts, [], list)]),
PathOrVhost = envy:get(chef_objects, s3_url_type, path, atom),
mini_s3:new(erlang:binary_to_list(S3AccessKeyId), erlang:binary_to_list(S3SecretKeyId), S3Url, PathOrVhost, SslOpts).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ authenticate(User, Password) ->
Result.

maybe_ssl_options(simple_tls, Options) ->
Options ++ [{ssl, true}];
lists:uniq([{verify, verify_none}, {ssl, true} | Options]);
maybe_ssl_options(_, Options) ->
Options.

Expand Down
2 changes: 1 addition & 1 deletion src/oc_erchef/apps/oc_chef_wm/src/oc_chef_wm_sup.erl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ init([]) ->
Ip = envy:get(oc_chef_wm, ip, string),
Port = envy:get(oc_chef_wm, port, pos_integer),
Ssl = envy:get(oc_chef_wm, ssl, false, boolean),
SslOpts = envy:get(oc_chef_wm, ssl_opts, [], list),
SslOpts = lists:uniq([{verify, verify_none} | envy:get(oc_chef_wm, ssl_opts, [], list)]),

WebConfig = [
{ip, Ip},
Expand Down

0 comments on commit 1b5716c

Please sign in to comment.