]
Brian Stansberry commented on WFCORE-3041:
------------------------------------------
This comment has nothing to do with how to fix this JIRA; this is just my place to say
this:
Going forward, please don't do stuff like this "default value of an attribute is
the name of the resource" thing again. It results in difficult to maintain software
and an API whose behavior is unintuitive and cannot be described via the standard
metadata. It forces use of custom subsystem code and thus makes it harder to convert
subsystem development to a largely declarative mechanism and with very specific plug
points for custom code.
Cannot add policy resource with no parameter
--------------------------------------------
Key: WFCORE-3041
URL:
https://issues.jboss.org/browse/WFCORE-3041
Project: WildFly Core
Issue Type: Bug
Components: Security
Reporter: Claudio Miranda
Assignee: Michal Petrov
subsystem=elytron/policy resources has no required attributes, but it fails to add a
resource with no parameters.
{code}
/profile=full/subsystem=elytron/policy=policy_test:add
{
"outcome" => "failed",
"result" => undefined,
"failure-description" => {"WFLYDC0074: Operation failed or was
rolled back on all servers. Server failures:" => {"server-group" =>
{"main-server-group" => {"host" => {"master" =>
{"server-one" => "Could find policy provider with name
[policy_test]"}}}}}},
"rolled-back" => true,
"server-groups" => {"main-server-group" =>
{"host" => {"master" => {"server-one" =>
{"response" => {
"outcome" => "failed",
"failure-description" => "Could find policy provider with name
[policy_test]",
"rolled-back" => true
}}}}}}
}
{code}
To add is necessary to inform either custom-policy or jacc-policy
{code}
/profile=full/subsystem=elytron/policy=policy2:add(jacc-policy=[{name=policy2}])
{
"outcome" => "success",
"result" => undefined,
"server-groups" => {"main-server-group" =>
{"host" => {"master" => {"server-one" =>
{"response" => {
"outcome" => "success",
"response-headers" => {
"operation-requires-reload" => true,
"process-state" => "reload-required"
}
}}}}}}
}
{code}
There is also a problem related to "default-policy" being set to a non existent
policy.