[jboss-jira] [JBoss JIRA] (WFLY-8268) Obtain password from external source (CMD, EXT) doesn't work on Windows.

Hynek Švábek (JIRA) issues at jboss.org
Wed Mar 1 09:54:02 EST 2017


     [ https://issues.jboss.org/browse/WFLY-8268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hynek Švábek updated WFLY-8268:
-------------------------------
    Description: 
Obtain password from external source (CMD, EXT) doesn't work on Windows.

Try to create new CS which obtains password from external source:
{code}
/subsystem=elytron/credential-store=myCredStore:add(uri="cr-store://test/myCredStore.jceks?create=true", credential-reference={clear-text="{CMD}C:\path\to\scrit\pass.bat,VerySecretPassword", type=COMMAND}, relative-to=jboss.server.config.dir)

pass.bat file contains only this
{code}
echo %1
{code}

Because of https://issues.jboss.org/browse/JBEAP-9211 you must do this extra step:
Add new alias to CS -> JCEKS file is created


Please try it open directly with pass "VerySecretPassword" -> *it doesn't work* on Windows.

In my opinion there is problem with back slashes in script path.
https://github.com/wildfly/wildfly-core/blob/3.0.0.Alpha22/controller/src/main/java/org/jboss/as/controller/security/CredentialReference.java#L198

Because when I add there back slashed to path then it works.

  was:
Obtain password from external source (CMD, EXT) doesn't work on Windows.

Try to create new CS which obtains password from external source:
{code}
/subsystem=elytron/credential-store=myCredStore:add(uri="cr-store://test/myCredStore.jceks?create=true", credential-reference={clear-text="{CMD}C:\path\to\scrit\pass.bat,VerySecretPassword", type=COMMAND}, relative-to=jboss.server.config.dir)

pass.bat file contains only this
{code}
echo %1
{code}

Because of https://issues.jboss.org/browse/JBEAP-9211 you must do this extra step:
Now you add new alias to CS -> JCEKS file is created


Please try it open directly with pass "VerySecretPassword" -> *it doesn't work* on Windows.

In my opinion there is problem with back slashes in script path.
https://github.com/wildfly/wildfly-core/blob/3.0.0.Alpha22/controller/src/main/java/org/jboss/as/controller/security/CredentialReference.java#L198

Because when I add there back slashed to path then it works.



> Obtain password from external source (CMD, EXT) doesn't work on Windows.
> ------------------------------------------------------------------------
>
>                 Key: WFLY-8268
>                 URL: https://issues.jboss.org/browse/WFLY-8268
>             Project: WildFly
>          Issue Type: Bug
>          Components: Security
>            Reporter: Hynek Švábek
>            Assignee: Darran Lofthouse
>
> Obtain password from external source (CMD, EXT) doesn't work on Windows.
> Try to create new CS which obtains password from external source:
> {code}
> /subsystem=elytron/credential-store=myCredStore:add(uri="cr-store://test/myCredStore.jceks?create=true", credential-reference={clear-text="{CMD}C:\path\to\scrit\pass.bat,VerySecretPassword", type=COMMAND}, relative-to=jboss.server.config.dir)
> pass.bat file contains only this
> {code}
> echo %1
> {code}
> Because of https://issues.jboss.org/browse/JBEAP-9211 you must do this extra step:
> Add new alias to CS -> JCEKS file is created
> Please try it open directly with pass "VerySecretPassword" -> *it doesn't work* on Windows.
> In my opinion there is problem with back slashes in script path.
> https://github.com/wildfly/wildfly-core/blob/3.0.0.Alpha22/controller/src/main/java/org/jboss/as/controller/security/CredentialReference.java#L198
> Because when I add there back slashed to path then it works.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)



More information about the jboss-jira mailing list