diff --git a/irrd/conf/default_config.yaml b/irrd/conf/default_config.yaml index a99d7d22e..748c615c3 100644 --- a/irrd/conf/default_config.yaml +++ b/irrd/conf/default_config.yaml @@ -45,6 +45,11 @@ irrd: auth: gnupg_keyring: null authenticate_parents_route_creation: true + set_creation: + COMMON: + prefix_required: true + autnum_authentication: opportunistic + email: footer: '' notification_header: | diff --git a/irrd/updates/parser_state.py b/irrd/updates/parser_state.py index 7566080b6..acaf918cf 100644 --- a/irrd/updates/parser_state.py +++ b/irrd/updates/parser_state.py @@ -34,6 +34,4 @@ def for_set_name(set_name: str): setting = get_setting(f'auth.set_creation.{set_name}.autnum_authentication') if not setting: setting = get_setting(f'auth.set_creation.{AUTH_SET_CREATION_COMMON_KEY}.autnum_authentication') - if not setting: - return RPSLSetAutnumAuthenticationMode.DISABLED return getattr(RPSLSetAutnumAuthenticationMode, setting.upper()) diff --git a/irrd/updates/tests/test_validators.py b/irrd/updates/tests/test_validators.py index d203f8ce9..c27880fa1 100644 --- a/irrd/updates/tests/test_validators.py +++ b/irrd/updates/tests/test_validators.py @@ -455,8 +455,7 @@ def test_as_set_autnum_disabled(self, prepare_mocks, config_override): ['rpsl_pks', ({'TEST-MNT'},), {}], ] - def test_as_set_autnum_opportunistic_exists(self, prepare_mocks, config_override): - config_override({'auth': {'set_creation': {'as-set': {'autnum_authentication': 'opportunistic'}}}}) + def test_as_set_autnum_opportunistic_exists_default(self, prepare_mocks, config_override): validator, mock_dq, mock_dh = prepare_mocks as_set = rpsl_object_from_text(SAMPLE_AS_SET) assert as_set.clean_for_create() # fill pk_asn_segment @@ -506,11 +505,6 @@ def test_as_set_autnum_opportunistic_exists(self, prepare_mocks, config_override result = validator.process_auth(as_set, None) assert result.is_valid() - # Default is disabled - config_override({}) - result = validator.process_auth(as_set, None) - assert result.is_valid() - def test_as_set_autnum_opportunistic_does_not_exist(self, prepare_mocks, config_override): config_override({'auth': {'set_creation': { AUTH_SET_CREATION_COMMON_KEY: {'autnum_authentication': 'opportunistic'}