Skip to content

moving missing alias entries for securit providers to warnings #1227

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

Merged
merged 1 commit into from
Oct 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
ERROR_ATTRIBUTE_PATH_TOKEN_REQUIRED = 4022
ERROR_ATTRIBUTE_WRONG_DEFAULT_VALUE = 4023
ERROR_ATTRIBUTE_MUST_BE_NO_NAME = 4024
ERROR_FLATTENED_MBEAN_ATTRIBUTE_ERROR = 4025

MSG_MAP = {
TESTED_MBEAN_FOLDER: 'Verified',
Expand Down Expand Up @@ -135,7 +136,8 @@
ERROR_CANNOT_TEST_MBEAN_UNSPECIFIED: 'Unspecified problem',
ERROR_CANNOT_TEST_MBEAN_CD: 'Cannot create MBean',
ERROR_FAILURE_ATTRIBUTE_UNEXPECTED: 'Unexpected condition for attribute',
ERROR_ATTRIBUTE_PASSWORD_NOT_MARKED: 'Attribute not marked as password'
ERROR_ATTRIBUTE_PASSWORD_NOT_MARKED: 'Attribute not marked as password',
ERROR_FLATTENED_MBEAN_ATTRIBUTE_ERROR: 'Attribute exists for flattened folder in aliases'
}
MSG_ID = 'id'
LOCATION = 'location'
Expand Down Expand Up @@ -537,6 +539,12 @@ def _does_alias_attribute_exist(self, location, generated_attribute, generated_a
elif self._is_generated_attribute_readonly(location, generated_attribute, generated_attribute_info):
self._add_error(location, ERROR_ATTRIBUTE_ALIAS_NOT_FOUND_IS_READONLY,
attribute=generated_attribute, message=message)
elif location.get_folder_path().startswith('/SecurityConfiguration/Realm'):
# We are not fully implementing Security Providers and only intend to
# add attributes as customers need them so make these warnings.
#
self._add_warning(location, ERROR_ATTRIBUTE_ALIAS_NOT_FOUND,
attribute=generated_attribute, message=message)
else:
self._add_error(location, ERROR_ATTRIBUTE_ALIAS_NOT_FOUND,
attribute=generated_attribute, message=message)
Expand Down Expand Up @@ -963,7 +971,8 @@ def _check_attribute_list_for_flattened(self, location, attributes):
if len(attributes) > 0:
self._add_error(location, ERROR_FLATTENED_MBEAN_HAS_ATTRIBUTES)
for attribute in attributes:
self._add_error(location, ERROR_ATTRIBUTE_ALIAS_NOT_FOUND, attribute=attribute)
message = 'Flattened location %s has attribute %s' % (location.get_folder_path(), attribute)
self._add_error(location, ERROR_FLATTENED_MBEAN_ATTRIBUTE_ERROR, message=message, attribute=attribute)

def _check_single_folder(self, dictionary, location, is_flattened_folder):
"""
Expand Down