You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Adel Boutros <Ad...@live.com> on 2016/12/22 11:31:13 UTC

[Qpid Java Broker - 6.0.4]

Hello,


While using the broker, it seems the JDBC password in the case of a JDBC Message Store cannot be passed as a system property. If I set the password manually in the config.json, it works.

Can you please check? (I can provide a patch if needed however I would need to point me where it is in the code)


In the below example, JDBC_PASSWORD is never replaced by it's value (empty string), instead the string "${JDBC_PASSWORD}" is passed


Start command

---------------------

qpid-server.bat -props messaging.properties


messaging.properties

----------------------------

JDBC_URL=jdbc:derby:target/memdb-266521489264643;create=true
JDBC_USERNAME=
JDBC_PASSWORD=

default/config/config.json
---------------------------------
  "type" : "JDBC",
  "connectionUrl" : "${JDBC_URL}",
  "username" : "${JDBC_USERNAME}",
  "password" : "${JDBC_PASSWORD}",

PS:
1- I have my own Configuration Encryptor and I debugged it and noticed the string "${JDBC_PASSWORD}" is passed  instead of "" as an argument to the decrypt method
2- It works fine for the other properties (JDBC_URL, JDBC_USERNAME)

Regards,
Adel


Re: [Qpid Java Broker - 6.0.4]

Posted by Adel Boutros <Ad...@live.com>.
Thanks and I confirm it works [?]

Adel

________________________________
From: Rob Godfrey <ro...@gmail.com>
Sent: Thursday, December 22, 2016 3:53:33 PM
To: users@qpid.apache.org
Subject: Re: [Qpid Java Broker - 6.0.4]

This is the contract and won't change

-- Rob

On 22 December 2016 at 13:24, Adel Boutros <Ad...@live.com> wrote:

> I thought about doing that but I wanted to make sure interpolation was not
> done before hand.
>
>
> Is this contract ("interpolation (converting ${var} variables into their
> representation) is only performed after secret decryption") valid
> indefinitely or might it change in the future?
>
>
> Regards,
>
> Adel
>
> ________________________________
> From: Rob Godfrey <ro...@gmail.com>
> Sent: Thursday, December 22, 2016 1:40:49 PM
> To: users@qpid.apache.org
> Subject: Re: [Qpid Java Broker - 6.0.4]
>
> It's not that the password cannot be set as a system property, it is that
> interpolation (converting ${var} variables into their representation) is
> only performed after secret decryption... so if you want your configuration
> decrypter to work on values that may be held in system properties, then
> your decrypter will have to do the variable expansion itself.
>
> Hope this helps,
> Rob
>
> On 22 December 2016 at 12:31, Adel Boutros <Ad...@live.com> wrote:
>
> > Hello,
> >
> >
> > While using the broker, it seems the JDBC password in the case of a JDBC
> > Message Store cannot be passed as a system property. If I set the
> password
> > manually in the config.json, it works.
> >
> > Can you please check? (I can provide a patch if needed however I would
> > need to point me where it is in the code)
> >
> >
> > In the below example, JDBC_PASSWORD is never replaced by it's value
> (empty
> > string), instead the string "${JDBC_PASSWORD}" is passed
> >
> >
> > Start command
> >
> > ---------------------
> >
> > qpid-server.bat -props messaging.properties
> >
> >
> > messaging.properties
> >
> > ----------------------------
> >
> > JDBC_URL=jdbc:derby:target/memdb-266521489264643;create=true
> > JDBC_USERNAME=
> > JDBC_PASSWORD=
> >
> > default/config/config.json
> > ---------------------------------
> >   "type" : "JDBC",
> >   "connectionUrl" : "${JDBC_URL}",
> >   "username" : "${JDBC_USERNAME}",
> >   "password" : "${JDBC_PASSWORD}",
> >
> > PS:
> > 1- I have my own Configuration Encryptor and I debugged it and noticed
> the
> > string "${JDBC_PASSWORD}" is passed  instead of "" as an argument to the
> > decrypt method
> > 2- It works fine for the other properties (JDBC_URL, JDBC_USERNAME)
> >
> > Regards,
> > Adel
> >
> >
>

Re: [Qpid Java Broker - 6.0.4]

Posted by Rob Godfrey <ro...@gmail.com>.
This is the contract and won't change

-- Rob

On 22 December 2016 at 13:24, Adel Boutros <Ad...@live.com> wrote:

