Let me give you some examples:
Create credential store named "test":
/subsystem=elytron/credential-store=test:add(location=test.storage, relative-to=jboss.server.data.dir, credential-reference={clear-text="secret2"}, create=true)
Add alias "my_db_password" with secret value "supersecret":
/subsystem=elytron/credential-store=test:add-alias(alias="my_db_password", secret-value="supersecret")
Check presence of aliases:
/subsystem=elytron/credential-store=test:read-aliases()
Change secret value attached to an alias:
/subsystem=elytron/credential-store=test:set-secret(alias="my_db_password", secret-value="notsosecret")
There is a reload operation which can be used in case the storage file was modified by outside process. Credential store "test" has to be reloaded the change can take the effect:
/subsystem=elytron/credential-store=test:reload()
Finally we can demonstrate removal of the alias from credential store "test":
/subsystem=elytron/credential-store=test:remove-alias(alias="my_db_password")
No comments:
Post a Comment