]
Darran Lofthouse moved WFLY-7907 to WFCORE-2429:
------------------------------------------------
Project: WildFly Core (was: WildFly)
Key: WFCORE-2429 (was: WFLY-7907)
Component/s: Security
(was: Security)
CLI command for update CredentialReference should fail rather then
pass.
------------------------------------------------------------------------
Key: WFCORE-2429
URL:
https://issues.jboss.org/browse/WFCORE-2429
Project: WildFly Core
Issue Type: Bug
Components: Security
Reporter: Hynek Švábek
Assignee: Peter Skopek
CLI command for update CredentialReference should fail rather then pass.
Because CLI command doesn't persist any data to configuration file but pass.
I expect that command would fail and shows some error message.
*How to reproduce*
{code}
/subsystem=elytron/credential-store=credS004:add(uri="cr-store://test/credS004.jceks?create.storage=true",
credential-reference={clear-text=pass987}, relative-to=jboss.server.data.dir)
{code}
{code}
/subsystem=elytron/credential-store=credS004:write-attribute(name=credential-reference.store,
value=credS002)
{code}
*AND*
{code}
/subsystem=elytron/credential-store=credS004:write-attribute(name=credential-reference.alias,
value=credS002)
{code}
*Ends with success, but it has to be a failure*
These commands could lead to inconsistency.
Because there is valid state to have
credential-reference={clear-text=pass987}
and credential-reference={store=cs, alias=alias}
but not their combination.
*I can use this right form of command*
{code}
/subsystem=elytron/credential-store=credS004:write-attribute(name=credential-reference,
value={store=credS002, alias=jimmy})
{code}
Now is everything OK.