> I thought about doing that but I wanted to make sure interpolation was not
> done before hand.
>
>
> Is this contract ("interpolation (converting ${var} variables into their
> representation) is only performed after secret decryption") valid
> indefinitely or might it change in the future?
>
>
> Regards,
>
> Adel
>
> ________________________________
> From: Rob Godfrey <ro...@gmail.com>
> Sent: Thursday, December 22, 2016 1:40:49 PM
> To: users@qpid.apache.org
> Subject: Re: [Qpid Java Broker - 6.0.4]
>
> It's not that the password cannot be set as a system property, it is that
> interpolation (converting ${var} variables into their representation) is
> only performed after secret decryption... so if you want your configuration
> decrypter to work on values that may be held in system properties, then
> your decrypter will have to do the variable expansion itself.
>
> Hope this helps,
> Rob
>
> On 22 December 2016 at 12:31, Adel Boutros <Ad...@live.com> wrote:
>
> > Hello,
> >
> >
> > While using the broker, it seems the JDBC password in the case of a JDBC
> > Message Store cannot be passed as a system property. If I set the
> password
> > manually in the config.json, it works.
> >
> > Can you please check? (I can provide a patch if needed however I would
> > need to point me where it is in the code)
> >
> >
> > In the below example, JDBC_PASSWORD is never replaced by it's value
> (empty
> > string), instead the string "${JDBC_PASSWORD}" is passed
> >
> >
> > Start command
> >
> > ---------------------
> >
> > qpid-server.bat -props messaging.properties
> >
> >
> > messaging.properties
> >
> > ----------------------------
> >
> > JDBC_URL=jdbc:derby:target/memdb-266521489264643;create=true
> > JDBC_USERNAME=
> > JDBC_PASSWORD=
> >
> > default/config/config.json
> > ---------------------------------
> >   "type" : "JDBC",
> >   "connectionUrl" : "${JDBC_URL}",
> >   "username" : "${JDBC_USERNAME}",
> >   "password" : "${JDBC_PASSWORD}",
> >
> > PS:
> > 1- I have my own Configuration Encryptor and I debugged it and noticed
> the
> > string "${JDBC_PASSWORD}" is passed  instead of "" as an argument to the
> > decrypt method
> > 2- It works fine for the other properties (JDBC_URL, JDBC_USERNAME)
> >
> > Regards,
> > Adel
> >
> >
>

Re: [Qpid Java Broker - 6.0.4]

Posted by Adel Boutros <Ad...@live.com>.
I thought about doing that but I wanted to make sure interpolation was not done before hand.


Is this contract ("interpolation (converting ${var} variables into their representation) is only performed after secret decryption") valid indefinitely or might it change in the future?


Regards,

Adel

________________________________
From: Rob Godfrey <ro...@gmail.com>
Sent: Thursday, December 22, 2016 1:40:49 PM
To: users@qpid.apache.org
Subject: Re: [Qpid Java Broker - 6.0.4]

It's not that the password cannot be set as a system property, it is that
interpolation (converting ${var} variables into their representation) is
only performed after secret decryption... so if you want your configuration
decrypter to work on values that may be held in system properties, then
your decrypter will have to do the variable expansion itself.

Hope this helps,
Rob

On 22 December 2016 at 12:31, Adel Boutros <Ad...@live.com> wrote:

> Hello,
>
>
> While using the broker, it seems the JDBC password in the case of a JDBC
> Message Store cannot be passed as a system property. If I set the password
> manually in the config.json, it works.
>
> Can you please check? (I can provide a patch if needed however I would
> need to point me where it is in the code)
>
>
> In the below example, JDBC_PASSWORD is never replaced by it's value (empty
> string), instead the string "${JDBC_PASSWORD}" is passed
>
>
> Start command
>
> ---------------------
>
> qpid-server.bat -props messaging.properties
>
>
> messaging.properties
>
> ----------------------------
>
> JDBC_URL=jdbc:derby:target/memdb-266521489264643;create=true
> JDBC_USERNAME=
> JDBC_PASSWORD=
>
> default/config/config.json
> ---------------------------------
>   "type" : "JDBC",
>   "connectionUrl" : "${JDBC_URL}",
>   "username" : "${JDBC_USERNAME}",
>   "password" : "${JDBC_PASSWORD}",
>
> PS:
> 1- I have my own Configuration Encryptor and I debugged it and noticed the
> string "${JDBC_PASSWORD}" is passed  instead of "" as an argument to the
> decrypt method
> 2- It works fine for the other properties (JDBC_URL, JDBC_USERNAME)
>
> Regards,
> Adel
>
>

Re: [Qpid Java Broker - 6.0.4]

Posted by Rob Godfrey <ro...@gmail.com>.
It's not that the password cannot be set as a system property, it is that
interpolation (converting ${var} variables into their representation) is
only performed after secret decryption... so if you want your configuration
decrypter to work on values that may be held in system properties, then
your decrypter will have to do the variable expansion itself.

Hope this helps,
Rob

On 22 December 2016 at 12:31, Adel Boutros <Ad...@live.com> wrote:

> Hello,
>
>
> While using the broker, it seems the JDBC password in the case of a JDBC
> Message Store cannot be passed as a system property. If I set the password
> manually in the config.json, it works.
>
> Can you please check? (I can provide a patch if needed however I would
> need to point me where it is in the code)
>
>
> In the below example, JDBC_PASSWORD is never replaced by it's value (empty
> string), instead the string "${JDBC_PASSWORD}" is passed
>
>
> Start command
>
> ---------------------
>
> qpid-server.bat -props messaging.properties
>
>
> messaging.properties
>
> ----------------------------
>
> JDBC_URL=jdbc:derby:target/memdb-266521489264643;create=true
> JDBC_USERNAME=
> JDBC_PASSWORD=
>
> default/config/config.json
> ---------------------------------
>   "type" : "JDBC",
>   "connectionUrl" : "${JDBC_URL}",
>   "username" : "${JDBC_USERNAME}",
>   "password" : "${JDBC_PASSWORD}",
>
> PS:
> 1- I have my own Configuration Encryptor and I debugged it and noticed the
> string "${JDBC_PASSWORD}" is passed  instead of "" as an argument to the
> decrypt method
> 2- It works fine for the other properties (JDBC_URL, JDBC_USERNAME)
>
> Regards,
> Adel
>
>