Skip to content
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

ssoadm can't change description and displayName attributes in Policy Sets #91

Open
minnoroth opened this issue Apr 19, 2023 · 0 comments

Comments

@minnoroth
Copy link
Contributor

ssoadm tools can't create/update Policy Set's description and displayName attributes.
Subcommands create-appl, set-appl ignore properties description and displayName both from --datafile (-D) and from --attributevalues (-a)

protected void setApplicationAttributes(Application appl,
Map<String, Set<String>> attributeValues,
boolean bCreate) throws CLIException {
Set<String> resourceTypeUuids = attributeValues.get(ATTR_RESOURCE_TYPE_UUIDS);
if ((resourceTypeUuids == null) || resourceTypeUuids.isEmpty()) {
if (bCreate) {
throw new CLIException(getResourceString("resourceTypeUuids-required"),
ExitCodes.REQUEST_CANNOT_BE_PROCESSED);
}
} else {
appl.addAllResourceTypeUuids(resourceTypeUuids);
}
Set<String> subjects = attributeValues.get(ATTR_SUBJECTS);
if ((subjects == null) || subjects.isEmpty()) {
if (bCreate) {
throw new CLIException(getResourceString("subjects-required"),
ExitCodes.REQUEST_CANNOT_BE_PROCESSED);
}
} else {
appl.setSubjects(subjects);
}
Set<String> conditions = attributeValues.get(ATTR_CONDITIONS);
if ((conditions == null) || conditions.isEmpty()) {
if (bCreate) {
throw new CLIException(getResourceString("conditions-required"),
ExitCodes.REQUEST_CANNOT_BE_PROCESSED);
}
} else {
appl.setConditions(conditions);
}
Class entitlementCombiner = getEntitlementCombiner(
attributeValues);
if (entitlementCombiner == null) {
if (bCreate) {
throw new CLIException(getResourceString(
"entitlement-combiner-required"),
ExitCodes.REQUEST_CANNOT_BE_PROCESSED);
}
} else {
appl.setEntitlementCombiner(entitlementCombiner);
}
Set<String> names = attributeValues.get(ATTR_SUBJECT_ATTRIBUTE_NAMES);
if ((names != null) && !names.isEmpty()) {
appl.setAttributeNames(names);
}
Class resourceComparator = getResourceComparator(attributeValues);
if (resourceComparator != null) {
try {
appl.setResourceComparator(resourceComparator);
} catch (InstantiationException ex) {
throw new CLIException(ex,
ExitCodes.REQUEST_CANNOT_BE_PROCESSED);
} catch (IllegalAccessException ex) {
throw new CLIException(ex,
ExitCodes.REQUEST_CANNOT_BE_PROCESSED);
}
}
Class saveIndex = getSaveIndex(attributeValues);
if (saveIndex != null) {
try {
appl.setSaveIndex(saveIndex);
} catch (InstantiationException ex) {
throw new CLIException(ex,
ExitCodes.REQUEST_CANNOT_BE_PROCESSED);
} catch (IllegalAccessException ex) {
throw new CLIException(ex,
ExitCodes.REQUEST_CANNOT_BE_PROCESSED);
}
}
Class searchIndex = getSearchIndex(attributeValues);
if (searchIndex != null) {
try {
appl.setSearchIndex(searchIndex);
} catch (InstantiationException ex) {
throw new CLIException(ex,
ExitCodes.REQUEST_CANNOT_BE_PROCESSED);
} catch (IllegalAccessException ex) {
throw new CLIException(ex,
ExitCodes.REQUEST_CANNOT_BE_PROCESSED);
}
}
}

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

No branches or pull requests

1 participant