]
Ondrej Kotek updated WFWIP-374:
-------------------------------
Summary: (secret-key-)credential-store overwrites existing aliases when generating or
importing keys (was: credential-store overwrites existing aliases when generating or
importing keys)
(secret-key-)credential-store overwrites existing aliases when
generating or importing keys
-------------------------------------------------------------------------------------------
Key: WFWIP-374
URL:
https://issues.redhat.com/browse/WFWIP-374
Project: WildFly WIP
Issue Type: Bug
Components: Security
Reporter: Ondrej Kotek
Assignee: Darran Lofthouse
Priority: Critical
The Elytron {{credential-store}} resource overwrites existing aliases when generating or
importing keys, this is not consistent with the behaviour of the {{add-alias}} operation.
{noformat}
[standalone@localhost:9990 /]
/subsystem=elytron/credential-store=a:generate-secret-key(alias=a1)
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=elytron/credential-store=a:read-aliases
{
"outcome" => "success",
"result" => ["a1"]
}
[standalone@localhost:9990 /]
/subsystem=elytron/credential-store=a:generate-secret-key(alias=a1)
{"outcome" => "success"}
-------------------------
[standalone@localhost:9990 /]
/subsystem=elytron/credential-store=a:export-secret-key(alias=a2)
{
"outcome" => "success",
"result" => {"key" =>
"RUxZAUuJqp+mNwIEDMrUz0iK6dyG"}
}
[standalone@localhost:9990 /]
/subsystem=elytron/credential-store=a:import-secret-key(alias=a2,key=RUxZAUuJqp+mNwIEDMrUz0iK6dyG)
{"outcome" => "success"}
-------------------------
[standalone@localhost:9990 /]
/subsystem=elytron/credential-store=a:add-alias(alias=a2,secret-value=a2)
{"outcome" => "success"}
[standalone@localhost:9990 /]
/subsystem=elytron/credential-store=a:add-alias(alias=a2,secret-value=a2)
{
"outcome" => "failed",
"failure-description" => "WFLYELY00913: Credential alias
'a2' of credential type
'org.wildfly.security.credential.PasswordCredential' already exists in the
store",
"rolled-back" => true
}
{noformat}