Skip to content

Make settings for validate_common_name saner #355

@lordnull

Description

@lordnull

Best demonstrated by example. Take replication's peer_common_name_acl. By default:

{peer_common_name_acl, "*"}

Some users will see this and attempt to update it:

{peer_common_name_acl, "*.example.com"}

This will blow up when a peer attempts to connect as there is no function clause to handle raw erlang strings other that "*" (see https://github.com/basho/riak_repl/blob/master/src/riak_repl_util.erl#L496-L523 ).

Furthermore, with the upcoming cuttlefish changes, having two different data types for one configuration options will make support that configuration additionally complex.

The proposed change is:

  • Change the default from "" to [""].
  • Change the validation function to not special case "", but instead special case ["" | _Filters].
  • Add documentation stating that "" in the acl list is the same as "" being the only item in the list
  • Using cuttlefish syntax: replication.peer_common_name_acl.0 = *

Thanks to @joecaswell for the issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions