Skip to content

Support GovCloud#17

Open
axelson wants to merge 1 commit intovoltone:mainfrom
felt:add-govcloud-support
Open

Support GovCloud#17
axelson wants to merge 1 commit intovoltone:mainfrom
felt:add-govcloud-support

Conversation

@axelson
Copy link
Copy Markdown

@axelson axelson commented Jul 15, 2025

Fixes #16

Adds GovCloud bundle and allows choosing between them, e.g. with AwsRdsCAStore.ssl_opts(database_url, aws_partition: :govcloud)

The GovCloud bundle comes from https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html

Copy link
Copy Markdown
Owner

@voltone voltone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the proposal! Does GovCloud use these roots for RDS, or also for other things? In the normal RDS environments they use dedicated root CAs for the RDS service, independent of the normal (public) root CA, for things like public host certificates.

There is now quite a lot of duplication in the Mix task, including the bundles variable (which also has some inconsistencies in use of string literals, module attributes and function calls). Do you think you can clean that up a bit, or shall I?

Comment thread lib/aws_rds_castore.ex
Comment on lines -39 to +41
def ssl_opts(url_or_hostname) when is_list(url_or_hostname) do
ssl_opts(List.to_string(url_or_hostname))
end

def ssl_opts(url_or_hostname) do
def ssl_opts(url_or_hostname, opts \\ []) when is_list(url_or_hostname) and is_list(opts) do
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now no longer accepts a binary as the first argument, it only accepts a charlist

Comment thread src/aws_rds_castore.erl
file_path(aws).

file_path(aws) ->
PrivDir = code:lib_dir(aws_rds_castore, priv),
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just merged #18 that changes how the path is built. Can you please rebase on main?

Comment thread src/aws_rds_castore.erl
ssl_opts(Hostname, []).

%% Returns a set of `:ssl` transport options for certificate verification with options.
ssl_opts(Hostname, Options) when is_binary(Hostname) ->
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, so now Erlang supports binaries, but Elixir no longer does :)

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.

Support for GovCloud

2 participants